diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-28 13:18:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-05-29 09:40:12 +0200 |
commit | 31b0be0f21479323408e128f2e8a1a795e037e74 (patch) | |
tree | 97f4d31113dc06084758042cd6e87f73c5c5a43e /include | |
parent | f1ce5c3e7e621334be29df0fa425803ce77afb28 (diff) |
improve pahole script and pack a few classes
(*) fix: I was substracting the padding space instead of adding it
when calculating how much free space we had to improve.
(*) sort input data, so we process structs located in the same DSO
together, which reduces GDB's memory usage
(*) handle another error condition, where gdbs output is sufficiently
mixed up that we miss the end of commands terminator
Change-Id: Ic4bb92b736f38a2b3d90e4a14485152b7f869b43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/basegfx/DrawCommands.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/PropertyInfoHash.hxx | 17 | ||||
-rw-r--r-- | include/comphelper/enumhelper.hxx | 4 | ||||
-rw-r--r-- | include/comphelper/interfacecontainer2.hxx | 2 | ||||
-rw-r--r-- | include/comphelper/propertysetinfo.hxx | 4 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 20 | ||||
-rw-r--r-- | include/formula/FormulaCompiler.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/maptype.hxx | 17 | ||||
-rw-r--r-- | include/xmloff/xmlictxt.hxx | 6 |
9 files changed, 47 insertions, 27 deletions
diff --git a/include/basegfx/DrawCommands.hxx b/include/basegfx/DrawCommands.hxx index e9e3b935b8cf..fef43689b4a9 100644 --- a/include/basegfx/DrawCommands.hxx +++ b/include/basegfx/DrawCommands.hxx @@ -43,8 +43,8 @@ enum class GradientType class GradientStop { public: - float mfOffset; basegfx::BColor maColor; + float mfOffset; float mfOpacity; }; diff --git a/include/comphelper/PropertyInfoHash.hxx b/include/comphelper/PropertyInfoHash.hxx index 03c4373001d2..8c584ce5a572 100644 --- a/include/comphelper/PropertyInfoHash.hxx +++ b/include/comphelper/PropertyInfoHash.hxx @@ -28,15 +28,20 @@ namespace comphelper { struct PropertyInfo { - OUString const maName; - sal_Int32 const mnHandle; - css::uno::Type const maType; - sal_Int16 const mnAttributes; + OUString maName; + css::uno::Type maType; + sal_Int32 mnHandle; + sal_Int16 mnAttributes; + + PropertyInfo(OUString const & aName, sal_Int32 nHandle, css::uno::Type const & aType, sal_Int16 nAttributes) + : maName(aName), maType(aType), mnHandle(nHandle), mnAttributes(nAttributes) {} + PropertyInfo(OUString && aName, sal_Int32 nHandle, css::uno::Type const & aType, sal_Int16 nAttributes) + : maName(std::move(aName)), maType(aType), mnHandle(nHandle), mnAttributes(nAttributes) {} }; struct PropertyData { - sal_uInt8 const mnMapId; - PropertyInfo const *mpInfo; + sal_uInt8 mnMapId; + const PropertyInfo *mpInfo; PropertyData ( sal_uInt8 nMapId, PropertyInfo const *pInfo ) : mnMapId ( nMapId ) , mpInfo ( pInfo ) {} diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx index 16d95b76e808..5e5e000d78df 100644 --- a/include/comphelper/enumhelper.hxx +++ b/include/comphelper/enumhelper.hxx @@ -46,9 +46,9 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName final : private OEnumerationLock css::lang::XEventListener > { css::uno::Sequence< OUString > const m_aNames; + css::uno::Reference< css::container::XNameAccess > m_xAccess; sal_Int32 m_nPos; - css::uno::Reference< css::container::XNameAccess > m_xAccess; - bool m_bListening; + bool m_bListening; public: OEnumerationByName(const css::uno::Reference< css::container::XNameAccess >& _rxAccess); diff --git a/include/comphelper/interfacecontainer2.hxx b/include/comphelper/interfacecontainer2.hxx index c049a6c6726e..626ef830211d 100644 --- a/include/comphelper/interfacecontainer2.hxx +++ b/include/comphelper/interfacecontainer2.hxx @@ -100,9 +100,9 @@ public: private: OInterfaceContainerHelper2 & rCont; - bool const bIsList; detail::element_alias2 aData; sal_Int32 nRemain; + bool bIsList; OInterfaceIteratorHelper2( const OInterfaceIteratorHelper2 & ) = delete; OInterfaceIteratorHelper2 & operator = ( const OInterfaceIteratorHelper2 & ) = delete; diff --git a/include/comphelper/propertysetinfo.hxx b/include/comphelper/propertysetinfo.hxx index ee413ac51611..aaf8484ad879 100644 --- a/include/comphelper/propertysetinfo.hxx +++ b/include/comphelper/propertysetinfo.hxx @@ -44,8 +44,8 @@ namespace comphelper struct PropertyMapEntry { OUString maName; - sal_Int32 mnHandle; css::uno::Type maType; + sal_Int32 mnHandle; /// flag bitmap, @see css::beans::PropertyAttribute sal_Int16 mnAttributes; sal_uInt8 mnMemberId; @@ -54,8 +54,8 @@ struct PropertyMapEntry PropertyMapEntry(OUString _aName, sal_Int32 _nHandle, css::uno::Type const & _rType, sal_Int16 _nAttributes, sal_uInt8 _nMemberId, PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE) : maName( _aName ) - , mnHandle( _nHandle ) , maType( _rType ) + , mnHandle( _nHandle ) , mnAttributes( _nAttributes ) , mnMemberId( _nMemberId ) , mnMoreFlags( _nMoreFlags ) diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index a048c4e06ac0..3d71ac19818b 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -126,9 +126,9 @@ private: Paragraph& operator=(const Paragraph& rPara ) = delete; - ParaFlag nFlags; OUString aBulText; Size aBulSize; + ParaFlag nFlags; bool bVisible; bool IsVisible() const { return bVisible; } @@ -526,16 +526,16 @@ public: SdrPage* GetSdrPage() const { return mpSdrPage; } }; -struct EBulletInfo + struct EBulletInfo { - bool bVisible; - sal_uInt16 nType; // see SvxNumberType - OUString aText; - SvxFont aFont; - sal_Int32 nParagraph; - tools::Rectangle aBounds; - - EBulletInfo() : bVisible( false ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {} + SvxFont aFont; + tools::Rectangle aBounds; + OUString aText; + sal_Int32 nParagraph; + sal_uInt16 nType; // see SvxNumberType + bool bVisible; + + EBulletInfo() : nParagraph( EE_PARA_NOT_FOUND ), nType( 0 ), bVisible( false ) {} }; enum class OutlinerMode { diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index ecc9e5dd3f4f..9fdd5a521087 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -60,8 +60,8 @@ struct FormulaArrayStack { FormulaArrayStack* pNext; FormulaTokenArray* pArr; - sal_uInt16 nIndex; FormulaTokenRef mpLastToken; + sal_uInt16 nIndex; bool bTemp; }; diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx index b09d48b31e6b..dbde180797cf 100644 --- a/include/xmloff/maptype.hxx +++ b/include/xmloff/maptype.hxx @@ -32,9 +32,9 @@ struct XMLPropertyMapEntry { const char* msApiName; /// Property-Name sal_Int32 nApiNameLength; /// length of property name + enum ::xmloff::token::XMLTokenEnum meXMLName; /// XML-Name sal_uInt16 mnNameSpace; /** declares the Namespace in which this property exists */ - enum ::xmloff::token::XMLTokenEnum meXMLName; /// XML-Name /** * The lowest 14 bits specify the basic XML type of the property value, of @@ -98,6 +98,21 @@ struct XMLPropertyMapEntry Property-Name exist, all except one must have this flag set. */ bool mbImportOnly; + + XMLPropertyMapEntry( + const char* sApiName, + sal_Int32 nApiNameLength_, + sal_uInt16 nNameSpace, + enum ::xmloff::token::XMLTokenEnum eXMLName, + sal_uInt32 nType, + sal_Int16 nContextId, + SvtSaveOptions::ODFSaneDefaultVersion nEarliestODFVersionForExport, + bool bImportOnly) + : msApiName(sApiName), nApiNameLength(nApiNameLength_), + meXMLName(eXMLName), mnNameSpace(nNameSpace), mnType(nType), + mnContextId(nContextId), mnEarliestODFVersionForExport(nEarliestODFVersionForExport), + mbImportOnly(bImportOnly) + {} }; diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index 64927daf693b..29975774bf00 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -47,12 +47,12 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public css::xml::sax::XFastContextHa { friend class SvXMLImport; - oslInterlockedCount m_nRefCount; SvXMLImport& mrImport; - sal_uInt16 mnPrefix; OUString maLocalName; - bool mbPrefixAndLocalNameFilledIn; std::unique_ptr<SvXMLNamespaceMap> m_pRewindMap; + oslInterlockedCount m_nRefCount; + sal_uInt16 mnPrefix; + bool mbPrefixAndLocalNameFilledIn; SAL_DLLPRIVATE std::unique_ptr<SvXMLNamespaceMap> TakeRewindMap() { return std::move(m_pRewindMap); } SAL_DLLPRIVATE void PutRewindMap(std::unique_ptr<SvXMLNamespaceMap> p) { m_pRewindMap = std::move(p); } |