summaryrefslogtreecommitdiff
path: root/oox
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 /oox
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 'oox')
-rw-r--r--oox/source/crypto/AgileEngine.cxx2
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx2
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx6
-rw-r--r--oox/source/drawingml/table/tablecell.cxx8
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx8
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx2
-rw-r--r--oox/source/drawingml/textliststyle.cxx2
-rw-r--r--oox/source/export/chartexport.cxx20
-rw-r--r--oox/source/export/drawingml.cxx10
-rw-r--r--oox/source/export/shapes.cxx8
-rw-r--r--oox/source/export/vmlexport.cxx10
-rw-r--r--oox/source/ole/olehelper.cxx2
-rw-r--r--oox/source/ole/vbaexport.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx2
-rw-r--r--oox/source/ppt/slidepersist.cxx2
-rw-r--r--oox/source/vml/vmlformatting.cxx4
-rw-r--r--oox/source/vml/vmlshape.cxx4
17 files changed, 47 insertions, 47 deletions
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 54a8d952c66d..172f3b1f2120 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -230,7 +230,7 @@ Crypto::CryptoType AgileEngine::cryptoType(const AgileEncryptionInfo& rInfo)
return Crypto::UNKNOWN;
}
-std::vector<sal_uInt8> calculateIV(comphelper::HashType eType,
+static std::vector<sal_uInt8> calculateIV(comphelper::HashType eType,
std::vector<sal_uInt8> const & rSalt,
std::vector<sal_uInt8> const & rBlock,
sal_Int32 nCipherBlockSize)
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 5726ab425cff..bc4582cb7276 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -91,7 +91,7 @@ typedef std::unordered_map< OUString, FormularCommand > FormulaCommandHMap;
static const FormulaCommandHMap* pCommandHashMap;
-OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
+static OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
{
OUString aRet;
switch( rParameter.Type )
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 7dbd454f1595..901995bc2039 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -344,7 +344,7 @@ uno::Sequence<beans::PropertyValue> Diagram::getDomsAsPropertyValues() const
return aValue;
}
-uno::Reference<xml::dom::XDocument> loadFragment(
+static uno::Reference<xml::dom::XDocument> loadFragment(
core::XmlFilterBase& rFilter,
const OUString& rFragmentPath )
{
@@ -353,14 +353,14 @@ uno::Reference<xml::dom::XDocument> loadFragment(
return rFilter.importFragment( rFragmentPath );
}
-uno::Reference<xml::dom::XDocument> loadFragment(
+static uno::Reference<xml::dom::XDocument> loadFragment(
core::XmlFilterBase& rFilter,
const rtl::Reference< core::FragmentHandler >& rxHandler )
{
return loadFragment( rFilter, rxHandler->getFragmentPath() );
}
-void importFragment( core::XmlFilterBase& rFilter,
+static void importFragment( core::XmlFilterBase& rFilter,
const uno::Reference<xml::dom::XDocument>& rXDom,
const char* pDocName,
const DiagramPtr& pDiagram,
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 7639743842b2..bfcf750f51e0 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -69,7 +69,7 @@ TableCell::~TableCell()
{
}
-void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
+static void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
Reference< XPropertySet > const & rxPropSet, oox::drawingml::LineProperties& rLineProperties,
sal_Int32 nPropId )
{
@@ -135,7 +135,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
aPropSet.setProperty( nPropId, aBorderLine );
}
-void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart& rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties& rLineProperties )
+static void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart& rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties& rLineProperties )
{
std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rPartLineBorders( rTableStylePart.getLineBorders() );
::oox::drawingml::ShapeStyleRef& rLineStyleRef = rTableStylePart.getStyleRefs()[ nLineType ];
@@ -153,7 +153,7 @@ void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart&
}
}
-void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
+static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
oox::drawingml::FillProperties& rFillProperties,
TextCharacterProperties& aTextCharProps,
oox::drawingml::LineProperties& rLeftBorder,
@@ -201,7 +201,7 @@ void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
aTextCharProps.moItalic = *rTableStylePart.getTextItalicStyle();
}
-void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell )
+static void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell )
{
Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) );
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index 00c5b765cfca..3701e1ecac9b 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -49,7 +49,7 @@ TableProperties::TableProperties()
{
}
-void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, const std::vector< TableRow >& rvTableRows )
+static void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, const std::vector< TableRow >& rvTableRows )
{
if ( rvTableRows.size() > 1 )
xTableRows->insertByIndex( 0, rvTableRows.size() - 1 );
@@ -64,7 +64,7 @@ void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, const std:
}
}
-void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const std::vector< sal_Int32 >& rvTableGrid )
+static void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const std::vector< sal_Int32 >& rvTableGrid )
{
if ( rvTableGrid.size() > 1 )
xTableColumns->insertByIndex( 0, rvTableGrid.size() - 1 );
@@ -78,7 +78,7 @@ void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const
}
}
-void MergeCells( const uno::Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
+static void MergeCells( const uno::Reference< XTable >& xTable, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nColSpan, sal_Int32 nRowSpan )
{
if( xTable.is() ) try
{
@@ -140,7 +140,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , sal_Int32 tblFill
pTableStyle->getLastCol().getTextBoldStyle() = textBoldStyle;
}
-TableStyle* CreateTableStyle(const OUString& styleId)
+static TableStyle* CreateTableStyle(const OUString& styleId)
{
TableStyle* pTableStyle = nullptr;
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index 77ab07b50423..6443064e40d2 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -155,7 +155,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
// TODO If bUnderlineFillFollowText uFillTx (CT_TextUnderlineFillFollowText) is set, fill color of the underline should be the same color as the text
}
-void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValue>& aVectorOfProperyValues )
+static void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValue>& aVectorOfProperyValues )
{
if (!rPropSet.hasProperty(PROP_CharInteropGrabBag) || aVectorOfProperyValues.empty())
return;
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 879fdea363d2..15475ddcacb0 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -63,7 +63,7 @@ TextListStyle& TextListStyle::operator=(const TextListStyle& rStyle)
return *this;
}
-void applyStyleList( const TextParagraphPropertiesVector& rSourceListStyle, TextParagraphPropertiesVector& rDestListStyle )
+static void applyStyleList( const TextParagraphPropertiesVector& rSourceListStyle, TextParagraphPropertiesVector& rDestListStyle )
{
TextParagraphPropertiesVector::iterator aDestListStyleIter( rDestListStyle.begin() );
for (auto const& elemSource : rSourceListStyle)
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 584774d9bbbc..63958cdb3f7a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -156,7 +156,7 @@ private:
OUString m_aRole;
};
-Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram )
+static Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram )
{
Reference< chart2::data::XLabeledDataSequence > xResult;
try
@@ -197,7 +197,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
return xResult;
}
-Reference< chart2::data::XLabeledDataSequence >
+static Reference< chart2::data::XLabeledDataSequence >
lcl_getDataSequenceByRole(
const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aLabeledSeq,
const OUString & rRole )
@@ -215,7 +215,7 @@ Reference< chart2::data::XLabeledDataSequence >
return aNoResult;
}
-bool lcl_hasCategoryLabels( const Reference< chart2::XChartDocument >& xChartDoc )
+static bool lcl_hasCategoryLabels( const Reference< chart2::XChartDocument >& xChartDoc )
{
//categories are always the first sequence
Reference< chart2::XDiagram > xDiagram( xChartDoc->getFirstDiagram());
@@ -223,7 +223,7 @@ bool lcl_hasCategoryLabels( const Reference< chart2::XChartDocument >& xChartDoc
return xCategories.is();
}
-bool lcl_isSeriesAttachedToFirstAxis(
+static bool lcl_isSeriesAttachedToFirstAxis(
const Reference< chart2::XDataSeries > & xDataSeries )
{
bool bResult=true;
@@ -243,7 +243,7 @@ bool lcl_isSeriesAttachedToFirstAxis(
return bResult;
}
-OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
+static OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
{
OUStringBuffer aResult;
bool bPrecedeWithSpace = false;
@@ -260,7 +260,7 @@ OUString lcl_flattenStringSequence( const Sequence< OUString > & rSequence )
return aResult.makeStringAndClear();
}
-OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xLabelSeq )
+static OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xLabelSeq )
{
Sequence< OUString > aLabels;
@@ -280,7 +280,7 @@ OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xL
return lcl_flattenStringSequence( aLabels );
}
-void lcl_fillCategoriesIntoStringVector(
+static void lcl_fillCategoriesIntoStringVector(
const Reference< chart2::data::XDataSequence > & xCategories,
::std::vector< OUString > & rOutCategories )
{
@@ -304,7 +304,7 @@ void lcl_fillCategoriesIntoStringVector(
}
}
-::std::vector< double > lcl_getAllValuesFromSequence( const Reference< chart2::data::XDataSequence > & xSeq )
+static ::std::vector< double > lcl_getAllValuesFromSequence( const Reference< chart2::data::XDataSequence > & xSeq )
{
double fNan = 0.0;
::rtl::math::setNan( &fNan );
@@ -327,7 +327,7 @@ void lcl_fillCategoriesIntoStringVector(
return aResult;
}
-sal_Int32 lcl_getChartType( const OUString& sChartType )
+static sal_Int32 lcl_getChartType( const OUString& sChartType )
{
chart::TypeId eChartTypeId = chart::TYPEID_UNKNOWN;
if( sChartType == "com.sun.star.chart.BarDiagram"
@@ -364,7 +364,7 @@ sal_Int32 lcl_getChartType( const OUString& sChartType )
return eChartTypeId;
}
-sal_Int32 lcl_generateRandomValue()
+static sal_Int32 lcl_generateRandomValue()
{
return comphelper::rng::uniform_int_distribution(0, 100000000-1);
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ee6a43b58df5..5824f51e19b6 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -134,7 +134,7 @@ namespace drawingml {
#define CGETAD(propName) \
(( bCheckDirect && GetPropertyAndState( rXPropSet, rXPropState, #propName, eState ) && eState == beans::PropertyState_DIRECT_VALUE )||GetProperty( rXPropSet, #propName ))
-css::uno::Any getLineDash( const css::uno::Reference<css::frame::XModel>& xModel, const OUString& rDashName )
+static css::uno::Any getLineDash( const css::uno::Reference<css::frame::XModel>& xModel, const OUString& rDashName )
{
css::uno::Reference<css::lang::XMultiServiceFactory> xFact(xModel, css::uno::UNO_QUERY);
css::uno::Reference<css::container::XNameAccess> xNameAccess(
@@ -1908,7 +1908,7 @@ void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
}
}
-OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBehind, bool bPBoth)
+static OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBehind, bool bPBoth)
{
OUString sPrefixSuffix;
@@ -2597,7 +2597,7 @@ void DrawingML::WritePresetShape( const char* pShape )
mpFS->endElementNS( XML_a, XML_prstGeom );
}
-std::map< OString, std::vector<OString> > lcl_getAdjNames()
+static std::map< OString, std::vector<OString> > lcl_getAdjNames()
{
std::map< OString, std::vector<OString> > aRet;
@@ -3339,12 +3339,12 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert
}
}
-sal_Int32 lcl_CalculateDist(const double dX, const double dY)
+static sal_Int32 lcl_CalculateDist(const double dX, const double dY)
{
return static_cast< sal_Int32 >(sqrt(dX*dX + dY*dY) * 360);
}
-sal_Int32 lcl_CalculateDir(const double dX, const double dY)
+static sal_Int32 lcl_CalculateDir(const double dX, const double dY)
{
return (static_cast< sal_Int32 >(basegfx::rad2deg(atan2(dY,dX)) * 60000) + 21600000) % 21600000;
}
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 6fd56390233c..3f7e0912bf56 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -633,7 +633,7 @@ static bool lcl_IsOnWhitelist(OUString const & rShapeType)
return std::find(vWhitelist.begin(), vWhitelist.end(), rShapeType) != vWhitelist.end();
}
-bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParameter &rParam, Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq)
+static bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParameter &rParam, Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq)
{
bool bAdj = false;
if ( rParam.Value.getValueTypeClass() == TypeClass_DOUBLE )
@@ -667,7 +667,7 @@ bool lcl_GetHandlePosition( sal_Int32 &nValue, const EnhancedCustomShapeParamete
return bAdj;
}
-void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles,
+static void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles,
std::vector< std::pair< sal_Int32, sal_Int32> > &rHandlePositionList,
Sequence< EnhancedCustomShapeAdjustmentValue > &rSeq)
{
@@ -706,12 +706,12 @@ void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles,
}
}
-void lcl_AppendAdjustmentValue( std::vector< std::pair< sal_Int32, sal_Int32> > &rAvList, sal_Int32 nAdjIdx, sal_Int32 nValue )
+static void lcl_AppendAdjustmentValue( std::vector< std::pair< sal_Int32, sal_Int32> > &rAvList, sal_Int32 nAdjIdx, sal_Int32 nValue )
{
rAvList.emplace_back( nAdjIdx , nValue );
}
-sal_Int32 lcl_NormalizeAngle( sal_Int32 nAngle )
+static sal_Int32 lcl_NormalizeAngle( sal_Int32 nAngle )
{
nAngle = nAngle % 360;
return nAngle < 0 ? ( nAngle + 360 ) : nAngle ;
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index e980c9a7d325..ef30786b6f3d 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -335,14 +335,14 @@ static void impl_AddInt( sax_fastparser::FastAttributeList *pAttrList, sal_Int32
pAttrList->add( nElement, OString::number( nValue ).getStr() );
}
-inline sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal )
+static inline sal_uInt16 impl_GetUInt16( const sal_uInt8* &pVal )
{
sal_uInt16 nRet = *pVal++;
nRet += ( *pVal++ ) << 8;
return nRet;
}
-inline sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize )
+static inline sal_Int32 impl_GetPointComponent( const sal_uInt8* &pVal, sal_uInt16 nPointSize )
{
sal_Int32 nRet = 0;
if ( ( nPointSize == 0xfff0 ) || ( nPointSize == 4 ) )
@@ -1104,7 +1104,7 @@ void VMLExport::AddShapeAttribute( sal_Int32 nAttribute, const OString& rValue )
m_pShapeAttrList->add( nAttribute, rValue );
}
-std::vector<OString> lcl_getShapeTypes()
+static std::vector<OString> lcl_getShapeTypes()
{
std::vector<OString> aRet;
@@ -1125,7 +1125,7 @@ std::vector<OString> lcl_getShapeTypes()
return aRet;
}
-bool lcl_isTextBox(const SdrObject* pSdrObject)
+static bool lcl_isTextBox(const SdrObject* pSdrObject)
{
uno::Reference<beans::XPropertySet> xPropertySet(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY);
if (xPropertySet.is())
@@ -1136,7 +1136,7 @@ bool lcl_isTextBox(const SdrObject* pSdrObject)
return false;
}
-OUString lcl_getAnchorIdFromGrabBag(const SdrObject* pSdrObject)
+static OUString lcl_getAnchorIdFromGrabBag(const SdrObject* pSdrObject)
{
OUString aResult;
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 640787cdada6..5dd58e5c7de6 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -315,7 +315,7 @@ bool OleHelper::importStdPic( StreamDataSequence& orGraphicData, BinaryInputStre
return !rInStrm.isEof() && (nStdPicId == OLE_STDPIC_ID) && (nBytes > 0) && (rInStrm.readData( orGraphicData, nBytes ) == nBytes);
}
-Reference< css::frame::XFrame > lcl_getFrame( const Reference< css::frame::XModel >& rxModel )
+static Reference< css::frame::XFrame > lcl_getFrame( const Reference< css::frame::XModel >& rxModel )
{
Reference< css::frame::XFrame > xFrame;
if ( rxModel.is() )
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 5d0d07be49a4..1dd2b5d25537 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -100,7 +100,7 @@ VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_
{
}
-void setUInt16(sal_uInt8* pBuffer, size_t nPos, sal_uInt16 nVal)
+static void setUInt16(sal_uInt8* pBuffer, size_t nPos, sal_uInt16 nVal)
{
pBuffer[nPos] = nVal & 0xFF;
pBuffer[nPos+1] = (nVal & 0xFF00) >> 8;
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 1ba3cdbd2e7e..bbf725620b76 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -100,7 +100,7 @@ PresentationFragmentHandler::~PresentationFragmentHandler() throw()
{
}
-void ResolveTextFields( XmlFilterBase const & rFilter )
+static void ResolveTextFields( XmlFilterBase const & rFilter )
{
const oox::core::TextFieldStack& rTextFields = rFilter.getTextFieldStack();
if ( !rTextFields.empty() )
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index f56bee7469a1..010f582b838b 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -179,7 +179,7 @@ void SlidePersist::createBackground( const XmlFilterBase& rFilterBase )
}
}
-void setTextStyle( Reference< beans::XPropertySet > const & rxPropSet, const XmlFilterBase& rFilter,
+static void setTextStyle( Reference< beans::XPropertySet > const & rxPropSet, const XmlFilterBase& rFilter,
oox::drawingml::TextListStylePtr const & pTextListStylePtr, int nLevel )
{
::oox::drawingml::TextParagraphPropertiesPtr pTextParagraphPropertiesPtr( pTextListStylePtr->getListStyle()[ nLevel ] );
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 99c95eab372e..cbd40329ffe8 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -717,7 +717,7 @@ void FillModel::assignUsed( const FillModel& rSource )
moRotate.assignIfUsed( rSource.moRotate );
}
-void lcl_setGradientStop( std::multimap< double, Color >& rMap, const double fKey, const Color& rValue ) {
+static void lcl_setGradientStop( std::multimap< double, Color >& rMap, const double fKey, const Color& rValue ) {
auto aElement = rMap.find( fKey );
if (aElement != rMap.end())
@@ -883,7 +883,7 @@ TextpathModel::TextpathModel()
{
}
-beans::PropertyValue lcl_createTextpathProps()
+static beans::PropertyValue lcl_createTextpathProps()
{
uno::Sequence<beans::PropertyValue> aTextpathPropSeq( comphelper::InitPropertySequence({
{ "TextPath", uno::Any(true) },
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index ad811a0d3065..ee80a0cfbd98 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -554,7 +554,7 @@ SimpleShape::SimpleShape( Drawing& rDrawing, const OUString& rService ) :
{
}
-void lcl_setSurround(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
+static void lcl_setSurround(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
{
OUString aWrapType = rTypeModel.moWrapType.get();
@@ -579,7 +579,7 @@ void lcl_setSurround(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, co
rPropSet.setProperty(PROP_Surround, static_cast<sal_Int32>(nSurround));
}
-void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
+static void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel, const GraphicHelper& rGraphicHelper)
{
if ( rTypeModel.maPosition == "absolute" )
{