move IsFuzzing to comphelper

and try something a bit more generic

Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Caolán McNamara
2023-12-30 12:45:45 +01:00
parent 2c8e9ed3cb
commit f0a8b5b81d
175 changed files with 425 additions and 410 deletions
+1 -1
View File
@@ -31,10 +31,10 @@ $(eval $(call gb_Library_use_external,canvasfactory,boost_headers))
$(eval $(call gb_Library_use_sdk_api,canvasfactory))
$(eval $(call gb_Library_use_libraries,canvasfactory,\
comphelper \
cppu \
cppuhelper \
sal \
utl \
vcl \
))
+2 -2
View File
@@ -38,7 +38,7 @@
#include <o3tl/functional.hxx>
#include <o3tl/string_view.hxx>
#include <vcl/skia/SkiaHelper.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -113,7 +113,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
m_bCacheHasUseAcceleratedEntry(),
m_bCacheHasUseAAEntry()
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
try
{
+23 -4
View File
@@ -183,9 +183,10 @@ css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue(OUStrin
std::scoped_lock aGuard(maMutex);
if (mbDisposed)
throw css::lang::DisposedException();
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
return css::uno::Any();
#else
// should be short-circuited in ConfigurationProperty::get()
assert(!comphelper::IsFuzzing());
// Cache the configuration access, since some of the keys are used in hot code.
auto it = maPropertyCache.find(path);
if( it != maPropertyCache.end())
@@ -201,7 +202,6 @@ css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue(OUStrin
css::uno::Any property = access->getByName(childName);
maPropertyCache.emplace(path, property);
return property;
#endif
}
void comphelper::detail::ConfigurationWrapper::setPropertyValue(
@@ -332,4 +332,23 @@ void SAL_CALL comphelper::ConfigurationListener::propertyChange(
}
}
namespace comphelper {
static bool bIsFuzzing = false;
#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
bool IsFuzzing()
{
return bIsFuzzing;
}
#endif
void EnableFuzzing()
{
bIsFuzzing = true;
LanguageTag::disable_lt_tag_parse();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+2 -2
View File
@@ -41,7 +41,7 @@
#include <comphelper/servicehelper.hxx>
#include <o3tl/string_view.hxx>
#include <comphelper/string.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbhelper.hxx>
#include <comphelper/types.hxx>
@@ -1383,7 +1383,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
bool ODbaseTable::HasMemoFields() const
{
return m_aHeader.type > dBaseIV && !utl::ConfigManager::IsFuzzing();
return m_aHeader.type > dBaseIV && !comphelper::IsFuzzing();
}
// creates in principle dBase III file format
@@ -32,7 +32,7 @@
#include <com/sun/star/ucb/XContentIdentifier.hpp>
#include <tools/urlobj.hxx>
#include <file/FCatalog.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/pathoptions.hxx>
#include <ucbhelper/content.hxx>
#include <connectivity/dbcharset.hxx>
@@ -132,7 +132,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
OUString aFileName = aDSN;
INetURLObject aURL;
aURL.SetSmartProtocol(INetProtocol::File);
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
SvtPathOptions aPathOptions;
aFileName = aPathOptions.SubstituteVariable(aFileName);
@@ -227,7 +227,7 @@ ViewInformation2D::ViewInformation2D()
if (!bForwardsAreInitialized)
{
bForwardsAreInitialized = true;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
bForwardPixelSnapHairline
= officecfg::Office::Common::Drawinglayer::SnapHorVerLinesToDiscrete::get();
@@ -356,8 +356,7 @@ void ViewInformation2D::setPixelSnapHairline(bool bNew)
static std::atomic<bool>& globalAntiAliasing()
{
static std::atomic<bool> g_GlobalAntiAliasing
= utl::ConfigManager::IsFuzzing()
|| officecfg::Office::Common::Drawinglayer::AntiAliasing::get();
= comphelper::IsFuzzing() || officecfg::Office::Common::Drawinglayer::AntiAliasing::get();
return g_GlobalAntiAliasing;
}
+2 -2
View File
@@ -31,7 +31,7 @@
#include <svtools/rtftoken.h>
#include <svtools/htmltokn.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
using namespace com::sun::star;
@@ -336,7 +336,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
{
nEsc *= 10; //HalfPoints => Twips was embezzled in RTFITEM.CXX!
SvxFont aFont;
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
{
// ofz#24932 detecting RTL vs LTR is slow
aFont = aStartPaM.GetNode()->GetCharAttribs().GetDefFont();
+2 -2
View File
@@ -66,7 +66,7 @@
#include <comphelper/flagguard.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unicode/ubidi.h>
#include <algorithm>
@@ -130,7 +130,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
mbLastTryMerge(false),
mbReplaceLeadingSingleQuotationMark(true),
mbSkipOutsideFormat(false),
mbFuzzing(utl::ConfigManager::IsFuzzing()),
mbFuzzing(comphelper::IsFuzzing()),
mbNbspRunNext(false)
{
maStatus.GetControlWord() = EEControlBits::USECHARATTRIBS | EEControlBits::DOIDLEFORMAT |
+2 -2
View File
@@ -58,7 +58,7 @@
#include <editeng/hngpnctitem.hxx>
#include <editeng/forbiddencharacterstable.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <math.h>
#include <vcl/metric.hxx>
@@ -4545,7 +4545,7 @@ const SvxLRSpaceItem& ImpEditEngine::GetLRSpaceItem( ContentNode* pNode )
// text numeral setting:
LanguageType ImpEditEngine::ImplCalcDigitLang(LanguageType eCurLang)
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return LANGUAGE_ENGLISH_US;
// #114278# Also setting up digit language from Svt options
+2 -2
View File
@@ -46,7 +46,7 @@
#include <tools/stream.hxx>
#include <tools/debug.hxx>
#include <tools/GenericTypeSerializer.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <libxml/xmlwriter.h>
#include <editeng/unonrule.hxx>
#include <sal/log.hxx>
@@ -107,7 +107,7 @@ SvxNumberType::~SvxNumberType()
OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const
{
LanguageTag aLang = utl::ConfigManager::IsFuzzing() ?
LanguageTag aLang = comphelper::IsFuzzing() ?
LanguageTag("en-US") :
Application::GetSettings().GetLanguageTag();
return GetNumStr( nNo, aLang.getLocale() );
+2 -2
View File
@@ -24,7 +24,7 @@
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/fontdefs.hxx>
#include <unotools/intlwrapper.hxx>
#include <unotools/syslocale.hxx>
@@ -764,7 +764,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if (fPoint < 0. || fPoint > 10000.)
return false;
static bool bFuzzing = utl::ConfigManager::IsFuzzing();
static bool bFuzzing = comphelper::IsFuzzing();
if (bFuzzing && fPoint > 120)
{
SAL_WARN("editeng.items", "SvxFontHeightItem ignoring font size of " << fPoint << " for performance");
+2 -2
View File
@@ -27,7 +27,7 @@
#include <svl/itempool.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <tools/debug.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/string.hxx>
@@ -629,7 +629,7 @@ SvxRTFItemStackType* SvxRTFParser::GetAttrSet_()
aAttrStack.push_back( std::move(xNew) );
if (aAttrStack.size() > 96 && utl::ConfigManager::IsFuzzing())
if (aAttrStack.size() > 96 && comphelper::IsFuzzing())
throw std::range_error("ecStackOverflow");
bNewGroup = false;
@@ -54,7 +54,7 @@
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/propertyvalue.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/securityoptions.hxx>
@@ -485,7 +485,7 @@ OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const
if ( aFilterName.isEmpty() )
{
OUString sDocumentServiceName = GetDocumentServiceName();
if (utl::ConfigManager::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT &&
if (comphelper::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT &&
sDocumentServiceName == "com.sun.star.chart2.ChartDocument")
{
return "chart8";
+2 -2
View File
@@ -26,7 +26,7 @@
#include <o3tl/sprintf.hxx>
#include <tools/stream.hxx>
#include <memory>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/graph.hxx>
#include <vcl/pdfread.hxx>
#include <rtl/bootstrap.hxx>
@@ -386,7 +386,7 @@ bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, SvStream& rStream, sal_
rPolyPoly.append( basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( nLeft, nTop, nRight, nBottom ) ) );
SAL_INFO("emfio", "\t\t" << i << " Left: " << nLeft << ", top: " << nTop << ", right: " << nRight << ", bottom: " << nBottom);
}
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
rPolyPoly = basegfx::utils::solveCrossovers(rPolyPoly);
rPolyPoly = basegfx::utils::stripNeutralPolygons(rPolyPoly);
+5 -5
View File
@@ -35,7 +35,7 @@
#include <osl/diagnose.h>
#include <vcl/virdev.hxx>
#include <o3tl/safeint.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/defaultencoding.hxx>
#include <unotools/wincodepage.hxx>
@@ -1006,7 +1006,7 @@ namespace emfio
void MtfTools::IntersectClipRect( const tools::Rectangle& rRect )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
mbClipNeedsUpdate=true;
if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0))
@@ -1020,7 +1020,7 @@ namespace emfio
void MtfTools::ExcludeClipRect( const tools::Rectangle& rRect )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
mbClipNeedsUpdate=true;
tools::Polygon aPoly( rRect );
@@ -1030,7 +1030,7 @@ namespace emfio
void MtfTools::MoveClipRegion( const Size& rSize )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
mbClipNeedsUpdate=true;
maClipPath.moveClipRegion( ImplMap( rSize ) );
@@ -1038,7 +1038,7 @@ namespace emfio
void MtfTools::SetClipPath( const tools::PolyPolygon& rPolyPolygon, RegionMode eClippingMode, bool bIsMapped )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
mbClipNeedsUpdate = true;
tools::PolyPolygon aPolyPolygon(rPolyPolygon);
+1 -1
View File
@@ -881,7 +881,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
{
css::uno::Reference< css::uno::XInterface > xCfg;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
try
{
+3 -3
View File
@@ -47,7 +47,7 @@
#include <comphelper/processfactory.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/helpers.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include "bitmap.hxx"
#include "elements.hxx"
@@ -110,7 +110,7 @@ bool CGMImpressOutAct::ImplInitPage()
bool CGMImpressOutAct::ImplCreateShape( const OUString& rType )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) );
maXShape.set( xNewShape, uno::UNO_QUERY );
@@ -390,7 +390,7 @@ void CGMImpressOutAct::InsertPage()
maXDrawPage = maXDrawPages->insertNewByIndex(0xffff);
if ( !ImplInitPage() )
mpCGM->mbStatus = false;
if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && utl::ConfigManager::IsFuzzing())
if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && comphelper::IsFuzzing())
{
// ofz#21753 that's enough pages for fuzzing, we're not doing anything productive now
mpCGM->mbStatus = false;
+2 -2
View File
@@ -19,7 +19,7 @@
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/BitmapTools.hxx>
#include <memory>
@@ -375,7 +375,7 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc )
void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest )
{
++mpCGM->mnBitmapInserts;
static const bool bFuzzing = utl::ConfigManager::IsFuzzing();
static const bool bFuzzing = comphelper::IsFuzzing();
if (bFuzzing)
{
if (rDest.mxBitmap.GetSizePixel().Height() + rSource.mnY > SAL_MAX_UINT16)
+2 -2
View File
@@ -35,7 +35,7 @@
#include <comphelper/classids.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/streamwrap.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
@@ -7196,7 +7196,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
xStorage->Commit();
xStorage.clear();
OUString aType = SfxFilter::GetTypeFromStorage( rSrcStg );
if (aType.getLength() && !utl::ConfigManager::IsFuzzing())
if (aType.getLength() && !comphelper::IsFuzzing())
{
SfxFilterMatcher aMatch( sStarName );
pFilter = aMatch.GetFilter4EA( aType );
+1 -1
View File
@@ -499,7 +499,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
}
}
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
// getting the string for the producer
OUString aProducerOverride = officecfg::Office::Common::Save::Document::GeneratorOverride::get();
+2 -1
View File
@@ -29,6 +29,7 @@
#include <com/sun/star/frame/XModel3.hpp>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <comphelper/configuration.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/bootstrap.hxx>
#include <unotools/mediadescriptor.hxx>
@@ -490,7 +491,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram
impl_appendComponentTitle (sTitle, xComponent);
#ifndef MACOSX
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
// fdo#70376: We want the window title to contain just the
// document name (from the above "component title").
+2 -2
View File
@@ -33,7 +33,7 @@
#include <comphelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/configpaths.hxx>
#include <rtl/ref.hxx>
#include <sal/log.hxx>
@@ -127,7 +127,7 @@ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::uno::XComponent
void JobExecutor::initListeners()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
// read the list of all currently registered events inside configuration.
+2 -2
View File
@@ -58,7 +58,7 @@
#include <sal/log.hxx>
#include <comphelper/errcode.hxx>
#include <vcl/threadex.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
namespace framework{
@@ -673,7 +673,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Desktop::queryDispatch( co
if ( aURL.Protocol.equalsIgnoreAsciiCase(".uno:") )
aCommand = aURL.Path;
if (!m_xCommandOptions && !utl::ConfigManager::IsFuzzing())
if (!m_xCommandOptions && !comphelper::IsFuzzing())
m_xCommandOptions.reset(new SvtCommandOptions);
// Make std::unordered_map lookup if the current URL is in the disabled list
+2 -2
View File
@@ -36,7 +36,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/enumhelper.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <utility>
namespace {
@@ -128,7 +128,7 @@ private:
ModuleManager::ModuleManager(css::uno::Reference< css::uno::XComponentContext > xContext)
: m_xContext(std::move(xContext))
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
m_xCFG.set( comphelper::ConfigurationHelper::openConfig(
m_xContext, "/org.openoffice.Setup/Office/Factories",
+2 -2
View File
@@ -20,7 +20,7 @@
#include "precompile.h"
#include <comphelper/newarray.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <sal/log.hxx>
#include <tools/long.hxx>
@@ -291,7 +291,7 @@ bool TxtBox::Read(HWPFile & hwpf)
return hwpf.SetState(HWP_InvalidFileFormat);
}
if (ncell > 4096 && utl::ConfigManager::IsFuzzing()) {
if (ncell > 4096 && comphelper::IsFuzzing()) {
// cut off at an arbitrary size to speed up fuzzing
return hwpf.SetState(HWP_InvalidFileFormat);
}
+3 -3
View File
@@ -30,7 +30,7 @@
#include <tools/stream.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include "fontmap.hxx"
#include "formula.h"
@@ -958,7 +958,7 @@ void HwpReader::makeMasterStyles()
PageSetting *pPrevSet = nullptr;
PageSetting *pPage = nullptr;
if (nMax > 512 && utl::ConfigManager::IsFuzzing())
if (nMax > 512 && comphelper::IsFuzzing())
{
SAL_WARN("filter.hwp", "too many pages: " << nMax << " clip to " << 512);
nMax = 512;
@@ -1476,7 +1476,7 @@ void HwpReader::makePageStyle()
HWPInfo& hwpinfo = hwpfile.GetHWPInfo();
int pmCount = hwpfile.getColumnCount();
if (pmCount > 512 && utl::ConfigManager::IsFuzzing())
if (pmCount > 512 && comphelper::IsFuzzing())
{
SAL_WARN("filter.hwp", "too many pages: " << pmCount << " clip to " << 512);
pmCount = 512;
+1 -1
View File
@@ -229,7 +229,7 @@ tools::Long PaperInfo::sloppyFitPageDimension(tools::Long nDimension)
PaperInfo PaperInfo::getSystemDefaultPaper()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return PaperInfo(PAPER_A4);
OUString aLocaleStr = officecfg::Setup::L10N::ooSetupSystemLocale::get();
+12
View File
@@ -192,6 +192,16 @@ private:
}
// Avoid using the config layer and rely on defaults which is only useful
// for special test tool targets (typically fuzzing) where start-up speed
// is of the essence
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
constexpr bool IsFuzzing() { return true; }
#else
COMPHELPER_DLLPUBLIC bool IsFuzzing();
#endif
COMPHELPER_DLLPUBLIC void EnableFuzzing();
/// A type-safe wrapper around a (non-localized) configuration property.
///
/// Automatically generated headers for the various configuration properties
@@ -211,6 +221,8 @@ template< typename T, typename U > struct ConfigurationProperty
/// For nillable properties, U is of type std::optional<U'>.
static U get()
{
if (comphelper::IsFuzzing())
return U();
// Folding this into one statement causes a bogus error at least with
// Red Hat GCC 4.6.2-1:
css::uno::Any a(
-10
View File
@@ -77,16 +77,6 @@ public:
SAL_DLLPRIVATE void registerConfigItem(utl::ConfigItem * item);
// Avoid using the config layer and rely on defaults which is only useful
// for special test tool targets (typically fuzzing) where start-up speed
// is of the essence
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
static constexpr bool IsFuzzing() { return true; }
#else
static bool IsFuzzing();
#endif
static void EnableFuzzing();
private:
ConfigManager(const ConfigManager&) = delete;
+2 -2
View File
@@ -67,7 +67,7 @@
#include <lwpglobalmgr.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <xfilter/xfstylemanager.hxx>
#include <xfilter/xfcell.hxx>
@@ -820,7 +820,7 @@ void LwpConnectedCellLayout::Read()
cnumcols = static_cast<sal_uInt8>(numcols);
m_nRealrowspan = cnumrows;
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
m_nRealrowspan = std::min<sal_uInt16>(m_nRealrowspan, 128);
m_nRealcolspan = cnumcols;
@@ -81,7 +81,7 @@
#include <xfilter/xfparastyle.hxx>
#include <o3tl/sorted_vector.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <algorithm>
#include <memory>
@@ -803,7 +803,7 @@ void LwpTableLayout::ParseTable()
pTableHeading->GetStartEndRow(nStartHeadRow,nEndHeadRow);
if (nStartHeadRow == 0)
{
if (utl::ConfigManager::IsFuzzing() && nEndHeadRow - nStartHeadRow > 128)
if (comphelper::IsFuzzing() && nEndHeadRow - nStartHeadRow > 128)
{
SAL_WARN("lwp", "truncating HeadingRow for fuzzing performance");
nEndHeadRow = nStartHeadRow + 128;
+2 -2
View File
@@ -8,7 +8,7 @@
*/
#include <sal/config.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include "helper/qahelper.hxx"
#include <global.hxx>
@@ -33,7 +33,7 @@ public:
public:
ScCacheTest()
{
utl::ConfigManager::EnableFuzzing();
comphelper::EnableFuzzing();
ScDLL::Init();
ScGlobal::Init();
}
+2 -2
View File
@@ -9,7 +9,7 @@
#include <sal/config.h>
#include "helper/qahelper.hxx"
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <document.hxx>
#include <docsh.hxx>
#include <global.hxx>
@@ -70,7 +70,7 @@ public:
virtual void setUp() override
{
utl::ConfigManager::EnableFuzzing();
comphelper::EnableFuzzing();
ScDLL::Init();
ScGlobal::Init();
}
+2 -2
View File
@@ -36,7 +36,7 @@
#include <comphelper/threadpool.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <scmod.hxx>
#include <document.hxx>
@@ -222,7 +222,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, ScDocShell* pDocShell ) :
if ( eMode == SCDOCMODE_DOCUMENT || eMode == SCDOCMODE_FUNCTIONACCESS )
{
mxPoolHelper = new ScPoolHelper( *this );
if (!utl::ConfigManager::IsFuzzing()) //just too slow
if (!comphelper::IsFuzzing()) //just too slow
pBASM.reset( new ScBroadcastAreaSlotMachine( this ) );
pChartListenerCollection.reset( new ScChartListenerCollection( *this ) );
pRefreshTimerControl.reset( new ScRefreshTimerControl );
+2 -2
View File
@@ -22,7 +22,7 @@
#include <svl/zformat.hxx>
#include <formula/token.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <osl/diagnose.h>
#include <o3tl/string_view.hxx>
@@ -273,7 +273,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked");
return;
}
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
{
// just too slow
if (nCol2 - nCol1 > 64)
+3 -3
View File
@@ -28,7 +28,7 @@
#include <o3tl/safeint.hxx>
#include <svl/sharedstringpool.hxx>
#include <svl/languageoptions.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unordered_map>
namespace {
@@ -61,7 +61,7 @@ struct ScDocumentImportImpl
mrDoc(rDoc),
maListenCxt(rDoc),
mnDefaultScriptNumeric(SvtScriptType::UNKNOWN),
mbFuzzing(utl::ConfigManager::IsFuzzing())
mbFuzzing(comphelper::IsFuzzing())
{}
bool isValid( size_t nTab, size_t nCol )
@@ -411,7 +411,7 @@ void ScDocumentImport::setMatrixCells(
if (!pBlockPos)
return;
if (utl::ConfigManager::IsFuzzing()) //just too slow
if (comphelper::IsFuzzing()) //just too slow
return;
sc::CellStoreType& rCells = pTab->aCol[rBasePos.Col()].maCells;
+2 -2
View File
@@ -19,7 +19,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/objsh.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/pathoptions.hxx>
#include <tools/urlobj.hxx>
#include <svl/numformat.hxx>
@@ -291,7 +291,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
if (!pShell || !pShell->HasName())
{ // maybe relative to document path working directory
INetURLObject aObj;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
aObj.SetSmartURL(SvtPathOptions().GetWorkPath());
aObj.setFinalSlash(); // it IS a path
+2 -2
View File
@@ -32,7 +32,7 @@
#include <com/sun/star/i18n/OrdinalSuffix.hpp>
#include <comphelper/processfactory.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/localedatawrapper.hxx>
namespace com::sun::star::ucb { class XCommandEnvironment; }
@@ -43,7 +43,7 @@ using namespace ::com::sun::star::ucb;
void ScGlobal::InitAddIns()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
// multi paths separated by semicolons
+3 -3
View File
@@ -14,7 +14,7 @@
#include <formula/opcode.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <calcconfig.hxx>
@@ -68,7 +68,7 @@ ForceCalculationType ScCalcConfig::getForceCalculationType()
bool ScCalcConfig::isOpenCLEnabled()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
static ForceCalculationType force = getForceCalculationType();
if( force != ForceCalculationNone )
@@ -79,7 +79,7 @@ bool ScCalcConfig::isOpenCLEnabled()
bool ScCalcConfig::isThreadingEnabled()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
static ForceCalculationType force = getForceCalculationType();
if( force != ForceCalculationNone )
+1 -1
View File
@@ -4450,7 +4450,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
if ( cSymbol[0] < 128 )
{
bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] );
if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !utl::ConfigManager::IsFuzzing())
if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !comphelper::IsFuzzing())
{
bMayBeFuncName = officecfg::Office::Common::Misc::ExperimentalMode::get();
}
+2 -2
View File
@@ -19,12 +19,12 @@
#include <optutil.hxx>
#include <global.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/localedatawrapper.hxx>
bool ScOptionsUtil::IsMetricSystem()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return true;
//TODO: which language should be used here - system language or installed office language?
+2 -2
View File
@@ -28,7 +28,7 @@
#include <sfx2/docfile.hxx>
#include <svx/svxids.hrc>
#include <svl/numformat.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <sal/log.hxx>
#include <sfx2/objsh.hxx>
@@ -97,7 +97,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
mnLastRecId(0),
mbBiff2HasXfs(false),
mbBiff2HasXfsValid(false),
mbFuzzing(utl::ConfigManager::IsFuzzing())
mbFuzzing(comphelper::IsFuzzing())
{
nBdshtTab = 0;
+2 -2
View File
@@ -42,7 +42,7 @@
#include <imp_op.hxx>
#include <excimp8.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <memory>
@@ -776,7 +776,7 @@ ErrCode ImportExcel::Read()
pProgress.reset();
GetDocImport().finalize();
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
AdjustRowHeight();
PostDocLoad();
+3 -3
View File
@@ -32,7 +32,7 @@
#include <editeng/flditem.hxx>
#include <editeng/editobj.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <stringutil.hxx>
#include <cellform.hxx>
#include <cellvalue.hxx>
@@ -422,7 +422,7 @@ void XclImpHyperlink::InsertUrl( XclImpRoot& rRoot, const XclRange& rXclRange, c
SCROW nScRow1, nScRow2;
aScRange.GetVars( nScCol1, nScRow1, nScTab, nScCol2, nScRow2, nScTab );
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
{
SCROW nRows = nScRow2 - nScRow1;
if (nRows > 1024)
@@ -933,7 +933,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
void XclImpValidationManager::Apply()
{
const bool bFuzzing = utl::ConfigManager::IsFuzzing();
const bool bFuzzing = comphelper::IsFuzzing();
size_t nPatterns = 0;
ScDocument& rDoc = GetRoot().GetDoc();
+2 -2
View File
@@ -43,7 +43,7 @@
#include <sfx2/objsh.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/fltrcfg.hxx>
#include <vcl/dibtools.hxx>
#include <vcl/gdimtf.hxx>
@@ -1511,7 +1511,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
{
if( maTextData.mxString->IsRich() )
{
if (maTextData.mxString->GetText().getLength() > 1024 && utl::ConfigManager::IsFuzzing())
if (maTextData.mxString->GetText().getLength() > 1024 && comphelper::IsFuzzing())
{
SAL_WARN("sc.filter", "truncating slow long rich text for fuzzing performance");
maTextData.mxString->SetText(maTextData.mxString->GetText().copy(0, 1024));
+2 -2
View File
@@ -28,7 +28,7 @@
#include <editeng/lrspitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/brushitem.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <document.hxx>
#include <stlsheet.hxx>
#include <attrib.hxx>
@@ -125,7 +125,7 @@ void XclImpPageSettings::ReadHeaderFooter( XclImpStream& rStrm )
default: OSL_FAIL( "XclImpPageSettings::ReadHeaderFooter - unknown record" );
}
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
{
if (maData.maHeader.getLength() > 10)
maData.maHeader = maData.maHeader.copy(0, 10);
+2 -2
View File
@@ -30,7 +30,7 @@
#include <svl/numformat.hxx>
#include <sal/log.hxx>
#include <sot/storage.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <document.hxx>
#include <formulacell.hxx>
@@ -1411,7 +1411,7 @@ void XclImpPivotTable::Convert()
if( !mxPCache || !mxPCache->IsValid() )
return;
if (utl::ConfigManager::IsFuzzing()) //just too slow
if (comphelper::IsFuzzing()) //just too slow
return;
ScDPSaveData aSaveData;
+2 -2
View File
@@ -59,7 +59,7 @@
#include <xlchart.hxx>
#include <xltracer.hxx>
#include <xltools.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/useroptions.hxx>
#include <root.hxx>
@@ -109,7 +109,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
mnScTab( 0 ),
mbExport( bExport )
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
maUserName = SvtUserOptions().GetLastName();
if (maUserName.isEmpty())
maUserName = "Calc";
+2 -2
View File
@@ -29,7 +29,7 @@
#include <editeng/udlnitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/justifyitem.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <formulacell.hxx>
#include <document.hxx>
@@ -327,7 +327,7 @@ void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n)
nDefWidth = static_cast<sal_uInt16>( TWIPS_PER_CHAR * nDefWidth );
const bool bFuzzing = utl::ConfigManager::IsFuzzing();
const bool bFuzzing = comphelper::IsFuzzing();
// instead of default, set all Cols in SC by hand
for (SCCOL nCol = 0 ; nCol <= rContext.rDoc.MaxCol() ; nCol++)
+2 -2
View File
@@ -29,7 +29,7 @@
#include <document.hxx>
#include <formulacell.hxx>
#include <tools/stream.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <docoptio.hxx>
#include <scdll.hxx>
#include <memory>
@@ -155,7 +155,7 @@ ScQProReader::ScQProReader(SvStream* pStream)
, mnOffset(0)
, mpStream(pStream)
, mbEndOfFile(false)
, mnMaxTab(utl::ConfigManager::IsFuzzing() ? 128 : MAXTAB)
, mnMaxTab(comphelper::IsFuzzing() ? 128 : MAXTAB)
{
if( mpStream )
{
+1 -1
View File
@@ -138,7 +138,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
if (!pFormatter)
pFormatter = mpDoc->GetFormatTable();
bool bNumbersEnglishUS = false;
if (pFormatter->GetLanguage() == LANGUAGE_SYSTEM && !utl::ConfigManager::IsFuzzing())
if (pFormatter->GetLanguage() == LANGUAGE_SYSTEM && !comphelper::IsFuzzing())
{
// Automatic language option selected. Check for the global 'use US English' option.
bNumbersEnglishUS = officecfg::Office::Common::Filter::HTML::Import::NumbersEnglishUS::get();
+2 -2
View File
@@ -30,7 +30,7 @@
#include <unonames.hxx>
#include <comphelper/extract.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/families.hxx>
#include <xmloff/xmltoken.hxx>
@@ -74,7 +74,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport,
{
nRepeatedRows = std::max( it.toInt32(), sal_Int32(1) );
nRepeatedRows = std::min( nRepeatedRows, rImport.GetDocument()->GetSheetLimits().GetMaxRowCount() );
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
nRepeatedRows = std::min(nRepeatedRows, sal_Int32(1024));
}
break;
+3 -3
View File
@@ -24,7 +24,7 @@
#include <editeng/forbiddencharacterstable.hxx>
#include <orcusfilters.hxx>
#include <config_folders.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/processfactory.hxx>
#include <o3tl/unit_conversion.hxx>
@@ -111,13 +111,13 @@ void ScDocShell::InitItems()
// Other modifications after creation of the DrawLayer
pDrawLayer->SetNotifyUndoActionHdl( std::bind( &ScDocFunc::NotifyDrawUndo, m_pDocFunc.get(), std::placeholders::_1 ) );
}
else if (!utl::ConfigManager::IsFuzzing())
else if (!comphelper::IsFuzzing())
{
// always use global color table instead of local copy
PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ) );
}
if (utl::ConfigManager::IsFuzzing() ||
if (comphelper::IsFuzzing() ||
(m_pDocument->GetForbiddenCharacters() && m_pDocument->IsValidAsianCompression() && m_pDocument->IsValidAsianKerning()))
return;
+1 -1
View File
@@ -419,7 +419,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
ScViewOptions aViewOpt = pScMod->GetViewOptions();
aDocOpt.SetAutoSpell( bAutoSpell );
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
// two-digit year entry from Tools->Options->General
aDocOpt.SetYear2000(officecfg::Office::Common::DateFormat::TwoDigitYear::get());
+2 -2
View File
@@ -52,7 +52,7 @@
#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/ucbhelper.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -2761,7 +2761,7 @@ void ScExternalRefManager::maybeCreateRealFileName(sal_uInt16 nFileId)
OUString ScExternalRefManager::getOwnDocumentName() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return "file:///tmp/document";
ScDocShell* pShell = mrDoc.GetDocumentShell();
+6 -6
View File
@@ -58,7 +58,7 @@
#include <scresid.hxx>
#include <o3tl/safeint.hxx>
#include <tools/svlibrary.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <editeng/editobj.hxx>
@@ -102,7 +102,7 @@ enum class SylkVersion
// Whole document without Undo
ScImportExport::ScImportExport( ScDocument& r )
: pDocSh( r.GetDocumentShell() ), rDoc( r ),
nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( true ), bSingle( true ), bUndo( false ),
@@ -117,7 +117,7 @@ ScImportExport::ScImportExport( ScDocument& r )
ScImportExport::ScImportExport( ScDocument& r, const ScAddress& rPt )
: pDocSh( r.GetDocumentShell() ), rDoc( r ),
aRange( rPt ),
nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
@@ -133,7 +133,7 @@ ScImportExport::ScImportExport( ScDocument& r, const ScAddress& rPt )
ScImportExport::ScImportExport( ScDocument& r, const ScRange& rRange )
: pDocSh( r.GetDocumentShell() ), rDoc( r ),
aRange( rRange ),
nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ),
@@ -150,7 +150,7 @@ ScImportExport::ScImportExport( ScDocument& r, const ScRange& rRange )
// If a View exists, the TabNo of the view will be used.
ScImportExport::ScImportExport( ScDocument& r, const OUString& rPos )
: pDocSh( r.GetDocumentShell() ), rDoc( r ),
nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K),
cSep( '\t' ), cStr( '"' ),
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ),
@@ -2304,7 +2304,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm )
sal_uInt32 nKey;
sal_Int32 nCheckPos;
if (aCode.getLength() > 2048 && utl::ConfigManager::IsFuzzing())
if (aCode.getLength() > 2048 && comphelper::IsFuzzing())
{
// consider an excessive length as a failure when fuzzing
nCheckPos = 1;
+2 -2
View File
@@ -34,7 +34,7 @@
#include <vcl/weld.hxx>
#include <tools/urlobj.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/processfactory.hxx>
#include <tablink.hxx>
@@ -433,7 +433,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName,
std::shared_ptr<const SfxFilter> pSfxFilter;
auto pMedium = std::make_unique<SfxMedium>( rFileName, StreamMode::STD_READ );
if (pMedium->GetErrorIgnoreWarning() == ERRCODE_NONE && !utl::ConfigManager::IsFuzzing())
if (pMedium->GetErrorIgnoreWarning() == ERRCODE_NONE && !comphelper::IsFuzzing())
{
if ( bWithInteraction )
pMedium->UseInteractionHandler(true); // #i73992# no longer called from GuessFilter
+2 -2
View File
@@ -53,10 +53,10 @@ ScDrawView::ScDrawView(
{
SetNegativeX(comphelper::LibreOfficeKit::isActive() && rDoc.IsLayoutRTL(nTab));
// #i73602# Use default from the configuration
SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get());
SetBufferedOverlayAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get());
// #i74769#, #i75172# Use default from the configuration
SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get());
SetBufferedOutputAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get());
Construct();
}
+1 -1
View File
@@ -312,7 +312,7 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList,
bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
bool bRet = false;
+3 -3
View File
@@ -181,7 +181,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
SetCalcFieldValueHdl( &rOutliner );
// set linguistic options
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
const SvtLinguConfig aLinguConfig;
SvtLinguOptions aOptions;
@@ -1102,7 +1102,7 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const OUString& rAuthor )
void SdDrawDocument::InitLayoutVector()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
const Reference<css::uno::XComponentContext> xContext(
@@ -1140,7 +1140,7 @@ void SdDrawDocument::InitLayoutVector()
void SdDrawDocument::InitObjectVector()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
const Reference<css::uno::XComponentContext> xContext(
+2 -2
View File
@@ -38,7 +38,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
#include <rtl/bootstrap.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/streamwrap.hxx>
#include <tools/stream.hxx>
#include <tools/UnitConversion.hxx>
@@ -628,7 +628,7 @@ void SdDrawDocument::CreateLayoutTemplates()
void SdDrawDocument::CreateDefaultCellStyles()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
Reference<css::uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
+3 -3
View File
@@ -19,7 +19,7 @@
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <svl/urihelper.hxx>
#include <svx/svxids.hrc>
@@ -581,7 +581,7 @@ bool ImplSdPPTImport::Import()
// create master pages:
std::unique_ptr<SfxProgress> xStbMgr;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
xStbMgr.reset(new SfxProgress(pDocShell,
SdResId( STR_POWERPOINT_IMPORT),
@@ -1956,7 +1956,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd ) )
{
OUString aGalleryDir;
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
osl_getTempDirURL(&aGalleryDir.pData);
else
aGalleryDir = SvtPathOptions().GetGalleryPath();
+8 -8
View File
@@ -21,7 +21,7 @@
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/moduleoptions.hxx>
#include <svx/fmobjfac.hxx>
#include <svx/objfac3d.hxx>
@@ -87,7 +87,7 @@ using namespace ::com::sun::star;
// Register all Factories
void SdDLL::RegisterFactorys()
{
if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress())
if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress())
{
::sd::ImpressViewShellBase::RegisterFactory (
::sd::IMPRESS_FACTORY_ID);
@@ -110,7 +110,7 @@ void SdDLL::RegisterFactorys()
::sd::PRESENTATION_FACTORY_ID);
}
}
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
{
::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
}
@@ -223,24 +223,24 @@ void SdDLL::Init()
SfxObjectFactory* pDrawFact = nullptr;
SfxObjectFactory* pImpressFact = nullptr;
if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress())
if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress())
pImpressFact = &::sd::DrawDocShell::Factory();
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
pDrawFact = &::sd::GraphicDocShell::Factory();
auto pUniqueModule = std::make_unique<SdModule>(pImpressFact, pDrawFact);
SdModule* pModule = pUniqueModule.get();
SfxApplication::SetModule(SfxToolsModule::Draw, std::move(pUniqueModule));
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsImpress())
if (!comphelper::IsFuzzing() && SvtModuleOptions().IsImpress())
{
// Register the Impress shape types in order to make the shapes accessible.
::accessibility::RegisterImpressShapeTypes ();
::sd::DrawDocShell::Factory().SetDocumentServiceName( "com.sun.star.presentation.PresentationDocument" );
}
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
{
::sd::GraphicDocShell::Factory().SetDocumentServiceName( "com.sun.star.drawing.DrawingDocument" );
}
@@ -262,7 +262,7 @@ void SdDLL::Init()
// register your exotic remote controls here
#ifdef ENABLE_SDREMOTE
if (!utl::ConfigManager::IsFuzzing() && !Application::IsHeadlessModeEnabled())
if (!comphelper::IsFuzzing() && !Application::IsHeadlessModeEnabled())
RegisterRemotes();
#endif
}
+1 -1
View File
@@ -105,7 +105,7 @@ void DrawDocShell::Construct( bool bClipboard )
pUndoManager->SetDocShell(this);
mpUndoManager = std::move(pUndoManager);
if (!utl::ConfigManager::IsFuzzing()
if (!comphelper::IsFuzzing()
&& officecfg::Office::Common::Undo::Steps::get() < 1)
{
mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps
+2 -2
View File
@@ -114,10 +114,10 @@ View::View(
mpClipboard (new ViewClipboard (*this))
{
// #i73602# Use default from the configuration
SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get());
SetBufferedOverlayAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get());
// #i74769#, #i75172# Use default from the configuration
SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get());
SetBufferedOutputAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get());
EnableExtendedKeyInputDispatcher(false);
EnableExtendedMouseEventDispatcher(false);
+2 -2
View File
@@ -114,11 +114,11 @@ SfxApplication* SfxApplication::GetOrCreate()
#if HAVE_FEATURE_XMLHELP || defined(EMSCRIPTEN)
bool bHelpTip = officecfg::Office::Common::Help::Tip::get();
bool bExtendedHelpTip = officecfg::Office::Common::Help::ExtendedTip::get();
if (!utl::ConfigManager::IsFuzzing() && bHelpTip)
if (!comphelper::IsFuzzing() && bHelpTip)
Help::EnableQuickHelp();
else
Help::DisableQuickHelp();
if (!utl::ConfigManager::IsFuzzing() && bHelpTip && bExtendedHelpTip)
if (!comphelper::IsFuzzing() && bHelpTip && bExtendedHelpTip)
Help::EnableBalloonHelp();
else
Help::DisableBalloonHelp();
+4 -4
View File
@@ -65,7 +65,7 @@ BasicManager* SfxApplication::GetBasicManager()
#if !HAVE_FEATURE_SCRIPTING
return nullptr;
#else
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return nullptr;
return BasicManagerRepository::getApplicationBasicManager();
#endif
@@ -76,7 +76,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer()
#if !HAVE_FEATURE_SCRIPTING
return nullptr;
#else
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return nullptr;
if ( !pImpl->pBasicManager->isValid() )
GetBasicManager();
@@ -90,7 +90,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer()
#if !HAVE_FEATURE_SCRIPTING
return nullptr;
#else
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return nullptr;
if ( !pImpl->pBasicManager->isValid() )
GetBasicManager();
@@ -103,7 +103,7 @@ StarBASIC* SfxApplication::GetBasic()
#if !HAVE_FEATURE_SCRIPTING
return nullptr;
#else
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return nullptr;
return GetBasicManager()->GetLib(0);
#endif
+2 -1
View File
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <basic/sbdef.hxx>
#include <comphelper/configuration.hxx>
#include <tools/svlibrary.h>
#include <svtools/soerr.hxx>
#include <unotools/configmgr.hxx>
@@ -194,7 +195,7 @@ void SfxApplication::Initialize_Impl()
RID_BASIC_START, ErrCodeArea::Sbx, ErrCodeArea::Sbx, BasResLocale());
#endif
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
SolarMutexGuard aGuard;
//ensure instantiation of listener that manages the internal recently-used
+2 -1
View File
@@ -19,6 +19,7 @@
#include <config_features.h>
#include <config_feature_desktop.h>
#include <comphelper/configuration.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
@@ -1162,7 +1163,7 @@ css::uno::Reference< css::frame::XFrame > SfxWorkWindow::GetFrameInterface()
void SfxWorkWindow::UpdateObjectBars_Impl2()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
// Lock SplitWindows (which means suppressing the Resize-Reaction of the
+1 -1
View File
@@ -214,7 +214,7 @@ void SfxShell::SetUndoManager( SfxUndoManager *pNewUndoMgr )
// a supported scenario (/me thinks it is not), then we would need to notify all such clients instances.
pUndoMgr = pNewUndoMgr;
if (pUndoMgr && !utl::ConfigManager::IsFuzzing())
if (pUndoMgr && !comphelper::IsFuzzing())
{
pUndoMgr->SetMaxUndoActionCount(
officecfg::Office::Common::Undo::Steps::get());
+1 -1
View File
@@ -654,7 +654,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving )
return pBaseURLItem->GetValue();
OUString aBaseURL;
if (!utl::ConfigManager::IsFuzzing() && GetContent().is())
if (!comphelper::IsFuzzing() && GetContent().is())
{
try
{
+6 -6
View File
@@ -327,7 +327,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
}
SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_013;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
nDefVersion = GetODFSaneDefaultVersion();
}
@@ -506,7 +506,7 @@ bool SfxObjectShell::DoInitNew()
pArgs[nLength].Name = "Title";
pArgs[nLength].Value <<= GetTitle( SFX_TITLE_DETECT );
xModel->attachResource( OUString(), aArgs );
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
impl_addToModelCollection(xModel);
}
@@ -1001,7 +1001,7 @@ bool SfxObjectShell::DoSave()
if (IsOwnStorageFormat(*GetMedium()))
{
SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_013;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
nDefVersion = GetODFSaneDefaultVersion();
}
@@ -1187,7 +1187,7 @@ bool SfxObjectShell::SaveTo_Impl
}
SvtSaveOptions::ODFSaneDefaultVersion nVersion(SvtSaveOptions::ODFSVER_LATEST_EXTENDED);
if (bOwnTarget && !utl::ConfigManager::IsFuzzing())
if (bOwnTarget && !comphelper::IsFuzzing())
{
nVersion = GetODFSaneDefaultVersion();
}
@@ -3379,7 +3379,7 @@ uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage()
SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false );
pImpl->m_bCreateTempStor = false;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
SfxGetpApp()->NotifyEvent( SfxEventHint( SfxEventHintId::StorageChanged, GlobalEventConfig::GetEventName(GlobalEventId::STORAGECHANGED), this ) );
}
catch( uno::Exception& )
@@ -3894,7 +3894,7 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
{
if (utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
if (comphelper::IsFuzzing() || officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
return pImpl->m_bMacroCallsSeenWhileLoading;
return false;
}
+3 -2
View File
@@ -45,6 +45,7 @@
#include <sfx2/signaturestate.hxx>
#include <sfx2/sfxmodelfactory.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/servicehelper.hxx>
@@ -733,7 +734,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
{
#if HAVE_FEATURE_SCRIPTING
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
try
{
@@ -1074,7 +1075,7 @@ SfxObjectShell* SfxObjectShell::GetParentShell(const css::uno::Reference<css::un
void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
{
pImpl->bInitialized = true;
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
if ( i_fromInitNew )
{
+1 -1
View File
@@ -940,7 +940,7 @@ const OUString& SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY()
SfxClassificationPolicyType SfxClassificationHelper::getPolicyType()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return SfxClassificationPolicyType::IntellectualProperty;
sal_Int32 nPolicyTypeNumber = officecfg::Office::Common::Classification::Policy::get();
auto eType = static_cast<SfxClassificationPolicyType>(nPolicyTypeNumber);
+4 -4
View File
@@ -21,7 +21,7 @@
#include <svl/intitem.hxx>
#include <svl/eitem.hxx>
#include <svl/languageoptions.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <utility>
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
@@ -1257,7 +1257,7 @@ bool SmMathConfig::IsAutoCloseBrackets() const
sal_Int16 SmMathConfig::GetDefaultSmSyntaxVersion() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return nDefaultSmSyntaxVersion;
if (!pOther)
const_cast<SmMathConfig*>(this)->LoadOther();
@@ -1309,7 +1309,7 @@ void SmMathConfig::SetDefaultSmSyntaxVersion( sal_Int16 nVal )
bool SmMathConfig::IsInlineEditEnable() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
if (!pOther)
const_cast<SmMathConfig*>(this)->LoadOther();
@@ -1330,7 +1330,7 @@ void SmMathConfig::SetInlineEditEnable( bool bVal )
bool SmMathConfig::IsIgnoreSpacesRight() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return false;
if (!pOther)
const_cast<SmMathConfig*>(this)->LoadOther();
+2 -2
View File
@@ -22,7 +22,7 @@
#include <com/sun/star/i18n/KParseType.hpp>
#include <i18nlangtag/lang.h>
#include <tools/lineend.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/syslocale.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
@@ -1594,7 +1594,7 @@ std::unique_ptr<SmBlankNode> SmParser5::DoBlank()
// Ignore trailing spaces, if corresponding option is set
if (m_aCurToken.eType == TNEWLINE
|| (m_aCurToken.eType == TEND && !utl::ConfigManager::IsFuzzing()
|| (m_aCurToken.eType == TEND && !comphelper::IsFuzzing()
&& SM_MOD()->GetConfig()->IsIgnoreSpacesRight()))
{
pBlankNode->Clear();
+1 -1
View File
@@ -431,7 +431,7 @@ void SvtCTLOptions::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals )
SvtCTLOptions::TextNumerals SvtCTLOptions::GetCTLTextNumerals()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return SvtCTLOptions::NUMERALS_ARABIC;
return static_cast<SvtCTLOptions::TextNumerals>(officecfg::Office::Common::I18N::CTL::CTLTextNumerals::get());
}
+1 -1
View File
@@ -3640,7 +3640,7 @@ sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const
// static
sal_uInt16 SvNumberFormatter::GetYear2000Default()
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
return officecfg::Office::Common::DateFormat::TwoDigitYear::get();
return 1930;
}
+3 -3
View File
@@ -194,7 +194,7 @@ ColorConfig_Impl::ColorConfig_Impl() :
uno::Sequence < OUString > aNames(1);
EnableNotification( aNames );
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
Load(OUString());
::Application::AddEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) );
@@ -356,7 +356,7 @@ IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent,
ColorConfig::ColorConfig()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
std::unique_lock aGuard( ColorMutex_Impl() );
if ( !m_pImpl )
@@ -371,7 +371,7 @@ ColorConfig::ColorConfig()
ColorConfig::~ColorConfig()
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
std::unique_lock aGuard( ColorMutex_Impl() );
m_pImpl->RemoveListener(this);
+2 -2
View File
@@ -26,7 +26,7 @@
#include <rtl/character.hxx>
#include <sal/log.hxx>
#include <unicode/ucsdet.h>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vector>
@@ -83,7 +83,7 @@ SvParser<T>::SvParser( SvStream& rIn, sal_uInt8 nStackSize )
, m_nTokenIndex(0)
, nTokenValue( 0 )
, bTokenHasValue( false )
, bFuzzing(utl::ConfigManager::IsFuzzing())
, bFuzzing(comphelper::IsFuzzing())
, eState( SvParserState::NotStarted )
, eSrcEnc( RTL_TEXTENCODING_DONTKNOW )
, nNextChPos(0)
@@ -43,7 +43,7 @@
#include <svx/xbtmpit.hxx>
#include <svx/xhatch.hxx>
#include <svx/sdshitm.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
@@ -705,7 +705,7 @@ void EnhancedCustomShape2d::SetPathSize( sal_Int32 nIndex )
else
m_fYRatio = 1.0;
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
{
if (fabs(m_fXScale) > 100000)
{
@@ -58,7 +58,7 @@
#include <svx/xlnwtit.hxx>
#include <svx/xlntrit.hxx>
#include <svx/xfltrit.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -406,7 +406,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
basegfx::B2DPolyPolygon aTotalPolyPoly;
SdrObjListIter aIter( *pShape2d, SdrIterMode::DeepNoGroups );
const bool bMultipleSubObjects(aIter.Count() > 1);
const bool bFuzzing(utl::ConfigManager::IsFuzzing());
const bool bFuzzing(comphelper::IsFuzzing());
while( aIter.IsMore() )
{
@@ -51,7 +51,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <sal/log.hxx>
#include <rtl/math.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <comphelper/string.hxx>
using namespace com::sun::star;
@@ -1148,7 +1148,7 @@ rtl::Reference<SdrObject> EnhancedCustomShapeFontWork::CreateFontWork(
rtl::Reference<SdrObject> pRet;
// calculating scaling factor is too slow
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return pRet;
tools::PolyPolygon aOutlines2d( GetOutlinesFromShape2d( pShape2d ) );
+3 -3
View File
@@ -39,7 +39,7 @@
#include <com/sun/star/uno/Sequence.h>
#include <svx/sdr/contact/viewcontactofe3dscene.hxx>
#include <svx/e3dsceneupdater.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
using namespace com::sun::star;
@@ -284,7 +284,7 @@ E3dScene* E3dObject::getRootE3dSceneFromE3dObject() const
basegfx::B3DRange E3dObject::RecalcBoundVolume() const
{
basegfx::B3DRange aRetval;
if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing
if (comphelper::IsFuzzing()) // skip slow path for fuzzing
return aRetval;
const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
@@ -549,7 +549,7 @@ SdrObjKind E3dCompoundObject::GetObjIdentifier() const
void E3dCompoundObject::RecalcSnapRect()
{
if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing
if (comphelper::IsFuzzing()) // skip slow path for fuzzing
return;
const uno::Sequence< beans::PropertyValue > aEmptyParameters;
+2 -2
View File
@@ -92,7 +92,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/debug.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -3460,7 +3460,7 @@ void FmXFormShell::CreateExternalView_Lock()
void FmXFormShell::implAdjustConfigCache_Lock()
{
const bool bFuzzing(utl::ConfigManager::IsFuzzing());
const bool bFuzzing(comphelper::IsFuzzing());
if (bFuzzing)
return;
+2 -2
View File
@@ -32,7 +32,7 @@
#include <ucbhelper/content.hxx>
#include <com/sun/star/ucb/ContentCreationException.hpp>
#include <o3tl/string_view.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/pathoptions.hxx>
#include <svx/dialmgr.hxx>
@@ -243,7 +243,7 @@ Gallery* Gallery::GetGalleryInstance()
{
// note: this would deadlock if it used osl::Mutex::getGlobalMutex()
static Gallery *const s_pGallery(
utl::ConfigManager::IsFuzzing() ? nullptr :
comphelper::IsFuzzing() ? nullptr :
new Gallery(SvtPathOptions().GetGalleryPath()));
return s_pGallery;
@@ -36,7 +36,7 @@
#include <osl/diagnose.h>
#include <officecfg/Office/Common.hxx>
#include <svx/unoapi.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/pdfextoutdevdata.hxx>
#include <comphelper/lok.hxx>
@@ -361,7 +361,7 @@ namespace sdr::contact
// check if text animation is allowed.
bool ObjectContactOfPageView::IsTextAnimationAllowed() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return true;
return officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get();
}
@@ -369,7 +369,7 @@ namespace sdr::contact
// check if graphic animation is allowed.
bool ObjectContactOfPageView::IsGraphicAnimationAllowed() const
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return true;
// Related tdf#156630 respect system animation setting
+1 -1
View File
@@ -53,7 +53,7 @@ SdrDragView::SdrDragView(SdrModel& rSdrModel, OutputDevice* pOut)
, mbDragLimit(false)
, mbDragHdl(false)
, mbDragStripes(false)
, mbSolidDragging(utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Drawinglayer::SolidDragCreate::get())
, mbSolidDragging(comphelper::IsFuzzing() || officecfg::Office::Common::Drawinglayer::SolidDragCreate::get())
, mbResizeAtCenter(false)
, mbCrookAtCenter(false)
, mbDragWithCopy(false)
+2 -2
View File
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
// Global data of the DrawingEngine
SdrGlobalData::SdrGlobalData()
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
svx::ExtrusionBar::RegisterInterface();
svx::FontworkBar::RegisterInterface();
@@ -84,7 +84,7 @@ SdrGlobalData & GetSdrGlobalData() {
OLEObjCache::OLEObjCache()
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
// This limit is only useful on 32-bit windows, where we can run out of virtual memory (see tdf#95579)
// For everything else, we are better off keeping it in main memory rather than using our hacky page-out thing
+3 -3
View File
@@ -153,7 +153,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel
, mbAddExtLeading(false)
, mbInDestruction(false)
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
mnCharCompressType = static_cast<CharCompressType>(
officecfg::Office::Common::AsianLayout::CompressCharacterDistance::get());
@@ -195,7 +195,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel
m_pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this );
ImpSetOutlinerDefaults(m_pChainingOutliner.get(), true);
ImpCreateTables(bDisablePropertyFiles || utl::ConfigManager::IsFuzzing());
ImpCreateTables(bDisablePropertyFiles || comphelper::IsFuzzing());
mpImpl->initTheme();
}
@@ -627,7 +627,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt )
SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK);
SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL);
LanguageType nLanguage;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
nLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
else
nLanguage = LANGUAGE_ENGLISH_US;
+5 -5
View File
@@ -46,7 +46,7 @@
#include <tools/bigint.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <tools/helpers.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/ptrstyle.hxx>
#include <vector>
@@ -548,7 +548,7 @@ SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool()
mpGlobalItemPool->SetSecondaryPool(pGlobalOutlPool.get());
mpGlobalItemPool->SetDefaultMetric(SdrEngineDefaults::GetMapUnit());
mpGlobalItemPool->FreezeIdRanges();
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
mpGlobalItemPool->acquire();
else
{
@@ -975,7 +975,7 @@ const tools::Rectangle& SdrObject::GetLastBoundRect() const
void SdrObject::RecalcBoundRect()
{
// #i101680# suppress BoundRect calculations on import(s)
if ((getSdrModelFromSdrObject().isLocked()) || utl::ConfigManager::IsFuzzing())
if ((getSdrModelFromSdrObject().isLocked()) || comphelper::IsFuzzing())
return;
auto const& rRectangle = getOutRectangle();
@@ -1010,7 +1010,7 @@ void SdrObject::RecalcBoundRect()
void SdrObject::BroadcastObjectChange() const
{
if ((getSdrModelFromSdrObject().isLocked()) || utl::ConfigManager::IsFuzzing())
if ((getSdrModelFromSdrObject().isLocked()) || comphelper::IsFuzzing())
return;
bool bPlusDataBroadcast(m_pPlusData && m_pPlusData->pBroadcast);
@@ -2419,7 +2419,7 @@ rtl::Reference<SdrObject> SdrObject::ImpConvertToContourObj(bool bForceLineDash)
}
// check for fill rsults
if (!aExtractedLineFills.empty() && !utl::ConfigManager::IsFuzzing())
if (!aExtractedLineFills.empty() && !comphelper::IsFuzzing())
{
// merge to a single tools::PolyPolygon (OR)
aMergedLineFillPolyPolygon = basegfx::utils::mergeToSinglePolyPolygon(std::move(aExtractedLineFills));
+2 -2
View File
@@ -54,7 +54,7 @@
#include <sal/log.hxx>
#include <o3tl/unit_conversion.hxx>
#include <o3tl/temporary.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/fhgtitem.hxx>
@@ -1428,7 +1428,7 @@ namespace
bool IsAutoGrow(const SdrTextObj& rObj)
{
bool bAutoGrow = rObj.IsAutoGrowHeight() || rObj.IsAutoGrowWidth();
return bAutoGrow && !utl::ConfigManager::IsFuzzing();
return bAutoGrow && !comphelper::IsFuzzing();
}
}
+2 -2
View File
@@ -36,7 +36,7 @@
#include <svx/xlnclit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/sdshitm.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
using namespace com::sun::star;
@@ -419,7 +419,7 @@ rtl::Reference<SdrObject> SdrTextObj::DoConvertToPolyObj(bool bBezier, bool bAdd
bool SdrTextObj::ImpCanConvTextToCurve() const
{
return !IsOutlText() && !utl::ConfigManager::IsFuzzing();
return !IsOutlText() && !comphelper::IsFuzzing();
}
rtl::Reference<SdrPathObj> SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const
+2 -2
View File
@@ -22,7 +22,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/ptrstyle.hxx>
#include <com/sun/star/style/XStyle.hpp>
@@ -755,7 +755,7 @@ sal_Int32 SdrTableObjImpl::getRowCount() const
void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight )
{
if (utl::ConfigManager::IsFuzzing())
if (comphelper::IsFuzzing())
return;
if(!mpLayouter)
return;
+2 -2
View File
@@ -47,7 +47,7 @@
#include <comphelper/processfactory.hxx>
#include <svx/svdotable.hxx>
#include <cell.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
// SvxTextEditSourceImpl
@@ -508,7 +508,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
const_cast<EditEngine*>(&(mpOutliner->GetEditEngine()))->EnableUndo( false );
}
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
if ( !m_xLinguServiceManager.is() )
{
+2 -2
View File
@@ -19,7 +19,7 @@
#include <memory>
#include <XPropertyTable.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/pathoptions.hxx>
#include <svx/strings.hrc>
@@ -32,7 +32,7 @@ XColorListRef XColorList::CreateStdColorList()
{
return XPropertyList::AsColorList(
XPropertyList::CreatePropertyList(
XPropertyListType::Color, !utl::ConfigManager::IsFuzzing() ?
XPropertyListType::Color, !comphelper::IsFuzzing() ?
SvtPathOptions().GetPalettePath() :
"", ""));
}
+2 -2
View File
@@ -21,7 +21,7 @@
#include <docsh.hxx>
#include <swmodule.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <vcl/svapp.hxx>
using namespace com::sun::star;
@@ -34,7 +34,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get()
if (!spTheSwSmartTagMgr)
{
OUString sModuleName
= !utl::ConfigManager::IsFuzzing() ? SwDocShell::Factory().GetModuleName() : "Writer";
= !comphelper::IsFuzzing() ? SwDocShell::Factory().GetModuleName() : "Writer";
spTheSwSmartTagMgr = new SwSmartTagMgr(sModuleName);
spTheSwSmartTagMgr->Init(u"Writer");
}
+3 -3
View File
@@ -129,7 +129,7 @@
#include <tools/globname.hxx>
#include <tox.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <unotools/collatorwrapper.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <vcl/mapmod.hxx>
@@ -672,7 +672,7 @@ void InitCore()
pGlobalOLEExcludeList = new std::vector<SvGlobalName>;
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
const SvxSwAutoFormatFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
SwDoc::s_pAutoCompleteWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen,
@@ -743,7 +743,7 @@ void SwCalendarWrapper::LoadDefaultCalendar( LanguageType eLang )
LanguageType GetAppLanguage()
{
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
return Application::GetSettings().GetLanguageTag().getLanguageType();
return LANGUAGE_ENGLISH_US;
}
+1 -1
View File
@@ -875,7 +875,7 @@ bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) const
const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint());
const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark());
if (!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get())
if (officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get())
{
; // allow editing all fields in generic mode
}
@@ -43,7 +43,7 @@
#include <svx/svdotext.hxx>
#include <svx/svdview.hxx>
#include <svl/srchitem.hxx>
#include <unotools/configmgr.hxx>
#include <comphelper/configuration.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
@@ -109,7 +109,7 @@ void DocumentDrawModelManager::InitDrawModel()
mpDrawModel->InsertPage( pMasterPage.get() );
SAL_INFO( "sw.doc", "after create DrawDocument" );
SdrOutliner& rOutliner = mpDrawModel->GetDrawOutliner();
if (!utl::ConfigManager::IsFuzzing())
if (!comphelper::IsFuzzing())
{
SAL_INFO( "sw.doc", "before create Spellchecker/Hyphenator" );
css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpell = ::GetSpellChecker();

Some files were not shown because too many files have changed in this diff Show More