Kaydet (Commit) 444ae4d0 authored tarafından Julien Nabet's avatar Julien Nabet

Fix 'bSkipBreaks' is assigned a value that is never used

See http://nabble.documentfoundation.org/Cppcheck-bSkipBreaks-is-assigned-a-value-that-is-never-used-sc-td4034724.html

Change-Id: I846d433c49ad6951539ad283514ce84263236bbb
üst 3a7a9703
...@@ -120,7 +120,6 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) ...@@ -120,7 +120,6 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
bool bSkipColBreaks = false; bool bSkipColBreaks = false;
bool bSkipRowBreaks = false; bool bSkipRowBreaks = false;
bool bSkipBreaks = false;
if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SFX_ITEM_SET ) if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, false, &pItem ) == SFX_ITEM_SET )
{ {
...@@ -138,15 +137,6 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea ) ...@@ -138,15 +137,6 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
bSkipRowBreaks = true; bSkipRowBreaks = true;
} }
if (!bSkipBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SFX_ITEM_SET)
{
const ScPageScaleToItem& rScaleToItem = static_cast<const ScPageScaleToItem&>(
pStyleSet->Get(ATTR_PAGE_SCALETO));
if (rScaleToItem.GetWidth() > 0 || rScaleToItem.GetHeight() > 0)
// when fitting to a fixed width x height, ignore manual breaks.
bSkipBreaks = true;
}
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
long nPageSizeX = aPageSizeTwips.Width(); long nPageSizeX = aPageSizeTwips.Width();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment