[Libreoffice-commits] core.git: editeng/source include/editeng

Daniel Robertson danlrobertson89 at gmail.com
Wed Nov 4 00:16:38 PST 2015


 editeng/source/items/frmitems.cxx |    4 ++--
 include/editeng/lrspitem.hxx      |    6 +++---
 include/editeng/outliner.hxx      |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit f57a6593e21d45008173352fc29ededdbc2c8878
Author: Daniel Robertson <danlrobertson89 at gmail.com>
Date:   Tue Nov 3 14:14:08 2015 -0500

    editeng: Eliminate unecessary padding in classes
    
    Edit the order of SvxLRSpaceItem and PaintFirstLineInfo members to
    remove unecessary padding due to data alignment.
    
    Change-Id: Icf2c92ef86a32384e51d1cb6f1a079b10995dfd5
    Reviewed-on: https://gerrit.libreoffice.org/19763
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 11cbfe2..3aa5888 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -399,13 +399,13 @@ SvxLRSpaceItem::SvxLRSpaceItem( const sal_uInt16 nId ) :
 
     SfxPoolItem( nId ),
 
-    nFirstLineOfst  ( 0 ),
     nTxtLeft        ( 0 ),
     nLeftMargin     ( 0 ),
     nRightMargin    ( 0 ),
     nPropFirstLineOfst( 100 ),
     nPropLeftMargin( 100 ),
     nPropRightMargin( 100 ),
+    nFirstLineOfst  ( 0 ),
     bAutoFirst      ( false ),
     bExplicitZeroMarginValRight(false),
     bExplicitZeroMarginValLeft(false)
@@ -420,13 +420,13 @@ SvxLRSpaceItem::SvxLRSpaceItem( const long nLeft, const long nRight,
 
     SfxPoolItem( nId ),
 
-    nFirstLineOfst  ( nOfset ),
     nTxtLeft        ( nTLeft ),
     nLeftMargin     ( nLeft ),
     nRightMargin    ( nRight ),
     nPropFirstLineOfst( 100 ),
     nPropLeftMargin( 100 ),
     nPropRightMargin( 100 ),
+    nFirstLineOfst  ( nOfset ),
     bAutoFirst      ( false ),
     bExplicitZeroMarginValRight(false),
     bExplicitZeroMarginValLeft(false)
diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx
index 40da999..94daed8 100644
--- a/include/editeng/lrspitem.hxx
+++ b/include/editeng/lrspitem.hxx
@@ -50,15 +50,15 @@
 
 class EDITENG_DLLPUBLIC SvxLRSpaceItem : public SfxPoolItem
 {
-    short   nFirstLineOfst;     // First-line indent _always_ relative to nTxtLeft
     long    nTxtLeft;           // We spend a sal_uInt16
     long    nLeftMargin;        // nLeft or the negative first-line indent
     long    nRightMargin;       // The unproblematic right edge
 
     sal_uInt16  nPropFirstLineOfst, nPropLeftMargin, nPropRightMargin;
+    short   nFirstLineOfst;     // First-line indent _always_ relative to nTxtLeft
     bool        bAutoFirst  : 1;    // Automatic calculation of the first line indent
-    bool        bExplicitZeroMarginValRight;
-    bool        bExplicitZeroMarginValLeft;
+    bool        bExplicitZeroMarginValRight : 1;
+    bool        bExplicitZeroMarginValLeft : 1;
 
     void   AdjustLeft();        // nLeftMargin and nTxtLeft are being adjusted.
 
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 517c80a..50df0a9 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -479,14 +479,14 @@ public:
 struct EDITENG_DLLPUBLIC PaintFirstLineInfo
 {
     sal_Int32 mnPara;
+    short mnOrientation;
     const Point& mrStartPos;
     long mnBaseLineY;
     const Point& mrOrigin;
-    short mnOrientation;
     VclPtr<OutputDevice> mpOutDev;
 
     PaintFirstLineInfo( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
-        : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
+        : mnPara( nPara ), mnOrientation( nOrientation ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mpOutDev( pOutDev )
     {}
 };
 


More information about the Libreoffice-commits mailing list