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>
This commit is contained in:
Noel Grandin
2017-08-31 09:55:52 +02:00
parent c54850b23a
commit b02998a7cb
10 changed files with 20 additions and 45 deletions

View File

@@ -63,12 +63,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. 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. Our helper class OPropertySetHelper works optimized with handles but sometimes we have only a property name.

View File

@@ -143,10 +143,10 @@ public:
// only requirement is the object needs to implement XName // 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 > template< typename OneIfc >
class XNamedObjectCollectionHelper : public XNamedCollectionHelper_BASE class XNamedObjectCollectionHelper : public ::cppu::WeakImplHelper< css::container::XNameAccess,
css::container::XIndexAccess,
css::container::XEnumerationAccess >
{ {
public: public:
typedef std::vector< css::uno::Reference< OneIfc > > XNamedVec; typedef std::vector< css::uno::Reference< OneIfc > > XNamedVec;
@@ -330,9 +330,7 @@ public:
}; };
typedef ::cppu::WeakImplHelper<ov::XCollection> XCollection_InterfacesBASE; typedef ScVbaCollectionBase< ::cppu::WeakImplHelper<ov::XCollection> > CollImplBase;
typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase;
// compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this ) // compatible with the old collections ( pre XHelperInterface base class ) ( some internal objects still use this )
class VBAHELPER_DLLPUBLIC ScVbaCollectionBaseImpl : public CollImplBase class VBAHELPER_DLLPUBLIC ScVbaCollectionBaseImpl : public CollImplBase
{ {

View File

@@ -30,8 +30,6 @@
#include <vbahelper/vbadllapi.h> #include <vbahelper/vbadllapi.h>
#include <vbahelper/vbahelper.hxx> #include <vbahelper/vbahelper.hxx>
typedef ::cppu::WeakImplHelper< ov::XPropValue > PropValueImpl_BASE;
class VBAHELPER_DLLPUBLIC PropListener class VBAHELPER_DLLPUBLIC PropListener
{ {
public: 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; PropListener* m_pListener;
public: public:

View File

@@ -88,10 +88,6 @@ class XMLErrors;
class StyleMap; class StyleMap;
enum class SvXMLErrorFlags; enum class SvXMLErrorFlags;
typedef std::stack<SvXMLImportContextRef> SvXMLImportContexts_Impl;
typedef std::stack<css::uno::Reference<css::xml::sax::XFastContextHandler>>
FastSvXMLImportContexts_Impl;
namespace xmloff { namespace xmloff {
class RDFaImportHelper; class RDFaImportHelper;
} }
@@ -204,12 +200,13 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper<
std::unique_ptr<SvXMLImport_Impl> mpImpl; // dummy std::unique_ptr<SvXMLImport_Impl> mpImpl; // dummy
std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap;
std::unique_ptr<SvXMLUnitConverter> mpUnitConv; std::unique_ptr<SvXMLUnitConverter> mpUnitConv;
SvXMLImportContexts_Impl maContexts; std::stack<SvXMLImportContextRef> maContexts;
FastSvXMLImportContexts_Impl maFastContexts; std::stack<css::uno::Reference<css::xml::sax::XFastContextHandler>>
std::unique_ptr<SvXMLNumFmtHelper> mpNumImport; maFastContexts;
std::unique_ptr<ProgressBarHelper> mpProgressBarHelper; std::unique_ptr<SvXMLNumFmtHelper> mpNumImport;
std::unique_ptr<ProgressBarHelper> mpProgressBarHelper;
std::unique_ptr<XMLEventImportHelper> mpEventImportHelper; std::unique_ptr<XMLEventImportHelper> mpEventImportHelper;
std::unique_ptr<XMLErrors> mpXMLErrors; std::unique_ptr<XMLErrors> mpXMLErrors;
rtl::Reference<StyleMap> mpStyleMap; rtl::Reference<StyleMap> mpStyleMap;

View File

@@ -62,9 +62,7 @@ typedef std::unordered_map<OString, bool, OStringHash>
enum class IdLevel { Null=0, Text=2, Identifier=5 }; enum class IdLevel { Null=0, Text=2, Identifier=5 };
typedef std::vector< OString > ExportList; /// Purpose: holds mandatory data to export a single res
/// Purpose: holds mandatory data to export a single res (used with ResStack)
class ResData class ResData
{ {
public: public:
@@ -92,7 +90,6 @@ enum class StringType {
}; };
typedef ::std::vector< ResData* > ResStack;
class ParserQueue; class ParserQueue;
// class MergeEntrys // class MergeEntrys

View File

@@ -35,11 +35,9 @@ using namespace ::com::sun::star::uno;
namespace { namespace {
typedef ::cppu::WeakImplHelper< XInputStream > UnoBinaryInputStream_BASE;
/** Implementation of a UNO input stream wrapping a binary input stream. /** Implementation of a UNO input stream wrapping a binary input stream.
*/ */
class UnoBinaryInputStream : public UnoBinaryInputStream_BASE class UnoBinaryInputStream : public ::cppu::WeakImplHelper< XInputStream >
{ {
public: public:
explicit UnoBinaryInputStream( BinaryInputStream& rInStrm ); explicit UnoBinaryInputStream( BinaryInputStream& rInStrm );

View File

@@ -935,10 +935,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet )
} }
} }
typedef ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo > VBAToOOEventDescGen_BASE; class VBAToOOEventDescGen : public ::cppu::WeakImplHelper< XVBAToOOEventDescGen, css::lang::XServiceInfo >
class VBAToOOEventDescGen : public VBAToOOEventDescGen_BASE
{ {
public: public:
VBAToOOEventDescGen(); VBAToOOEventDescGen();

View File

@@ -72,8 +72,6 @@ using namespace com::sun::star::lang;
typedef std::unordered_map<OUString, sal_Int32, OUStringHash> NameToHandleMap; typedef std::unordered_map<OUString, sal_Int32, OUStringHash> NameToHandleMap;
typedef std::unordered_map<sal_Int32, sal_Int32> EnumToHandleMap;
typedef std::set<OUString> VarNameSet; typedef std::set<OUString> VarNameSet;
// class SvtPathOptions_Impl --------------------------------------------- // class SvtPathOptions_Impl ---------------------------------------------
@@ -85,7 +83,8 @@ class SvtPathOptions_Impl
Reference< XFastPropertySet > m_xPathSettings; Reference< XFastPropertySet > m_xPathSettings;
Reference< XStringSubstitution > m_xSubstVariables; Reference< XStringSubstitution > m_xSubstVariables;
Reference< XMacroExpander > m_xMacroExpander; Reference< XMacroExpander > m_xMacroExpander;
mutable EnumToHandleMap m_aMapEnumToPropHandle; mutable std::unordered_map<sal_Int32, sal_Int32>
m_aMapEnumToPropHandle;
VarNameSet m_aSystemPathVarNames; VarNameSet m_aSystemPathVarNames;
OUString m_aEmptyString; OUString m_aEmptyString;

View File

@@ -25,9 +25,7 @@
#include <cppuhelper/implbase.hxx> #include <cppuhelper/implbase.hxx>
typedef cppu::WeakImplHelper< ov::msforms::XNewFont > VbaNewFont_BASE; class VbaNewFont : public cppu::WeakImplHelper< ov::msforms::XNewFont >
class VbaNewFont : public VbaNewFont_BASE
{ {
public: public:
/// @throws css::uno::RuntimeException /// @throws css::uno::RuntimeException

View File

@@ -23,8 +23,6 @@
#include <unordered_map> #include <unordered_map>
typedef std::unordered_map< OString, GLuint, OStringHash > UniformCache;
enum class TextureShaderType enum class TextureShaderType
{ {
Normal = 0, Normal = 0,
@@ -44,7 +42,8 @@ class VCL_PLUGIN_PUBLIC OpenGLProgram
{ {
private: private:
GLuint mnId; GLuint mnId;
UniformCache maUniformLocations; std::unordered_map< OString, GLuint, OStringHash >
maUniformLocations;
sal_uInt32 mnEnabledAttribs; sal_uInt32 mnEnabledAttribs;
GLuint mnPositionAttrib; GLuint mnPositionAttrib;
GLuint mnTexCoordAttrib; GLuint mnTexCoordAttrib;