summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-15 19:13:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-09-17 09:05:38 +0200
commit206b5b2661be37efdff3c6aedb6f248c4636be79 (patch)
treeaf385e5b4725dcfea23988d9113cced8e9ccaf3c /xmloff
parenta85d3ba1c0de313b60324b9ecfa488bb99d69d06 (diff)
New loplugin:external
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx2
-rw-r--r--xmloff/source/core/DomExport.cxx6
-rw-r--r--xmloff/source/draw/shapeexport.cxx10
-rw-r--r--xmloff/source/draw/xexptran.cxx16
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx44
-rw-r--r--xmloff/source/forms/controlpropertymap.cxx4
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx6
-rw-r--r--xmloff/source/style/xmlnumfe.cxx2
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/text/txtflde.cxx18
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx2
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.cxx16
-rw-r--r--xmloff/source/xforms/xformsexport.cxx26
15 files changed, 80 insertions, 80 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 3864308f40dc..b7f0a2ff8087 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -241,14 +241,14 @@ SchXMLChartContext::SchXMLChartContext( SchXMLImportHelper& rImpHelper,
SchXMLChartContext::~SchXMLChartContext()
{}
-bool lcl_hasServiceName(Reference<lang::XMultiServiceFactory> const & xFactory, OUString const & rServiceName)
+static bool lcl_hasServiceName(Reference<lang::XMultiServiceFactory> const & xFactory, OUString const & rServiceName)
{
const uno::Sequence<OUString> aServiceNames(xFactory->getAvailableServiceNames());
return std::find(aServiceNames.begin(), aServiceNames.end(), rServiceName) != aServiceNames.end();
}
-void lcl_setDataProvider(uno::Reference<chart2::XChartDocument> const & xChartDoc, OUString const & sDataPilotSource)
+static void lcl_setDataProvider(uno::Reference<chart2::XChartDocument> const & xChartDoc, OUString const & sDataPilotSource)
{
if (!xChartDoc.is())
return;
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 7b1348ec846e..eb0934cc8a90 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -155,7 +155,7 @@ SchXMLChartTypeEnum GetChartTypeEnum( const OUString& rClassName )
typedef std::map< OUString, OUString > tMakeStringStringMap;
//static
-const tMakeStringStringMap& lcl_getChartTypeNameMap()
+static const tMakeStringStringMap& lcl_getChartTypeNameMap()
{
//shape property -- chart model object property
static const tMakeStringStringMap g_aChartTypeNameMap{
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 19f755fb6f29..c804aeb179f5 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -206,7 +206,7 @@ public:
virtual void EndElement() override;
};
-SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_uInt16 p_nPrefix,
+static SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_uInt16 p_nPrefix,
const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList,
beans::PropertyValue& rProp, XMLConfigBaseContext* pBaseContext)
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index e6d018242676..736835056b9d 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -60,11 +60,11 @@ public:
virtual void endElement( const Reference<XElement>& ) {}
};
-void visit( DomVisitor&, const Reference<XDocument>& );
-void visit( DomVisitor&, const Reference<XNode>& );
+static void visit( DomVisitor&, const Reference<XDocument>& );
+static void visit( DomVisitor&, const Reference<XNode>& );
-void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode )
+static void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode )
{
switch( xNode->getNodeType() )
{
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 9936f974183d..22c421e19a70 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -3739,7 +3739,7 @@ void XMLShapeExport::export3DLamps( const css::uno::Reference< css::beans::XProp
// using namespace ::xmloff::EnhancedCustomShapeToken;
-void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::EnhancedCustomShapeParameter& rParameter )
+static void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::EnhancedCustomShapeParameter& rParameter )
{
if ( !rStrBuffer.isEmpty() )
rStrBuffer.append( ' ' );
@@ -3799,7 +3799,7 @@ void ExportParameter( OUStringBuffer& rStrBuffer, const css::drawing::EnhancedCu
}
}
-void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUString >& rEquations )
+static void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUString >& rEquations )
{
sal_Int32 i;
for ( i = 0; i < rEquations.getLength(); i++ )
@@ -3825,7 +3825,7 @@ void ImpExportEquations( SvXMLExport& rExport, const uno::Sequence< OUString >&
}
}
-void ImpExportHandles( SvXMLExport& rExport, const uno::Sequence< beans::PropertyValues >& rHandles )
+static void ImpExportHandles( SvXMLExport& rExport, const uno::Sequence< beans::PropertyValues >& rHandles )
{
sal_uInt32 i, j, nElements = rHandles.getLength();
if ( nElements )
@@ -3969,7 +3969,7 @@ void ImpExportHandles( SvXMLExport& rExport, const uno::Sequence< beans::Propert
}
}
-void ImpExportEnhancedPath( SvXMLExport& rExport,
+static void ImpExportEnhancedPath( SvXMLExport& rExport,
const uno::Sequence< css::drawing::EnhancedCustomShapeParameterPair >& rCoordinates,
const uno::Sequence< css::drawing::EnhancedCustomShapeSegment >& rSegments,
bool bExtended = false )
@@ -4129,7 +4129,7 @@ void ImpExportEnhancedPath( SvXMLExport& rExport,
ImpExportEnhancedPath( rExport, rCoordinates, rSegments, true );
}
-void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< beans::XPropertySet >& xPropSet )
+static void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< beans::XPropertySet >& xPropSet )
{
bool bEquations = false;
uno::Sequence< OUString > aEquations;
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 9aece77e02a2..23eec3b5b8e4 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -39,28 +39,28 @@ using namespace ::com::sun::star;
using o3tl::make_unique;
// parsing help functions for simple chars
-void Imp_SkipSpaces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
+static void Imp_SkipSpaces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
{
while(rPos < nLen
&& ' ' == rStr[rPos])
rPos++;
}
-void Imp_SkipSpacesAndOpeningBraces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
+static void Imp_SkipSpacesAndOpeningBraces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
{
while(rPos < nLen
&& (' ' == rStr[rPos] || '(' == rStr[rPos]))
rPos++;
}
-void Imp_SkipSpacesAndCommas(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
+static void Imp_SkipSpacesAndCommas(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
{
while(rPos < nLen
&& (' ' == rStr[rPos] || ',' == rStr[rPos]))
rPos++;
}
-void Imp_SkipSpacesAndClosingBraces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
+static void Imp_SkipSpacesAndClosingBraces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
{
while(rPos < nLen
&& (' ' == rStr[rPos] || ')' == rStr[rPos]))
@@ -69,7 +69,7 @@ void Imp_SkipSpacesAndClosingBraces(const OUString& rStr, sal_Int32& rPos, const
// parsing help functions for integer numbers
-bool Imp_IsOnUnitChar(const OUString& rStr, const sal_Int32 nPos)
+static bool Imp_IsOnUnitChar(const OUString& rStr, const sal_Int32 nPos)
{
sal_Unicode aChar(rStr[nPos]);
@@ -78,7 +78,7 @@ bool Imp_IsOnUnitChar(const OUString& rStr, const sal_Int32 nPos)
|| '%' == aChar;
}
-double Imp_GetDoubleChar(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen,
+static double Imp_GetDoubleChar(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen,
const SvXMLUnitConverter& rConv, double fRetval, bool bLookForUnits = false)
{
sal_Unicode aChar(rStr[rPos]);
@@ -141,14 +141,14 @@ double Imp_GetDoubleChar(const OUString& rStr, sal_Int32& rPos, const sal_Int32
return fRetval;
}
-void Imp_PutDoubleChar(OUString& rStr, double fValue)
+static void Imp_PutDoubleChar(OUString& rStr, double fValue)
{
OUStringBuffer sStringBuffer;
::sax::Converter::convertDouble(sStringBuffer, fValue);
rStr += sStringBuffer;
}
-void Imp_PutDoubleChar(OUStringBuffer& rStr, const SvXMLUnitConverter& rConv, double fValue,
+static void Imp_PutDoubleChar(OUStringBuffer& rStr, const SvXMLUnitConverter& rConv, double fValue,
bool bConvertUnits = false)
{
OUStringBuffer sStringBuffer;
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index f84c1e976dd5..c30647b5a469 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -75,7 +75,7 @@ const SvXMLEnumMapEntry<sal_uInt16> aXML_GluePointEnumMap[] =
{ XML_RECTANGLE, 3 },
{ XML_TOKEN_INVALID, 0 }
};
-void GetBool( std::vector< css::beans::PropertyValue >& rDest,
+static void GetBool( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
bool bAttrBool;
@@ -88,7 +88,7 @@ void GetBool( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetInt32( std::vector< css::beans::PropertyValue >& rDest,
+static void GetInt32( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
sal_Int32 nAttrNumber;
@@ -101,7 +101,7 @@ void GetInt32( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetDouble( std::vector< css::beans::PropertyValue >& rDest,
+static void GetDouble( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
double fAttrDouble;
@@ -114,7 +114,7 @@ void GetDouble( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetString( std::vector< css::beans::PropertyValue >& rDest,
+static void GetString( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
beans::PropertyValue aProp;
@@ -124,7 +124,7 @@ void GetString( std::vector< css::beans::PropertyValue >& rDest,
}
template<typename EnumT>
-void GetEnum( std::vector< css::beans::PropertyValue >& rDest,
+static void GetEnum( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp,
const SvXMLEnumMapEntry<EnumT>& rMap )
{
@@ -138,7 +138,7 @@ void GetEnum( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetDoublePercentage( std::vector< css::beans::PropertyValue >& rDest,
+static void GetDoublePercentage( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
sal_Int16 const eSrcUnit = ::sax::Converter::GetUnitFromString(
@@ -158,7 +158,7 @@ void GetDoublePercentage( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetB3DVector( std::vector< css::beans::PropertyValue >& rDest,
+static void GetB3DVector( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
::basegfx::B3DVector aB3DVector;
@@ -172,7 +172,7 @@ void GetB3DVector( std::vector< css::beans::PropertyValue >& rDest,
}
}
-bool GetEquationName( const OUString& rEquation, const sal_Int32 nStart, OUString& rEquationName )
+static bool GetEquationName( const OUString& rEquation, const sal_Int32 nStart, OUString& rEquationName )
{
sal_Int32 nIndex = nStart;
while( nIndex < rEquation.getLength() )
@@ -195,7 +195,7 @@ bool GetEquationName( const OUString& rEquation, const sal_Int32 nStart, OUStrin
return bValid;
}
-bool GetNextParameter( css::drawing::EnhancedCustomShapeParameter& rParameter, sal_Int32& nIndex, const OUString& rParaString )
+static bool GetNextParameter( css::drawing::EnhancedCustomShapeParameter& rParameter, sal_Int32& nIndex, const OUString& rParaString )
{
if ( nIndex >= rParaString.getLength() )
return false;
@@ -427,7 +427,7 @@ bool GetNextParameter( css::drawing::EnhancedCustomShapeParameter& rParameter, s
return bValid;
}
-void GetPosition3D( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:extrusion-viewpoint
+static void GetPosition3D( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:extrusion-viewpoint
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp,
SvXMLUnitConverter& rUnitConverter )
{
@@ -441,7 +441,7 @@ void GetPosition3D( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetDoubleSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:glue-point-leaving-directions
+static void GetDoubleSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:glue-point-leaving-directions
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< double > vDirection;
@@ -466,7 +466,7 @@ void GetDoubleSequence( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetSizeSequence( std::vector< css::beans::PropertyValue >& rDest,
+static void GetSizeSequence( std::vector< css::beans::PropertyValue >& rDest,
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< sal_Int32 > vNum;
@@ -503,7 +503,7 @@ void GetSizeSequence( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetEnhancedParameter( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:handle-position
+static void GetEnhancedParameter( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:handle-position
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
sal_Int32 nIndex = 0;
@@ -517,7 +517,7 @@ void GetEnhancedParameter( std::vector< css::beans::PropertyValue >& rDest,
}
}
-void GetEnhancedParameterPair( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:handle-position
+static void GetEnhancedParameterPair( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:handle-position
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
sal_Int32 nIndex = 0;
@@ -532,7 +532,7 @@ void GetEnhancedParameterPair( std::vector< css::beans::PropertyValue >& rDest,
}
}
-sal_Int32 GetEnhancedParameterPairSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:glue-points
+static sal_Int32 GetEnhancedParameterPairSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:glue-points
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< css::drawing::EnhancedCustomShapeParameterPair > vParameter;
@@ -554,7 +554,7 @@ sal_Int32 GetEnhancedParameterPairSequence( std::vector< css::beans::PropertyVal
return vParameter.size();
}
-void GetEnhancedRectangleSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:text-areas
+static void GetEnhancedRectangleSequence( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:text-areas
const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp )
{
std::vector< css::drawing::EnhancedCustomShapeTextFrame > vTextFrame;
@@ -578,7 +578,7 @@ void GetEnhancedRectangleSequence( std::vector< css::beans::PropertyValue >& rDe
}
}
-void GetEnhancedPath( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:enhanced-path
+static void GetEnhancedPath( std::vector< css::beans::PropertyValue >& rDest, // e.g. draw:enhanced-path
const OUString& rValue )
{
std::vector< css::drawing::EnhancedCustomShapeParameterPair > vCoordinates;
@@ -816,7 +816,7 @@ void GetEnhancedPath( std::vector< css::beans::PropertyValue >& rDest,
rDest.push_back( aProp );
}
-void GetAdjustmentValues( std::vector< css::beans::PropertyValue >& rDest, // draw:adjustments
+static void GetAdjustmentValues( std::vector< css::beans::PropertyValue >& rDest, // draw:adjustments
const OUString& rValue )
{
std::vector< css::drawing::EnhancedCustomShapeAdjustmentValue > vAdjustmentValue;
@@ -1105,7 +1105,7 @@ void XMLEnhancedCustomShapeContext::StartElement( const uno::Reference< xml::sax
}
}
-void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
+static void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
const std::vector< beans::PropertyValues >& rElement,
const OUString& rElementName )
{
@@ -1118,7 +1118,7 @@ void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rP
}
}
-void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
+static void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
const std::vector< OUString >& rElement,
const OUString& rElementName )
{
@@ -1131,7 +1131,7 @@ void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rP
}
}
-void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
+static void SdXMLCustomShapePropertyMerge( std::vector< css::beans::PropertyValue >& rPropVec,
const std::vector< css::beans::PropertyValue >& rElement,
const OUString& rElementName )
{
@@ -1148,7 +1148,7 @@ typedef std::unordered_map< OUString, sal_Int32 > EquationHashMap;
/* if rPara.Type is from type EnhancedCustomShapeParameterType::EQUATION, the name of the equation
will be converted from OUString to index */
-void CheckAndResolveEquationParameter( css::drawing::EnhancedCustomShapeParameter& rPara, EquationHashMap* pH )
+static void CheckAndResolveEquationParameter( css::drawing::EnhancedCustomShapeParameter& rPara, EquationHashMap* pH )
{
if ( rPara.Type == css::drawing::EnhancedCustomShapeParameterType::EQUATION )
{
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 852c2d93d3da..9ca9b7aed308 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -38,7 +38,7 @@ namespace xmloff
#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
#define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
- XMLPropertyMapEntry* getControlStylePropertyMap_Access( )
+ static XMLPropertyMapEntry* getControlStylePropertyMap_Access( )
{
static XMLPropertyMapEntry aControlStyleProperties[] =
{
@@ -93,7 +93,7 @@ namespace xmloff
}
};
- void implSortMap(XMLPropertyMapEntry* _pMap)
+ static void implSortMap(XMLPropertyMapEntry* _pMap)
{
XMLPropertyMapEntry* pEnd;
// determine the last element
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 24926aa8c5ad..95f0394e16f7 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -534,7 +534,7 @@ void XMLFontAutoStylePool::exportXML()
}
}
-OUString getFreeFontName(uno::Reference<embed::XStorage> const & rxStorage, OUString const & rFamilyName)
+static OUString getFreeFontName(uno::Reference<embed::XStorage> const & rxStorage, OUString const & rFamilyName)
{
OUString sName;
int nIndex = 1;
@@ -549,7 +549,7 @@ OUString getFreeFontName(uno::Reference<embed::XStorage> const & rxStorage, OUSt
return sName;
}
-OString convertToHashString(std::vector<unsigned char> const & rHash)
+static OString convertToHashString(std::vector<unsigned char> const & rHash)
{
std::stringstream aStringStream;
for (auto const & rByte : rHash)
@@ -560,7 +560,7 @@ OString convertToHashString(std::vector<unsigned char> const & rHash)
return OString(aStringStream.str().c_str());
}
-OString getFileHash(OUString const & rFileUrl)
+static OString getFileHash(OUString const & rFileUrl)
{
OString aHash;
osl::File aFile(rFileUrl);
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index ddc70eec4733..b83ae01fb358 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -845,7 +845,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
// for old (automatic) currency formats: parse currency symbol from text
-sal_Int32 lcl_FindSymbol( const OUString& sUpperStr, const OUString& sCurString )
+static sal_Int32 lcl_FindSymbol( const OUString& sUpperStr, const OUString& sCurString )
{
// search for currency symbol
// Quoting as in ImpSvNumberformatScan::Symbol_Division
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 8018f2b1bc3d..c02eea4fb020 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -536,7 +536,7 @@ const TableStyleElement* getWriterSpecificTableStyleMap()
return &gWriterSpecificTableStyleElements[0];
}
-const TableStyleElement* getWriterSpecificTableStyleAttributes()
+static const TableStyleElement* getWriterSpecificTableStyleAttributes()
{
static const struct TableStyleElement gWriterSpecifitTableStyleAttributes[] =
{
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 698fcb076477..ba5bba24ac6a 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -249,25 +249,25 @@ SvXMLEnumStringMapEntry<FieldIdEnum> const aFieldServiceNameMapping[] =
// property accessor helper functions
-inline bool GetBoolProperty(const OUString&,
+static inline bool GetBoolProperty(const OUString&,
const Reference<XPropertySet> &);
-inline bool GetOptionalBoolProperty(const OUString&,
+static inline bool GetOptionalBoolProperty(const OUString&,
const Reference<XPropertySet> &,
const Reference<XPropertySetInfo> &,
bool bDefault);
-inline double GetDoubleProperty(const OUString&,
+static inline double GetDoubleProperty(const OUString&,
const Reference<XPropertySet> &);
-inline OUString const GetStringProperty(const OUString&,
+static inline OUString const GetStringProperty(const OUString&,
const Reference<XPropertySet> &);
-inline sal_Int32 GetIntProperty(const OUString&,
+static inline sal_Int32 GetIntProperty(const OUString&,
const Reference<XPropertySet> &);
-inline sal_Int16 GetInt16Property(const OUString&,
+static inline sal_Int16 GetInt16Property(const OUString&,
const Reference<XPropertySet> &);
-inline sal_Int8 GetInt8Property(const OUString&,
+static inline sal_Int8 GetInt8Property(const OUString&,
const Reference<XPropertySet> &);
-inline util::DateTime const GetDateTimeProperty( const OUString& sPropName,
+static inline util::DateTime const GetDateTimeProperty( const OUString& sPropName,
const Reference<XPropertySet> & xPropSet);
-inline Sequence<OUString> const GetStringSequenceProperty(
+static inline Sequence<OUString> const GetStringSequenceProperty(
const OUString& sPropName,
const Reference<XPropertySet> & xPropSet);
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index 7667d628b397..5fd369f621e5 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -122,7 +122,7 @@ OUString XMLEventOASISTransformerContext::GetEventName(
return (*aIter).second;
}
-bool ParseURL(
+static bool ParseURL(
const OUString& rAttrValue,
OUString* pName, OUString* pLocation )
{
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index c1720b1f5c60..fcf58ce5eb2f 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -132,26 +132,26 @@ void SchemaRestrictionContext::HandleAttribute(
typedef Any (*convert_t)( const OUString& );
-Any xforms_string( const OUString& rValue )
+static Any xforms_string( const OUString& rValue )
{
return makeAny( rValue );
}
-Any xforms_int32( const OUString& rValue )
+static Any xforms_int32( const OUString& rValue )
{
sal_Int32 nValue;
bool bSuccess = ::sax::Converter::convertNumber( nValue, rValue );
return bSuccess ? makeAny( nValue ) : Any();
}
-Any xforms_int16( const OUString& rValue )
+static Any xforms_int16( const OUString& rValue )
{
sal_Int32 nValue;
bool bSuccess = ::sax::Converter::convertNumber( nValue, rValue );
return bSuccess ? makeAny( static_cast<sal_Int16>( nValue ) ) : Any();
}
-Any xforms_whitespace( const OUString& rValue )
+static Any xforms_whitespace( const OUString& rValue )
{
Any aValue;
if( IsXMLToken( rValue, XML_PRESERVE ) )
@@ -163,14 +163,14 @@ Any xforms_whitespace( const OUString& rValue )
return aValue;
}
-Any xforms_double( const OUString& rValue )
+static Any xforms_double( const OUString& rValue )
{
double fValue;
bool bSuccess = ::sax::Converter::convertDouble( fValue, rValue );
return bSuccess ? makeAny( fValue ) : Any();
}
-Any xforms_date( const OUString& rValue )
+static Any xforms_date( const OUString& rValue )
{
Any aAny;
@@ -191,14 +191,14 @@ Any xforms_date( const OUString& rValue )
return aAny;
}
-Any xforms_dateTime( const OUString& rValue )
+static Any xforms_dateTime( const OUString& rValue )
{
util::DateTime aDateTime;
bool const bSuccess = ::sax::Converter::parseDateTime(aDateTime, rValue);
return bSuccess ? makeAny( aDateTime ) : Any();
}
-Any xforms_time( const OUString& rValue )
+static Any xforms_time( const OUString& rValue )
{
Any aAny;
Duration aDuration;
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 98291990581a..db14dec1e36b 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -101,10 +101,10 @@ void exportXForms( SvXMLExport& rExport )
}
-void exportXFormsInstance( SvXMLExport&, const Sequence<PropertyValue>& );
-void exportXFormsBinding( SvXMLExport&, const Reference<XPropertySet>& );
-void exportXFormsSubmission( SvXMLExport&, const Reference<XPropertySet>& );
-void exportXFormsSchemas( SvXMLExport&, const Reference<css::xforms::XModel>& );
+static void exportXFormsInstance( SvXMLExport&, const Sequence<PropertyValue>& );
+static void exportXFormsBinding( SvXMLExport&, const Reference<XPropertySet>& );
+static void exportXFormsSubmission( SvXMLExport&, const Reference<XPropertySet>& );
+static void exportXFormsSchemas( SvXMLExport&, const Reference<css::xforms::XModel>& );
typedef OUString (*convert_t)( const Any& );
@@ -123,15 +123,15 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet,
#define TABLE_END { nullptr, 0, 0, nullptr }
// any conversion functions
-OUString xforms_string( const Any& );
-OUString xforms_bool( const Any& );
-OUString xforms_whitespace( const Any& );
-template<typename T, void (*FUNC)( OUStringBuffer&, T )> OUString xforms_convert( const Any& );
-template<typename T, void (*FUNC)( OUStringBuffer&, const T& )> OUString xforms_convertRef( const Any& );
-
-void xforms_formatDate( OUStringBuffer& aBuffer, const util::Date& aDate );
-void xforms_formatTime( OUStringBuffer& aBuffer, const css::util::Time& aTime );
-void xforms_formatDateTime( OUStringBuffer& aBuffer, const util::DateTime& aDateTime );
+static OUString xforms_string( const Any& );
+static OUString xforms_bool( const Any& );
+static OUString xforms_whitespace( const Any& );
+template<typename T, void (*FUNC)( OUStringBuffer&, T )> static OUString xforms_convert( const Any& );
+template<typename T, void (*FUNC)( OUStringBuffer&, const T& )> static OUString xforms_convertRef( const Any& );
+
+static void xforms_formatDate( OUStringBuffer& aBuffer, const util::Date& aDate );
+static void xforms_formatTime( OUStringBuffer& aBuffer, const css::util::Time& aTime );
+static void xforms_formatDateTime( OUStringBuffer& aBuffer, const util::DateTime& aDateTime );
static void convertNumber(OUStringBuffer & b, sal_Int32 n) {
b.append(n);