Kaydet (Commit) 85dccfb3 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwColumnPage

Change-Id: I94bc95a25ac11de419f18490b7d466ee22631778
Reviewed-on: https://gerrit.libreoffice.org/27095Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 3fa31e22
...@@ -394,12 +394,12 @@ const sal_uInt16 SwColumnPage::aPageRg[] = { ...@@ -394,12 +394,12 @@ const sal_uInt16 SwColumnPage::aPageRg[] = {
void SwColumnPage::ResetColWidth() void SwColumnPage::ResetColWidth()
{ {
if( nCols ) if( m_nCols )
{ {
const sal_uInt16 nWidth = GetMaxWidth( pColMgr, nCols ) / nCols; const sal_uInt16 nWidth = GetMaxWidth( m_pColMgr, m_nCols ) / m_nCols;
for(sal_uInt16 i = 0; i < nCols; ++i) for(sal_uInt16 i = 0; i < m_nCols; ++i)
nColWidth[i] = (long) nWidth; m_nColWidth[i] = (long) nWidth;
} }
} }
...@@ -407,14 +407,14 @@ void SwColumnPage::ResetColWidth() ...@@ -407,14 +407,14 @@ void SwColumnPage::ResetColWidth()
// Now as TabPage // Now as TabPage
SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
: SfxTabPage(pParent, "ColumnPage", "modules/swriter/ui/columnpage.ui", &rSet) : SfxTabPage(pParent, "ColumnPage", "modules/swriter/ui/columnpage.ui", &rSet)
, pColMgr(nullptr) , m_pColMgr(nullptr)
, nFirstVis(0) , m_nFirstVis(0)
, nMinWidth(MINLAY) , m_nMinWidth(MINLAY)
, pModifiedField(nullptr) , m_pModifiedField(nullptr)
, bFormat(false) , m_bFormat(false)
, bFrame(false) , m_bFrame(false)
, bHtmlMode(false) , m_bHtmlMode(false)
, bLockUpdate(false) , m_bLockUpdate(false)
{ {
get(m_pCLNrEdt, "colsnf"); get(m_pCLNrEdt, "colsnf");
get(m_pBalanceColsCB, "balance"); get(m_pBalanceColsCB, "balance");
...@@ -441,11 +441,11 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) ...@@ -441,11 +441,11 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
get(m_pPgeExampleWN, "pageexample"); get(m_pPgeExampleWN, "pageexample");
get(m_pFrameExampleWN, "frameexample"); get(m_pFrameExampleWN, "frameexample");
connectPercentField(aEd1, "width1mf"); connectPercentField(m_aEd1, "width1mf");
connectPercentField(aEd2, "width2mf"); connectPercentField(m_aEd2, "width2mf");
connectPercentField(aEd3, "width3mf"); connectPercentField(m_aEd3, "width3mf");
connectPercentField(aDistEd1, "spacing1mf"); connectPercentField(m_aDistEd1, "spacing1mf");
connectPercentField(aDistEd2, "spacing2mf"); connectPercentField(m_aDistEd2, "spacing2mf");
SetExchangeSupport(); SetExchangeSupport();
...@@ -481,16 +481,16 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet) ...@@ -481,16 +481,16 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
Link<Edit&,void> aCLNrLk = LINK(this, SwColumnPage, ColModify); Link<Edit&,void> aCLNrLk = LINK(this, SwColumnPage, ColModify);
m_pCLNrEdt->SetModifyHdl(aCLNrLk); m_pCLNrEdt->SetModifyHdl(aCLNrLk);
Link<Edit&,void> aLk = LINK(this, SwColumnPage, GapModify); Link<Edit&,void> aLk = LINK(this, SwColumnPage, GapModify);
aDistEd1.SetModifyHdl(aLk); m_aDistEd1.SetModifyHdl(aLk);
aDistEd2.SetModifyHdl(aLk); m_aDistEd2.SetModifyHdl(aLk);
aLk = LINK(this, SwColumnPage, EdModify); aLk = LINK(this, SwColumnPage, EdModify);
aEd1.SetModifyHdl(aLk); m_aEd1.SetModifyHdl(aLk);
aEd2.SetModifyHdl(aLk); m_aEd2.SetModifyHdl(aLk);
aEd3.SetModifyHdl(aLk); m_aEd3.SetModifyHdl(aLk);
m_pBtnBack->SetClickHdl(LINK(this, SwColumnPage, Up)); m_pBtnBack->SetClickHdl(LINK(this, SwColumnPage, Up));
m_pBtnNext->SetClickHdl(LINK(this, SwColumnPage, Down)); m_pBtnNext->SetClickHdl(LINK(this, SwColumnPage, Down));
...@@ -557,7 +557,7 @@ SwColumnPage::~SwColumnPage() ...@@ -557,7 +557,7 @@ SwColumnPage::~SwColumnPage()
void SwColumnPage::dispose() void SwColumnPage::dispose()
{ {
delete pColMgr; delete m_pColMgr;
m_pCLNrEdt.clear(); m_pCLNrEdt.clear();
m_pDefaultVS.clear(); m_pDefaultVS.clear();
m_pBalanceColsCB.clear(); m_pBalanceColsCB.clear();
...@@ -587,13 +587,13 @@ void SwColumnPage::dispose() ...@@ -587,13 +587,13 @@ void SwColumnPage::dispose()
void SwColumnPage::SetPageWidth(long nPageWidth) void SwColumnPage::SetPageWidth(long nPageWidth)
{ {
long nNewMaxWidth = static_cast< long >(aEd1.NormalizePercent(nPageWidth)); long nNewMaxWidth = static_cast< long >(m_aEd1.NormalizePercent(nPageWidth));
aDistEd1.SetMax(nNewMaxWidth, FUNIT_TWIP); m_aDistEd1.SetMax(nNewMaxWidth, FUNIT_TWIP);
aDistEd2.SetMax(nNewMaxWidth, FUNIT_TWIP); m_aDistEd2.SetMax(nNewMaxWidth, FUNIT_TWIP);
aEd1.SetMax(nNewMaxWidth, FUNIT_TWIP); m_aEd1.SetMax(nNewMaxWidth, FUNIT_TWIP);
aEd2.SetMax(nNewMaxWidth, FUNIT_TWIP); m_aEd2.SetMax(nNewMaxWidth, FUNIT_TWIP);
aEd3.SetMax(nNewMaxWidth, FUNIT_TWIP); m_aEd3.SetMax(nNewMaxWidth, FUNIT_TWIP);
} }
void SwColumnPage::connectPercentField(PercentField &rWrap, const OString &rName) void SwColumnPage::connectPercentField(PercentField &rWrap, const OString &rName)
...@@ -610,31 +610,31 @@ void SwColumnPage::Reset(const SfxItemSet *rSet) ...@@ -610,31 +610,31 @@ void SwColumnPage::Reset(const SfxItemSet *rSet)
::GetHtmlMode(static_cast<const SwDocShell*>(SfxObjectShell::Current())); ::GetHtmlMode(static_cast<const SwDocShell*>(SfxObjectShell::Current()));
if(nHtmlMode & HTMLMODE_ON) if(nHtmlMode & HTMLMODE_ON)
{ {
bHtmlMode = true; m_bHtmlMode = true;
m_pAutoWidthBox->Enable(false); m_pAutoWidthBox->Enable(false);
} }
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode); FieldUnit aMetric = ::GetDfltMetric(m_bHtmlMode);
aEd1.SetMetric(aMetric); m_aEd1.SetMetric(aMetric);
aEd2.SetMetric(aMetric); m_aEd2.SetMetric(aMetric);
aEd3.SetMetric(aMetric); m_aEd3.SetMetric(aMetric);
aDistEd1.SetMetric(aMetric); m_aDistEd1.SetMetric(aMetric);
aDistEd2.SetMetric(aMetric); m_aDistEd2.SetMetric(aMetric);
delete pColMgr; delete m_pColMgr;
pColMgr = new SwColMgr(*rSet); m_pColMgr = new SwColMgr(*rSet);
nCols = pColMgr->GetCount() ; m_nCols = m_pColMgr->GetCount() ;
m_pCLNrEdt->SetMax(std::max((sal_uInt16)m_pCLNrEdt->GetMax(), nCols)); m_pCLNrEdt->SetMax(std::max((sal_uInt16)m_pCLNrEdt->GetMax(), m_nCols));
m_pCLNrEdt->SetLast(std::max(nCols,(sal_uInt16)m_pCLNrEdt->GetMax())); m_pCLNrEdt->SetLast(std::max(m_nCols,(sal_uInt16)m_pCLNrEdt->GetMax()));
if(bFrame) if(m_bFrame)
{ {
if(bFormat) // there is no size here if(m_bFormat) // there is no size here
pColMgr->SetActualWidth(FRAME_FORMAT_WIDTH); m_pColMgr->SetActualWidth(FRAME_FORMAT_WIDTH);
else else
{ {
const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE)); const SwFormatFrameSize& rSize = static_cast<const SwFormatFrameSize&>(rSet->Get(RES_FRM_SIZE));
const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(rSet->Get(RES_BOX));
pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetSmallestDistance()); m_pColMgr->SetActualWidth((sal_uInt16)rSize.GetSize().Width() - rBox.GetSmallestDistance());
} }
} }
if(m_pBalanceColsCB->IsVisible()) if(m_pBalanceColsCB->IsVisible())
...@@ -675,7 +675,7 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet) ...@@ -675,7 +675,7 @@ bool SwColumnPage::FillItemSet(SfxItemSet *rSet)
// the current settings are already present // the current settings are already present
const SfxPoolItem* pOldItem; const SfxPoolItem* pOldItem;
const SwFormatCol& rCol = pColMgr->GetColumns(); const SwFormatCol& rCol = m_pColMgr->GetColumns();
if(nullptr == (pOldItem = GetOldItem( *rSet, RES_COL )) || if(nullptr == (pOldItem = GetOldItem( *rSet, RES_COL )) ||
rCol != *pOldItem ) rCol != *pOldItem )
rSet->Put(rCol); rSet->Put(rCol);
...@@ -703,42 +703,42 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgrListBox, ListBox&, void ) ...@@ -703,42 +703,42 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgrListBox, ListBox&, void )
} }
IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void ) IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void )
{ {
long nGutterWidth = pColMgr->GetGutterWidth(); long nGutterWidth = m_pColMgr->GetGutterWidth();
if(nCols > 1) if(m_nCols > 1)
{ {
// Determine whether the most narrow column is too narrow // Determine whether the most narrow column is too narrow
// for the adjusted column gap // for the adjusted column gap
long nMin = nColWidth[0]; long nMin = m_nColWidth[0];
for( sal_uInt16 i = 1; i < nCols; ++i ) for( sal_uInt16 i = 1; i < m_nCols; ++i )
nMin = std::min(nMin, nColWidth[i]); nMin = std::min(nMin, m_nColWidth[i]);
bool bAutoWidth = m_pAutoWidthBox->IsChecked(); bool bAutoWidth = m_pAutoWidthBox->IsChecked();
if(!bAutoWidth) if(!bAutoWidth)
{ {
pColMgr->SetAutoWidth(false); m_pColMgr->SetAutoWidth(false);
// when the user didn't allocate the whole width, // when the user didn't allocate the whole width,
// add the missing amount to the last column. // add the missing amount to the last column.
long nSum = 0; long nSum = 0;
for(sal_uInt16 i = 0; i < nCols; ++i) for(sal_uInt16 i = 0; i < m_nCols; ++i)
nSum += nColWidth[i]; nSum += m_nColWidth[i];
nGutterWidth = 0; nGutterWidth = 0;
for(sal_uInt16 i = 0; i < nCols - 1; ++i) for(sal_uInt16 i = 0; i < m_nCols - 1; ++i)
nGutterWidth += nColDist[i]; nGutterWidth += m_nColDist[i];
nSum += nGutterWidth; nSum += nGutterWidth;
long nMaxW = pColMgr->GetActualSize(); long nMaxW = m_pColMgr->GetActualSize();
if( nSum < nMaxW ) if( nSum < nMaxW )
nColWidth[nCols - 1] += nMaxW - nSum; m_nColWidth[m_nCols - 1] += nMaxW - nSum;
pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(nColWidth[0] + nColDist[0]/2) ); m_pColMgr->SetColWidth( 0, static_cast< sal_uInt16 >(m_nColWidth[0] + m_nColDist[0]/2) );
for( sal_uInt16 i = 1; i < nCols-1; ++i ) for( sal_uInt16 i = 1; i < m_nCols-1; ++i )
{ {
long nActDist = (nColDist[i] + nColDist[i - 1]) / 2; long nActDist = (m_nColDist[i] + m_nColDist[i - 1]) / 2;
pColMgr->SetColWidth( i, static_cast< sal_uInt16 >(nColWidth[i] + nActDist )); m_pColMgr->SetColWidth( i, static_cast< sal_uInt16 >(m_nColWidth[i] + nActDist ));
} }
pColMgr->SetColWidth( nCols-1, static_cast< sal_uInt16 >(nColWidth[nCols-1] + nColDist[nCols -2]/2) ); m_pColMgr->SetColWidth( m_nCols-1, static_cast< sal_uInt16 >(m_nColWidth[m_nCols-1] + m_nColDist[m_nCols -2]/2) );
} }
...@@ -755,17 +755,17 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void ) ...@@ -755,17 +755,17 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void )
m_pLineWidthEdit->GetDecimalDigits( ), m_pLineWidthEdit->GetDecimalDigits( ),
m_pLineWidthEdit->GetUnit(), MAP_TWIP )); m_pLineWidthEdit->GetUnit(), MAP_TWIP ));
if( !bEnable ) if( !bEnable )
pColMgr->SetNoLine(); m_pColMgr->SetNoLine();
else else
{ {
pColMgr->SetLineWidthAndColor( m_pColMgr->SetLineWidthAndColor(
::editeng::SvxBorderStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ), ::editeng::SvxBorderStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
nLineWidth, nLineWidth,
m_pLineColorDLB->GetSelectEntryColor() ); m_pLineColorDLB->GetSelectEntryColor() );
pColMgr->SetAdjust( SwColLineAdj( m_pColMgr->SetAdjust( SwColLineAdj(
m_pLinePosDLB->GetSelectEntryPos() + 1) ); m_pLinePosDLB->GetSelectEntryPos() + 1) );
pColMgr->SetLineHeightPercent((short)m_pLineHeightEdit->GetValue()); m_pColMgr->SetLineHeightPercent((short)m_pLineHeightEdit->GetValue());
bEnable = pColMgr->GetLineHeightPercent() != 100; bEnable = m_pColMgr->GetLineHeightPercent() != 100;
} }
m_pLinePosLbl->Enable( bEnable ); m_pLinePosLbl->Enable( bEnable );
m_pLinePosDLB->Enable( bEnable ); m_pLinePosDLB->Enable( bEnable );
...@@ -780,22 +780,22 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void ) ...@@ -780,22 +780,22 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void )
} }
else else
{ {
pColMgr->NoCols(); m_pColMgr->NoCols();
nCols = 0; m_nCols = 0;
} }
//set maximum values //set maximum values
m_pCLNrEdt->SetMax(std::max(1L, m_pCLNrEdt->SetMax(std::max(1L,
std::min(long(nMaxCols), long( pColMgr->GetActualSize() / (nGutterWidth + MINLAY)) ))); std::min(long(nMaxCols), long( m_pColMgr->GetActualSize() / (nGutterWidth + MINLAY)) )));
m_pCLNrEdt->SetLast(m_pCLNrEdt->GetMax()); m_pCLNrEdt->SetLast(m_pCLNrEdt->GetMax());
m_pCLNrEdt->Reformat(); m_pCLNrEdt->Reformat();
//prompt example window //prompt example window
if(!bLockUpdate) if(!m_bLockUpdate)
{ {
if(bFrame) if(m_bFrame)
{ {
m_pFrameExampleWN->SetColumns( pColMgr->GetColumns() ); m_pFrameExampleWN->SetColumns( m_pColMgr->GetColumns() );
m_pFrameExampleWN->Invalidate(); m_pFrameExampleWN->Invalidate();
} }
else else
...@@ -805,31 +805,31 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void ) ...@@ -805,31 +805,31 @@ IMPL_LINK_NOARG_TYPED( SwColumnPage, UpdateColMgr, Edit&, void )
void SwColumnPage::Init() void SwColumnPage::Init()
{ {
m_pCLNrEdt->SetValue(nCols); m_pCLNrEdt->SetValue(m_nCols);
bool bAutoWidth = pColMgr->IsAutoWidth() || bHtmlMode; bool bAutoWidth = m_pColMgr->IsAutoWidth() || m_bHtmlMode;
m_pAutoWidthBox->Check( bAutoWidth ); m_pAutoWidthBox->Check( bAutoWidth );
sal_Int32 nColumnWidthSum = 0; sal_Int32 nColumnWidthSum = 0;
// set the widths // set the widths
for(sal_uInt16 i = 0; i < nCols; ++i) for(sal_uInt16 i = 0; i < m_nCols; ++i)
{ {
nColWidth[i] = pColMgr->GetColWidth(i); m_nColWidth[i] = m_pColMgr->GetColWidth(i);
nColumnWidthSum += nColWidth[i]; nColumnWidthSum += m_nColWidth[i];
if(i < nCols - 1) if(i < m_nCols - 1)
nColDist[i] = pColMgr->GetGutterWidth(i); m_nColDist[i] = m_pColMgr->GetGutterWidth(i);
} }
if( 1 < nCols ) if( 1 < m_nCols )
{ {
// #97495# make sure that the automatic column width's are always equal // #97495# make sure that the automatic column width's are always equal
if(bAutoWidth) if(bAutoWidth)
{ {
nColumnWidthSum /= nCols; nColumnWidthSum /= m_nCols;
for(sal_uInt16 i = 0; i < nCols; ++i) for(sal_uInt16 i = 0; i < m_nCols; ++i)
nColWidth[i] = nColumnWidthSum; m_nColWidth[i] = nColumnWidthSum;
} }
SwColLineAdj eAdj = pColMgr->GetAdjust(); SwColLineAdj eAdj = m_pColMgr->GetAdjust();
if( COLADJ_NONE == eAdj ) // the dialog doesn't know a NONE! if( COLADJ_NONE == eAdj ) // the dialog doesn't know a NONE!
{ {
eAdj = COLADJ_TOP; eAdj = COLADJ_TOP;
...@@ -840,11 +840,11 @@ void SwColumnPage::Init() ...@@ -840,11 +840,11 @@ void SwColumnPage::Init()
else else
{ {
// Need to multiply by 100 because of the 2 decimals // Need to multiply by 100 because of the 2 decimals
m_pLineWidthEdit->SetValue( pColMgr->GetLineWidth() * 100, FUNIT_TWIP ); m_pLineWidthEdit->SetValue( m_pColMgr->GetLineWidth() * 100, FUNIT_TWIP );
m_pLineColorDLB->SelectEntry( pColMgr->GetLineColor() ); m_pLineColorDLB->SelectEntry( m_pColMgr->GetLineColor() );
m_pLineTypeDLB->SelectEntry( pColMgr->GetLineStyle() ); m_pLineTypeDLB->SelectEntry( m_pColMgr->GetLineStyle() );
m_pLineTypeDLB->SetWidth( pColMgr->GetLineWidth( ) ); m_pLineTypeDLB->SetWidth( m_pColMgr->GetLineWidth( ) );
m_pLineHeightEdit->SetValue( pColMgr->GetLineHeightPercent() ); m_pLineHeightEdit->SetValue( m_pColMgr->GetLineHeightPercent() );
} }
m_pLinePosDLB->SelectEntryPos( static_cast< sal_Int32 >(eAdj - 1) ); m_pLinePosDLB->SelectEntryPos( static_cast< sal_Int32 >(eAdj - 1) );
...@@ -862,7 +862,7 @@ void SwColumnPage::Init() ...@@ -862,7 +862,7 @@ void SwColumnPage::Init()
// set maximum number of columns // set maximum number of columns
// values below 1 are not allowed // values below 1 are not allowed
m_pCLNrEdt->SetMax(std::max(1L, m_pCLNrEdt->SetMax(std::max(1L,
std::min(long(nMaxCols), long( pColMgr->GetActualSize() / nMinWidth) ))); std::min(long(nMaxCols), long( m_pColMgr->GetActualSize() / m_nMinWidth) )));
} }
bool SwColumnPage::isLineNotNone() const bool SwColumnPage::isLineNotNone() const
...@@ -885,15 +885,15 @@ void SwColumnPage::UpdateCols() ...@@ -885,15 +885,15 @@ void SwColumnPage::UpdateCols()
bool bEnable12 = false; bool bEnable12 = false;
bool bEnable3 = false; bool bEnable3 = false;
const bool bEdit = !m_pAutoWidthBox->IsChecked(); const bool bEdit = !m_pAutoWidthBox->IsChecked();
if ( nCols > nVisCols ) if ( m_nCols > nVisCols )
{ {
bEnableBtns = true && !bHtmlMode; bEnableBtns = true && !m_bHtmlMode;
bEnable12 = bEnable3 = bEdit; bEnable12 = bEnable3 = bEdit;
} }
else if( bEdit ) else if( bEdit )
{ {
// here are purposely hardly any breaks // here are purposely hardly any breaks
switch(nCols) switch(m_nCols)
{ {
case 3: bEnable3 = true; case 3: bEnable3 = true;
SAL_FALLTHROUGH; SAL_FALLTHROUGH;
...@@ -901,13 +901,13 @@ void SwColumnPage::UpdateCols() ...@@ -901,13 +901,13 @@ void SwColumnPage::UpdateCols()
default: /* do nothing */; default: /* do nothing */;
} }
} }
aEd1.Enable( bEnable12 ); m_aEd1.Enable( bEnable12 );
bool bEnable = nCols > 1; bool bEnable = m_nCols > 1;
aDistEd1.Enable(bEnable); m_aDistEd1.Enable(bEnable);
m_pAutoWidthBox->Enable( bEnable && !bHtmlMode ); m_pAutoWidthBox->Enable( bEnable && !m_bHtmlMode );
aEd2.Enable( bEnable12 ); m_aEd2.Enable( bEnable12 );
aDistEd2.Enable(bEnable3); m_aDistEd2.Enable(bEnable3);
aEd3.Enable( bEnable3 ); m_aEd3.Enable( bEnable3 );
m_pLbl1->Enable(bEnable12 ); m_pLbl1->Enable(bEnable12 );
m_pLbl2->Enable(bEnable12 ); m_pLbl2->Enable(bEnable12 );
m_pLbl3->Enable(bEnable3 ); m_pLbl3->Enable(bEnable3 );
...@@ -931,7 +931,7 @@ void SwColumnPage::UpdateCols() ...@@ -931,7 +931,7 @@ void SwColumnPage::UpdateCols()
m_pLineColorLbl->Enable( bEnable ); m_pLineColorLbl->Enable( bEnable );
if (bEnable) if (bEnable)
bEnable = pColMgr->GetLineHeightPercent() != 100; bEnable = m_pColMgr->GetLineHeightPercent() != 100;
//and these additionally depend on line height != 100% //and these additionally depend on line height != 100%
m_pLinePosDLB->Enable( bEnable ); m_pLinePosDLB->Enable( bEnable );
...@@ -953,15 +953,15 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis ) ...@@ -953,15 +953,15 @@ void SwColumnPage::SetLabels( sal_uInt16 nVis )
m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl)); m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl));
const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1)); m_aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1));
aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl2)); m_aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl2));
aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl3)); m_aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl3));
const OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ; const OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
aDistEd1.SetAccessibleName( m_aDistEd1.SetAccessibleName(
sDist.replaceFirst("%1", sLbl1).replaceFirst("%2", sLbl2)); sDist.replaceFirst("%1", sLbl1).replaceFirst("%2", sLbl2));
aDistEd2.SetAccessibleName( m_aDistEd2.SetAccessibleName(
sDist.replaceFirst("%1", sLbl2).replaceFirst("%2", sLbl3)); sDist.replaceFirst("%1", sLbl2).replaceFirst("%2", sLbl3));
} }
...@@ -977,22 +977,22 @@ IMPL_LINK_TYPED( SwColumnPage, ColModify, Edit&, rEdit, void ) ...@@ -977,22 +977,22 @@ IMPL_LINK_TYPED( SwColumnPage, ColModify, Edit&, rEdit, void )
void SwColumnPage::ColModify(NumericField* pNF) void SwColumnPage::ColModify(NumericField* pNF)
{ {
nCols = (sal_uInt16)m_pCLNrEdt->GetValue(); m_nCols = (sal_uInt16)m_pCLNrEdt->GetValue();
//#107890# the handler is also called from LoseFocus() //#107890# the handler is also called from LoseFocus()
//then no change has been made and thus no action should be taken //then no change has been made and thus no action should be taken
// #i17816# changing the displayed types within the ValueSet // #i17816# changing the displayed types within the ValueSet
//from two columns to two columns with different settings doesn't invalidate the //from two columns to two columns with different settings doesn't invalidate the
// example windows in ::ColModify() // example windows in ::ColModify()
if (!pNF || pColMgr->GetCount() != nCols) if (!pNF || m_pColMgr->GetCount() != m_nCols)
{ {
if(pNF) if(pNF)
m_pDefaultVS->SetNoSelection(); m_pDefaultVS->SetNoSelection();
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); long nDist = static_cast< long >(m_aDistEd1.DenormalizePercent(m_aDistEd1.GetValue(FUNIT_TWIP)));
pColMgr->SetCount(nCols, (sal_uInt16)nDist); m_pColMgr->SetCount(m_nCols, (sal_uInt16)nDist);
for(sal_uInt16 i = 0; i < nCols; i++) for(sal_uInt16 i = 0; i < m_nCols; i++)
nColDist[i] = nDist; m_nColDist[i] = nDist;
nFirstVis = 0; m_nFirstVis = 0;
SetLabels( nFirstVis ); SetLabels( m_nFirstVis );
UpdateCols(); UpdateCols();
ResetColWidth(); ResetColWidth();
Update(nullptr); Update(nullptr);
...@@ -1007,7 +1007,7 @@ void SwColumnPage::ColModify(NumericField* pNF) ...@@ -1007,7 +1007,7 @@ void SwColumnPage::ColModify(NumericField* pNF)
*/ */
IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void ) IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void )
{ {
if (nCols < 2) if (m_nCols < 2)
return; return;
MetricField* pMetricField = static_cast<MetricField*>(&rEdit); MetricField* pMetricField = static_cast<MetricField*>(&rEdit);
PercentField *pField = m_aPercentFieldsMap[pMetricField]; PercentField *pField = m_aPercentFieldsMap[pMetricField];
...@@ -1016,27 +1016,27 @@ IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void ) ...@@ -1016,27 +1016,27 @@ IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void )
if(m_pAutoWidthBox->IsChecked()) if(m_pAutoWidthBox->IsChecked())
{ {
const long nMaxGap = static_cast< long > const long nMaxGap = static_cast< long >
((pColMgr->GetActualSize() - nCols * MINLAY)/(nCols - 1)); ((m_pColMgr->GetActualSize() - m_nCols * MINLAY)/(m_nCols - 1));
if(nActValue > nMaxGap) if(nActValue > nMaxGap)
{ {
nActValue = nMaxGap; nActValue = nMaxGap;
aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP); m_aDistEd1.SetPrcntValue(m_aDistEd1.NormalizePercent(nMaxGap), FUNIT_TWIP);
} }
pColMgr->SetGutterWidth((sal_uInt16)nActValue); m_pColMgr->SetGutterWidth((sal_uInt16)nActValue);
for(sal_uInt16 i = 0; i < nCols; i++) for(sal_uInt16 i = 0; i < m_nCols; i++)
nColDist[i] = nActValue; m_nColDist[i] = nActValue;
ResetColWidth(); ResetColWidth();
UpdateCols(); UpdateCols();
} }
else else
{ {
const sal_uInt16 nVis = nFirstVis + ((pField == &aDistEd2) ? 1 : 0); const sal_uInt16 nVis = m_nFirstVis + ((pField == &m_aDistEd2) ? 1 : 0);
long nDiff = nActValue - nColDist[nVis]; long nDiff = nActValue - m_nColDist[nVis];
if(nDiff) if(nDiff)
{ {
long nLeft = nColWidth[nVis]; long nLeft = m_nColWidth[nVis];
long nRight = nColWidth[nVis + 1]; long nRight = m_nColWidth[nVis + 1];
if(nLeft + nRight + 2 * MINLAY < nDiff) if(nLeft + nRight + 2 * MINLAY < nDiff)
nDiff = nLeft + nRight - 2 * MINLAY; nDiff = nLeft + nRight - 2 * MINLAY;
if(nDiff < nRight - MINLAY) if(nDiff < nRight - MINLAY)
...@@ -1059,13 +1059,13 @@ IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void ) ...@@ -1059,13 +1059,13 @@ IMPL_LINK_TYPED( SwColumnPage, GapModify, Edit&, rEdit, void )
} }
nDiff = nTemp; nDiff = nTemp;
} }
nColWidth[nVis] = nLeft; m_nColWidth[nVis] = nLeft;
nColWidth[nVis + 1] = nRight; m_nColWidth[nVis + 1] = nRight;
nColDist[nVis] += nDiff; m_nColDist[nVis] += nDiff;
pColMgr->SetColWidth( nVis, sal_uInt16(nLeft) ); m_pColMgr->SetColWidth( nVis, sal_uInt16(nLeft) );
pColMgr->SetColWidth( nVis + 1, sal_uInt16(nRight) ); m_pColMgr->SetColWidth( nVis + 1, sal_uInt16(nRight) );
pColMgr->SetGutterWidth( sal_uInt16(nColDist[nVis]), nVis ); m_pColMgr->SetGutterWidth( sal_uInt16(m_nColDist[nVis]), nVis );
} }
} }
...@@ -1077,7 +1077,7 @@ IMPL_LINK_TYPED( SwColumnPage, EdModify, Edit&, rEdit, void ) ...@@ -1077,7 +1077,7 @@ IMPL_LINK_TYPED( SwColumnPage, EdModify, Edit&, rEdit, void )
MetricField * pMetricField = static_cast<MetricField*>(&rEdit); MetricField * pMetricField = static_cast<MetricField*>(&rEdit);
PercentField *pField = m_aPercentFieldsMap[pMetricField]; PercentField *pField = m_aPercentFieldsMap[pMetricField];
assert(pField); assert(pField);
pModifiedField = pField; m_pModifiedField = pField;
Timeout(); Timeout();
} }
...@@ -1086,16 +1086,16 @@ IMPL_LINK_TYPED( SwColumnPage, EdModify, Edit&, rEdit, void ) ...@@ -1086,16 +1086,16 @@ IMPL_LINK_TYPED( SwColumnPage, EdModify, Edit&, rEdit, void )
IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void ) IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void )
{ {
CheckBox* pBox = static_cast<CheckBox*>(pButton); CheckBox* pBox = static_cast<CheckBox*>(pButton);
long nDist = static_cast< long >(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); long nDist = static_cast< long >(m_aDistEd1.DenormalizePercent(m_aDistEd1.GetValue(FUNIT_TWIP)));
pColMgr->SetCount(nCols, (sal_uInt16)nDist); m_pColMgr->SetCount(m_nCols, (sal_uInt16)nDist);
for(sal_uInt16 i = 0; i < nCols; i++) for(sal_uInt16 i = 0; i < m_nCols; i++)
nColDist[i] = nDist; m_nColDist[i] = nDist;
if(pBox->IsChecked()) if(pBox->IsChecked())
{ {
pColMgr->SetGutterWidth(sal_uInt16(nDist)); m_pColMgr->SetGutterWidth(sal_uInt16(nDist));
ResetColWidth(); ResetColWidth();
} }
pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist)); m_pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols(); UpdateCols();
Update(nullptr); Update(nullptr);
} }
...@@ -1103,10 +1103,10 @@ IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void ) ...@@ -1103,10 +1103,10 @@ IMPL_LINK_TYPED( SwColumnPage, AutoWidthHdl, Button*, pButton, void )
// scroll up the contents of the edits // scroll up the contents of the edits
IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void) IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void)
{ {
if( nFirstVis ) if( m_nFirstVis )
{ {
--nFirstVis; --m_nFirstVis;
SetLabels( nFirstVis ); SetLabels( m_nFirstVis );
Update(nullptr); Update(nullptr);
} }
} }
...@@ -1114,10 +1114,10 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void) ...@@ -1114,10 +1114,10 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Up, Button*, void)
// scroll down the contents of the edits. // scroll down the contents of the edits.
IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void) IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void)
{ {
if( nFirstVis + nVisCols < nCols ) if( m_nFirstVis + nVisCols < m_nCols )
{ {
++nFirstVis; ++m_nFirstVis;
SetLabels( nFirstVis ); SetLabels( m_nFirstVis );
Update(nullptr); Update(nullptr);
} }
} }
...@@ -1126,42 +1126,42 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void) ...@@ -1126,42 +1126,42 @@ IMPL_LINK_NOARG_TYPED(SwColumnPage, Down, Button*, void)
// an alteration of the column width or the column gap. // an alteration of the column width or the column gap.
void SwColumnPage::Timeout() void SwColumnPage::Timeout()
{ {
PercentField *pField = pModifiedField; PercentField *pField = m_pModifiedField;
if (pModifiedField) if (m_pModifiedField)
{ {
// find the changed column // find the changed column
sal_uInt16 nChanged = nFirstVis; sal_uInt16 nChanged = m_nFirstVis;
if(pModifiedField == &aEd2) if(m_pModifiedField == &m_aEd2)
++nChanged; ++nChanged;
else if(pModifiedField == &aEd3) else if(m_pModifiedField == &m_aEd3)
nChanged += 2; nChanged += 2;
long nNewWidth = static_cast< long > long nNewWidth = static_cast< long >
(pModifiedField->DenormalizePercent(pModifiedField->GetValue(FUNIT_TWIP))); (m_pModifiedField->DenormalizePercent(m_pModifiedField->GetValue(FUNIT_TWIP)));
long nDiff = nNewWidth - nColWidth[nChanged]; long nDiff = nNewWidth - m_nColWidth[nChanged];
// when it's the last column // when it's the last column
if(nChanged == nCols - 1) if(nChanged == m_nCols - 1)
{ {
nColWidth[0] -= nDiff; m_nColWidth[0] -= nDiff;
if(nColWidth[0] < (long)nMinWidth) if(m_nColWidth[0] < (long)m_nMinWidth)
{ {
nNewWidth -= nMinWidth - nColWidth[0]; nNewWidth -= m_nMinWidth - m_nColWidth[0];
nColWidth[0] = nMinWidth; m_nColWidth[0] = m_nMinWidth;
} }
} }
else if(nDiff) else if(nDiff)
{ {
nColWidth[nChanged + 1] -= nDiff; m_nColWidth[nChanged + 1] -= nDiff;
if(nColWidth[nChanged + 1] < (long) nMinWidth) if(m_nColWidth[nChanged + 1] < (long) m_nMinWidth)
{ {
nNewWidth -= nMinWidth - nColWidth[nChanged + 1]; nNewWidth -= m_nMinWidth - m_nColWidth[nChanged + 1];
nColWidth[nChanged + 1] = nMinWidth; m_nColWidth[nChanged + 1] = m_nMinWidth;
} }
} }
nColWidth[nChanged] = nNewWidth; m_nColWidth[nChanged] = nNewWidth;
pModifiedField = nullptr; m_pModifiedField = nullptr;
} }
Update(pField ? pField->get() : nullptr); Update(pField ? pField->get() : nullptr);
...@@ -1170,54 +1170,54 @@ void SwColumnPage::Timeout() ...@@ -1170,54 +1170,54 @@ void SwColumnPage::Timeout()
// Update the view // Update the view
void SwColumnPage::Update(MetricField *pInteractiveField) void SwColumnPage::Update(MetricField *pInteractiveField)
{ {
m_pBalanceColsCB->Enable(nCols > 1); m_pBalanceColsCB->Enable(m_nCols > 1);
if(nCols >= 2) if(m_nCols >= 2)
{ {
sal_Int64 nCurrentValue, nNewValue; sal_Int64 nCurrentValue, nNewValue;
nCurrentValue = aEd1.NormalizePercent(aEd1.DenormalizePercent(aEd1.GetValue(FUNIT_TWIP))); nCurrentValue = m_aEd1.NormalizePercent(m_aEd1.DenormalizePercent(m_aEd1.GetValue(FUNIT_TWIP)));
nNewValue = aEd1.NormalizePercent(nColWidth[nFirstVis]); nNewValue = m_aEd1.NormalizePercent(m_nColWidth[m_nFirstVis]);
//fdo#87612 if we're interacting with this widget and the value will be the same //fdo#87612 if we're interacting with this widget and the value will be the same
//then leave it alone (i.e. don't change equivalent values of e.g. .8 -> 0.8) //then leave it alone (i.e. don't change equivalent values of e.g. .8 -> 0.8)
if (nNewValue != nCurrentValue || pInteractiveField != aEd1.get()) if (nNewValue != nCurrentValue || pInteractiveField != m_aEd1.get())
aEd1.SetPrcntValue(nNewValue, FUNIT_TWIP); m_aEd1.SetPrcntValue(nNewValue, FUNIT_TWIP);
nCurrentValue = aDistEd1.NormalizePercent(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP))); nCurrentValue = m_aDistEd1.NormalizePercent(m_aDistEd1.DenormalizePercent(m_aDistEd1.GetValue(FUNIT_TWIP)));
nNewValue = aDistEd1.NormalizePercent(nColDist[nFirstVis]); nNewValue = m_aDistEd1.NormalizePercent(m_nColDist[m_nFirstVis]);
if (nNewValue != nCurrentValue || pInteractiveField != aDistEd1.get()) if (nNewValue != nCurrentValue || pInteractiveField != m_aDistEd1.get())
aDistEd1.SetPrcntValue(nNewValue, FUNIT_TWIP); m_aDistEd1.SetPrcntValue(nNewValue, FUNIT_TWIP);
nCurrentValue = aEd2.NormalizePercent(aEd2.DenormalizePercent(aEd2.GetValue(FUNIT_TWIP))); nCurrentValue = m_aEd2.NormalizePercent(m_aEd2.DenormalizePercent(m_aEd2.GetValue(FUNIT_TWIP)));
nNewValue = aEd2.NormalizePercent(nColWidth[nFirstVis+1]); nNewValue = m_aEd2.NormalizePercent(m_nColWidth[m_nFirstVis+1]);
if (nNewValue != nCurrentValue || pInteractiveField != aEd2.get()) if (nNewValue != nCurrentValue || pInteractiveField != m_aEd2.get())
aEd2.SetPrcntValue(nNewValue, FUNIT_TWIP); m_aEd2.SetPrcntValue(nNewValue, FUNIT_TWIP);
if(nCols >= 3) if(m_nCols >= 3)
{ {
nCurrentValue = aDistEd2.NormalizePercent(aDistEd2.DenormalizePercent(aDistEd2.GetValue(FUNIT_TWIP))); nCurrentValue = m_aDistEd2.NormalizePercent(m_aDistEd2.DenormalizePercent(m_aDistEd2.GetValue(FUNIT_TWIP)));
nNewValue = aDistEd2.NormalizePercent(nColDist[nFirstVis+1]); nNewValue = m_aDistEd2.NormalizePercent(m_nColDist[m_nFirstVis+1]);
if (nNewValue != nCurrentValue || pInteractiveField != aDistEd2.get()) if (nNewValue != nCurrentValue || pInteractiveField != m_aDistEd2.get())
aDistEd2.SetPrcntValue(nNewValue, FUNIT_TWIP); m_aDistEd2.SetPrcntValue(nNewValue, FUNIT_TWIP);
nCurrentValue = aEd3.NormalizePercent(aEd3.DenormalizePercent(aEd3.GetValue(FUNIT_TWIP))); nCurrentValue = m_aEd3.NormalizePercent(m_aEd3.DenormalizePercent(m_aEd3.GetValue(FUNIT_TWIP)));
nNewValue = aEd3.NormalizePercent(nColWidth[nFirstVis+2]); nNewValue = m_aEd3.NormalizePercent(m_nColWidth[m_nFirstVis+2]);
if (nNewValue != nCurrentValue || pInteractiveField != aEd3.get()) if (nNewValue != nCurrentValue || pInteractiveField != m_aEd3.get())
aEd3.SetPrcntValue(nNewValue, FUNIT_TWIP); m_aEd3.SetPrcntValue(nNewValue, FUNIT_TWIP);
} }
else else
{ {
aEd3.SetText(OUString()); m_aEd3.SetText(OUString());
aDistEd2.SetText(OUString()); m_aDistEd2.SetText(OUString());
} }
} }
else else
{ {
aEd1.SetText(OUString()); m_aEd1.SetText(OUString());
aEd2.SetText(OUString()); m_aEd2.SetText(OUString());
aEd3.SetText(OUString()); m_aEd3.SetText(OUString());
aDistEd1.SetText(OUString()); m_aDistEd1.SetText(OUString());
aDistEd2.SetText(OUString()); m_aDistEd2.SetText(OUString());
} }
UpdateColMgr(*m_pLineWidthEdit); UpdateColMgr(*m_pLineWidthEdit);
} }
...@@ -1234,7 +1234,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) ...@@ -1234,7 +1234,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT; rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
} }
if (!bFrame) if (!m_bFrame)
{ {
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE )) if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE ))
{ {
...@@ -1261,15 +1261,15 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) ...@@ -1261,15 +1261,15 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
} }
if( pColMgr->GetActualSize() != nActWidth) if( m_pColMgr->GetActualSize() != nActWidth)
{ {
pColMgr->SetActualWidth(nActWidth); m_pColMgr->SetActualWidth(nActWidth);
ColModify( nullptr ); ColModify( nullptr );
UpdateColMgr( *m_pLineWidthEdit ); UpdateColMgr( *m_pLineWidthEdit );
} }
} }
m_pFrameExampleWN->Hide(); m_pFrameExampleWN->Hide();
m_pPgeExampleWN->UpdateExample( rSet, pColMgr ); m_pPgeExampleWN->UpdateExample( rSet, m_pColMgr );
m_pPgeExampleWN->Show(); m_pPgeExampleWN->Show();
} }
...@@ -1283,7 +1283,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) ...@@ -1283,7 +1283,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>( rSet.Get(RES_BOX));
sal_uInt16 nTotalWish; sal_uInt16 nTotalWish;
if (bFormat) if (m_bFormat)
nTotalWish = FRAME_FORMAT_WIDTH; nTotalWish = FRAME_FORMAT_WIDTH;
else else
{ {
...@@ -1294,21 +1294,21 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) ...@@ -1294,21 +1294,21 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
// set maximum values of column width // set maximum values of column width
SetPageWidth(nTotalWish); SetPageWidth(nTotalWish);
if(pColMgr->GetActualSize() != nTotalWish) if(m_pColMgr->GetActualSize() != nTotalWish)
{ {
pColMgr->SetActualWidth(nTotalWish); m_pColMgr->SetActualWidth(nTotalWish);
Init(); Init();
} }
bool bPercent; bool bPercent;
// only relative data in frame format // only relative data in frame format
if ( bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) ) if ( m_bFormat || (rSize.GetWidthPercent() && rSize.GetWidthPercent() != SwFormatFrameSize::SYNCED) )
{ {
// set value for 100% // set value for 100%
aEd1.SetRefValue(nTotalWish); m_aEd1.SetRefValue(nTotalWish);
aEd2.SetRefValue(nTotalWish); m_aEd2.SetRefValue(nTotalWish);
aEd3.SetRefValue(nTotalWish); m_aEd3.SetRefValue(nTotalWish);
aDistEd1.SetRefValue(nTotalWish); m_aDistEd1.SetRefValue(nTotalWish);
aDistEd2.SetRefValue(nTotalWish); m_aDistEd2.SetRefValue(nTotalWish);
// switch to %-view // switch to %-view
bPercent = true; bPercent = true;
...@@ -1316,13 +1316,13 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet) ...@@ -1316,13 +1316,13 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
else else
bPercent = false; bPercent = false;
aEd1.ShowPercent(bPercent); m_aEd1.ShowPercent(bPercent);
aEd2.ShowPercent(bPercent); m_aEd2.ShowPercent(bPercent);
aEd3.ShowPercent(bPercent); m_aEd3.ShowPercent(bPercent);
aDistEd1.ShowPercent(bPercent); m_aDistEd1.ShowPercent(bPercent);
aDistEd2.ShowPercent(bPercent); m_aDistEd2.ShowPercent(bPercent);
aDistEd1.SetMetricFieldMin(0); m_aDistEd1.SetMetricFieldMin(0);
aDistEd2.SetMetricFieldMin(0); m_aDistEd2.SetMetricFieldMin(0);
} }
Update(nullptr); Update(nullptr);
} }
...@@ -1342,29 +1342,29 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void ) ...@@ -1342,29 +1342,29 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
{ {
m_pCLNrEdt->SetValue( nItem ); m_pCLNrEdt->SetValue( nItem );
m_pAutoWidthBox->Check(); m_pAutoWidthBox->Check();
aDistEd1.SetPrcntValue(0); m_aDistEd1.SetPrcntValue(0);
ColModify(nullptr); ColModify(nullptr);
} }
else else
{ {
bLockUpdate = true; m_bLockUpdate = true;
m_pCLNrEdt->SetValue( 2 ); m_pCLNrEdt->SetValue( 2 );
m_pAutoWidthBox->Check(false); m_pAutoWidthBox->Check(false);
aDistEd1.SetPrcntValue(0); m_aDistEd1.SetPrcntValue(0);
ColModify(nullptr); ColModify(nullptr);
// now set the width ratio to 2 : 1 or 1 : 2 respectively // now set the width ratio to 2 : 1 or 1 : 2 respectively
const long nSmall = static_cast< long >(pColMgr->GetActualSize() / 3); const long nSmall = static_cast< long >(m_pColMgr->GetActualSize() / 3);
if(nItem == 4) if(nItem == 4)
{ {
aEd2.SetPrcntValue(aEd2.NormalizePercent(nSmall), FUNIT_TWIP); m_aEd2.SetPrcntValue(m_aEd2.NormalizePercent(nSmall), FUNIT_TWIP);
pModifiedField = &aEd2; m_pModifiedField = &m_aEd2;
} }
else else
{ {
aEd1.SetPrcntValue(aEd1.NormalizePercent(nSmall), FUNIT_TWIP); m_aEd1.SetPrcntValue(m_aEd1.NormalizePercent(nSmall), FUNIT_TWIP);
pModifiedField = &aEd1; m_pModifiedField = &m_aEd1;
} }
bLockUpdate = false; m_bLockUpdate = false;
Timeout(); Timeout();
} }
...@@ -1372,7 +1372,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void ) ...@@ -1372,7 +1372,7 @@ IMPL_LINK_TYPED( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS, void )
void SwColumnPage::SetFrameMode(bool bMod) void SwColumnPage::SetFrameMode(bool bMod)
{ {
bFrame = bMod; m_bFrame = bMod;
} }
void SwColumnPage::SetInSection(bool bSet) void SwColumnPage::SetInSection(bool bSet)
......
...@@ -90,14 +90,14 @@ class SwColumnPage : public SfxTabPage ...@@ -90,14 +90,14 @@ class SwColumnPage : public SfxTabPage
VclPtr<PushButton> m_pBtnBack; VclPtr<PushButton> m_pBtnBack;
VclPtr<FixedText> m_pLbl1; VclPtr<FixedText> m_pLbl1;
PercentField aEd1; PercentField m_aEd1;
VclPtr<FixedText> m_pLbl2; VclPtr<FixedText> m_pLbl2;
PercentField aEd2; PercentField m_aEd2;
VclPtr<FixedText> m_pLbl3; VclPtr<FixedText> m_pLbl3;
PercentField aEd3; PercentField m_aEd3;
VclPtr<PushButton> m_pBtnNext; VclPtr<PushButton> m_pBtnNext;
PercentField aDistEd1; PercentField m_aDistEd1;
PercentField aDistEd2; PercentField m_aDistEd2;
VclPtr<CheckBox> m_pAutoWidthBox; VclPtr<CheckBox> m_pAutoWidthBox;
VclPtr<FixedText> m_pLineTypeLbl; VclPtr<FixedText> m_pLineTypeLbl;
...@@ -118,21 +118,21 @@ class SwColumnPage : public SfxTabPage ...@@ -118,21 +118,21 @@ class SwColumnPage : public SfxTabPage
VclPtr<SwColExample> m_pPgeExampleWN; VclPtr<SwColExample> m_pPgeExampleWN;
VclPtr<SwColumnOnlyExample> m_pFrameExampleWN; VclPtr<SwColumnOnlyExample> m_pFrameExampleWN;
SwColMgr* pColMgr; SwColMgr* m_pColMgr;
sal_uInt16 nFirstVis; sal_uInt16 m_nFirstVis;
sal_uInt16 nCols; sal_uInt16 m_nCols;
long nColWidth[nMaxCols]; long m_nColWidth[nMaxCols];
long nColDist[nMaxCols]; long m_nColDist[nMaxCols];
sal_uInt16 nMinWidth; sal_uInt16 m_nMinWidth;
PercentField* pModifiedField; PercentField* m_pModifiedField;
std::map<VclPtr<MetricField>, PercentField*> m_aPercentFieldsMap; std::map<VclPtr<MetricField>, PercentField*> m_aPercentFieldsMap;
bool bFormat; bool m_bFormat;
bool bFrame; bool m_bFrame;
bool bHtmlMode; bool m_bHtmlMode;
bool bLockUpdate; bool m_bLockUpdate;
// Handler // Handler
DECL_LINK_TYPED( ColModify, Edit&, void ); DECL_LINK_TYPED( ColModify, Edit&, void );
...@@ -182,7 +182,7 @@ public: ...@@ -182,7 +182,7 @@ public:
void SetFormatUsed(bool bFormatUsed) void SetFormatUsed(bool bFormatUsed)
{ {
bFormat = bFormatUsed; m_bFormat = bFormatUsed;
} }
void ShowBalance(bool bShow) void ShowBalance(bool bShow)
......
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