summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-31 09:55:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-31 12:06:50 +0200
commitb02998a7cb86bb69c01fd7c2625c801eef835e55 (patch)
treeeaee008356bc6054b43844744e50d24756a53007
parentc54850b23a8240a41755af171a6d3f990ee69f84 (diff)
inline some use-once typedefs
and remove some dead ones Change-Id: I6946d717d3c15dc5207489ed3d56d985dd953d59 Reviewed-on: https://gerrit.libreoffice.org/41746 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--framework/inc/stdtypes.h6
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx10
-rw-r--r--include/vbahelper/vbapropvalue.hxx4
-rw-r--r--include/xmloff/xmlimp.hxx17
-rw-r--r--l10ntools/inc/export.hxx5
-rw-r--r--oox/source/helper/textinputstream.cxx4
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx5
-rw-r--r--unotools/source/config/pathoptions.cxx5
-rw-r--r--vbahelper/source/msforms/vbanewfont.hxx4
-rw-r--r--vcl/inc/opengl/program.hxx5
10 files changed, 20 insertions, 45 deletions
diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index 9cc180787462..778e09174166 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -64,12 +64,6 @@ struct KeyEventEqualsFunc
};
/**
- Basic OUString hash.
- Key and values are OUStrings.
-*/
-typedef std::unordered_map<OUString, OUString, OUStringHash> OUStringHashMap;
-
-/**
It can be used to map names (e.g. of properties) to her corresponding handles.
Our helper class OPropertySetHelper works optimized with handles but sometimes we have only a property name.
Mapping between these two parts of a property should be done in the fastest way :-)
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index 93e5e0e65ec9..db65f542dcb2 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -143,10 +143,10 @@ public:
// only requirement is the object needs to implement XName
-typedef ::cppu::WeakImplHelper< css::container::XNameAccess, css::container::XIndexAccess, css::container::XEnumerationAccess > XNamedCollectionHelper_BASE;
-
template< typename OneIfc >
-class XNamedObjectCollectionHelper : public XNamedCollectionHelper_BASE
+class XNamedObjectCollectionHelper : public ::cppu::WeakImplHelper< css::container::XNameAccess,
+ css::container::XIndexAccess,
+ css::container::XEnumerationAccess >
{
public:
typedef std::vector< css::uno::Reference< OneIfc > > XNamedVec;
@@ -330,9 +330,7 @@ public:
};
-typedef ::cppu::WeakImplHelper<ov::XCollection> XCollection_InterfacesBASE;
-
-typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase;
+typedef ScVbaCollectionBase< ::cppu::WeakImplHelper<ov::XCollection> > CollImplBase;
// compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this )
class VBAHELPER_DLLPUBLIC ScVbaCollectionBaseImpl : public CollImplBase
{
diff --git a/include/vbahelper/vbapropvalue.hxx b/include/vbahelper/vbapropvalue.hxx
index 23d9d3e743aa..0ea4417595d7 100644
--- a/include/vbahelper/vbapropvalue.hxx
+++ b/include/vbahelper/vbapropvalue.hxx
@@ -30,8 +30,6 @@
#include <vbahelper/vbadllapi.h>
#include <vbahelper/vbahelper.hxx>
-typedef ::cppu::WeakImplHelper< ov::XPropValue > PropValueImpl_BASE;
-
class VBAHELPER_DLLPUBLIC PropListener
{
public:
@@ -43,7 +41,7 @@ protected:
};
-class VBAHELPER_DLLPUBLIC ScVbaPropValue : public PropValueImpl_BASE
+class VBAHELPER_DLLPUBLIC ScVbaPropValue : public ::cppu::WeakImplHelper< ov::XPropValue >
{
PropListener* m_pListener;
public:
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 36b70f88a4f7..390c3d511349 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -88,10 +88,6 @@ class XMLErrors;
class StyleMap;
enum class SvXMLErrorFlags;
-typedef std::stack<SvXMLImportContextRef> SvXMLImportContexts_Impl;
-typedef std::stack<css::uno::Reference<css::xml::sax::XFastContextHandler>>
- FastSvXMLImportContexts_Impl;
-
namespace xmloff {
class RDFaImportHelper;
}
@@ -204,12 +200,13 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper<
std::unique_ptr<SvXMLImport_Impl> mpImpl; // dummy
- std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap;
- std::unique_ptr<SvXMLUnitConverter> mpUnitConv;
- SvXMLImportContexts_Impl maContexts;
- FastSvXMLImportContexts_Impl maFastContexts;
- std::unique_ptr<SvXMLNumFmtHelper> mpNumImport;
- std::unique_ptr<ProgressBarHelper> mpProgressBarHelper;
+ std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap;
+ std::unique_ptr<SvXMLUnitConverter> mpUnitConv;
+ std::stack<SvXMLImportContextRef> maContexts;
+ std::stack<css::uno::Reference<css::xml::sax::XFastContextHandler>>
+ maFastContexts;
+ std::unique_ptr<SvXMLNumFmtHelper> mpNumImport;
+ std::unique_ptr<ProgressBarHelper> mpProgressBarHelper;
std::unique_ptr<XMLEventImportHelper> mpEventImportHelper;
std::unique_ptr<XMLErrors> mpXMLErrors;
rtl::Reference<StyleMap> mpStyleMap;
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 40f8c27ff6df..f1930b792c76 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -62,9 +62,7 @@ typedef std::unordered_map<OString, bool, OStringHash>
enum class IdLevel { Null=0, Text=2, Identifier=5 };
-typedef std::vector< OString > ExportList;
-
-/// Purpose: holds mandatory data to export a single res (used with ResStack)
+/// Purpose: holds mandatory data to export a single res
class ResData
{
public:
@@ -92,7 +90,6 @@ enum class StringType {
};
-typedef ::std::vector< ResData* > ResStack;
class ParserQueue;
// class MergeEntrys
diff --git a/oox/source/helper/textinputstream.cxx b/oox/source/helper/textinputstream.cxx
index e592ce0b5283..e5c35e914bd6 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -35,11 +35,9 @@ using namespace ::com::sun::star::uno;
namespace {
-typedef ::cppu::WeakImplHelper< XInputStream > UnoBinaryInputStream_BASE;
-
/** Implementation of a UNO input stream wrapping a binary input stream.
*/
-class UnoBinaryInputStream : public UnoBinaryInputStream_BASE
+class UnoBinaryInputStream : public ::cppu::WeakImplHelper< XInputStream >
{
public:
explicit UnoBinaryInputStream( BinaryInputStream& rInStrm );
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index e85455f90bb1..837a8329f285 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -935,10 +935,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
}
}
-typedef ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo > VBAToOOEventDescGen_BASE;
-
-
-class VBAToOOEventDescGen : public VBAToOOEventDescGen_BASE
+class VBAToOOEventDescGen : public ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo >
{
public:
VBAToOOEventDescGen();
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index c8925967c875..6bdc59f93c4d 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -72,8 +72,6 @@ using namespace com::sun::star::lang;
typedef std::unordered_map<OUString, sal_Int32, OUStringHash> NameToHandleMap;
-typedef std::unordered_map<sal_Int32, sal_Int32> EnumToHandleMap;
-
typedef std::set<OUString> VarNameSet;
// class SvtPathOptions_Impl ---------------------------------------------
@@ -85,7 +83,8 @@ class SvtPathOptions_Impl
Reference< XFastPropertySet > m_xPathSettings;
Reference< XStringSubstitution > m_xSubstVariables;
Reference< XMacroExpander > m_xMacroExpander;
- mutable EnumToHandleMap m_aMapEnumToPropHandle;
+ mutable std::unordered_map<sal_Int32, sal_Int32>
+ m_aMapEnumToPropHandle;
VarNameSet m_aSystemPathVarNames;
OUString m_aEmptyString;
diff --git a/vbahelper/source/msforms/vbanewfont.hxx b/vbahelper/source/msforms/vbanewfont.hxx
index bf3d0f1d1400..fc21f88f211f 100644
--- a/vbahelper/source/msforms/vbanewfont.hxx
+++ b/vbahelper/source/msforms/vbanewfont.hxx
@@ -25,9 +25,7 @@
#include <cppuhelper/implbase.hxx>
-typedef cppu::WeakImplHelper< ov::msforms::XNewFont > VbaNewFont_BASE;
-
-class VbaNewFont : public VbaNewFont_BASE
+class VbaNewFont : public cppu::WeakImplHelper< ov::msforms::XNewFont >
{
public:
/// @throws css::uno::RuntimeException
diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index cb6839d96536..88ec1b7c1896 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -23,8 +23,6 @@
#include <unordered_map>
-typedef std::unordered_map< OString, GLuint, OStringHash > UniformCache;
-
enum class TextureShaderType
{
Normal = 0,
@@ -44,7 +42,8 @@ class VCL_PLUGIN_PUBLIC OpenGLProgram
{
private:
GLuint mnId;
- UniformCache maUniformLocations;
+ std::unordered_map< OString, GLuint, OStringHash >
+ maUniformLocations;
sal_uInt32 mnEnabledAttribs;
GLuint mnPositionAttrib;
GLuint mnTexCoordAttrib;