summaryrefslogtreecommitdiffstats
path: root/include/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-11 15:53:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-11 17:24:16 +0200
commit77fca82aab16619a693d53e970ac717f54105e95 (patch)
tree785d92d2faba195d0723b1343184636a71afd278 /include/editeng
parentclang:optin.performance.Padding in sfx2 (diff)
downloadcore-77fca82aab16619a693d53e970ac717f54105e95.tar.gz
core-77fca82aab16619a693d53e970ac717f54105e95.zip
clang:optin.performance.Padding in svx,editeng
Excessive padding in 'struct svx::SpellPortion' (18 padding bytes, where 2 is optimal). Excessive padding in 'class SvxNumRule' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct SpellInfo' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct ImpEditEngine::LineAreaInfo' (14 padding bytes, where 6 is optimal). Excessive padding in 'class ImpChainLinkProperties' (5 padding bytes, where 1 is optimal). Excessive padding in 'class TextChainFlow' (20 padding bytes, where 4 is optimal). Excessive padding in 'class SdrObjList' (13 padding bytes, where 5 is optimal). Excessive padding in 'class SdrLayer' (12 padding bytes, where 4 is optimal). Change-Id: I17b1c40bfe553c7635dc6177845dc92956cd0fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/SpellPortions.hxx36
-rw-r--r--include/editeng/numitem.hxx7
2 files changed, 21 insertions, 22 deletions
diff --git a/include/editeng/SpellPortions.hxx b/include/editeng/SpellPortions.hxx
index 0681b5dbbfcc..75f6254385cb 100644
--- a/include/editeng/SpellPortions.hxx
+++ b/include/editeng/SpellPortions.hxx
@@ -41,6 +41,22 @@ struct SpellPortion
/** contains the text of the portion.
*/
OUString sText;
+ /** for wrong words this reference is filled with the error information otherwise
+ it's an empty reference
+ */
+ css::uno::Reference< css::linguistic2::XSpellAlternatives> xAlternatives;
+ /** provides access to the grammar checker interface
+ */
+ css::uno::Reference< css::linguistic2::XProofreader > xGrammarChecker;
+ /** contains the proposed dialog title if the proof reading component provides one.
+ */
+ OUString sDialogTitle;
+ /** contains the grammar error information
+ */
+ css::linguistic2::SingleProofreadingError aGrammarError;
+ /** contains the language applied to the text. It has to match the script type.
+ */
+ LanguageType eLanguage;
/** Marks the portion as field, footnote symbol or any other special content that
should be protected against unintentional deletion.
*/
@@ -50,33 +66,17 @@ struct SpellPortion
for them.
*/
bool bIsHidden;
- /** contains the language applied to the text. It has to match the script type.
- */
- LanguageType eLanguage;
- /** for wrong words this reference is filled with the error information otherwise
- it's an empty reference
- */
- css::uno::Reference< css::linguistic2::XSpellAlternatives> xAlternatives;
/** determines whether the error type is a grammar error
*/
bool bIsGrammarError;
- /** contains the grammar error information
- */
- css::linguistic2::SingleProofreadingError aGrammarError;
- /** provides access to the grammar checker interface
- */
- css::uno::Reference< css::linguistic2::XProofreader > xGrammarChecker;
/** marks portion as to-be-ignored. This is a return parameter.
*/
- /** contains the proposed dialog title if the proof reading component provides one.
- */
- OUString sDialogTitle;
-
bool bIgnoreThisError;
+
SpellPortion() :
+ eLanguage(LANGUAGE_DONTKNOW),
bIsField(false),
bIsHidden(false),
- eLanguage(LANGUAGE_DONTKNOW),
bIsGrammarError(false),
bIgnoreThisError(false)
{
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 5f444e29389d..baa6ad3204e1 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -226,7 +226,7 @@ public:
};
//Feature-Flags (only sal_uInt16!)
-enum class SvxNumRuleFlags
+enum class SvxNumRuleFlags : sal_uInt16
{
NONE = 0x0000,
CONTINUOUS = 0x0001, // consecutive numbers possible?
@@ -242,7 +242,7 @@ namespace o3tl
template<> struct typed_flags<SvxNumRuleFlags> : is_typed_flags<SvxNumRuleFlags, 0x039d> {};
}
-enum class SvxNumRuleType
+enum class SvxNumRuleType : sal_uInt8
{
NUMBERING,
OUTLINE_NUMBERING,
@@ -251,12 +251,11 @@ enum class SvxNumRuleType
class EDITENG_DLLPUBLIC SvxNumRule final
{
+ std::unique_ptr<SvxNumberFormat> aFmts[SVX_MAX_NUM];
sal_uInt16 nLevelCount; // Number of supported levels
SvxNumRuleFlags nFeatureFlags; // What is supported?
SvxNumRuleType eNumberingType; // Type of numbering
bool bContinuousNumbering; // sequential numbering
-
- std::unique_ptr<SvxNumberFormat> aFmts[SVX_MAX_NUM];
bool aFmtsSet[SVX_MAX_NUM]; // Flags indicating valid levels
static sal_Int32 nRefCount;