Kaydet (Commit) 38187ec1 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:singlevalfields extend to all static vars

Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 60714a81
......@@ -66,7 +66,7 @@ long const nBasePad = 2;
long const nCursorPad = 5;
long nVirtToolBoxHeight; // inited in WatchWindow, used in Stackwindow
long nHeaderBarHeight;
static const long nHeaderBarHeight = 16;
// Returns pBase converted to SbxVariable if valid and is not an SbxMethod.
SbxVariable* IsSbxVariable (SbxBase* pBase)
......@@ -1581,8 +1581,6 @@ WatchWindow::WatchWindow (Layout* pParent)
if ( nRWBtnSize > nVirtToolBoxHeight )
nVirtToolBoxHeight = nRWBtnSize;
nHeaderBarHeight = 16;
aTreeListBox->SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST);
aTreeListBox->EnableInplaceEditing(true);
aTreeListBox->SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) );
......
......@@ -3657,15 +3657,6 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
static SbUnoServiceCtor* pFirstCtor = nullptr;
void clearUnoServiceCtors()
{
SbUnoServiceCtor* pCtor = pFirstCtor;
if( pCtor )
pCtor->SbxValue::Clear();
}
SbUnoServiceCtor::SbUnoServiceCtor( const OUString& aName_, Reference< XServiceConstructorDescription > const & xServiceCtorDesc )
: SbxMethod( aName_, SbxOBJECT )
, m_xServiceCtorDesc( xServiceCtorDesc )
......
......@@ -973,7 +973,6 @@ static void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic )
{
// #67781 Delete return values of the Uno-methods
clearUnoMethods();
clearUnoServiceCtors();
ClearUnoObjectsInRTL_Impl_Rek( pBasic );
......
......@@ -259,12 +259,9 @@ public:
SbUnoService* findUnoService( const OUString& rName );
void clearUnoServiceCtors();
class SbUnoServiceCtor : public SbxMethod
{
friend class SbUnoService;
friend void clearUnoServiceCtors();
css::uno::Reference< css::reflection::XServiceConstructorDescription > m_xServiceCtorDesc;
......
......@@ -2508,10 +2508,10 @@ void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool)
// Function looks for wildcards, removes them and always returns the pure path
static OUString implSetupWildcard(const OUString& rFileParam, SbiRTLData& rRTLData)
{
static sal_Char cDelim1 = '/';
static sal_Char cDelim2 = '\\';
static sal_Char cWild1 = '*';
static sal_Char cWild2 = '?';
static const sal_Char cDelim1 = '/';
static const sal_Char cDelim2 = '\\';
static const sal_Char cWild1 = '*';
static const sal_Char cWild2 = '?';
rRTLData.pWildCard.reset();
rRTLData.sFullNameToBeChecked.clear();
......
......@@ -7,9 +7,15 @@ connectivity/source/inc/dbase/dindexnode.hxx:125
cui/source/inc/cfg.hxx:248
SvxConfigEntry nId
sal_uInt16
desktop/source/app/main.c:29
/media/noel/disk2/libo5/desktop/source/app/main.c g_Exiting
int
editeng/source/misc/hangulhanja.cxx:79
editeng::HangulHanjaConversion_Impl m_eConvType
class HangulHanjaConversion::ConversionType
editeng/source/misc/svxacorr.cxx:229
GetIgnoreTranslWrapper bIsInit
int
filter/source/graphicfilter/eps/eps.cxx:141
PSWriter nNextChrSetId
sal_uInt8
......@@ -34,6 +40,9 @@ include/vcl/headbar.hxx:213
include/vcl/headbar.hxx:214
HeaderBar mnBorderOff2
long
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:190
(anonymous) g_bInGetJavaVM
sig_atomic_t
libreofficekit/source/gtk/tilebuffer.hxx:219
LOEvent m_nSetGraphicSelectionType
int
......@@ -61,6 +70,12 @@ sc/source/ui/vba/vbahyperlink.hxx:83
sd/qa/unit/tiledrendering/tiledrendering.cxx:968
ViewCallback m_nPart
int
soltools/cpp/_tokens.c:34
/media/noel/disk2/libo5/soltools/cpp/_tokens.c EBCDIC_ExternTokenDetected
int
soltools/cpp/_tokens.c:35
/media/noel/disk2/libo5/soltools/cpp/_tokens.c EBCDIC_StartTokenDetected
int
soltools/cpp/cpp.h:121
includelist always
char
......@@ -88,9 +103,24 @@ vcl/inc/unx/i18n_ic.hxx:33
vcl/inc/unx/salframe.h:130
X11SalFrame mbInputFocus
int
vcl/unx/generic/app/saldata.cxx:466
EmitFontpathWarning bOnce
int
vcl/unx/generic/app/saldata.cxx:519
X11SalData::XError bOnce
int
vcl/unx/generic/app/sm.cxx:186
/media/noel/disk2/libo5/vcl/unx/generic/app/sm.cxx nSmDel
int
vcl/unx/generic/window/FWS.cxx:174
extern badWindowFound
int
vcl/workben/icontest.cxx:145
IconTestApp nRet
int
workdir/LexTarget/l10ntools/source/cfglex.cxx:2301
/media/noel/disk2/libo5/workdir/LexTarget/l10ntools/source/cfglex.cxx bText
int
writerfilter/source/dmapper/PageBordersHandler.hxx:54
writerfilter::dmapper::PageBordersHandler m_eOffsetFrom
class SectionPropertyMap::BorderOffsetFrom
......@@ -131,7 +131,25 @@ void SingleValFields::niceName(const DeclaratorDecl* fieldOrVarDecl, MyFieldInfo
if (fieldDecl)
aInfo.parentClass = fieldDecl->getParent()->getQualifiedNameAsString();
else
aInfo.parentClass = dyn_cast<CXXRecordDecl>(varDecl->getDeclContext())->getQualifiedNameAsString();
{
if (auto parentRecordDecl = dyn_cast<CXXRecordDecl>(varDecl->getDeclContext()))
aInfo.parentClass = parentRecordDecl->getQualifiedNameAsString();
else if (auto parentMethodDecl = dyn_cast<CXXMethodDecl>(varDecl->getDeclContext()))
aInfo.parentClass = parentMethodDecl->getQualifiedNameAsString();
else if (auto parentFunctionDecl = dyn_cast<FunctionDecl>(varDecl->getDeclContext()))
aInfo.parentClass = parentFunctionDecl->getQualifiedNameAsString();
else if (isa<TranslationUnitDecl>(varDecl->getDeclContext()))
aInfo.parentClass = handler.getMainFileName();
else if (auto parentNamespaceDecl = dyn_cast<NamespaceDecl>(varDecl->getDeclContext()))
aInfo.parentClass = parentNamespaceDecl->getQualifiedNameAsString();
else if (isa<LinkageSpecDecl>(varDecl->getDeclContext()))
aInfo.parentClass = "extern"; // what to do here?
else
{
std::cout << "what is this? " << varDecl->getDeclContext()->getDeclKindName() << std::endl;
exit(1);
}
}
aInfo.fieldName = fieldOrVarDecl->getNameAsString();
aInfo.fieldType = fieldOrVarDecl->getType().getAsString();
......@@ -166,12 +184,16 @@ bool SingleValFields::VisitFieldDecl( const FieldDecl* fieldDecl )
bool SingleValFields::VisitVarDecl( const VarDecl* varDecl )
{
if (!varDecl->isStaticDataMember())
if (isa<ParmVarDecl>(varDecl))
return true;
if (varDecl->getType().isConstQualified())
return true;
if (!(varDecl->isStaticLocal() || varDecl->isStaticDataMember() || varDecl->hasGlobalStorage()))
return true;
auto canonicalDecl = varDecl->getCanonicalDecl();
if (!canonicalDecl->getLocation().isValid())
return true;
if( ignoreLocation( canonicalDecl )
|| isInUnoIncludeFile( compiler.getSourceManager().getSpellingLoc(canonicalDecl->getLocation())) )
......@@ -238,10 +260,12 @@ bool SingleValFields::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
const VarDecl* varDecl = dyn_cast_or_null<VarDecl>(declRefExpr->getDecl());
if (!varDecl)
return true;
if (!varDecl->isStaticDataMember())
if (isa<ParmVarDecl>(varDecl))
return true;
if (varDecl->getType().isConstQualified())
return true;
if (!(varDecl->isStaticLocal() || varDecl->isStaticDataMember() || varDecl->hasGlobalStorage()))
return true;
if (ignoreLocation(declRefExpr))
return true;
walkPotentialAssign(varDecl, declRefExpr);
......@@ -379,11 +403,14 @@ void SingleValFields::walkPotentialAssign( const DeclaratorDecl* fieldOrVarDecl,
|| isa<MaterializeTemporaryExpr>(parent) //???
|| isa<InitListExpr>(parent)
|| isa<CXXUnresolvedConstructExpr>(parent)
|| isa<LambdaExpr>(parent)
|| isa<PackExpansionExpr>(parent)
|| isa<CXXPseudoDestructorExpr>(parent)
)
{
break;
}
else if ( isa<ArrayInitLoopExpr>(parent) )
else if ( isa<ArrayInitLoopExpr>(parent) || isa<GCCAsmStmt>(parent) || isa<VAArgExpr>(parent))
{
bPotentiallyAssignedTo = true;
break;
......@@ -493,7 +520,11 @@ std::string SingleValFields::getExprValue(const Expr* arg)
return "?";
// for stuff like: OUString foo = "xxx";
if (auto stringLiteral = dyn_cast<clang::StringLiteral>(arg))
return stringLiteral->getString();
{
if (stringLiteral->getCharByteWidth() == 1)
return stringLiteral->getString();
return "?";
}
// ParenListExpr containing a CXXNullPtrLiteralExpr and has a NULL type pointer
if (auto parenListExpr = dyn_cast<ParenListExpr>(arg))
{
......@@ -506,7 +537,10 @@ std::string SingleValFields::getExprValue(const Expr* arg)
if (constructExpr->getNumArgs() >= 1
&& isa<clang::StringLiteral>(constructExpr->getArg(0)))
{
return dyn_cast<clang::StringLiteral>(constructExpr->getArg(0))->getString();
auto stringLiteral = dyn_cast<clang::StringLiteral>(constructExpr->getArg(0));
if (stringLiteral->getCharByteWidth() == 1)
return stringLiteral->getString();
return "?";
}
}
if (arg->getType()->isFloatingType())
......
......@@ -406,7 +406,7 @@ namespace dbtools
css::util::Date DBTypeConversion::toDate(const OUString& _sSQLString)
{
// get the token out of a string
static sal_Unicode sDateSep = '-';
static const sal_Unicode sDateSep = '-';
sal_Int32 nIndex = 0;
sal_uInt16 nYear = 0,
......
......@@ -75,7 +75,7 @@ namespace dbtools
}
assert(false);
static OUString sErr("#FilterManager::getFilterComponent unknown component#");
static const OUString sErr("#FilterManager::getFilterComponent unknown component#");
return sErr;
}
......
......@@ -360,7 +360,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
::sal_Int64 nLen = xSeek->getLength();
if ( nLen < position)
{
static ::sal_Int64 BUFFER_SIZE = 9192;
static const ::sal_Int64 BUFFER_SIZE = 9192;
#ifdef HSQLDB_DBG
aDataLog.seek( nLen );
#endif
......
......@@ -67,7 +67,7 @@ struct AlignSize_Impl
#endif
// the value of the maximal alignment
static sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
static const sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
static sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
{
......
......@@ -72,7 +72,7 @@ struct AlignSize_Impl
#endif
// the value of the maximal alignment
static sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
static const sal_Int32 nMaxAlignment = static_cast<sal_Int32>( reinterpret_cast<sal_Size>(&reinterpret_cast<AlignSize_Impl *>(16)->dDouble) - 16);
static sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
{
......
......@@ -438,14 +438,14 @@ void ScreenshotAnnotationDlg_Impl::PaintControlDataEntry(
// grow in pixels to be a little bit 'outside'. This also
// ensures that getWidth()/getHeight() ain't 0.0 (see division below)
static double fGrowTopLeft(1.5);
static double fGrowBottomRight(0.5);
static const double fGrowTopLeft(1.5);
static const double fGrowBottomRight(0.5);
aB2DRange.expand(aB2DRange.getMinimum() - basegfx::B2DPoint(fGrowTopLeft, fGrowTopLeft));
aB2DRange.expand(aB2DRange.getMaximum() + basegfx::B2DPoint(fGrowBottomRight, fGrowBottomRight));
// edge rounding in pixel. Need to convert, value for
// createPolygonFromRect is relative [0.0 .. 1.0]
static double fEdgeRoundPixel(8.0);
static const double fEdgeRoundPixel(8.0);
const basegfx::B2DPolygon aPolygon(
basegfx::utils::createPolygonFromRect(
aB2DRange,
......@@ -510,14 +510,14 @@ void ScreenshotAnnotationDlg_Impl::RepaintToBuffer(
// paint selected entries
for (auto&& rCandidate : maSelected)
{
static double fLineWidthEntries(5.0);
static const double fLineWidthEntries(5.0);
PaintControlDataEntry(*rCandidate, COL_LIGHTRED, fLineWidthEntries, fTransparence * 0.2);
}
// paint hilighted entry
if (mpHilighted && bPaintHilight)
{
static double fLineWidthHilight(7.0);
static const double fLineWidthHilight(7.0);
PaintControlDataEntry(*mpHilighted, aHilightColor, fLineWidthHilight, fTransparence);
}
......
......@@ -174,7 +174,7 @@ namespace drawinglayer
basegfx::B2DVector aScreenZoom(
basegfx::fTools::equalZero(aScale.getX()) ? 1.0 : aDiscreteSize.getX() / aScale.getX(),
basegfx::fTools::equalZero(aScale.getY()) ? 1.0 : aDiscreteSize.getY() / aScale.getY());
static double fZoomScale(28.0); // do not ask for this constant factor, but it gets the zoom right
static const double fZoomScale(28.0); // do not ask for this constant factor, but it gets the zoom right
aScreenZoom *= fZoomScale;
// set zoom at control view for text scaling
......
......@@ -69,20 +69,20 @@ namespace drawinglayer
if(fSquare > 0.0)
{
// check if less than a maximum square pixels is used
static sal_uInt32 fMaximumSquare(MAXIMUM_SQUARE_LENGTH * MAXIMUM_SQUARE_LENGTH);
static const sal_uInt32 fMaximumSquare(MAXIMUM_SQUARE_LENGTH * MAXIMUM_SQUARE_LENGTH);
if(fSquare < fMaximumSquare)
{
// calculate needed number of tiles and check if used more than a minimum count
const texture::GeoTexSvxTiled aTiling(getReferenceRange());
const sal_uInt32 nTiles(aTiling.getNumberOfTiles());
static sal_uInt32 nMinimumTiles(MINIMUM_TILES_LENGTH * MINIMUM_TILES_LENGTH);
static const sal_uInt32 nMinimumTiles(MINIMUM_TILES_LENGTH * MINIMUM_TILES_LENGTH);
if(nTiles >= nMinimumTiles)
{
rWidth = basegfx::fround(ceil(fW));
rHeight = basegfx::fround(ceil(fH));
static sal_uInt32 fMinimumSquare(MINIMUM_SQUARE_LENGTH * MINIMUM_SQUARE_LENGTH);
static const sal_uInt32 fMinimumSquare(MINIMUM_SQUARE_LENGTH * MINIMUM_SQUARE_LENGTH);
if(fSquare < fMinimumSquare)
{
......
......@@ -280,7 +280,7 @@ namespace drawinglayer
}
// determine the oversample value
static sal_uInt16 nDefaultOversampleValue(3);
static const sal_uInt16 nDefaultOversampleValue(3);
const sal_uInt16 nOversampleValue(aDrawinglayerOpt.IsAntiAliasing() ? nDefaultOversampleValue : 0);
geometry::ViewInformation3D aViewInformation3D(getViewInformation3D());
......
......@@ -228,7 +228,7 @@ namespace drawinglayer
// is constant, relative to font size, rotated with the text and has a
// constant color.
// shadow parameter values
static double fFactor(1.0 / 24.0);
static const double fFactor(1.0 / 24.0);
const double fTextShadowOffset(aDecTrans.getScale().getY() * fFactor);
static basegfx::BColor aShadowColor(0.3, 0.3, 0.3);
......
......@@ -29,7 +29,7 @@ namespace drawinglayer
{
namespace primitive2d
{
static double fDiscreteSize(1.1);
static const double fDiscreteSize(1.1);
void TextEffectPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const
{
......
......@@ -46,7 +46,7 @@ namespace
if(basegfx::fTools::equalZero(aFontScale.getY()))
{
// no font height; choose one and adapt scale to get back to original scaling
static double fDefaultFontScale(100.0);
static const double fDefaultFontScale(100.0);
rScale.setY(1.0 / fDefaultFontScale);
aFontScale.setY(fDefaultFontScale);
}
......
......@@ -47,7 +47,7 @@ namespace drawinglayer
getTransformation().decompose(aScale, aTranslate, fRotate, fShearX);
// calculate distances based on a static default (to allow testing in debugger)
static double fDefaultDistance(0.03);
static const double fDefaultDistance(0.03);
const double fFontHeight(aScale.getY());
const double fUnderlineDistance(fFontHeight * fDefaultDistance);
const double fWaveWidth(2.0 * fUnderlineDistance);
......
......@@ -548,7 +548,7 @@ namespace drawinglayer
if(basegfx::fTools::more(getRadius(), 0.0))
{
const attribute::MaterialAttribute3D aMaterial(getBColor());
static sal_uInt32 nSegments(8); // default for 3d line segments, for more quality just raise this value (in even steps)
static const sal_uInt32 nSegments(8); // default for 3d line segments, for more quality just raise this value (in even steps)
const bool bClosed(getB3DPolygon().isClosed());
const bool bNoLineJoin(basegfx::B2DLineJoin::NONE == getLineJoin());
const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1);
......
......@@ -96,7 +96,7 @@ BibConfig* BibModul::GetConfig()
// PropertyNames
#define STATIC_USTRING(a,b) OUString a(b)
#define STATIC_USTRING(a,b) const OUString a(b)
STATIC_USTRING(FM_PROP_LABEL,"Label");
STATIC_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
STATIC_USTRING(FM_PROP_NAME,"Name");
......
......@@ -19,16 +19,16 @@
#ifndef INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBPROP_HXX
#define INCLUDED_EXTENSIONS_SOURCE_BIBLIOGRAPHY_BIBPROP_HXX
extern OUString FM_PROP_LABEL;
extern OUString FM_PROP_NAME;
extern OUString FM_PROP_CONTROLSOURCE;
extern OUString FM_PROP_FORMATKEY;
extern OUString FM_PROP_VALUE;
extern OUString FM_PROP_EDITMODE;
extern OUString FM_PROP_DATASOURCE;
extern OUString FM_PROP_CURSORSOURCE;
extern OUString FM_PROP_CURSORSOURCETYPE;
extern OUString FM_PROP_TEXT;
extern const OUString FM_PROP_LABEL;
extern const OUString FM_PROP_NAME;
extern const OUString FM_PROP_CONTROLSOURCE;
extern const OUString FM_PROP_FORMATKEY;
extern const OUString FM_PROP_VALUE;
extern const OUString FM_PROP_EDITMODE;
extern const OUString FM_PROP_DATASOURCE;
extern const OUString FM_PROP_CURSORSOURCE;
extern const OUString FM_PROP_CURSORSOURCETYPE;
extern const OUString FM_PROP_TEXT;
#endif
......
......@@ -714,7 +714,7 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
void LoadEnv::impl_detectTypeAndFilter()
{
static sal_Int32 FILTERFLAG_TEMPLATEPATH = 16;
static const sal_Int32 FILTERFLAG_TEMPLATEPATH = 16;
// SAFE ->
osl::ClearableMutexGuard aReadLock(m_mutex);
......
......@@ -1082,9 +1082,9 @@ OUString getHebrewNativeNumberString(const OUString& aNumberString, bool useGere
// See UTN 41 for implementation information
// http://www.unicode.org/notes/tn41/
static sal_Unicode cyrillicThousandsMark = 0x0482;
static sal_Unicode cyrillicTitlo = 0x0483;
static sal_Unicode cyrillicTen = 0x0456;
static const sal_Unicode cyrillicThousandsMark = 0x0482;
static const sal_Unicode cyrillicTitlo = 0x0483;
static const sal_Unicode cyrillicTen = 0x0456;
struct CyrillicNumberChar {
sal_Unicode code;
......
......@@ -22,7 +22,7 @@
#include <rtl/strbuf.hxx>
#include <osl/diagnose.h>
static OString sGlobal("::");
static const OString sGlobal("::");
static OString convertName(const OString& name)
{
......
......@@ -2545,7 +2545,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
bThousand = nIntegerDigits > 0 && ((nIntegerDigits % 3) == 0);
}
OUString aFormat;
static OUString sBreak = ",";
static const OUString sBreak = ",";
const OUString sThousand = OUString::number(static_cast<sal_Int32>(bThousand));
const OUString sNegRed = OUString::number(static_cast<sal_Int32>(bNegRed));
const OUString sPrecision = OUString::number(nPrecision);
......
......@@ -1984,7 +1984,7 @@ static void implWriteCharToBuffer( OUStringBuffer& aBuf, sal_Unicode cu, bool bK
static void implWriteStringWithEncoding( const OUString& aStr,
Reference< io::XTextOutputStream2 > const & xTextOutputStream, bool bKey )
{
static sal_Unicode cLineFeed = 0xa;
static const sal_Unicode cLineFeed = 0xa;
OUStringBuffer aBuf;
sal_Int32 nLen = aStr.getLength();
......
......@@ -155,10 +155,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterObject::getAccessibleIndexInParent()
sal_Int16 SAL_CALL AccessibleSlideSorterObject::getAccessibleRole()
{
ThrowIfDisposed();
//set Role = Shape
//static sal_Int16 nRole = AccessibleRole::LIST_ITEM;
static sal_Int16 nRole = AccessibleRole::SHAPE;
return nRole;
return AccessibleRole::SHAPE;
}
OUString SAL_CALL AccessibleSlideSorterObject::getAccessibleDescription()
......
......@@ -253,8 +253,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterView::getAccessibleIndexInParent()
sal_Int16 SAL_CALL AccessibleSlideSorterView::getAccessibleRole()
{
ThrowIfDisposed();
static sal_Int16 nRole = AccessibleRole::DOCUMENT;
return nRole;
return AccessibleRole::DOCUMENT;
}
OUString SAL_CALL AccessibleSlideSorterView::getAccessibleDescription()
......
......@@ -763,7 +763,7 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con
if (bDotted)
{
std::vector<double> aPattern;
static double fFactor(1.0);
static const double fFactor(1.0);
aPattern.push_back(3.0 * fFactor);
aPattern.push_back(1.0 * fFactor);
......
......@@ -368,7 +368,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
// use a text size factor to get more reliable text sizes from the text layouter
// (and from vcl), tipp from HDU
static sal_uInt32 nTextSizeFactor(100);
static const sal_uInt32 nTextSizeFactor(100);
// use a factor to get more linear text size calculations
aScaledVclFont.SetFontHeight( 500 * nTextSizeFactor );
......
......@@ -2582,7 +2582,7 @@ void SfxHelpWindow_Impl::Resize()
void SfxHelpWindow_Impl::Split()
{
static long nMinSplitSize = 5;
static const long nMinSplitSize = 5;
static long nMaxSplitSize = 99 - nMinSplitSize;
SplitWindow::Split();
......
......@@ -47,43 +47,43 @@ namespace
const OUString& PROP_BACNAME()
{
static OUString sProp("BusinessAuthorizationCategory:Name");
static const OUString sProp("BusinessAuthorizationCategory:Name");
return sProp;
}
const OUString& PROP_STARTVALIDITY()
{
static OUString sProp("Authorization:StartValidity");
static const OUString sProp("Authorization:StartValidity");
return sProp;
}
const OUString& PROP_NONE()
{
static OUString sProp("None");
static const OUString sProp("None");
return sProp;
}
const OUString& PROP_IMPACTSCALE()
{
static OUString sProp("Impact:Scale");
static const OUString sProp("Impact:Scale");
return sProp;
}
const OUString& PROP_IMPACTLEVEL()
{
static OUString sProp("Impact:Level:Confidentiality");
static const OUString sProp("Impact:Level:Confidentiality");
return sProp;
}
const OUString& PROP_PREFIX_EXPORTCONTROL()
{
static OUString sProp("urn:bails:ExportControl:");
static const OUString sProp("urn:bails:ExportControl:");
return sProp;
}
const OUString& PROP_PREFIX_NATIONALSECURITY()
{
static OUString sProp("urn:bails:NationalSecurity:");
static const OUString sProp("urn:bails:NationalSecurity:");
return sProp;
}
......@@ -919,25 +919,25 @@ const OUString& SfxClassificationHelper::policyTypeToString(SfxClassificationPol
const OUString& SfxClassificationHelper::PROP_DOCHEADER()
{
static OUString sProp("Marking:document-header");
static const OUString sProp("Marking:document-header");
return sProp;
}
const OUString& SfxClassificationHelper::PROP_DOCFOOTER()
{
static OUString sProp("Marking:document-footer");
static const OUString sProp("Marking:document-footer");
return sProp;
}
const OUString& SfxClassificationHelper::PROP_DOCWATERMARK()
{
static OUString sProp("Marking:document-watermark");
static const OUString sProp("Marking:document-watermark");
return sProp;
}
const OUString& SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY()
{
static OUString sProp("urn:bails:IntellectualProperty:");
static const OUString sProp("urn:bails:IntellectualProperty:");
return sProp;
}
......
......@@ -145,7 +145,7 @@ void FileControl::StateChanged( StateChangedType nType )
void FileControl::Resize()
{
static long ButtonBorder = 10;
static const long ButtonBorder = 10;
if( mnInternalFlags & FileControlMode_Internal::INRESIZE )
return;
......
......@@ -37,7 +37,7 @@ namespace sdr
{
const basegfx::B2DRange aHatchRange(getBasePosition(), maSecondPosition);
basegfx::BColor aColor(getBaseColor().getBColor());
static double fChange(0.1); // just small optical change, do not make it annoying
static const double fChange(0.1); // just small optical change, do not make it annoying
if(mbOverlayState)
{
......
......@@ -598,7 +598,7 @@ namespace
}
}
static double fPatScFact(10.0); // 10.0 multiply, see old code
static const double fPatScFact(10.0); // 10.0 multiply, see old code
const std::vector<double> aDashing(svtools::GetLineDashing(rBorder.Type(), rBorder.PatternScale() * fPatScFact));
const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDashing);
const basegfx::B2DPoint aStart(rOrigin + (aPerpendX * aCombination.getRefModeOffset()));
......
......@@ -405,7 +405,7 @@ bool XDash::operator==(const XDash& rDash) const
// XDash is translated into an array of doubles which describe the lengths of the
// dashes, dots and empty passages. It returns the complete length of the full DashDot
// sequence and fills the given vetor of doubles accordingly (also resizing, so deleting it).
static double SMALLEST_DASH_WIDTH(26.95);
static const double SMALLEST_DASH_WIDTH(26.95);
double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double fLineWidth) const
{
......
......@@ -277,7 +277,7 @@ static void lcl_formatReferenceLanguage( OUString& rRefText,
// ASCII 1-letter numbering
// az a), e), f) ... x)
// az i., v. (but, a x.)