summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-19 16:32:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-11-22 12:57:32 +0100
commitf853ec317f6af1b8c65cc5bd758371689c75118d (patch)
treeb86d729bf9a9465ee619ead3b5635efa62a1804e /oox
parentf31d36966bceb90e261cbecd42634bde4448d527 (diff)
Extend loplugin:external to warn about classes
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx4
-rw-r--r--oox/source/drawingml/clrscheme.cxx4
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx53
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx4
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx4
-rw-r--r--oox/source/drawingml/shape.cxx4
-rw-r--r--oox/source/drawingml/textbodycontext.cxx4
-rw-r--r--oox/source/drawingml/themeelementscontext.cxx16
-rw-r--r--oox/source/export/chartexport.cxx4
-rw-r--r--oox/source/helper/progressbar.cxx4
-rw-r--r--oox/source/mathml/import.cxx4
-rw-r--r--oox/source/ppt/customshowlistcontext.cxx4
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx4
-rw-r--r--oox/source/ppt/timetargetelementcontext.cxx4
-rw-r--r--oox/source/shape/ShapeFilterBase.cxx4
15 files changed, 117 insertions, 4 deletions
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index ed52ccf5c2b1..b071126be53d 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -570,6 +570,8 @@ void lclConvertPictureOptions( FillProperties& orFillProps, const PictureOptions
struct ObjectFormatterData;
+namespace {
+
class DetailFormatterBase
{
public:
@@ -700,6 +702,8 @@ private:
const ObjectTypeFormatEntry& mrEntry; /// Additional settings.
};
+}
+
struct ObjectFormatterData
{
typedef RefMap< ObjectType, ObjectTypeFormatter > ObjectTypeFormatterMap;
diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx
index 47d9426e0646..e1d184f9f413 100644
--- a/oox/source/drawingml/clrscheme.cxx
+++ b/oox/source/drawingml/clrscheme.cxx
@@ -45,6 +45,8 @@ void ClrMap::setColorMap( sal_Int32 nClrToken, sal_Int32 nMappedClrToken )
maClrMap[ nClrToken ] = nMappedClrToken;
}
+namespace {
+
struct find_by_token
{
explicit find_by_token(sal_Int32 token):
@@ -61,6 +63,8 @@ private:
sal_Int32 const m_token;
};
+}
+
bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, ::Color& rColor ) const
{
OSL_ASSERT((nSchemeClrToken & sal_Int32(0xFFFF0000))==0);
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 20db50d0d865..6b436c05cdb8 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -63,13 +63,14 @@ enum FormularCommand
FC_VAL
};
-}
-
struct FormularCommandNameTable
{
const char* pS;
FormularCommand const pE;
};
+
+}
+
static const FormularCommandNameTable pFormularCommandNameTable[] =
{
{ "*/", FC_MULDIV },
@@ -426,6 +427,8 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
return aRet;
}
+namespace {
+
// CT_GeomGuideList
class GeomGuideListContext : public ContextHandler2
{
@@ -438,6 +441,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
GeomGuideListContext::GeomGuideListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList )
: ContextHandler2( rParent )
, mrGuideList( rGuideList )
@@ -628,6 +633,8 @@ static const OUString& GetGeomGuideName( const OUString& rValue )
return rValue;
}
+namespace {
+
// CT_AdjPoint2D
class AdjPoint2DContext : public ContextHandler2
{
@@ -635,6 +642,8 @@ public:
AdjPoint2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
};
+}
+
AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler2( rParent )
{
@@ -642,6 +651,8 @@ AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper const & rParent, con
rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get() );
}
+namespace {
+
// CT_XYAdjustHandle
class XYAdjustHandleContext : public ContextHandler2
{
@@ -654,6 +665,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
: ContextHandler2( rParent )
, mrAdjustHandle( rAdjustHandle )
@@ -692,6 +705,8 @@ ContextHandlerRef XYAdjustHandleContext::onCreateContext( sal_Int32 aElementToke
return nullptr;
}
+namespace {
+
// CT_PolarAdjustHandle
class PolarAdjustHandleContext : public ContextHandler2
{
@@ -704,6 +719,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
: ContextHandler2( rParent )
, mrAdjustHandle( rAdjustHandle )
@@ -745,6 +762,8 @@ ContextHandlerRef PolarAdjustHandleContext::onCreateContext( sal_Int32 aElementT
return nullptr;
}
+namespace {
+
// CT_AdjustHandleList
class AdjustHandleListContext : public ContextHandler2
{
@@ -757,6 +776,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
AdjustHandleListContext::AdjustHandleListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList )
: ContextHandler2( rParent )
, mrAdjustHandleList( rAdjustHandleList )
@@ -781,6 +802,8 @@ ContextHandlerRef AdjustHandleListContext::onCreateContext( sal_Int32 aElementTo
return nullptr;
}
+namespace {
+
// CT_ConnectionSite
class ConnectionSiteContext : public ContextHandler2
{
@@ -793,6 +816,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
ConnectionSiteContext::ConnectionSiteContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite )
: ContextHandler2( rParent )
, mrConnectionSite( rConnectionSite )
@@ -808,6 +833,8 @@ ContextHandlerRef ConnectionSiteContext::onCreateContext( sal_Int32 aElementToke
return nullptr;
}
+namespace {
+
// CT_Path2DMoveTo
class Path2DMoveToContext : public ContextHandler2
{
@@ -820,6 +847,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
Path2DMoveToContext::Path2DMoveToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler2( rParent )
, mrAdjPoint2D( rAdjPoint2D )
@@ -834,6 +863,8 @@ ContextHandlerRef Path2DMoveToContext::onCreateContext( sal_Int32 aElementToken,
return nullptr;
}
+namespace {
+
// CT_Path2DLineTo
class Path2DLineToContext : public ContextHandler2
{
@@ -846,6 +877,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
Path2DLineToContext::Path2DLineToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
: ContextHandler2( rParent )
, mrAdjPoint2D( rAdjPoint2D )
@@ -860,6 +893,8 @@ ContextHandlerRef Path2DLineToContext::onCreateContext( sal_Int32 aElementToken,
return nullptr;
}
+namespace {
+
// CT_Path2DQuadBezierTo
class Path2DQuadBezierToContext : public ContextHandler2
{
@@ -874,6 +909,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler2Helper const & rParent,
CustomShapeProperties& rCustomShapeProperties,
EnhancedCustomShapeParameterPair& rPt1,
@@ -893,6 +930,8 @@ ContextHandlerRef Path2DQuadBezierToContext::onCreateContext( sal_Int32 aElement
return nullptr;
}
+namespace {
+
// CT_Path2DCubicBezierTo
class Path2DCubicBezierToContext : public ContextHandler2
{
@@ -909,6 +948,8 @@ protected:
int nCount;
};
+}
+
Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties,
EnhancedCustomShapeParameterPair& rControlPt1,
EnhancedCustomShapeParameterPair& rControlPt2,
@@ -930,6 +971,8 @@ ContextHandlerRef Path2DCubicBezierToContext::onCreateContext( sal_Int32 aElemen
return nullptr;
}
+namespace {
+
// CT_Path2DContext
class Path2DContext : public ContextHandler2
{
@@ -945,6 +988,8 @@ protected:
CustomShapeProperties& mrCustomShapeProperties;
};
+}
+
Path2DContext::Path2DContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< css::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D )
: ContextHandler2( rParent )
, mrPath2D( rPath2D )
@@ -1127,6 +1172,8 @@ ContextHandlerRef Path2DContext::onCreateContext( sal_Int32 aElementToken,
return nullptr;
}
+namespace {
+
// CT_Path2DList
class Path2DListContext : public ContextHandler2
{
@@ -1143,6 +1190,8 @@ protected:
std::vector< Path2D >& mrPath2DList;
};
+}
+
Path2DListContext:: Path2DListContext( ContextHandler2Helper const & rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments,
std::vector< Path2D >& rPath2DList )
: ContextHandler2( rParent )
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index b98d0ee87ccf..3746addb8550 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -31,6 +31,8 @@ using namespace ::com::sun::star::uno;
namespace oox { namespace drawingml {
+namespace {
+
// CT_CxnList
class CxnListContext
: public ContextHandler2
@@ -320,6 +322,8 @@ private:
DiagramDataPtr mpDataModel;
};
+}
+
DataModelContext::DataModelContext( ContextHandler2Helper const & rParent,
const DiagramDataPtr & pDataModel )
: ContextHandler2( rParent )
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 3547aad28a7a..35128debddb9 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -34,6 +34,8 @@ using namespace ::com::sun::star::xml::sax;
namespace oox { namespace drawingml {
+namespace {
+
class IfContext
: public LayoutNodeContext
{
@@ -169,6 +171,8 @@ private:
LayoutNode::VarMap & mVariables;
};
+}
+
// CT_LayoutNode
LayoutNodeContext::LayoutNodeContext( ContextHandler2Helper const & rParent,
const AttributeList& rAttribs,
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 4e574af50869..68f0d3c62b51 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -347,6 +347,8 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
mbLocked = rReferencedShape.mbLocked;
}
+namespace {
+
struct ActionLockGuard
{
explicit ActionLockGuard(Reference<drawing::XShape> const& xShape)
@@ -366,6 +368,8 @@ private:
Reference<document::XActionLockable> m_xLockable;
};
+}
+
// for group shapes, the following method is also adding each child
void Shape::addChildren(
XmlFilterBase& rFilterBase,
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index cbd1e420ee5a..0f8c90ab4c89 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -40,6 +40,8 @@ using namespace ::com::sun::star::xml::sax;
namespace oox { namespace drawingml {
+namespace {
+
// CT_TextParagraph
class TextParagraphContext : public ContextHandler2
{
@@ -52,6 +54,8 @@ protected:
TextParagraph& mrParagraph;
};
+}
+
TextParagraphContext::TextParagraphContext( ContextHandler2Helper const & rParent, TextParagraph& rPara )
: ContextHandler2( rParent )
, mrParagraph( rPara )
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index 8c94a9bf74db..3919a3790bd6 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -38,6 +38,8 @@ using namespace ::com::sun::star::xml::sax;
namespace oox {
namespace drawingml {
+namespace {
+
class FillStyleListContext : public ContextHandler2
{
public:
@@ -48,6 +50,8 @@ private:
FillStyleList& mrFillStyleList;
};
+}
+
FillStyleListContext::FillStyleListContext( ContextHandler2Helper const & rParent, FillStyleList& rFillStyleList ) :
ContextHandler2( rParent ),
mrFillStyleList( rFillStyleList )
@@ -70,6 +74,8 @@ ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement, con
return nullptr;
}
+namespace {
+
class LineStyleListContext : public ContextHandler2
{
public:
@@ -80,6 +86,8 @@ private:
LineStyleList& mrLineStyleList;
};
+}
+
LineStyleListContext::LineStyleListContext( ContextHandler2Helper const & rParent, LineStyleList& rLineStyleList ) :
ContextHandler2( rParent ),
mrLineStyleList( rLineStyleList )
@@ -97,6 +105,8 @@ ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement, con
return nullptr;
}
+namespace {
+
class EffectStyleListContext : public ContextHandler2
{
public:
@@ -107,6 +117,8 @@ private:
EffectStyleList& mrEffectStyleList;
};
+}
+
EffectStyleListContext::EffectStyleListContext( ContextHandler2Helper const & rParent, EffectStyleList& rEffectStyleList ) :
ContextHandler2( rParent ),
mrEffectStyleList( rEffectStyleList )
@@ -129,6 +141,8 @@ ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement, c
return nullptr;
}
+namespace {
+
class FontSchemeContext : public ContextHandler2
{
public:
@@ -141,6 +155,8 @@ private:
TextCharacterPropertiesPtr mxCharProps;
};
+}
+
FontSchemeContext::FontSchemeContext( ContextHandler2Helper const & rParent, FontScheme& rFontScheme ) :
ContextHandler2( rParent ),
mrFontScheme( rFontScheme )
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 7f0f948a4d85..89513746bcca 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -136,8 +136,6 @@ bool isPrimaryAxes(sal_Int32 nIndex)
return nIndex != 1;
}
-}
-
class lcl_MatchesRole
{
public:
@@ -161,6 +159,8 @@ private:
OUString const m_aRole;
};
+}
+
static Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram )
{
Reference< chart2::data::XLabeledDataSequence > xResult;
diff --git a/oox/source/helper/progressbar.cxx b/oox/source/helper/progressbar.cxx
index cf74b0341736..351b8e1422f5 100644
--- a/oox/source/helper/progressbar.cxx
+++ b/oox/source/helper/progressbar.cxx
@@ -72,6 +72,8 @@ void ProgressBar::setPosition( double fPosition )
namespace prv {
+namespace {
+
class SubSegment : public ISegmentProgressBar
{
public:
@@ -91,6 +93,8 @@ private:
double mfFreeStart;
};
+}
+
SubSegment::SubSegment( IProgressBar& rParentProgress, double fStartPos, double fLength ) :
mrParentProgress( rParentProgress ),
mfStartPos( fStartPos ),
diff --git a/oox/source/mathml/import.cxx b/oox/source/mathml/import.cxx
index ec338c451638..557f34016148 100644
--- a/oox/source/mathml/import.cxx
+++ b/oox/source/mathml/import.cxx
@@ -28,6 +28,8 @@ FormulaImportBase::FormulaImportBase()
namespace formulaimport {
+namespace {
+
class LazyMathBufferingContext : public core::ContextHandler
{
private:
@@ -47,6 +49,8 @@ public:
};
+}
+
LazyMathBufferingContext::LazyMathBufferingContext(
core::ContextHandler const& rParent, drawingml::TextParagraph & rPara)
: core::ContextHandler(rParent)
diff --git a/oox/source/ppt/customshowlistcontext.cxx b/oox/source/ppt/customshowlistcontext.cxx
index 0a8174cd053f..3be796d639d9 100644
--- a/oox/source/ppt/customshowlistcontext.cxx
+++ b/oox/source/ppt/customshowlistcontext.cxx
@@ -29,6 +29,8 @@ using namespace ::com::sun::star::xml::sax;
namespace oox { namespace ppt {
+namespace {
+
class CustomShowContext : public ::oox::core::FragmentHandler2
{
CustomShow mrCustomShow;
@@ -41,6 +43,8 @@ public:
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
};
+}
+
CustomShowContext::CustomShowContext( FragmentHandler2 const & rParent,
const Reference< XFastAttributeList >& rxAttribs,
CustomShow const & rCustomShow )
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index b965dfea1b6f..1a69bb97a729 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -98,6 +98,8 @@ namespace {
namespace oox { namespace ppt {
+ namespace {
+
struct AnimColor
{
AnimColor(sal_Int16 cs, sal_Int32 o, sal_Int32 t, sal_Int32 th )
@@ -897,6 +899,8 @@ namespace oox { namespace ppt {
Any maProgress;
};
+ }
+
TimeNodeContext * TimeNodeContext::makeContext(
FragmentHandler2 const & rParent, sal_Int32 aElement,
const Reference< XFastAttributeList >& xAttribs,
diff --git a/oox/source/ppt/timetargetelementcontext.cxx b/oox/source/ppt/timetargetelementcontext.cxx
index 43f10ee05df9..ab524c513e58 100644
--- a/oox/source/ppt/timetargetelementcontext.cxx
+++ b/oox/source/ppt/timetargetelementcontext.cxx
@@ -39,6 +39,8 @@ using namespace ::oox::core;
namespace oox { namespace ppt {
+ namespace {
+
// CT_TLShapeTargetElement
class ShapeTargetElementContext
: public FragmentHandler2
@@ -97,6 +99,8 @@ namespace oox { namespace ppt {
ShapeTargetElement & maShapeTarget;
};
+ }
+
TimeTargetElementContext::TimeTargetElementContext( FragmentHandler2 const & rParent, const AnimTargetElementPtr & pValue )
: FragmentHandler2( rParent ),
mpTarget( pValue )
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
index 562504090f76..6f96395c2806 100644
--- a/oox/source/shape/ShapeFilterBase.cxx
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -77,6 +77,8 @@ OUString ShapeFilterBase::getImplementationName()
return OUString();
}
+namespace {
+
/// Graphic helper for shapes, that can manage color schemes.
class ShapeGraphicHelper : public GraphicHelper
{
@@ -87,6 +89,8 @@ private:
const ShapeFilterBase& mrFilter;
};
+}
+
ShapeGraphicHelper::ShapeGraphicHelper( const ShapeFilterBase& rFilter ) :
GraphicHelper( rFilter.getComponentContext(), rFilter.getTargetFrame(), rFilter.getStorage() ),
mrFilter( rFilter )