[Libreoffice-commits] core.git: 2 commits - bin/gen-boost-headers cui/source editeng/source include/editeng sc/source svx/source sw/source

Michael Stahl mstahl at redhat.com
Mon May 30 15:40:28 UTC 2016


 bin/gen-boost-headers                           |   57 ++++++++++++++++++++++++
 cui/source/tabpages/border.cxx                  |    2 
 editeng/source/items/frmitems.cxx               |   14 ++---
 editeng/source/rtf/rtfitem.cxx                  |    2 
 include/editeng/boxitem.hxx                     |    6 +-
 sc/source/core/data/document.cxx                |    2 
 sc/source/core/data/stlpool.cxx                 |    2 
 sc/source/ui/unoobj/cellsuno.cxx                |    4 -
 svx/source/svdraw/svdattr.cxx                   |    2 
 svx/source/table/cell.cxx                       |    4 -
 sw/source/core/doc/DocumentStylePoolManager.cxx |    2 
 sw/source/core/doc/tblafmt.cxx                  |    4 -
 sw/source/core/docnode/ndtbl.cxx                |    3 -
 sw/source/core/docnode/ndtbl1.cxx               |    2 
 sw/source/core/edit/autofmt.cxx                 |    2 
 sw/source/core/unocore/unotbl.cxx               |    6 +-
 sw/source/filter/html/htmlcss1.cxx              |    4 -
 sw/source/filter/html/htmltab.cxx               |    6 +-
 sw/source/filter/ww8/docxattributeoutput.cxx    |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx     |    2 
 sw/source/ui/frmdlg/column.cxx                  |   10 ++--
 sw/source/uibase/shells/frmsh.cxx               |    5 +-
 sw/source/uibase/shells/tabsh.cxx               |    4 +
 sw/source/uibase/uiview/viewtab.cxx             |    7 +-
 24 files changed, 108 insertions(+), 46 deletions(-)

New commits:
commit 84fb4be390a7a09c27f3aa1f004c022f0cdc192a
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon May 30 15:25:26 2016 +0200

    editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()
    
    Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c999db8..5ea3bdc 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -496,7 +496,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
                                     nDefDist != nRightDist ||
                                     nDefDist != nTopDist   ||
                                     nDefDist != nBottomDist);
-                        if((pBoxItem->GetDistance() ||
+                        if ((pBoxItem->GetSmallestDistance() ||
                                 bIsAnyBorderVisible) && bDiffDist )
                         {
                             m_pLeftMF->SetModifyFlag();
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index f976697..58a118c 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1669,7 +1669,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
             aSeq[1] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetRight(), bConvert) );
             aSeq[2] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetBottom(), bConvert) );
             aSeq[3] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetTop(), bConvert) );
-            aSeq[4] <<= uno::makeAny( (sal_Int32)(bConvert ? convertTwipToMm100( GetDistance()) : GetDistance()));
+            aSeq[4] <<= uno::makeAny( (sal_Int32)(bConvert ? convertTwipToMm100( GetSmallestDistance()) : GetSmallestDistance()));
             aSeq[5] <<= uno::makeAny( (sal_Int32)(bConvert ? convertTwipToMm100( nTopDist ) : nTopDist ));
             aSeq[6] <<= uno::makeAny( (sal_Int32)(bConvert ? convertTwipToMm100( nBottomDist ) : nBottomDist ));
             aSeq[7] <<= uno::makeAny( (sal_Int32)(bConvert ? convertTwipToMm100( nLeftDist ) : nLeftDist ));
@@ -1694,7 +1694,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
             aRetLine = SvxBoxItem::SvxLineToLine(GetTop(), bConvert);
             break;
         case BORDER_DISTANCE:
-            nDist = GetDistance();
+            nDist = GetSmallestDistance();
             bDistMember = true;
             break;
         case TOP_BORDER_DISTANCE:
@@ -1852,7 +1852,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                         if( bConvert )
                             nDist = convertMm100ToTwip(nDist);
                         if ( n == 4 )
-                            SetDistance( sal_uInt16( nDist ));
+                            SetAllDistances(sal_uInt16(nDist));
                         else
                             SetDistance( sal_uInt16( nDist ), nLines[n-5] );
                     }
@@ -1951,7 +1951,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
             if( bConvert )
                 nDist = convertMm100ToTwip(nDist);
             if( nMemberId == BORDER_DISTANCE )
-                SetDistance( sal_uInt16( nDist ));
+                SetAllDistances(sal_uInt16(nDist));
             else
                 SetDistance( sal_uInt16( nDist ), nLine );
         }
@@ -2164,7 +2164,7 @@ bool SvxBoxItem::GetPresentation
 
 SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) const
 {
-    rStrm.WriteUInt16( GetDistance() );
+    rStrm.WriteUInt16( GetSmallestDistance() );
     const SvxBorderLine* pLine[ 4 ];    // top, left, right, bottom
     pLine[ 0 ] = GetTop();
     pLine[ 1 ] = GetLeft();
@@ -2265,7 +2265,7 @@ SfxPoolItem* SvxBoxItem::Create( SvStream& rStrm, sal_uInt16 nIVersion ) const
     }
     else
     {
-        pAttr->SetDistance( nDistance );
+        pAttr->SetAllDistances(nDistance);
     }
 
     return pAttr;
@@ -2328,7 +2328,7 @@ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, SvxBoxItemLine nLine )
 }
 
 
-sal_uInt16 SvxBoxItem::GetDistance() const
+sal_uInt16 SvxBoxItem::GetSmallestDistance() const
 {
     // The smallest distance that is not 0 will be returned.
     sal_uInt16 nDist = nTopDist;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 94aab74..f6e0691 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1538,7 +1538,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
                     break;
 
                 case RTF_BOX:
-                    aAttr.SetDistance( (sal_uInt16)nTokenValue );
+                    aAttr.SetAllDistances( (sal_uInt16)nTokenValue );
                     break;
                 }
             }
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 58ccb21..cb23578 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -99,12 +99,12 @@ public:
     void    SetLine( const editeng::SvxBorderLine* pNew, SvxBoxItemLine nLine );
 
     sal_uInt16  GetDistance( SvxBoxItemLine nLine ) const;
-    sal_uInt16  GetDistance() const;
+    sal_uInt16  GetSmallestDistance() const;
 
     bool IsRemoveAdjacentCellBorder() const { return bRemoveAdjCellBorder; }
 
     void    SetDistance( sal_uInt16 nNew, SvxBoxItemLine nLine );
-    inline void SetDistance( sal_uInt16 nNew );
+    inline void SetAllDistances( sal_uInt16 nNew );
 
     void SetRemoveAdjacentCellBorder( bool bSet = true ) { bRemoveAdjCellBorder = bSet; }
 
@@ -116,7 +116,7 @@ public:
     static bool LineToSvxLine(const css::table::BorderLine2& rLine, editeng::SvxBorderLine& rSvxLine, bool bConvert);
 };
 
-inline void SvxBoxItem::SetDistance( sal_uInt16 nNew )
+inline void SvxBoxItem::SetAllDistances(sal_uInt16 const nNew)
 {
     nTopDist = nBottomDist = nLeftDist = nRightDist = nNew;
 }
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index f5ad18c..68b1f8f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4956,7 +4956,7 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
     rLineOuter.SetLine(nullptr, SvxBoxItemLine::BOTTOM);
     rLineOuter.SetLine(nullptr, SvxBoxItemLine::LEFT);
     rLineOuter.SetLine(nullptr, SvxBoxItemLine::RIGHT);
-    rLineOuter.SetDistance(0);
+    rLineOuter.SetAllDistances(0);
 
     rLineInner.SetLine(nullptr, SvxBoxInfoItemLine::HORI);
     rLineInner.SetLine(nullptr, SvxBoxInfoItemLine::VERT);
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index ec06c08..9b2a5ce 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -374,7 +374,7 @@ void ScStyleSheetPool::CreateStandardStyles()
     aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::BOTTOM );
     aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::LEFT );
     aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::RIGHT );
-    aBoxItem.SetDistance( 10 ); // 0.2mm
+    aBoxItem.SetAllDistances( 10 ); // 0.2mm
     aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::TOP );
     aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::BOTTOM );
     aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::LEFT );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 944c56d..238da0d 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -962,7 +962,7 @@ template<typename TableBorderType>
 void lcl_fillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const TableBorderType& rBorder )
 {
     ::editeng::SvxBorderLine aLine;
-    rOuter.SetDistance( static_cast<sal_uInt16>(HMMToTwips( rBorder.Distance )) );
+    rOuter.SetAllDistances(static_cast<sal_uInt16>(HMMToTwips(rBorder.Distance)));
     rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ),         SvxBoxItemLine::TOP );
     rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ),      SvxBoxItemLine::BOTTOM );
     rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ),        SvxBoxItemLine::LEFT );
@@ -1014,7 +1014,7 @@ void lcl_fillTableBorder( TableBorderItem& rBorder, const SvxBoxItem& rOuter, co
     ScHelperFunctions::FillBorderLine( rBorder.HorizontalLine,  rInner.GetHori() );
     ScHelperFunctions::FillBorderLine( rBorder.VerticalLine,    rInner.GetVert() );
 
-    rBorder.Distance                = rOuter.GetDistance();
+    rBorder.Distance                = rOuter.GetSmallestDistance();
     rBorder.IsTopLineValid          = rInner.IsValid(SvxBoxInfoItemValidFlags::TOP);
     rBorder.IsBottomLineValid       = rInner.IsValid(SvxBoxInfoItemValidFlags::BOTTOM);
     rBorder.IsLeftLineValid         = rInner.IsValid(SvxBoxInfoItemValidFlags::LEFT);
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 5a0570c..65b1b12 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -307,7 +307,7 @@ SdrItemPool::SdrItemPool(
     mppLocalPoolDefaults[ SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL - SDRATTR_START ] = new SdrCustomShapeReplacementURLItem;
 
     SvxBoxItem* pboxItem = new SvxBoxItem( SDRATTR_TABLE_BORDER );
-    pboxItem->SetDistance( 100 );
+    pboxItem->SetAllDistances( 100 );
     mppLocalPoolDefaults[ SDRATTR_TABLE_BORDER - SDRATTR_START ] = pboxItem;
 
     SvxBoxInfoItem* pBoxInfoItem = new SvxBoxInfoItem( SDRATTR_TABLE_BORDER_INNER );
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index f4d11de..fc27035 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1046,7 +1046,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any&
             aBoxInfo.SetLine(bSet ? &aLine : nullptr, SvxBoxInfoItemLine::VERT);
             aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::VERT, pBorder->IsVerticalLineValid);
 
-            aBox.SetDistance(pBorder->Distance); //TODO
+            aBox.SetAllDistances(pBorder->Distance); //TODO
             aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::DISTANCE, pBorder->IsDistanceValid);
 
             mpProperties->SetObjectItem(aBox);
@@ -1162,7 +1162,7 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow
             aTableBorder.IsHorizontalLineValid  = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::HORI);
             aTableBorder.VerticalLine           = SvxBoxItem::SvxLineToLine(rBoxInfoItem.GetVert(), false);
             aTableBorder.IsVerticalLineValid    = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::VERT);
-            aTableBorder.Distance               = rBox.GetDistance();
+            aTableBorder.Distance               = rBox.GetSmallestDistance();
             aTableBorder.IsDistanceValid        = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::DISTANCE);
 
             return Any( aTableBorder );
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index b3ced5d..aab39ce 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1289,7 +1289,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
                 aBox.SetLine( &aLine, SvxBoxItemLine::BOTTOM );
                 aBox.SetLine( &aLine, SvxBoxItemLine::LEFT );
                 aBox.SetLine( &aLine, SvxBoxItemLine::RIGHT );
-                aBox.SetDistance( 85 );
+                aBox.SetAllDistances( 85 );
                 aSet.Put( aBox );
                 aSet.Put( SvxLRSpaceItem( 114, 114, 0, 0, RES_LR_SPACE ) );
                 aSet.Put( SvxULSpaceItem( 114, 114, RES_UL_SPACE ) );
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 6c55d0b..ebad1b0 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -305,7 +305,7 @@ SwBoxAutoFormat::SwBoxAutoFormat()
     m_aRotateMode( SVX_ROTATE_MODE_STANDARD, 0 )
 {
     m_eSysLanguage = m_eNumFormatLanguage = ::GetAppLanguage();
-    m_aBox.SetDistance( 55 );
+    m_aBox.SetAllDistances(55);
 }
 
 SwBoxAutoFormat::SwBoxAutoFormat( const SwBoxAutoFormat& rNew )
@@ -1118,7 +1118,7 @@ SwTableAutoFormatTable::SwTableAutoFormatTable()
         pNew->SetBoxFormat( aNew, i );
 
     SvxBoxItem aBox( RES_BOX );
-    aBox.SetDistance( 55 );
+    aBox.SetAllDistances(55);
     SvxBorderLine aLn( &aColor, DEF_LINE_WIDTH_0 );
     aBox.SetLine( &aLn, SvxBoxItemLine::LEFT );
     aBox.SetLine( &aLn, SvxBoxItemLine::BOTTOM );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index c01455a..2b92de2 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -125,7 +125,8 @@ static void lcl_SetDfltBoxAttr( SwFrameFormat& rFormat, sal_uInt8 nId )
         aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
         aLine.SetWidth( DEF_LINE_WIDTH_0 );
     }
-    SvxBoxItem aBox(RES_BOX); aBox.SetDistance( 55 );
+    SvxBoxItem aBox(RES_BOX);
+    aBox.SetAllDistances(55);
     if ( bTop )
         aBox.SetLine( &aLine, SvxBoxItemLine::TOP );
     if ( bBottom )
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 2a77eaa..03735e8 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1099,7 +1099,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
                                 rBox.GetDistance( k ) )
                             {
                                 aSetBoxInfo.SetValid( SvxBoxInfoItemValidFlags::DISTANCE, false );
-                                aSetBox.SetDistance( 0 );
+                                aSetBox.SetAllDistances(0);
                                 break;
                             }
                     }
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 816e081..c85e25c 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -584,7 +584,7 @@ bool SwAutoFormat::DoUnderline()
         aSet.Put( SwParaConnectBorderItem( false ) );
         SvxBoxItem aBox( RES_BOX );
         aBox.SetLine( &aLine, SvxBoxItemLine::BOTTOM );
-        aBox.SetDistance( 42 );     // ~0,75 mm
+        aBox.SetAllDistances(42);     // ~0,75 mm
         aSet.Put(aBox);
         m_pDoc->getIDocumentContentOperations().InsertItemSet( m_aDelPam, aSet );
 
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index ba58c94..eb1de8f 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2708,7 +2708,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An
                     aBoxInfo.SetLine(aVertLine.isEmpty() ? nullptr : &aVertLine, SvxBoxInfoItemLine::VERT);
                     aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::VERT, aBorder.IsVerticalLineValid);
 
-                    aBox.SetDistance((sal_uInt16)convertMm100ToTwip(aBorder.Distance));
+                    aBox.SetAllDistances(static_cast<sal_uInt16>(convertMm100ToTwip(aBorder.Distance)));
                     aBoxInfo.SetValid(SvxBoxInfoItemValidFlags::DISTANCE, aBorder.IsDistanceValid);
 
                     aSet.Put(aBox);
@@ -2898,7 +2898,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
                         aTableBorder.IsHorizontalLineValid  = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::HORI);
                         aTableBorder.VerticalLine           = SvxBoxItem::SvxLineToLine(rBoxInfoItem.GetVert(), true);
                         aTableBorder.IsVerticalLineValid    = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::VERT);
-                        aTableBorder.Distance               = convertTwipToMm100( rBox.GetDistance() );
+                        aTableBorder.Distance               = convertTwipToMm100(rBox.GetSmallestDistance());
                         aTableBorder.IsDistanceValid        = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::DISTANCE);
                         aRet <<= aTableBorder;
                     }
@@ -2917,7 +2917,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
                         aTableBorder.IsHorizontalLineValid  = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::HORI);
                         aTableBorder.VerticalLine           = SvxBoxItem::SvxLineToLine(rBoxInfoItem.GetVert(), true);
                         aTableBorder.IsVerticalLineValid    = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::VERT);
-                        aTableBorder.Distance               = convertTwipToMm100( rBox.GetDistance() );
+                        aTableBorder.Distance               = convertTwipToMm100(rBox.GetSmallestDistance());
                         aTableBorder.IsDistanceValid        = rBoxInfoItem.IsValid(SvxBoxInfoItemValidFlags::DISTANCE);
                         aRet <<= aTableBorder;
                     }
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index f78711b..f2ccc8c 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -2095,8 +2095,8 @@ void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet,
         if( (nFlags & HTML_FF_PADDING) == 0 )
         {
             SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) );
-            // Alle 4 Seiten gleichzeitig auf 0 setzen
-            aBoxItem.SetDistance( 0 );
+            // reset all 4 sides to 0
+            aBoxItem.SetAllDistances(0);
             rFrameItemSet.Put( aBoxItem );
         }
         else
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index fc407fd..96504ff 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1425,10 +1425,10 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
                     (2*nCellPadding <= nInnerFrameWidth) ? nCellPadding
                                                       : (nInnerFrameWidth / 2) );
                 // wir setzen das Item nur, wenn es eine Umrandung gibt
-                // oder eine sheet::Border-Distanz vorgegeben ist. Fehlt letztere,
+                // oder eine Border-Distanz vorgegeben ist. Fehlt letztere,
                 // dann gibt es eine Umrandung, und wir muessen die Distanz
                 // setzen
-                aBoxItem.SetDistance( nBDist ? nBDist : MIN_BORDER_DIST );
+                aBoxItem.SetAllDistances((nBDist) ? nBDist : MIN_BORDER_DIST);
                 pFrameFormat->SetFormatAttr( aBoxItem );
             }
             else
@@ -1528,7 +1528,7 @@ void HTMLTable::FixFillerFrameFormat( SwTableBox *pBox, bool bRight ) const
             aBoxItem.SetLine( &aInhLeftBorderLine, SvxBoxItemLine::LEFT );
         if( bRight && bInhRightBorder )
             aBoxItem.SetLine( &aInhRightBorderLine, SvxBoxItemLine::RIGHT );
-        aBoxItem.SetDistance( MIN_BORDER_DIST );
+        aBoxItem.SetAllDistances(MIN_BORDER_DIST);
         pFrameFormat->SetFormatAttr( aBoxItem );
     }
     else
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 59d375e..417fead 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4002,7 +4002,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt)
                 const SvxBoxItem& rBoxItem = static_cast< const SvxBoxItem& >(rHt);
                 bMustWrite = rBoxItem.GetTop() || rBoxItem.GetLeft() ||
                              rBoxItem.GetBottom() || rBoxItem.GetRight() ||
-                             rBoxItem.GetDistance();
+                             rBoxItem.GetSmallestDistance();
             }
             break;
         case RES_CHRATR_HIGHLIGHT:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 59b6bb5..8bdadc5 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3254,7 +3254,7 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox)
         OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR
     };
 
-    sal_uInt16 nDist = rBox.GetDistance();
+    sal_uInt16 const nDist = rBox.GetSmallestDistance();
 
     if (m_rExport.m_bRTFFlySyntax)
     {
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 6a55d0f..ebed2f3 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -154,7 +154,7 @@ SwColumnDlg::SwColumnDlg(vcl::Window* pParent, SwWrtShell& rSh)
 
         const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rFormat.GetLRSpace();
         const SvxBoxItem& rBox = (const SvxBoxItem&) rFormat.GetBox();
-        nPageWidth -= rLRSpace.GetLeft() + rLRSpace.GetRight() + rBox.GetDistance();
+        nPageWidth -= rLRSpace.GetLeft() + rLRSpace.GetRight() + rBox.GetSmallestDistance();
 
         pPageSet->Put(rFormat.GetCol());
         pPageSet->Put(rFormat.GetLRSpace());
@@ -636,7 +636,7 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
         {
             const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE));
             const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX));
-            pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetDistance());
+            pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetSmallestDistance());
         }
     }
     if(m_pBalanceColsCB->IsVisible())
@@ -1251,7 +1251,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
                                                                     RES_LR_SPACE ));
                 const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
                 nActWidth = rSize.GetSize().Width()
-                                - rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetDistance();
+                                - rLRSpace.GetLeft() - rLRSpace.GetRight() - rBox.GetSmallestDistance();
             }
             else
             {
@@ -1259,7 +1259,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
                                                                     RES_UL_SPACE ));
                 const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
                 nActWidth = rSize.GetSize().Height()
-                                - rULSpace.GetUpper() - rULSpace.GetLower() - rBox.GetDistance();
+                                - rULSpace.GetUpper() - rULSpace.GetLower() - rBox.GetSmallestDistance();
 
             }
 
@@ -1289,7 +1289,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
             nTotalWish = FRAME_FORMAT_WIDTH;
         else
         {
-            long nDistance = rBox.GetDistance();
+            long const nDistance = rBox.GetSmallestDistance();
             nTotalWish = (!bVertical ? rSize.GetWidth() : rSize.GetHeight()) - 2 * nDistance;
         }
 
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 95f31c9..a78df35 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1009,7 +1009,8 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
                     if(!StarBASIC::IsRunning())
 #endif
                     {
-                        aNewBox.SetDistance( rBoxItem.GetDistance() );
+                        // TODO: should this copy 4 individual Dist instead?
+                        aNewBox.SetAllDistances(rBoxItem.GetSmallestDistance());
                     }
 
                     aBoxItem = aNewBox;
@@ -1115,7 +1116,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
     if (bDefault && (aBoxItem.GetTop() || aBoxItem.GetBottom() ||
         aBoxItem.GetLeft() || aBoxItem.GetRight()))
     {
-        aBoxItem.SetDistance(MIN_BORDER_DIST);
+        aBoxItem.SetAllDistances(MIN_BORDER_DIST);
     }
     aFrameSet.Put( aBoxItem );
     // Template AutoUpdate
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index c8b9afd..4681b22 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -491,9 +491,11 @@ void SwTableShell::Execute(SfxRequest &rReq)
                 sal_uInt16 nDefValue = MIN_BORDER_DIST;
                 if ( !rReq.IsAPI() )
                     nDefValue = 55;
-                if ( !rReq.IsAPI() || aBox.GetDistance() < MIN_BORDER_DIST )
+                if (!rReq.IsAPI() || aBox.GetSmallestDistance() < MIN_BORDER_DIST)
+                {
                     for( SvxBoxItemLine k : o3tl::enumrange<SvxBoxItemLine>() )
                         aBox.SetDistance( std::max(rCoreBox.GetDistance(k), nDefValue) , k );
+                }
             }
             else
                 OSL_ENSURE( false, "where is BoxItem?" );
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 7ab973d..f5df065 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1650,7 +1650,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                     SvxColumnItem aColItem(nNum);
                     const SwRect aPrtRect = rSh.GetAnyCurRect(RECT_PAGE_PRT, pPt);
                     const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rMaster.GetFormatAttr(RES_BOX));
-                    long nDist = rBox.GetDistance();
+                    long nDist = rBox.GetSmallestDistance();
 
                     lcl_FillSvxColumn(
                         aCol,
@@ -1946,8 +1946,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                     const SwFormatCol* pCols = pFormat ? &pFormat->GetCol():
                                                    &rDesc.GetMaster().GetCol();
                     const SwColumns& rCols = pCols->GetColumns();
-                    const sal_uInt16 nBorder = pFormat ? pFormat->GetBox().GetDistance() :
-                                                  rDesc.GetMaster().GetBox().GetDistance();
+                    const sal_uInt16 nBorder = (pFormat)
+                        ? pFormat->GetBox().GetSmallestDistance()
+                        : rDesc.GetMaster().GetBox().GetSmallestDistance();
 
                     // RECT_FLY_PRT_EMBEDDED returns the relative position to RECT_FLY_EMBEDDED
                     // the absolute position must be added here
commit 4d23189aee9adeb87e749a21305f22a43fb3fb17
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri May 27 22:58:23 2016 +0200

    add gen-boost-headers script
    
    Change-Id: I02102f6c37863963efa9a312a5a0fbbc1f42f345

diff --git a/bin/gen-boost-headers b/bin/gen-boost-headers
new file mode 100755
index 0000000..8342f88
--- /dev/null
+++ b/bin/gen-boost-headers
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# generate a bunch of dummy headers that wrap the crappy boost headers and
+# suppress a myriad of warnings; requires GCC's #include_next extension
+
+set -euo pipefail
+IFS=$'\n\t'
+
+GENDIR=${SRCDIR}/external/boost/include
+
+rm -rf ${GENDIR}
+mkdir ${GENDIR}
+
+# note: clucene contains a copy of half of boost, so ignore it too
+
+cat <(cd ${SRCDIR} && git grep '^# *include') \
+    <(find ${WORKDIR}/UnpackedTarball/ -mindepth 1 -maxdepth 1 -type d \
+         | grep -v boost | grep -v clucene \
+         | xargs grep -r '^# *include') \
+ | grep -o '\bboost.*\.\(h\|hpp\|ipp\)' \
+ | sort | uniq \
+ | while read -r HEADER; do
+        mkdir -p "$(dirname ${GENDIR}/${HEADER})"
+        cat > "${GENDIR}/${HEADER}" << _EOF
+/* generated by $0, do not edit! */
+#pragma once
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"  /* first! for clang */
+#pragma GCC diagnostic ignored "-Wpragmas"  /* second! for GCC */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#pragma GCC diagnostic ignored "-Wextra"
+#pragma GCC diagnostic ignored "-Wignored-qualifiers"
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#pragma GCC diagnostic ignored "-Winvalid-constexpr"
+#pragma GCC diagnostic ignored "-Wplacement-new"
+#pragma GCC diagnostic ignored "-Wreturn-type"
+#pragma GCC diagnostic ignored "-Wshadow"
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
+#pragma GCC diagnostic ignored "-Wtype-limits"
+#pragma GCC diagnostic ignored "-Wundef"
+#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
+#pragma GCC diagnostic ignored "-Wunused-macros"
+#pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#include_next <${HEADER}>
+#pragma GCC diagnostic pop
+_EOF
+    done
+


More information about the Libreoffice-commits mailing list