diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /svx/source | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/dialcontrol.cxx | 24 | ||||
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 780 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx | 8 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 13 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingPopup.cxx | 10 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextUnderlinePopup.cxx | 8 | ||||
-rw-r--r-- | svx/source/sidebar/tools/Popup.cxx | 73 | ||||
-rw-r--r-- | svx/source/stbctrls/zoomsliderctrl.cxx | 150 | ||||
-rw-r--r-- | svx/source/svdraw/svdomedia.cxx | 70 | ||||
-rw-r--r-- | svx/source/svdraw/svdpage.cxx | 78 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 8 |
11 files changed, 585 insertions, 637 deletions
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index d317c872f0dc..55016d24cc10 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -32,12 +32,8 @@ namespace svx { - - const long DIAL_OUTER_WIDTH = 8; - - DialControlBmp::DialControlBmp( vcl::Window& rParent ) : VirtualDevice( rParent, 0, 0 ), mbEnabled( true ), @@ -224,9 +220,9 @@ void DialControlBmp::DrawBackground() DialControl::DialControl_Impl::DialControl_Impl ( vcl::Window& rParent ) : - mpBmpEnabled(new DialControlBmp(rParent)), - mpBmpDisabled(new DialControlBmp(rParent)), - mpBmpBuffered(new DialControlBmp(rParent)), + mxBmpEnabled(new DialControlBmp(rParent)), + mxBmpDisabled(new DialControlBmp(rParent)), + mxBmpBuffered(new DialControlBmp(rParent)), mpLinkField( 0 ), mnLinkedFieldValueMultiplyer( 0 ), mnAngle( 0 ), @@ -242,7 +238,7 @@ void DialControl::DialControl_Impl::Init( const Size& rWinSize, const vcl::Font& { maWinFont = rWinFont; maWinFont.SetTransparent(true); - mpBmpBuffered->InitBitmap(maWinFont); + mxBmpBuffered->InitBitmap(maWinFont); SetSize(rWinSize); } @@ -257,9 +253,9 @@ void DialControl::DialControl_Impl::SetSize( const Size& rWinSize ) mnCenterX = maWinSize.Width() / 2; mnCenterY = maWinSize.Height() / 2; - mpBmpEnabled->DrawBackground( maWinSize, true ); - mpBmpDisabled->DrawBackground( maWinSize, false ); - mpBmpBuffered->SetSize( maWinSize ); + mxBmpEnabled->DrawBackground( maWinSize, true ); + mxBmpDisabled->DrawBackground( maWinSize, false ); + mxBmpBuffered->SetSize( maWinSize ); } @@ -289,7 +285,7 @@ void DialControl::Resize() void DialControl::Paint( const Rectangle& ) { Point aPos; - DrawBitmapEx( aPos, mpImpl->mpBmpBuffered->GetBitmapEx( aPos, mpImpl->maWinSize ) ); + DrawBitmapEx( aPos, mpImpl->mxBmpBuffered->GetBitmapEx( aPos, mpImpl->maWinSize ) ); } void DialControl::StateChanged( StateChangedType nStateChange ) @@ -448,9 +444,9 @@ void DialControl::Init( const Size& rWinSize ) void DialControl::InvalidateControl() { - mpImpl->mpBmpBuffered->CopyBackground( IsEnabled() ? *mpImpl->mpBmpEnabled : *mpImpl->mpBmpDisabled ); + mpImpl->mxBmpBuffered->CopyBackground( IsEnabled() ? *mpImpl->mxBmpEnabled : *mpImpl->mxBmpDisabled ); if( !mpImpl->mbNoRot ) - mpImpl->mpBmpBuffered->DrawElements( GetText(), mpImpl->mnAngle ); + mpImpl->mxBmpBuffered->DrawElements( GetText(), mpImpl->mnAngle ); Invalidate(); } diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 39ae343f30d8..6afcf3d33372 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -132,7 +132,7 @@ struct SvxRuler_Impl { // For columns; buffered to prevent // recalculation errors // May be has to be widen for future values - bool bIsTableRows : 1; // mpColumnItem contains table rows instead of columns + bool bIsTableRows : 1; // mxColumnItem contains table rows instead of columns //#i24363# tab stops relative to indent bool bIsTabsRelativeToIndent : 1; // Tab stops relative to paragraph indent? @@ -225,7 +225,7 @@ SvxRuler::SvxRuler( Ruler(pParent, nWinStyle), pCtrlItem(new SvxRulerItem* [CTRL_ITEM_COUNT]), pEditWin(pWin), - mpRulerImpl(new SvxRuler_Impl), + mxRulerImpl(new SvxRuler_Impl), bAppSetNullOffset(false), // Is the 0-offset of the ruler set by the application? lLogicNullOffset(0), lAppNullOffset(LONG_MAX), @@ -326,7 +326,7 @@ SvxRuler::SvxRuler( pCtrlItem[i++] = new SvxRulerItem(SID_RULER_PROTECT, *this, rBindings ); pCtrlItem[i++] = new SvxRulerItem(SID_RULER_BORDER_DISTANCE, *this, rBindings); - mpRulerImpl->nControlerItems=i; + mxRulerImpl->nControlerItems=i; if( (nFlags & SVXRULER_SUPPORT_SET_NULLOFFSET) == SVXRULER_SUPPORT_SET_NULLOFFSET ) SetExtraType(RULER_EXTRA_NULLOFFSET, 0); @@ -491,15 +491,15 @@ inline sal_uInt16 SvxRuler::GetObjectBordersOff(sal_uInt16 nIdx) const void SvxRuler::UpdateFrame() { const sal_uInt16 nMarginStyle = - ( mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected() ) ? + ( mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected() ) ? 0 : RULER_MARGIN_SIZEABLE; - if(mpLRSpaceItem.get() && mpPagePosItem.get()) + if(mxLRSpaceItem.get() && mxPagePosItem.get()) { // if no initialization by default app behavior const long nOld = lLogicNullOffset; - lLogicNullOffset = mpColumnItem.get() ? mpColumnItem->GetLeft(): mpLRSpaceItem->GetLeft(); + lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft(): mxLRSpaceItem->GetLeft(); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - nOld; @@ -518,21 +518,21 @@ void SvxRuler::UpdateFrame() long lRight = 0; // evaluate the table right edge of the table - if(mpColumnItem.get() && mpColumnItem->IsTable()) - lRight = mpColumnItem->GetRight(); + if(mxColumnItem.get() && mxColumnItem->IsTable()) + lRight = mxColumnItem->GetRight(); else - lRight = mpLRSpaceItem->GetRight(); + lRight = mxLRSpaceItem->GetRight(); - long aWidth = mpPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset; + long aWidth = mxPagePosItem->GetWidth() - lRight - lLogicNullOffset + lAppNullOffset; long aWidthPixel = ConvertHPosPixel(aWidth); SetMargin2(aWidthPixel, nMarginStyle); } - else if(mpULSpaceItem.get() && mpPagePosItem.get()) + else if(mxULSpaceItem.get() && mxPagePosItem.get()) { // relative the upper edge of the surrounding frame const long nOld = lLogicNullOffset; - lLogicNullOffset = mpColumnItem.get() ? mpColumnItem->GetLeft() : mpULSpaceItem->GetUpper(); + lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft() : mxULSpaceItem->GetUpper(); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - nOld; @@ -548,8 +548,8 @@ void SvxRuler::UpdateFrame() SetMargin1(ConvertVPosPixel(lAppNullOffset), nMarginStyle); } - long lLower = mpColumnItem.get() ? mpColumnItem->GetRight() : mpULSpaceItem->GetLower(); - long nMargin2 = mpPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset; + long lLower = mxColumnItem.get() ? mxColumnItem->GetRight() : mxULSpaceItem->GetLower(); + long nMargin2 = mxPagePosItem->GetHeight() - lLower - lLogicNullOffset + lAppNullOffset; long nMargin2Pixel = ConvertVPosPixel(nMargin2); SetMargin2(nMargin2Pixel, nMarginStyle); @@ -561,10 +561,10 @@ void SvxRuler::UpdateFrame() SetMargin2(); } - if(mpColumnItem.get()) + if(mxColumnItem.get()) { - mpRulerImpl->nColLeftPix = (sal_uInt16) ConvertSizePixel(mpColumnItem->GetLeft()); - mpRulerImpl->nColRightPix = (sal_uInt16) ConvertSizePixel(mpColumnItem->GetRight()); + mxRulerImpl->nColLeftPix = (sal_uInt16) ConvertSizePixel(mxColumnItem->GetLeft()); + mxRulerImpl->nColRightPix = (sal_uInt16) ConvertSizePixel(mxColumnItem->GetRight()); } } @@ -603,18 +603,18 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) { case RULER_TYPE_INDENT: { - if (!mpParaItem.get()) + if (!mxParaItem.get()) break; long nIndex = aSelection.nAryPos + INDENT_GAP; long nIndentValue = 0.0; if (nIndex == INDENT_LEFT_MARGIN) - nIndentValue = mpParaItem->GetTxtLeft(); + nIndentValue = mxParaItem->GetTxtLeft(); else if (nIndex == INDENT_FIRST_LINE) - nIndentValue = mpParaItem->GetTxtFirstLineOfst(); + nIndentValue = mxParaItem->GetTxtFirstLineOfst(); else if (nIndex == INDENT_RIGHT_MARGIN) - nIndentValue = mpParaItem->GetRight(); + nIndentValue = mxParaItem->GetRight(); double fValue = OutputDevice::LogicToLogic(Size(nIndentValue, 0), pEditWin->GetMapMode(), GetCurrentMapMode()).Width(); fValue = rtl::math::round(fValue / aUnitData.nTickUnit, aNoDecimalPlaces); @@ -624,10 +624,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) } case RULER_TYPE_BORDER: { - if (mpColumnItem.get() == NULL) + if (mxColumnItem.get() == NULL) break; - SvxColumnItem& aColumnItem = *mpColumnItem.get(); + SvxColumnItem& aColumnItem = *mxColumnItem.get(); if (aSelection.nAryPos + 1 >= aColumnItem.Count()) break; @@ -645,10 +645,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) case RULER_TYPE_MARGIN1: { long nLeft = 0.0; - if (mpLRSpaceItem.get()) - nLeft = mpLRSpaceItem->GetLeft(); - else if (mpULSpaceItem.get()) - nLeft = mpULSpaceItem->GetUpper(); + if (mxLRSpaceItem.get()) + nLeft = mxLRSpaceItem->GetLeft(); + else if (mxULSpaceItem.get()) + nLeft = mxULSpaceItem->GetUpper(); else break; @@ -661,10 +661,10 @@ void SvxRuler::MouseMove( const MouseEvent& rMEvt ) case RULER_TYPE_MARGIN2: { long nRight = 0.0; - if (mpLRSpaceItem.get()) - nRight = mpLRSpaceItem->GetRight(); - else if (mpULSpaceItem.get()) - nRight = mpULSpaceItem->GetLower(); + if (mxLRSpaceItem.get()) + nRight = mxLRSpaceItem->GetRight(); + else if (mxULSpaceItem.get()) + nRight = mxULSpaceItem->GetLower(); else break; @@ -698,9 +698,9 @@ void SvxRuler::UpdateFrame(const SvxLongLRSpaceItem *pItem) // new value LRSpace if(bActive) { if(pItem) - mpLRSpaceItem.reset(new SvxLongLRSpaceItem(*pItem)); + mxLRSpaceItem.reset(new SvxLongLRSpaceItem(*pItem)); else - mpLRSpaceItem.reset(); + mxLRSpaceItem.reset(); StartListening_Impl(); } } @@ -711,9 +711,9 @@ void SvxRuler::UpdateFrameMinMax(const SfxRectangleItem *pItem) // value for Min if(bActive) { if(pItem) - mpMinMaxItem.reset(new SfxRectangleItem(*pItem)); + mxMinMaxItem.reset(new SfxRectangleItem(*pItem)); else - mpMinMaxItem.reset(); + mxMinMaxItem.reset(); } } @@ -724,9 +724,9 @@ void SvxRuler::UpdateFrame(const SvxLongULSpaceItem *pItem) // new value if(bActive && !bHorz) { if(pItem) - mpULSpaceItem.reset(new SvxLongULSpaceItem(*pItem)); + mxULSpaceItem.reset(new SvxLongULSpaceItem(*pItem)); else - mpULSpaceItem.reset(); + mxULSpaceItem.reset(); StartListening_Impl(); } } @@ -734,18 +734,18 @@ void SvxRuler::UpdateFrame(const SvxLongULSpaceItem *pItem) // new value void SvxRuler::Update( const SvxProtectItem* pItem ) { if( pItem ) - mpRulerImpl->aProtectItem = *pItem; + mxRulerImpl->aProtectItem = *pItem; } void SvxRuler::UpdateTextRTL(const SfxBoolItem* pItem) { if(bActive && bHorz) { - delete mpRulerImpl->pTextRTLItem; - mpRulerImpl->pTextRTLItem = 0; + delete mxRulerImpl->pTextRTLItem; + mxRulerImpl->pTextRTLItem = 0; if(pItem) - mpRulerImpl->pTextRTLItem = new SfxBoolItem(*pItem); - SetTextRTL(mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue()); + mxRulerImpl->pTextRTLItem = new SfxBoolItem(*pItem); + SetTextRTL(mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue()); StartListening_Impl(); } } @@ -759,21 +759,21 @@ void SvxRuler::Update( { if(pItem) { - mpColumnItem.reset(new SvxColumnItem(*pItem)); - mpRulerImpl->bIsTableRows = (pItem->Which() == SID_RULER_ROWS || pItem->Which() == SID_RULER_ROWS_VERTICAL); - if(!bHorz && !mpRulerImpl->bIsTableRows) - mpColumnItem->SetWhich(SID_RULER_BORDERS_VERTICAL); + mxColumnItem.reset(new SvxColumnItem(*pItem)); + mxRulerImpl->bIsTableRows = (pItem->Which() == SID_RULER_ROWS || pItem->Which() == SID_RULER_ROWS_VERTICAL); + if(!bHorz && !mxRulerImpl->bIsTableRows) + mxColumnItem->SetWhich(SID_RULER_BORDERS_VERTICAL); } - else if(mpColumnItem.get() && mpColumnItem->Which() == nSID) + else if(mxColumnItem.get() && mxColumnItem->Which() == nSID) //there are two groups of column items table/frame columns and table rows //both can occur in vertical or horizontal mode //the horizontal ruler handles the SID_RULER_BORDERS and SID_RULER_ROWS_VERTICAL //and the vertical handles SID_RULER_BORDERS_VERTICAL and SID_RULER_ROWS - //if mpColumnItem is already set with one of the ids then a NULL pItem argument + //if mxColumnItem is already set with one of the ids then a NULL pItem argument //must not delete it { - mpColumnItem.reset(); - mpRulerImpl->bIsTableRows = false; + mxColumnItem.reset(); + mxRulerImpl->bIsTableRows = false; } StartListening_Impl(); } @@ -783,38 +783,38 @@ void SvxRuler::Update( void SvxRuler::UpdateColumns() { /* Update column view */ - if(mpColumnItem.get() && mpColumnItem->Count() > 1) + if(mxColumnItem.get() && mxColumnItem->Count() > 1) { - mpBorders.resize(mpColumnItem->Count()); + mpBorders.resize(mxColumnItem->Count()); sal_uInt16 nStyleFlags = RULER_BORDER_VARIABLE; bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); if( !bProtectColumns ) nStyleFlags |= RULER_BORDER_MOVEABLE; - if( mpColumnItem->IsTable() ) + if( mxColumnItem->IsTable() ) nStyleFlags |= RULER_BORDER_TABLE; else if ( !bProtectColumns ) nStyleFlags |= RULER_BORDER_SIZEABLE; - sal_uInt16 nBorders = mpColumnItem->Count(); + sal_uInt16 nBorders = mxColumnItem->Count(); - if(!mpRulerImpl->bIsTableRows) + if(!mxRulerImpl->bIsTableRows) --nBorders; for(sal_uInt16 i = 0; i < nBorders; ++i) { mpBorders[i].nStyle = nStyleFlags; - if(!mpColumnItem->At(i).bVisible) + if(!mxColumnItem->At(i).bVisible) mpBorders[i].nStyle |= RULER_STYLE_INVISIBLE; - mpBorders[i].nPos = ConvertPosPixel(mpColumnItem->At(i).nEnd + lAppNullOffset); + mpBorders[i].nPos = ConvertPosPixel(mxColumnItem->At(i).nEnd + lAppNullOffset); - if(mpColumnItem->Count() == i + 1) + if(mxColumnItem->Count() == i + 1) { //with table rows the end of the table is contained in the //column item but it has no width! @@ -822,12 +822,12 @@ void SvxRuler::UpdateColumns() } else { - mpBorders[i].nWidth = ConvertSizePixel(mpColumnItem->At(i + 1).nStart - mpColumnItem->At(i).nEnd); + mpBorders[i].nWidth = ConvertSizePixel(mxColumnItem->At(i + 1).nStart - mxColumnItem->At(i).nEnd); } - mpBorders[i].nMinPos = ConvertPosPixel(mpColumnItem->At(i).nEndMin + lAppNullOffset); - mpBorders[i].nMaxPos = ConvertPosPixel(mpColumnItem->At(i).nEndMax + lAppNullOffset); + mpBorders[i].nMinPos = ConvertPosPixel(mxColumnItem->At(i).nEndMin + lAppNullOffset); + mpBorders[i].nMaxPos = ConvertPosPixel(mxColumnItem->At(i).nEndMax + lAppNullOffset); } - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); } else { @@ -838,22 +838,22 @@ void SvxRuler::UpdateColumns() void SvxRuler::UpdateObject() { /* Update view of object representation */ - if(mpObjectItem.get()) + if(mxObjectItem.get()) { DBG_ASSERT(!mpObjectBorders.empty(), "no Buffer"); // !! to the page margin - long nMargin = mpLRSpaceItem.get() ? mpLRSpaceItem->GetLeft() : 0; + long nMargin = mxLRSpaceItem.get() ? mxLRSpaceItem->GetLeft() : 0; mpObjectBorders[0].nPos = - ConvertPosPixel(mpObjectItem->GetStartX() - + ConvertPosPixel(mxObjectItem->GetStartX() - nMargin + lAppNullOffset); mpObjectBorders[1].nPos = - ConvertPosPixel(mpObjectItem->GetEndX() - nMargin + lAppNullOffset); - nMargin = mpULSpaceItem.get() ? mpULSpaceItem->GetUpper() : 0; + ConvertPosPixel(mxObjectItem->GetEndX() - nMargin + lAppNullOffset); + nMargin = mxULSpaceItem.get() ? mxULSpaceItem->GetUpper() : 0; mpObjectBorders[2].nPos = - ConvertPosPixel(mpObjectItem->GetStartY() - + ConvertPosPixel(mxObjectItem->GetStartY() - nMargin + lAppNullOffset); mpObjectBorders[3].nPos = - ConvertPosPixel(mpObjectItem->GetEndY() - nMargin + lAppNullOffset); + ConvertPosPixel(mxObjectItem->GetEndY() - nMargin + lAppNullOffset); const sal_uInt16 nOffset = GetObjectBordersOff(0); SetBorders(2, &mpObjectBorders[0] + nOffset); @@ -877,9 +877,9 @@ void SvxRuler::UpdatePara() */ // Dependence on PagePosItem - if(mpParaItem.get() && mpPagePosItem.get() && !mpObjectItem.get()) + if(mxParaItem.get() && mxPagePosItem.get() && !mxObjectItem.get()) { - bool bRTLText = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTLText = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); // First-line indent is negative to the left paragraph margin long nLeftFrameMargin = GetLeftFrameMargin(); long nRightFrameMargin = GetRightFrameMargin(); @@ -892,22 +892,22 @@ void SvxRuler::UpdatePara() if(bRTLText) { - leftMargin = nRightFrameMargin - mpParaItem->GetTxtLeft() + lAppNullOffset; - leftFirstLine = leftMargin - mpParaItem->GetTxtFirstLineOfst(); - rightMargin = nLeftFrameMargin + mpParaItem->GetRight() + lAppNullOffset; + leftMargin = nRightFrameMargin - mxParaItem->GetTxtLeft() + lAppNullOffset; + leftFirstLine = leftMargin - mxParaItem->GetTxtFirstLineOfst(); + rightMargin = nLeftFrameMargin + mxParaItem->GetRight() + lAppNullOffset; } else { - leftMargin = nLeftFrameMargin + mpParaItem->GetTxtLeft() + lAppNullOffset; - leftFirstLine = leftMargin + mpParaItem->GetTxtFirstLineOfst(); - rightMargin = nRightFrameMargin - mpParaItem->GetRight() + lAppNullOffset; + leftMargin = nLeftFrameMargin + mxParaItem->GetTxtLeft() + lAppNullOffset; + leftFirstLine = leftMargin + mxParaItem->GetTxtFirstLineOfst(); + rightMargin = nRightFrameMargin - mxParaItem->GetRight() + lAppNullOffset; } mpIndents[INDENT_LEFT_MARGIN].nPos = ConvertHPosPixel(leftMargin); mpIndents[INDENT_FIRST_LINE].nPos = ConvertHPosPixel(leftFirstLine); mpIndents[INDENT_RIGHT_MARGIN].nPos = ConvertHPosPixel(rightMargin); - if( mpParaItem->IsAutoFirst() ) + if( mxParaItem->IsAutoFirst() ) mpIndents[INDENT_FIRST_LINE].nStyle |= RULER_STYLE_INVISIBLE; else mpIndents[INDENT_FIRST_LINE].nStyle &= ~RULER_STYLE_INVISIBLE; @@ -932,9 +932,9 @@ void SvxRuler::UpdatePara(const SvxLRSpaceItem *pItem) // new value of paragraph if(bActive) { if(pItem) - mpParaItem.reset(new SvxLRSpaceItem(*pItem)); + mxParaItem.reset(new SvxLRSpaceItem(*pItem)); else - mpParaItem.reset(); + mxParaItem.reset(); StartListening_Impl(); } } @@ -945,9 +945,9 @@ void SvxRuler::UpdateParaBorder(const SvxLRSpaceItem * pItem ) if(bActive) { if(pItem) - mpParaBorderItem.reset(new SvxLRSpaceItem(*pItem)); + mxParaBorderItem.reset(new SvxLRSpaceItem(*pItem)); else - mpParaBorderItem.reset(); + mxParaBorderItem.reset(); StartListening_Impl(); } } @@ -955,21 +955,21 @@ void SvxRuler::UpdateParaBorder(const SvxLRSpaceItem * pItem ) void SvxRuler::UpdatePage() { /* Update view of position and width of page */ - if(mpPagePosItem.get()) + if(mxPagePosItem.get()) { // all objects are automatically adjusted if(bHorz) { SetPagePos( - pEditWin->LogicToPixel(mpPagePosItem->GetPos()).X(), - pEditWin->LogicToPixel(Size(mpPagePosItem->GetWidth(), 0)). + pEditWin->LogicToPixel(mxPagePosItem->GetPos()).X(), + pEditWin->LogicToPixel(Size(mxPagePosItem->GetWidth(), 0)). Width()); } else { SetPagePos( - pEditWin->LogicToPixel(mpPagePosItem->GetPos()).Y(), - pEditWin->LogicToPixel(Size(0, mpPagePosItem->GetHeight())). + pEditWin->LogicToPixel(mxPagePosItem->GetPos()).Y(), + pEditWin->LogicToPixel(Size(0, mxPagePosItem->GetHeight())). Height()); } if(bAppSetNullOffset) @@ -1000,9 +1000,9 @@ void SvxRuler::UpdatePage() // Unfortunately, we get the offset of the edit window to the ruler never // through a status message. So we set it ourselves if necessary. - if(lPos != mpRulerImpl->lOldWinPos) + if(lPos != mxRulerImpl->lOldWinPos) { - mpRulerImpl->lOldWinPos=lPos; + mxRulerImpl->lOldWinPos=lPos; SetWinPos(lPos); } } @@ -1013,9 +1013,9 @@ void SvxRuler::Update(const SvxPagePosSizeItem *pItem) // new value of page attr if(bActive) { if(pItem) - mpPagePosItem.reset(new SvxPagePosSizeItem(*pItem)); + mxPagePosItem.reset(new SvxPagePosSizeItem(*pItem)); else - mpPagePosItem.reset(); + mxPagePosItem.reset(); StartListening_Impl(); } } @@ -1058,28 +1058,28 @@ void SvxRuler::UpdateTabs() if(IsDrag()) return; - if( mpPagePosItem.get() && - mpParaItem.get() && - mpTabStopItem.get() && - !mpObjectItem.get() ) + if( mxPagePosItem.get() && + mxParaItem.get() && + mxTabStopItem.get() && + !mxObjectItem.get() ) { // buffer for DefaultTabStop // Distance last Tab <-> Right paragraph margin / DefaultTabDist - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); long nLeftFrameMargin = GetLeftFrameMargin(); long nRightFrameMargin = GetRightFrameMargin(); //#i24363# tab stops relative to indent - const long nParaItemTxtLeft = mpParaItem->GetTxtLeft(); + const long nParaItemTxtLeft = mxParaItem->GetTxtLeft(); const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft; - const long lLastTab = mpTabStopItem->Count() - ? ConvertHPosPixel(mpTabStopItem->At(mpTabStopItem->Count() - 1).GetTabPos()) + const long lLastTab = mxTabStopItem->Count() + ? ConvertHPosPixel(mxTabStopItem->At(mxTabStopItem->Count() - 1).GetTabPos()) : 0; const long lPosPixel = ConvertHPosPixel(lParaIndent) + lLastTab; - const long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mpParaItem->GetRight()); + const long lRightIndent = ConvertHPosPixel(nRightFrameMargin - mxParaItem->GetRight()); long nDefTabDist = ConvertHPosPixel(lDefTabDist); @@ -1090,10 +1090,10 @@ void SvxRuler::UpdateTabs() ? 0 : (sal_uInt16)( (lRightIndent - lPosPixel) / nDefTabDist ); - if(mpTabStopItem->Count() + TAB_GAP + nDefTabBuf > nTabBufSize) + if(mxTabStopItem->Count() + TAB_GAP + nDefTabBuf > nTabBufSize) { // 10 (GAP) in stock - nTabBufSize = mpTabStopItem->Count() + TAB_GAP + nDefTabBuf + GAP; + nTabBufSize = mxTabStopItem->Count() + TAB_GAP + nDefTabBuf + GAP; mpTabs.resize(nTabBufSize); } @@ -1104,10 +1104,10 @@ void SvxRuler::UpdateTabs() const long lRightPixMargin = ConvertSizePixel(nRightFrameMargin - nParaItemTxtLeft ); const long lParaIndentPix = ConvertSizePixel(lParaIndent); - for(j = 0; j < mpTabStopItem->Count(); ++j) + for(j = 0; j < mxTabStopItem->Count(); ++j) { - const SvxTabStop* pTab = &mpTabStopItem->At(j); - if (mpRulerImpl->bIsTabsRelativeToIndent) + const SvxTabStop* pTab = &mxTabStopItem->At(j); + if (mxRulerImpl->bIsTabsRelativeToIndent) { long nTabPosition = ConvertHPosPixel(lParaIndent + pTab->GetTabPos() + lAppNullOffset); mpTabs[nTabCount + TAB_GAP].nPos = nTabPosition; @@ -1126,7 +1126,7 @@ void SvxRuler::UpdateTabs() ++nTabCount; } - if(!mpTabStopItem->Count()) + if(!mxTabStopItem->Count()) mpTabs[0].nPos = bRTL ? lRightPixMargin : lParaIndentPix; // fill the rest with default Tabs @@ -1159,7 +1159,7 @@ void SvxRuler::UpdateTabs() if( j == 0 ) { //set the first default tab stop - if(mpRulerImpl->bIsTabsRelativeToIndent) + if(mxRulerImpl->bIsTabsRelativeToIndent) { mpTabs[nTabCount + TAB_GAP].nPos = (mpTabs[nTabCount].nPos + nDefTabDist); @@ -1205,13 +1205,13 @@ void SvxRuler::Update(const SvxTabStopItem *pItem) // new value for tabs { if(pItem) { - mpTabStopItem.reset(new SvxTabStopItem(*pItem)); + mxTabStopItem.reset(new SvxTabStopItem(*pItem)); if(!bHorz) - mpTabStopItem->SetWhich(SID_ATTR_TABSTOP_VERTICAL); + mxTabStopItem->SetWhich(SID_ATTR_TABSTOP_VERTICAL); } else { - mpTabStopItem.reset(); + mxTabStopItem.reset(); } StartListening_Impl(); } @@ -1223,9 +1223,9 @@ void SvxRuler::Update(const SvxObjectItem *pItem) // new value for objects if(bActive) { if(pItem) - mpObjectItem.reset(new SvxObjectItem(*pItem)); + mxObjectItem.reset(new SvxObjectItem(*pItem)); else - mpObjectItem.reset(); + mxObjectItem.reset(); StartListening_Impl(); } } @@ -1260,9 +1260,9 @@ void SvxRuler::Update() long SvxRuler::GetPageWidth() const { - if (!mpPagePosItem.get()) + if (!mxPagePosItem.get()) return 0; - return bHorz ? mpPagePosItem->GetWidth() : mpPagePosItem->GetHeight(); + return bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight(); } inline long SvxRuler::GetFrameLeft() const @@ -1277,8 +1277,8 @@ inline void SvxRuler::SetFrameLeft(long lFrameLeft) { /* Set Left margin in Pixels */ bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); if(bAppSetNullOffset) { SetMargin1(lFrameLeft - ConvertSizePixel(lLogicNullOffset), @@ -1293,25 +1293,25 @@ inline void SvxRuler::SetFrameLeft(long lFrameLeft) long SvxRuler::GetFirstLineIndent() const { /* Get First-line indent in pixels */ - return mpParaItem.get() ? mpIndents[INDENT_FIRST_LINE].nPos : GetMargin1(); + return mxParaItem.get() ? mpIndents[INDENT_FIRST_LINE].nPos : GetMargin1(); } long SvxRuler::GetLeftIndent() const { /* Get Left paragraph margin in Pixels */ - return mpParaItem.get() ? mpIndents[INDENT_LEFT_MARGIN].nPos : GetMargin1(); + return mxParaItem.get() ? mpIndents[INDENT_LEFT_MARGIN].nPos : GetMargin1(); } long SvxRuler::GetRightIndent() const { /* Get Right paragraph margin in Pixels */ - return mpParaItem.get() ? mpIndents[INDENT_RIGHT_MARGIN].nPos : GetMargin2(); + return mxParaItem.get() ? mpIndents[INDENT_RIGHT_MARGIN].nPos : GetMargin2(); } long SvxRuler::GetLogicRightIndent() const { /* Get Right paragraph margin in Logic */ - return mpParaItem.get() ? GetRightFrameMargin() - mpParaItem->GetRight() : GetRightFrameMargin(); + return mxParaItem.get() ? GetRightFrameMargin() - mxParaItem->GetRight() : GetRightFrameMargin(); } // Left margin in App values, is either the margin (= 0) or the left edge of @@ -1319,14 +1319,14 @@ long SvxRuler::GetLogicRightIndent() const long SvxRuler::GetLeftFrameMargin() const { // #126721# for some unknown reason the current column is set to 0xffff - DBG_ASSERT(!mpColumnItem.get() || mpColumnItem->GetActColumn() < mpColumnItem->Count(), + DBG_ASSERT(!mxColumnItem.get() || mxColumnItem->GetActColumn() < mxColumnItem->Count(), "issue #126721# - invalid current column!"); long nLeft = 0; - if (mpColumnItem.get() && - mpColumnItem->Count() && - mpColumnItem->IsConsistent()) + if (mxColumnItem.get() && + mxColumnItem->Count() && + mxColumnItem->IsConsistent()) { - nLeft = mpColumnItem->GetActiveColumnDescription().nStart; + nLeft = mxColumnItem->GetActiveColumnDescription().nStart; } return nLeft; @@ -1334,26 +1334,26 @@ long SvxRuler::GetLeftFrameMargin() const inline long SvxRuler::GetLeftMin() const { - DBG_ASSERT(mpMinMaxItem.get(), "no MinMax value set"); - if (mpMinMaxItem.get()) + DBG_ASSERT(mxMinMaxItem.get(), "no MinMax value set"); + if (mxMinMaxItem.get()) { if (bHorz) - return mpMinMaxItem->GetValue().Left(); + return mxMinMaxItem->GetValue().Left(); else - return mpMinMaxItem->GetValue().Top(); + return mxMinMaxItem->GetValue().Top(); } return 0; } inline long SvxRuler::GetRightMax() const { - DBG_ASSERT(mpMinMaxItem.get(), "no MinMax value set"); - if (mpMinMaxItem.get()) + DBG_ASSERT(mxMinMaxItem.get(), "no MinMax value set"); + if (mxMinMaxItem.get()) { if (bHorz) - return mpMinMaxItem->GetValue().Right(); + return mxMinMaxItem->GetValue().Right(); else - return mpMinMaxItem->GetValue().Bottom(); + return mxMinMaxItem->GetValue().Bottom(); } return 0; } @@ -1362,35 +1362,35 @@ inline long SvxRuler::GetRightMax() const long SvxRuler::GetRightFrameMargin() const { /* Get right frame margin (in logical units) */ - if (mpColumnItem.get()) + if (mxColumnItem.get()) { if (!IsActLastColumn(true)) { - return mpColumnItem->At(GetActRightColumn(true)).nEnd; + return mxColumnItem->At(GetActRightColumn(true)).nEnd; } } long lResult = lLogicNullOffset; // If possible deduct right table entry - if(mpColumnItem.get() && mpColumnItem->IsTable()) - lResult += mpColumnItem->GetRight(); - else if(bHorz && mpLRSpaceItem.get()) - lResult += mpLRSpaceItem->GetRight(); - else if(!bHorz && mpULSpaceItem.get()) - lResult += mpULSpaceItem->GetLower(); + if(mxColumnItem.get() && mxColumnItem->IsTable()) + lResult += mxColumnItem->GetRight(); + else if(bHorz && mxLRSpaceItem.get()) + lResult += mxLRSpaceItem->GetRight(); + else if(!bHorz && mxULSpaceItem.get()) + lResult += mxULSpaceItem->GetLower(); if(bHorz) - lResult = mpPagePosItem->GetWidth() - lResult; + lResult = mxPagePosItem->GetWidth() - lResult; else - lResult = mpPagePosItem->GetHeight() - lResult; + lResult = mxPagePosItem->GetHeight() - lResult; return lResult; } #define NEG_FLAG ( (nFlags & SVXRULER_SUPPORT_NEGATIVE_MARGINS) == \ SVXRULER_SUPPORT_NEGATIVE_MARGINS ) -#define TAB_FLAG ( mpColumnItem.get() && mpColumnItem->IsTable() ) +#define TAB_FLAG ( mxColumnItem.get() && mxColumnItem->IsTable() ) long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight ) { @@ -1402,7 +1402,7 @@ long SvxRuler::GetCorrectedDragPos( bool bLeft, bool bRight ) const long lNullPix = Ruler::GetNullOffset(); long lDragPos = GetDragPos() + lNullPix; ADD_DEBUG_TEXT("lDragPos: ", OUString::number(lDragPos)) - bool bHoriRows = bHorz && mpRulerImpl->bIsTableRows; + bool bHoriRows = bHorz && mxRulerImpl->bIsTableRows; if((bLeft || (bHoriRows)) && lDragPos < nMaxLeft) lDragPos = nMaxLeft; else if((bRight||bHoriRows) && lDragPos > nMaxRight) @@ -1436,7 +1436,7 @@ void SvxRuler::DragMargin1() return; DrawLine_Impl(lTabPos, ( TAB_FLAG && NEG_FLAG ) ? 3 : 7, bHorz); - if (mpColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) + if (mxColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) DragBorders(); AdjustMargin1(aDragPosition); } @@ -1447,8 +1447,8 @@ void SvxRuler::AdjustMargin1(long lInputDiff) const long lDragPos = lInputDiff; bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); const sal_uInt16 nMarginStyle = bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE; @@ -1457,31 +1457,31 @@ void SvxRuler::AdjustMargin1(long lInputDiff) { long lDiff = lDragPos; SetNullOffset(nOld + lDiff); - if (!mpColumnItem.get() || !(nDragType & DRAG_OBJECT_SIZE_LINEAR)) + if (!mxColumnItem.get() || !(nDragType & DRAG_OBJECT_SIZE_LINEAR)) { SetMargin2( GetMargin2() - lDiff, nMarginStyle ); - if (!mpColumnItem.get() && !mpObjectItem.get() && mpParaItem.get()) + if (!mxColumnItem.get() && !mxObjectItem.get() && mxParaItem.get()) { // Right indent of the old position mpIndents[INDENT_RIGHT_MARGIN].nPos -= lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } - if(mpObjectItem.get()) + if(mxObjectItem.get()) { mpObjectBorders[GetObjectBordersOff(0)].nPos -= lDiff; mpObjectBorders[GetObjectBordersOff(1)].nPos -= lDiff; SetBorders(2, &mpObjectBorders[0] + GetObjectBordersOff(0)); } - if(mpColumnItem.get()) + if(mxColumnItem.get()) { - for(sal_uInt16 i = 0; i < mpColumnItem->Count()-1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count()-1; ++i) mpBorders[i].nPos -= lDiff; - SetBorders(mpColumnItem->Count()-1, &mpBorders[0]); - if(mpColumnItem->IsFirstAct()) + SetBorders(mxColumnItem->Count()-1, &mpBorders[0]); + if(mxColumnItem->IsFirstAct()) { // Right indent of the old position - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_RIGHT_MARGIN].nPos -= lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); @@ -1489,7 +1489,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } else { - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos -= lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos -= lDiff; @@ -1497,7 +1497,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } } - if(mpTabStopItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) + if(mxTabStopItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) &&!IsActFirstColumn()) { ModifyTabs_Impl(nTabCount + TAB_GAP, &mpTabs[0], -lDiff); @@ -1511,9 +1511,9 @@ void SvxRuler::AdjustMargin1(long lInputDiff) long lDiff = lDragPos - nOld; SetMargin1(nOld + lDiff, nMarginStyle); - if (!mpColumnItem.get() || !(nDragType & (DRAG_OBJECT_SIZE_LINEAR | DRAG_OBJECT_SIZE_PROPORTIONAL))) + if (!mxColumnItem.get() || !(nDragType & (DRAG_OBJECT_SIZE_LINEAR | DRAG_OBJECT_SIZE_PROPORTIONAL))) { - if (!mpColumnItem.get() && !mpObjectItem.get() && mpParaItem.get()) + if (!mxColumnItem.get() && !mxObjectItem.get() && mxParaItem.get()) { // Left indent of the old position mpIndents[INDENT_FIRST_LINE].nPos += lDiff; @@ -1521,15 +1521,15 @@ void SvxRuler::AdjustMargin1(long lInputDiff) SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); } - if (mpColumnItem.get()) + if (mxColumnItem.get()) { - for(sal_uInt16 i = 0; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count() - 1; ++i) mpBorders[i].nPos += lDiff; - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); - if (mpColumnItem->IsFirstAct()) + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); + if (mxColumnItem->IsFirstAct()) { // Left indent of the old position - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos += lDiff; @@ -1538,7 +1538,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } else { - if(mpParaItem.get()) + if(mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; mpIndents[INDENT_LEFT_MARGIN].nPos += lDiff; @@ -1547,7 +1547,7 @@ void SvxRuler::AdjustMargin1(long lInputDiff) } } } - if(mpTabStopItem.get()) + if(mxTabStopItem.get()) { ModifyTabs_Impl(nTabCount + TAB_GAP, &mpTabs[0], lDiff); SetTabs(nTabCount, &mpTabs[0] + TAB_GAP); @@ -1567,24 +1567,24 @@ void SvxRuler::DragMargin2() if (lDiff == 0) return; - if( mpRulerImpl->bIsTableRows && + if( mxRulerImpl->bIsTableRows && !bHorz && - mpColumnItem.get() && + mxColumnItem.get() && (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL)) { DragBorders(); } bool bProtectColumns = - mpRulerImpl->aProtectItem.IsSizeProtected() || - mpRulerImpl->aProtectItem.IsPosProtected(); + mxRulerImpl->aProtectItem.IsSizeProtected() || + mxRulerImpl->aProtectItem.IsPosProtected(); const sal_uInt16 nMarginStyle = bProtectColumns ? 0 : RULER_MARGIN_SIZEABLE; SetMargin2( aDragPosition, nMarginStyle ); // Right indent of the old position - if((!mpColumnItem.get() || IsActLastColumn()) && mpParaItem.get()) + if((!mxColumnItem.get() || IsActLastColumn()) && mxParaItem.get()) { mpIndents[INDENT_FIRST_LINE].nPos += lDiff; SetIndents(INDENT_COUNT, &mpIndents[0] + INDENT_GAP); @@ -1599,7 +1599,7 @@ void SvxRuler::DragIndents() long aDragPosition = NEG_FLAG ? GetDragPos() : GetCorrectedDragPos(); const sal_uInt16 nIndex = GetDragAryPos() + INDENT_GAP; - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if(nIndex == INDENT_RIGHT_MARGIN) aDragPosition = MakePositionSticky(aDragPosition, bRTL ? GetLeftFrameMargin() : GetRightFrameMargin()); @@ -1646,8 +1646,8 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) long nDrapPosition = GetCorrectedDragPos( ( nNew & 4 ) != 0, ( nNew & 2 ) != 0 ); nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin()); lTabPosition = ConvertHSizeLogic( nDrapPosition + GetNullOffset() ); - if(mpPagePosItem.get()) - lTabPosition += mpPagePosItem->GetPos().X(); + if(mxPagePosItem.get()) + lTabPosition += mxPagePosItem->GetPos().X(); pEditWin->InvertTracking( Rectangle( Point(lTabPosition, -aZero.Y()), Point(lTabPosition, -aZero.Y() + nHeight) ), @@ -1671,8 +1671,8 @@ void SvxRuler::DrawLine_Impl(long& lTabPosition, int nNew, bool bHorizontal) long nDrapPosition = GetCorrectedDragPos(); nDrapPosition = MakePositionSticky(nDrapPosition, GetLeftFrameMargin()); lTabPosition = ConvertVSizeLogic(nDrapPosition + GetNullOffset()); - if(mpPagePosItem.get()) - lTabPosition += mpPagePosItem->GetPos().Y(); + if(mxPagePosItem.get()) + lTabPosition += mxPagePosItem->GetPos().Y(); pEditWin->InvertTracking( Rectangle( Point(-aZero.X(), lTabPosition), Point(-aZero.X()+nWidth, lTabPosition)), @@ -1709,14 +1709,14 @@ void SvxRuler::DragTabs() } else if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) { - mpRulerImpl->nTotalDist -= nDiff; + mxRulerImpl->nTotalDist -= nDiff; mpTabs[nIdx].nPos = aDragPosition; for(sal_uInt16 i = nIdx+1; i < nTabCount; ++i) { if(mpTabs[i].nStyle & RULER_TAB_DEFAULT) // can be canceled at the DefaultTabs break; - long nDelta = mpRulerImpl->nTotalDist * mpRulerImpl->pPercBuf[i]; + long nDelta = mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i]; nDelta /= 1000; mpTabs[i].nPos = mpTabs[nIdx].nPos + nDelta; if(mpTabs[i].nPos + GetNullOffset() > nMaxRight) @@ -1749,10 +1749,10 @@ void SvxRuler::SetActive(bool bOn) { pBindings->EnterRegistrations(); if(bOn) - for(sal_uInt16 i=0;i<mpRulerImpl->nControlerItems;i++) + for(sal_uInt16 i=0;i<mxRulerImpl->nControlerItems;i++) pCtrlItem[i]->ReBind(); else - for(sal_uInt16 j=0;j<mpRulerImpl->nControlerItems;j++) + for(sal_uInt16 j=0;j<mxRulerImpl->nControlerItems;j++) pCtrlItem[j]->UnBind(); pBindings->LeaveRegistrations(); } @@ -1817,11 +1817,11 @@ void SvxRuler::DragBorders() { case RULER_DRAGSIZE_MOVE: { -ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) +ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) if(GetDragType() == RULER_TYPE_BORDER) lDiff = lPos - nDragOffset - mpBorders[nIndex].nPos; else - lDiff = GetDragType() == RULER_TYPE_MARGIN1 ? lPos - mpRulerImpl->lLastLMargin : lPos - mpRulerImpl->lLastRMargin; + lDiff = GetDragType() == RULER_TYPE_MARGIN1 ? lPos - mxRulerImpl->lLastLMargin : lPos - mxRulerImpl->lLastRMargin; if(nDragType & DRAG_OBJECT_SIZE_LINEAR) { @@ -1857,20 +1857,20 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) OSL_FAIL("svx::SvxRuler::DragBorders(), unknown drag type!" ); //fall-through case RULER_TYPE_BORDER: - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { mpBorders[nIndex].nPos += lDiff; if(bHorz) { lLeft = mpBorders[nIndex].nPos; - mpRulerImpl->nTotalDist -= lDiff; + mxRulerImpl->nTotalDist -= lDiff; nLimit = nIndex + 1; } else { lLeft = 0; nStartLimit = nIndex - 1; - mpRulerImpl->nTotalDist += lDiff; + mxRulerImpl->nTotalDist += lDiff; nLimit = 0; } } @@ -1879,19 +1879,19 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) nLimit = nIndex + 1; mpBorders[nIndex].nPos += lDiff; lLeft = mpBorders[nIndex].nPos; - mpRulerImpl->nTotalDist -= lDiff; + mxRulerImpl->nTotalDist -= lDiff; } break; case RULER_TYPE_MARGIN1: nLimit = 0; - lLeft = mpRulerImpl->lLastLMargin + lDiff; - mpRulerImpl->nTotalDist -= lDiff; + lLeft = mxRulerImpl->lLastLMargin + lDiff; + mxRulerImpl->nTotalDist -= lDiff; break; case RULER_TYPE_MARGIN2: nLimit = 0; lLeft= 0; nStartLimit = mpBorders.size() - 2; - mpRulerImpl->nTotalDist += lDiff; + mxRulerImpl->nTotalDist += lDiff; break; } @@ -1901,11 +1901,11 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) long l = mpBorders[i].nPos; mpBorders[i].nPos = lLeft + - (mpRulerImpl->nTotalDist * mpRulerImpl->pPercBuf[i]) / 1000 + - mpRulerImpl->pBlockBuf[i]; + (mxRulerImpl->nTotalDist * mxRulerImpl->pPercBuf[i]) / 1000 + + mxRulerImpl->pBlockBuf[i]; // RR update the column - if(!mpRulerImpl->bIsTableRows) + if(!mxRulerImpl->bIsTableRows) { if(i == GetActRightColumn()) { @@ -1920,7 +1920,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) } } } - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { //in vertical tables the left borders have to be moved if(bHorz) @@ -1932,13 +1932,13 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) else { //otherwise the right borders are moved - for(int i = mpColumnItem->Count() - 1; i > nIndex; --i) + for(int i = mxColumnItem->Count() - 1; i > nIndex; --i) mpBorders[i].nPos += lDiff; SetMargin2( GetMargin2() + lDiff, 0 ); } } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { //moving rows: if a row is resized all following rows //have to be moved by the same amount. @@ -1996,7 +1996,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) GetActRightColumn() == nIndex && nDragSize != RULER_DRAGSIZE_2 && !mpIndents.empty() && - !mpRulerImpl->bIsTableRows) + !mxRulerImpl->bIsTableRows) { UpdateParaContents_Impl(lDiff, MOVE_RIGHT); } @@ -2007,7 +2007,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mpRulerImpl->lLastLMargin)) { UpdateParaContents_Impl(lDiff, MOVE_LEFT); } - SetBorders(mpColumnItem->Count() - 1, &mpBorders[0]); + SetBorders(mxColumnItem->Count() - 1, &mpBorders[0]); } void SvxRuler::DragObjectBorder() @@ -2034,69 +2034,69 @@ void SvxRuler::ApplyMargins() if(bHorz) { const long lOldNull = lLogicNullOffset; - if(mpRulerImpl->lMaxLeftLogic != -1 && nMaxLeft == GetMargin1() + Ruler::GetNullOffset()) + if(mxRulerImpl->lMaxLeftLogic != -1 && nMaxLeft == GetMargin1() + Ruler::GetNullOffset()) { - lLogicNullOffset = mpRulerImpl->lMaxLeftLogic; - mpLRSpaceItem->SetLeft(lLogicNullOffset); + lLogicNullOffset = mxRulerImpl->lMaxLeftLogic; + mxLRSpaceItem->SetLeft(lLogicNullOffset); } else { lLogicNullOffset = ConvertHPosLogic(GetFrameLeft()) - lAppNullOffset; - mpLRSpaceItem->SetLeft(PixelHAdjust(lLogicNullOffset, mpLRSpaceItem->GetLeft())); + mxLRSpaceItem->SetLeft(PixelHAdjust(lLogicNullOffset, mxLRSpaceItem->GetLeft())); } if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - lOldNull; long nRight; - if(mpRulerImpl->lMaxRightLogic != -1 + if(mxRulerImpl->lMaxRightLogic != -1 && nMaxRight == GetMargin2() + Ruler::GetNullOffset()) { - nRight = GetPageWidth() - mpRulerImpl->lMaxRightLogic; + nRight = GetPageWidth() - mxRulerImpl->lMaxRightLogic; } else { nRight = std::max((long)0, - mpPagePosItem->GetWidth() - mpLRSpaceItem->GetLeft() - + mxPagePosItem->GetWidth() - mxLRSpaceItem->GetLeft() - (ConvertHPosLogic(GetMargin2()) - lAppNullOffset)); - nRight = PixelHAdjust( nRight, mpLRSpaceItem->GetRight()); + nRight = PixelHAdjust( nRight, mxLRSpaceItem->GetRight()); } - mpLRSpaceItem->SetRight(nRight); + mxLRSpaceItem->SetRight(nRight); - pItem = mpLRSpaceItem.get(); + pItem = mxLRSpaceItem.get(); #ifdef DEBUGLIN - Debug_Impl(pEditWin, *mpLRSpaceItem); + Debug_Impl(pEditWin, *mxLRSpaceItem); #endif // DEBUGLIN } else { const long lOldNull = lLogicNullOffset; - mpULSpaceItem->SetUpper( + mxULSpaceItem->SetUpper( PixelVAdjust( lLogicNullOffset = ConvertVPosLogic(GetFrameLeft()) - - lAppNullOffset, mpULSpaceItem->GetUpper())); + lAppNullOffset, mxULSpaceItem->GetUpper())); if(bAppSetNullOffset) lAppNullOffset += lLogicNullOffset - lOldNull; - mpULSpaceItem->SetLower( + mxULSpaceItem->SetLower( PixelVAdjust( - std::max((long)0, mpPagePosItem->GetHeight() - - mpULSpaceItem->GetUpper() - + std::max((long)0, mxPagePosItem->GetHeight() - + mxULSpaceItem->GetUpper() - (ConvertVPosLogic(GetMargin2()) - - lAppNullOffset)), mpULSpaceItem->GetLower())); - pItem = mpULSpaceItem.get(); + lAppNullOffset)), mxULSpaceItem->GetLower())); + pItem = mxULSpaceItem.get(); nId = SID_ATTR_LONG_ULSPACE; #ifdef DEBUGLIN - Debug_Impl(pEditWin,*mpULSpaceItem.get()); + Debug_Impl(pEditWin,*mxULSpaceItem.get()); #endif // DEBUGLIN } pBindings->GetDispatcher()->Execute( nId, SfxCallMode::RECORD, pItem, 0L ); - if(mpTabStopItem.get()) + if(mxTabStopItem.get()) UpdateTabs(); } @@ -2116,7 +2116,7 @@ void SvxRuler::ApplyIndents() long nLeftFrameMargin = GetLeftFrameMargin(); - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); long nNewTxtLeft; long nNewFirstLineOffset; @@ -2126,7 +2126,7 @@ void SvxRuler::ApplyIndents() long nLeftMargin = ConvertPosLogic(mpIndents[INDENT_LEFT_MARGIN].nPos); long nRightMargin = ConvertPosLogic(mpIndents[INDENT_RIGHT_MARGIN].nPos); - if(mpColumnItem.get() && ((bRTL && !IsActLastColumn(true)) || (!bRTL && !IsActFirstColumn(true)))) + if(mxColumnItem.get() && ((bRTL && !IsActLastColumn(true)) || (!bRTL && !IsActFirstColumn(true)))) { if(bRTL) { @@ -2160,7 +2160,7 @@ void SvxRuler::ApplyIndents() else nNewFirstLineOffset = nFirstLine - nLeftMargin - lAppNullOffset; - if(mpColumnItem.get() && ((!bRTL && !IsActLastColumn(true)) || (bRTL && !IsActFirstColumn(true)))) + if(mxColumnItem.get() && ((!bRTL && !IsActLastColumn(true)) || (bRTL && !IsActFirstColumn(true)))) { if(bRTL) { @@ -2196,28 +2196,28 @@ void SvxRuler::ApplyIndents() nNewRight = RoundToCurrentMapMode(nNewRight); } - mpParaItem->SetTxtFirstLineOfst(sal::static_int_cast<short>(nNewFirstLineOffset)); - mpParaItem->SetTxtLeft(nNewTxtLeft); - mpParaItem->SetRight(nNewRight); + mxParaItem->SetTxtFirstLineOfst(sal::static_int_cast<short>(nNewFirstLineOffset)); + mxParaItem->SetTxtLeft(nNewTxtLeft); + mxParaItem->SetRight(nNewRight); sal_uInt16 nParagraphId = bHorz ? SID_ATTR_PARA_LRSPACE : SID_ATTR_PARA_LRSPACE_VERTICAL; - pBindings->GetDispatcher()->Execute( nParagraphId, SfxCallMode::RECORD, mpParaItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nParagraphId, SfxCallMode::RECORD, mxParaItem.get(), 0L ); UpdateTabs(); } void SvxRuler::ApplyTabs() { /* Apply tab settings, changed by dragging. */ - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); const sal_uInt16 nCoreIdx = GetDragAryPos(); if(IsDragDelete()) { - mpTabStopItem->Remove(nCoreIdx); + mxTabStopItem->Remove(nCoreIdx); } else if(DRAG_OBJECT_SIZE_LINEAR & nDragType || DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType) { - SvxTabStopItem *pItem = new SvxTabStopItem(mpTabStopItem->Which()); + SvxTabStopItem *pItem = new SvxTabStopItem(mxTabStopItem->Which()); //remove default tab stops for ( sal_uInt16 i = 0; i < pItem->Count(); ) { @@ -2232,35 +2232,35 @@ void SvxRuler::ApplyTabs() sal_uInt16 j; for(j = 0; j < nCoreIdx; ++j) { - pItem->Insert(mpTabStopItem->At(j)); + pItem->Insert(mxTabStopItem->At(j)); } - for(; j < mpTabStopItem->Count(); ++j) + for(; j < mxTabStopItem->Count(); ++j) { - SvxTabStop aTabStop = mpTabStopItem->At(j); + SvxTabStop aTabStop = mxTabStopItem->At(j); aTabStop.GetTabPos() = PixelHAdjust( ConvertHPosLogic( mpTabs[j + TAB_GAP].nPos - GetLeftIndent()) - lAppNullOffset, aTabStop.GetTabPos()); pItem->Insert(aTabStop); } - mpTabStopItem.reset(pItem); + mxTabStopItem.reset(pItem); } - else if( mpTabStopItem->Count() == 0 ) + else if( mxTabStopItem->Count() == 0 ) return; else { - SvxTabStop aTabStop = mpTabStopItem->At(nCoreIdx); - if( mpRulerImpl->lMaxRightLogic != -1 && + SvxTabStop aTabStop = mxTabStopItem->At(nCoreIdx); + if( mxRulerImpl->lMaxRightLogic != -1 && mpTabs[nCoreIdx + TAB_GAP].nPos + Ruler::GetNullOffset() == nMaxRight ) { - aTabStop.GetTabPos() = mpRulerImpl->lMaxRightLogic - lLogicNullOffset; + aTabStop.GetTabPos() = mxRulerImpl->lMaxRightLogic - lLogicNullOffset; } else { if(bRTL) { //#i24363# tab stops relative to indent - const long nTmpLeftIndent = mpRulerImpl->bIsTabsRelativeToIndent ? + const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : ConvertHPosPixel( GetRightFrameMargin() + lAppNullOffset ); @@ -2270,63 +2270,63 @@ void SvxRuler::ApplyTabs() else { //#i24363# tab stops relative to indent - const long nTmpLeftIndent = mpRulerImpl->bIsTabsRelativeToIndent ? + const long nTmpLeftIndent = mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : 0; long nNewPosition = ConvertHPosLogic(mpTabs[nCoreIdx + TAB_GAP].nPos - nTmpLeftIndent); aTabStop.GetTabPos() = PixelHAdjust(nNewPosition - lAppNullOffset, aTabStop.GetTabPos()); } } - mpTabStopItem->Remove(nCoreIdx); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Remove(nCoreIdx); + mxTabStopItem->Insert(aTabStop); } sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mpTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); UpdateTabs(); } void SvxRuler::ApplyBorders() { /* Applying (table) column settings; changed by dragging. */ - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { long lValue = GetFrameLeft(); - if(lValue != mpRulerImpl->nColLeftPix) + if(lValue != mxRulerImpl->nColLeftPix) { long nLeft = PixelHAdjust( ConvertHPosLogic(lValue) - lAppNullOffset, - mpColumnItem->GetLeft()); - mpColumnItem->SetLeft(nLeft); + mxColumnItem->GetLeft()); + mxColumnItem->SetLeft(nLeft); } lValue = GetMargin2(); - if(lValue != mpRulerImpl->nColRightPix) + if(lValue != mxRulerImpl->nColRightPix) { - long nWidthOrHeight = bHorz ? mpPagePosItem->GetWidth() : mpPagePosItem->GetHeight(); + long nWidthOrHeight = bHorz ? mxPagePosItem->GetWidth() : mxPagePosItem->GetHeight(); long nRight = PixelHAdjust( nWidthOrHeight - - mpColumnItem->GetLeft() - + mxColumnItem->GetLeft() - ConvertHPosLogic(lValue) - lAppNullOffset, - mpColumnItem->GetRight() ); - mpColumnItem->SetRight(nRight); + mxColumnItem->GetRight() ); + mxColumnItem->SetRight(nRight); } } - for(sal_uInt16 i = 0; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = 0; i < mxColumnItem->Count() - 1; ++i) { - long& nEnd = mpColumnItem->At(i).nEnd; + long& nEnd = mxColumnItem->At(i).nEnd; nEnd = PixelHAdjust( ConvertPosLogic(mpBorders[i].nPos), - mpColumnItem->At(i).nEnd); - long& nStart = mpColumnItem->At(i + 1).nStart; + mxColumnItem->At(i).nEnd); + long& nStart = mxColumnItem->At(i + 1).nStart; nStart = PixelHAdjust( ConvertSizeLogic(mpBorders[i].nPos + mpBorders[i].nWidth) - lAppNullOffset, - mpColumnItem->At(i + 1).nStart); + mxColumnItem->At(i + 1).nStart); // It may be that, due to the PixelHAdjust readjustment to old values, // the width becomes < 0. This we readjust. if( nEnd > nStart ) @@ -2334,16 +2334,16 @@ void SvxRuler::ApplyBorders() } #ifdef DEBUGLIN - Debug_Impl(pEditWin,*mpColumnItem.get()); + Debug_Impl(pEditWin,*mxColumnItem.get()); #endif // DEBUGLIN SfxBoolItem aFlag(SID_RULER_ACT_LINE_ONLY, nDragType & DRAG_OBJECT_ACTLINE_ONLY ? sal_True : sal_False); - sal_uInt16 nColId = mpRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : + sal_uInt16 nColId = mxRulerImpl->bIsTableRows ? (bHorz ? SID_RULER_ROWS : SID_RULER_ROWS_VERTICAL) : (bHorz ? SID_RULER_BORDERS : SID_RULER_BORDERS_VERTICAL); - pBindings->GetDispatcher()->Execute( nColId, SfxCallMode::RECORD, mpColumnItem.get(), &aFlag, 0L ); + pBindings->GetDispatcher()->Execute( nColId, SfxCallMode::RECORD, mxColumnItem.get(), &aFlag, 0L ); } void SvxRuler::ApplyObject() @@ -2351,37 +2351,37 @@ void SvxRuler::ApplyObject() /* Applying object settings, changed by dragging. */ // to the page margin - long nMargin = mpLRSpaceItem.get() ? mpLRSpaceItem->GetLeft() : 0; + long nMargin = mxLRSpaceItem.get() ? mxLRSpaceItem->GetLeft() : 0; long nStartX = PixelAdjust( ConvertPosLogic(mpObjectBorders[0].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetStartX()); - mpObjectItem->SetStartX(nStartX); + mxObjectItem->GetStartX()); + mxObjectItem->SetStartX(nStartX); long nEndX = PixelAdjust( ConvertPosLogic(mpObjectBorders[1].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetEndX()); - mpObjectItem->SetEndX(nEndX); + mxObjectItem->GetEndX()); + mxObjectItem->SetEndX(nEndX); - nMargin = mpULSpaceItem.get() ? mpULSpaceItem->GetUpper() : 0; + nMargin = mxULSpaceItem.get() ? mxULSpaceItem->GetUpper() : 0; long nStartY = PixelAdjust( ConvertPosLogic(mpObjectBorders[2].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetStartY()); - mpObjectItem->SetStartY(nStartY); + mxObjectItem->GetStartY()); + mxObjectItem->SetStartY(nStartY); long nEndY = PixelAdjust( ConvertPosLogic(mpObjectBorders[3].nPos) + nMargin - lAppNullOffset, - mpObjectItem->GetEndY()); - mpObjectItem->SetEndY(nEndY); + mxObjectItem->GetEndY()); + mxObjectItem->SetEndY(nEndY); - pBindings->GetDispatcher()->Execute(SID_RULER_OBJECT, SfxCallMode::RECORD, mpObjectItem.get(), 0L); + pBindings->GetDispatcher()->Execute(SID_RULER_OBJECT, SfxCallMode::RECORD, mxObjectItem.get(), 0L); } void SvxRuler::PrepareProportional_Impl(RulerType eType) @@ -2390,16 +2390,16 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) Preparation proportional dragging, and it is calculated based on the proportional share of the total width in parts per thousand. */ - mpRulerImpl->nTotalDist = GetMargin2(); + mxRulerImpl->nTotalDist = GetMargin2(); switch((int)eType) { case RULER_TYPE_MARGIN2: case RULER_TYPE_MARGIN1: case RULER_TYPE_BORDER: { - DBG_ASSERT(mpColumnItem.get(), "no ColumnItem"); + DBG_ASSERT(mxColumnItem.get(), "no ColumnItem"); - mpRulerImpl->SetPercSize(mpColumnItem->Count()); + mxRulerImpl->SetPercSize(mxColumnItem->Count()); long lPos; long lWidth=0; @@ -2417,7 +2417,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) } else { - if(mpRulerImpl->bIsTableRows &&!bHorz) + if(mxRulerImpl->bIsTableRows &&!bHorz) { lOrigLPos = GetMargin1(); nStart = 0; @@ -2433,14 +2433,14 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) //in horizontal mode the percentage value has to be //calculated on a "current change" position base //because the height of the table changes while dragging - if(mpRulerImpl->bIsTableRows && RULER_TYPE_BORDER == eType) + if(mxRulerImpl->bIsTableRows && RULER_TYPE_BORDER == eType) { sal_uInt16 nStartBorder; sal_uInt16 nEndBorder; if(bHorz) { nStartBorder = nIdx + 1; - nEndBorder = mpColumnItem->Count() - 1; + nEndBorder = mxColumnItem->Count() - 1; } else { @@ -2451,7 +2451,7 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) lWidth = mpBorders[nIdx].nPos; if(bHorz) lWidth = GetMargin2() - lWidth; - mpRulerImpl->nTotalDist = lWidth; + mxRulerImpl->nTotalDist = lWidth; lPos = lOrigLPos = mpBorders[nIdx].nPos; for(sal_uInt16 i = nStartBorder; i < nEndBorder; ++i) @@ -2463,32 +2463,32 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) } else lActWidth = mpBorders[i].nPos; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) - / mpRulerImpl->nTotalDist); - mpRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) + / mxRulerImpl->nTotalDist); + mxRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; lActBorderSum += mpBorders[i].nWidth; } } else { lPos = lOrigLPos; - for(sal_uInt16 ii = nStart; ii < mpColumnItem->Count() - 1; ++ii) + for(sal_uInt16 ii = nStart; ii < mxColumnItem->Count() - 1; ++ii) { lWidth += mpBorders[ii].nPos - lPos; lPos = mpBorders[ii].nPos + mpBorders[ii].nWidth; } lWidth += GetMargin2() - lPos; - mpRulerImpl->nTotalDist = lWidth; + mxRulerImpl->nTotalDist = lWidth; lPos = lOrigLPos; - for(sal_uInt16 i = nStart; i < mpColumnItem->Count() - 1; ++i) + for(sal_uInt16 i = nStart; i < mxColumnItem->Count() - 1; ++i) { lActWidth += mpBorders[i].nPos - lPos; lPos = mpBorders[i].nPos + mpBorders[i].nWidth; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) - / mpRulerImpl->nTotalDist); - mpRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((lActWidth * 1000) + / mxRulerImpl->nTotalDist); + mxRulerImpl->pBlockBuf[i] = (sal_uInt16)lActBorderSum; lActBorderSum += mpBorders[i].nWidth; } } @@ -2497,13 +2497,13 @@ void SvxRuler::PrepareProportional_Impl(RulerType eType) case RULER_TYPE_TAB: { const sal_uInt16 nIdx = GetDragAryPos()+TAB_GAP; - mpRulerImpl->nTotalDist -= mpTabs[nIdx].nPos; - mpRulerImpl->SetPercSize(nTabCount); - for(sal_uInt16 n=0;n<=nIdx;mpRulerImpl->pPercBuf[n++]=0) ; + mxRulerImpl->nTotalDist -= mpTabs[nIdx].nPos; + mxRulerImpl->SetPercSize(nTabCount); + for(sal_uInt16 n=0;n<=nIdx;mxRulerImpl->pPercBuf[n++]=0) ; for(sal_uInt16 i = nIdx+1; i < nTabCount; ++i) { const long nDelta = mpTabs[i].nPos - mpTabs[nIdx].nPos; - mpRulerImpl->pPercBuf[i] = (sal_uInt16)((nDelta * 1000) / mpRulerImpl->nTotalDist); + mxRulerImpl->pPercBuf[i] = (sal_uInt16)((nDelta * 1000) / mxRulerImpl->nTotalDist); } break; } @@ -2522,7 +2522,7 @@ void SvxRuler::EvalModifier() */ sal_uInt16 nModifier = GetDragModifier(); - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { //rows can only be moved in one way, additionally current column is possible if(nModifier == KEY_SHIFT) @@ -2548,7 +2548,7 @@ void SvxRuler::EvalModifier() ( ( RULER_TYPE_BORDER == eType || RULER_TYPE_MARGIN1 == eType || RULER_TYPE_MARGIN2 == eType ) && - mpColumnItem.get() ) ) + mxColumnItem.get() ) ) { PrepareProportional_Impl(eType); } @@ -2582,11 +2582,11 @@ void SvxRuler::Click() pBindings->Update( SID_RULER_PROTECT ); pBindings->Update( SID_ATTR_PARA_LRSPACE_VERTICAL ); } - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); - if(mpTabStopItem.get() && + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); + if(mxTabStopItem.get() && (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) { - bool bContentProtected = mpRulerImpl->aProtectItem.IsCntntProtected(); + bool bContentProtected = mxRulerImpl->aProtectItem.IsCntntProtected(); if( bContentProtected ) return; const long lPos = GetClickPos(); if((bRTL && lPos < std::min(GetFirstLineIndent(), GetLeftIndent()) && lPos > GetRightIndent()) || @@ -2596,19 +2596,19 @@ void SvxRuler::Click() long nTabPos; //#i24363# tab stops relative to indent if(bRTL) - nTabPos = ( mpRulerImpl->bIsTabsRelativeToIndent ? + nTabPos = ( mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : ConvertHPosPixel( GetRightFrameMargin() + lAppNullOffset ) ) - lPos; else nTabPos = lPos - - ( mpRulerImpl->bIsTabsRelativeToIndent ? + ( mxRulerImpl->bIsTabsRelativeToIndent ? GetLeftIndent() : 0 ); SvxTabStop aTabStop(ConvertHPosLogic(nTabPos), ToAttrTab_Impl(nDefTabType)); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Insert(aTabStop); UpdateTabs(); } } @@ -2633,18 +2633,18 @@ void SvxRuler::CalcMinMax() Calculates the limits for dragging; which are in pixels relative to the page edge */ - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); const long lNullPix = ConvertPosPixel(lLogicNullOffset); - mpRulerImpl->lMaxLeftLogic=mpRulerImpl->lMaxRightLogic=-1; + mxRulerImpl->lMaxLeftLogic=mxRulerImpl->lMaxRightLogic=-1; switch(GetDragType()) { case RULER_TYPE_MARGIN1: { // left edge of the surrounding Frame // DragPos - NOf between left - right - mpRulerImpl->lMaxLeftLogic = GetLeftMin(); - nMaxLeft=ConvertSizePixel(mpRulerImpl->lMaxLeftLogic); + mxRulerImpl->lMaxLeftLogic = GetLeftMin(); + nMaxLeft=ConvertSizePixel(mxRulerImpl->lMaxLeftLogic); - if (!mpColumnItem.get() || mpColumnItem->Count() == 1 ) + if (!mxColumnItem.get() || mxColumnItem->Count() == 1 ) { if(bRTL) { @@ -2659,17 +2659,17 @@ void SvxRuler::CalcMinMax() lMinFrame; } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { //top border is not moveable when table rows are displayed // protection of content means the margin is not moveable // - it's just a page break inside of a cell - if(bHorz && !mpRulerImpl->aProtectItem.IsCntntProtected()) + if(bHorz && !mxRulerImpl->aProtectItem.IsCntntProtected()) { nMaxLeft = mpBorders[0].nMinPos + lNullPix; if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) nMaxRight = GetRightIndent() + lNullPix - - (mpColumnItem->Count() - 1 ) * lMinFrame; + (mxColumnItem->Count() - 1 ) * lMinFrame; else nMaxRight = mpBorders[0].nPos - lMinFrame + lNullPix; } @@ -2686,14 +2686,14 @@ void SvxRuler::CalcMinMax() { nMaxRight = ConvertPosPixel( GetPageWidth() - ( - (mpColumnItem->IsTable() && mpLRSpaceItem.get()) - ? mpLRSpaceItem->GetRight() : 0)) + (mxColumnItem->IsTable() && mxLRSpaceItem.get()) + ? mxLRSpaceItem->GetRight() : 0)) - GetMargin2() + GetMargin1(); } else { nMaxRight = lNullPix - lMinFrame; - if (mpColumnItem->IsFirstAct()) + if (mxColumnItem->IsFirstAct()) { if(bRTL) { @@ -2708,7 +2708,7 @@ void SvxRuler::CalcMinMax() std::max(GetFirstLineIndent(), GetLeftIndent())); } } - else if ( mpColumnItem->Count() > 1 ) + else if ( mxColumnItem->Count() > 1 ) { nMaxRight += mpBorders[0].nPos; } @@ -2717,9 +2717,9 @@ void SvxRuler::CalcMinMax() nMaxRight += GetRightIndent() - std::max(GetFirstLineIndent(), GetLeftIndent()); } // Do not drag the left table edge over the edge of the page - if(mpLRSpaceItem.get() && mpColumnItem->IsTable()) + if(mxLRSpaceItem.get() && mxColumnItem->IsTable()) { - long nTmp=ConvertSizePixel(mpLRSpaceItem->GetLeft()); + long nTmp=ConvertSizePixel(mxLRSpaceItem->GetLeft()); if(nTmp>nMaxLeft) nMaxLeft=nTmp; } @@ -2729,14 +2729,14 @@ void SvxRuler::CalcMinMax() } case RULER_TYPE_MARGIN2: { // right edge of the surrounding Frame - mpRulerImpl->lMaxRightLogic = - mpMinMaxItem.get() ? + mxRulerImpl->lMaxRightLogic = + mxMinMaxItem.get() ? GetPageWidth() - GetRightMax() : GetPageWidth(); - nMaxRight = ConvertSizePixel(mpRulerImpl->lMaxRightLogic); + nMaxRight = ConvertSizePixel(mxRulerImpl->lMaxRightLogic); - if(!mpColumnItem.get()) + if(!mxColumnItem.get()) { if(bRTL) { @@ -2751,29 +2751,29 @@ void SvxRuler::CalcMinMax() lMinFrame + lNullPix; } } - else if(mpRulerImpl->bIsTableRows) + else if(mxRulerImpl->bIsTableRows) { // get the bottom move range from the last border position - only available for rows! // protection of content means the margin is not moveable - it's just a page break inside of a cell - if(bHorz || mpRulerImpl->aProtectItem.IsCntntProtected()) + if(bHorz || mxRulerImpl->aProtectItem.IsCntntProtected()) { - nMaxLeft = nMaxRight = mpBorders[mpColumnItem->Count() - 1].nMaxPos + lNullPix; + nMaxLeft = nMaxRight = mpBorders[mxColumnItem->Count() - 1].nMaxPos + lNullPix; } else { if(nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL) { - nMaxLeft = (mpColumnItem->Count()) * lMinFrame + lNullPix; + nMaxLeft = (mxColumnItem->Count()) * lMinFrame + lNullPix; } else { - if(mpColumnItem->Count() > 1) - nMaxLeft = mpBorders[mpColumnItem->Count() - 2].nPos + lMinFrame + lNullPix; + if(mxColumnItem->Count() > 1) + nMaxLeft = mpBorders[mxColumnItem->Count() - 2].nPos + lMinFrame + lNullPix; else nMaxLeft = lMinFrame + lNullPix; } - if(mpColumnItem->Count() > 1) - nMaxRight = mpBorders[mpColumnItem->Count() - 2].nMaxPos + lNullPix; + if(mxColumnItem->Count() > 1) + nMaxRight = mpBorders[mxColumnItem->Count() - 2].nMaxPos + lNullPix; else nMaxRight -= GetRightIndent() - lNullPix; } @@ -2781,7 +2781,7 @@ void SvxRuler::CalcMinMax() else { nMaxLeft = lMinFrame + lNullPix; - if(IsActLastColumn() || mpColumnItem->Count() < 2 ) //If last active column + if(IsActLastColumn() || mxColumnItem->Count() < 2 ) //If last active column { if(bRTL) { @@ -2796,12 +2796,12 @@ void SvxRuler::CalcMinMax() GetLeftIndent()); } } - if( mpColumnItem->Count() >= 2 ) + if( mxColumnItem->Count() >= 2 ) { long nNewMaxLeft = lMinFrame + lNullPix + - mpBorders[mpColumnItem->Count() - 2].nPos + - mpBorders[mpColumnItem->Count() - 2].nWidth; + mpBorders[mxColumnItem->Count() - 2].nPos + + mpBorders[mxColumnItem->Count() - 2].nWidth; nMaxLeft = std::max(nMaxLeft, nNewMaxLeft); } @@ -2822,7 +2822,7 @@ void SvxRuler::CalcMinMax() nMaxLeft = lNullPix; else nMaxLeft = mpBorders[nIdx - 1].nPos + mpBorders[nIdx - 1].nWidth + lNullPix; - if(nIdx == mpColumnItem->GetActColumn()) + if(nIdx == mxColumnItem->GetActColumn()) { if(bRTL) { @@ -2846,7 +2846,7 @@ void SvxRuler::CalcMinMax() } case RULER_DRAGSIZE_MOVE: { - if(mpColumnItem.get()) + if(mxColumnItem.get()) { //nIdx contains the position of the currently moved item //next visible separator on the left @@ -2857,7 +2857,7 @@ void SvxRuler::CalcMinMax() sal_uInt16 nActLeftCol=GetActLeftColumn(); //next separator on the right - regardless if visible or not sal_uInt16 nActRightCol=GetActRightColumn(); - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { if(nDragType & DRAG_OBJECT_ACTLINE_ONLY) { @@ -2868,7 +2868,7 @@ void SvxRuler::CalcMinMax() 0 : mpBorders[nLeftCol].nPos; //rows can always be increased without a limit - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) nMaxRight = mpBorders[nIdx].nMaxPos; else nMaxRight = nRightCol == USHRT_MAX ? @@ -2879,18 +2879,18 @@ void SvxRuler::CalcMinMax() } else { - if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType && !bHorz && mpRulerImpl->bIsTableRows) + if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType && !bHorz && mxRulerImpl->bIsTableRows) nMaxLeft = (nIdx + 1) * lMinFrame + lNullPix; else nMaxLeft = mpBorders[nIdx].nMinPos + lNullPix; if(DRAG_OBJECT_SIZE_PROPORTIONAL & nDragType|| (DRAG_OBJECT_SIZE_LINEAR & nDragType) ) { - if(mpRulerImpl->bIsTableRows) + if(mxRulerImpl->bIsTableRows) { if(bHorz) nMaxRight = GetRightIndent() + lNullPix - - (mpColumnItem->Count() - nIdx - 1) * lMinFrame; + (mxColumnItem->Count() - nIdx - 1) * lMinFrame; else nMaxRight = mpBorders[nIdx].nMaxPos + lNullPix; } @@ -3009,7 +3009,7 @@ void SvxRuler::CalcMinMax() // ObjectItem else { - if(mpObjectItem->HasLimits()) + if(mxObjectItem->HasLimits()) { if(CalcLimits(nMaxLeft, nMaxRight, nIdx & 1? sal_False : sal_True)) { @@ -3028,9 +3028,9 @@ void SvxRuler::CalcMinMax() case RULER_DRAGSIZE_2: { nMaxLeft = lNullPix + mpBorders[nIdx].nPos; - if(nIdx == mpColumnItem->Count()-2) { // last column + if(nIdx == mxColumnItem->Count()-2) { // last column nMaxRight = GetMargin2() + lNullPix; - if(mpColumnItem->IsLastAct()) { + if(mxColumnItem->IsLastAct()) { nMaxRight -= GetMargin2() - GetRightIndent() + std::max(GetFirstLineIndent(), @@ -3041,7 +3041,7 @@ void SvxRuler::CalcMinMax() } else { nMaxRight = lNullPix + mpBorders[nIdx+1].nPos; - if(mpColumnItem->GetActColumn()-1 == nIdx) { + if(mxColumnItem->GetActColumn()-1 == nIdx) { nMaxRight -= mpBorders[nIdx+1].nPos - GetRightIndent() + std::max(GetFirstLineIndent(), GetLeftIndent()); @@ -3068,9 +3068,9 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix + GetRightIndent(); - if(mpColumnItem.get() && !mpColumnItem->IsFirstAct()) - nMaxLeft += mpBorders[mpColumnItem->GetActColumn()-1].nPos + - mpBorders[mpColumnItem->GetActColumn()-1].nWidth; + if(mxColumnItem.get() && !mxColumnItem->IsFirstAct()) + nMaxLeft += mpBorders[mxColumnItem->GetActColumn()-1].nPos + + mpBorders[mxColumnItem->GetActColumn()-1].nWidth; nMaxRight = lNullPix + GetMargin2(); // Dragging along @@ -3088,9 +3088,9 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix; - if(mpColumnItem.get() && !mpColumnItem->IsFirstAct()) - nMaxLeft += mpBorders[mpColumnItem->GetActColumn()-1].nPos + - mpBorders[mpColumnItem->GetActColumn()-1].nWidth; + if(mxColumnItem.get() && !mxColumnItem->IsFirstAct()) + nMaxLeft += mpBorders[mxColumnItem->GetActColumn()-1].nPos + + mpBorders[mxColumnItem->GetActColumn()-1].nWidth; nMaxRight = lNullPix + GetRightIndent() - lMinFrame; // Dragging along @@ -3112,7 +3112,7 @@ void SvxRuler::CalcMinMax() { nMaxLeft = lNullPix; nMaxRight = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()) - lMinFrame; - if(mpColumnItem.get()) + if(mxColumnItem.get()) { sal_uInt16 nRightCol=GetActRightColumn( true ); if(!IsActLastColumn( true )) @@ -3131,7 +3131,7 @@ void SvxRuler::CalcMinMax() nMaxLeft = lNullPix + std::max(GetFirstLineIndent(), GetLeftIndent()); nMaxRight = lNullPix; - if(mpColumnItem.get()) + if(mxColumnItem.get()) { sal_uInt16 nRightCol=GetActRightColumn( true ); if(!IsActLastColumn( true )) @@ -3157,8 +3157,8 @@ void SvxRuler::CalcMinMax() else nMaxLeft = lNullPix + std::min(GetFirstLineIndent(), GetLeftIndent()); - mpRulerImpl->lMaxRightLogic = GetLogicRightIndent() + lLogicNullOffset; - nMaxRight = ConvertSizePixel(mpRulerImpl->lMaxRightLogic); + mxRulerImpl->lMaxRightLogic = GetLogicRightIndent() + lLogicNullOffset; + nMaxRight = ConvertSizePixel(mxRulerImpl->lMaxRightLogic); break; default: ; //prevent warning } @@ -3176,13 +3176,13 @@ long SvxRuler::StartDrag() <SvxRuler::CalcMinMax()> <SvxRuler::EndDrag()> */ - bool bContentProtected = mpRulerImpl->aProtectItem.IsCntntProtected(); + bool bContentProtected = mxRulerImpl->aProtectItem.IsCntntProtected(); if(!bValid) return sal_False; - mpRulerImpl->lLastLMargin = GetMargin1(); - mpRulerImpl->lLastRMargin = GetMargin2(); + mxRulerImpl->lLastLMargin = GetMargin1(); + mxRulerImpl->lLastRMargin = GetMargin2(); long bOk = 1; @@ -3196,9 +3196,9 @@ long SvxRuler::StartDrag() { case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame - if((bHorz && mpLRSpaceItem.get()) || (!bHorz && mpULSpaceItem.get())) + if((bHorz && mxLRSpaceItem.get()) || (!bHorz && mxULSpaceItem.get())) { - if(!mpColumnItem.get()) + if(!mxColumnItem.get()) EvalModifier(); else nDragType = DRAG_OBJECT; @@ -3209,10 +3209,10 @@ long SvxRuler::StartDrag() } break; case RULER_TYPE_BORDER: // Table, column (Modifier) - if(mpColumnItem.get()) + if(mxColumnItem.get()) { nDragOffset = 0; - if (!mpColumnItem->IsTable()) + if (!mxColumnItem->IsTable()) nDragOffset = GetDragPos() - mpBorders[GetDragAryPos()].nPos; EvalModifier(); } @@ -3270,19 +3270,19 @@ void SvxRuler::Drag() switch(GetDragType()) { case RULER_TYPE_MARGIN1: // left edge of the surrounding Frame DragMargin1(); - mpRulerImpl->lLastLMargin = GetMargin1(); + mxRulerImpl->lLastLMargin = GetMargin1(); break; case RULER_TYPE_MARGIN2: // right edge of the surrounding Frame DragMargin2(); - mpRulerImpl->lLastRMargin = GetMargin2(); + mxRulerImpl->lLastRMargin = GetMargin2(); break; case RULER_TYPE_INDENT: // Paragraph indents DragIndents(); break; case RULER_TYPE_BORDER: // Table, columns - if(mpColumnItem.get()) + if(mxColumnItem.get()) DragBorders(); - else if(mpObjectItem.get()) + else if(mxObjectItem.get()) DragObjectBorder(); break; case RULER_TYPE_TAB: // Tabs @@ -3313,11 +3313,11 @@ void SvxRuler::EndDrag() case RULER_TYPE_MARGIN1: // upper left edge of the surrounding Frame case RULER_TYPE_MARGIN2: // lower right edge of the surrounding Frame { - if(!mpColumnItem.get() || !mpColumnItem->IsTable()) + if(!mxColumnItem.get() || !mxColumnItem->IsTable()) ApplyMargins(); - if(mpColumnItem.get() && - (mpColumnItem->IsTable() || + if(mxColumnItem.get() && + (mxColumnItem->IsTable() || (nDragType & DRAG_OBJECT_SIZE_PROPORTIONAL))) ApplyBorders(); @@ -3325,15 +3325,15 @@ void SvxRuler::EndDrag() break; case RULER_TYPE_BORDER: // Table, columns if(lInitialDragPos != lPos || - (mpRulerImpl->bIsTableRows && bHorz)) //special case - the null offset is changed here + (mxRulerImpl->bIsTableRows && bHorz)) //special case - the null offset is changed here { - if(mpColumnItem.get()) + if(mxColumnItem.get()) { ApplyBorders(); if(bHorz) UpdateTabs(); } - else if(mpObjectItem.get()) + else if(mxObjectItem.get()) ApplyObject(); } break; @@ -3361,7 +3361,7 @@ void SvxRuler::EndDrag() Ruler::EndDrag(); if(bUndo) { - for(sal_uInt16 i = 0; i < mpRulerImpl->nControlerItems; i++) + for(sal_uInt16 i = 0; i < mxRulerImpl->nControlerItems; i++) { pCtrlItem[i]->ClearCache(); pCtrlItem[i]->GetBindings().Invalidate(pCtrlItem[i]->GetId()); @@ -3374,7 +3374,7 @@ void SvxRuler::ExtraDown() /* Override SV method, sets the new type for the Default tab. */ // Switch Tab Type - if(mpTabStopItem.get() && + if(mxTabStopItem.get() && (nFlags & SVXRULER_SUPPORT_TABS) == SVXRULER_SUPPORT_TABS) { ++nDefTabType; @@ -3417,16 +3417,16 @@ IMPL_LINK_INLINE_END( SvxRuler, MenuSelect, Menu *, pMenu ) IMPL_LINK( SvxRuler, TabMenuSelect, Menu *, pMenu ) { /* Handler of the tab menu for setting the type */ - if(mpTabStopItem.get() && mpTabStopItem->Count() > mpRulerImpl->nIdx) + if(mxTabStopItem.get() && mxTabStopItem->Count() > mxRulerImpl->nIdx) { - SvxTabStop aTabStop = mpTabStopItem->At(mpRulerImpl->nIdx); + SvxTabStop aTabStop = mxTabStopItem->At(mxRulerImpl->nIdx); aTabStop.GetAdjustment() = ToAttrTab_Impl(pMenu->GetCurItemId() - 1); - mpTabStopItem->Remove(mpRulerImpl->nIdx); - mpTabStopItem->Insert(aTabStop); + mxTabStopItem->Remove(mxRulerImpl->nIdx); + mxTabStopItem->Insert(aTabStop); sal_uInt16 nTabStopId = bHorz ? SID_ATTR_TABSTOP : SID_ATTR_TABSTOP_VERTICAL; - pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mpTabStopItem.get(), 0L ); + pBindings->GetDispatcher()->Execute( nTabStopId, SfxCallMode::RECORD, mxTabStopItem.get(), 0L ); UpdateTabs(); - mpRulerImpl->nIdx = 0; + mxRulerImpl->nIdx = 0; } return 0; } @@ -3437,11 +3437,11 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) if ( COMMAND_CONTEXTMENU == rCommandEvent.GetCommand() ) { CancelDrag(); - bool bRTL = mpRulerImpl->pTextRTLItem && mpRulerImpl->pTextRTLItem->GetValue(); + bool bRTL = mxRulerImpl->pTextRTLItem && mxRulerImpl->pTextRTLItem->GetValue(); if ( !mpTabs.empty() && RULER_TYPE_TAB == - GetType( rCommandEvent.GetMousePosPixel(), &mpRulerImpl->nIdx ) && - mpTabs[mpRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT ) + GetType( rCommandEvent.GetMousePosPixel(), &mxRulerImpl->nIdx ) && + mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle < RULER_TAB_DEFAULT ) { PopupMenu aMenu; aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect)); @@ -3460,7 +3460,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) aMenu.InsertItem(i + 1, ResId(RID_SVXSTR_RULER_START + i, DIALOG_MGR()).toString(), Image(aDev.GetBitmap(Point(), aSz), Color(COL_WHITE))); - aMenu.CheckItem(i + 1, i == mpTabs[mpRulerImpl->nIdx + TAB_GAP].nStyle); + aMenu.CheckItem(i + 1, i == mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle); aDev.SetOutputSize(aSz); // delete device } aMenu.Execute( this, rCommandEvent.GetMousePosPixel() ); @@ -3510,16 +3510,16 @@ sal_uInt16 SvxRuler::GetActRightColumn( sal_uInt16 nAct ) const { if( nAct == USHRT_MAX ) - nAct = mpColumnItem->GetActColumn(); + nAct = mxColumnItem->GetActColumn(); else nAct++; //To be able to pass on the ActDrag bool bConsiderHidden = !bForceDontConsiderHidden && !(nDragType & DRAG_OBJECT_ACTLINE_ONLY); - while( nAct < mpColumnItem->Count() - 1 ) + while( nAct < mxColumnItem->Count() - 1 ) { - if (mpColumnItem->At(nAct).bVisible || bConsiderHidden) + if (mxColumnItem->At(nAct).bVisible || bConsiderHidden) return nAct; else nAct++; @@ -3532,7 +3532,7 @@ sal_uInt16 SvxRuler::GetActLeftColumn( sal_uInt16 nAct ) const { if(nAct == USHRT_MAX) - nAct = mpColumnItem->GetActColumn(); + nAct = mxColumnItem->GetActColumn(); sal_uInt16 nLeftOffset = 1; @@ -3541,7 +3541,7 @@ sal_uInt16 SvxRuler::GetActLeftColumn( while(nAct >= nLeftOffset) { - if (mpColumnItem->At(nAct - nLeftOffset).bVisible || bConsiderHidden) + if (mxColumnItem->At(nAct - nLeftOffset).bVisible || bConsiderHidden) return nAct - nLeftOffset; else nLeftOffset++; @@ -3578,7 +3578,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const long lColumns = 0; sal_uInt16 nStart; - if(!mpColumnItem->IsTable()) + if(!mxColumnItem->IsTable()) { if(nCol == USHRT_MAX) { @@ -3626,7 +3626,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const if(nActCol == USHRT_MAX) { nRight = 0; - while(!(*mpColumnItem.get())[nRight].bVisible) + while(!(*mxColumnItem.get())[nRight].bVisible) { nRight++; } @@ -3659,12 +3659,12 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const } else { - if(mpColumnItem->IsTable()) + if(mxColumnItem->IsTable()) { sal_uInt16 nVisCols = 0; for(sal_uInt16 i = GetActRightColumn(false, nCol); i < mpBorders.size();) { - if((*mpColumnItem.get())[i].bVisible) + if((*mxColumnItem.get())[i].bVisible) nVisCols++; i = GetActRightColumn(false, i); } @@ -3685,7 +3685,7 @@ long SvxRuler::CalcPropMaxRight(sal_uInt16 nCol) const // Tab stops relative to indent (#i24363#) void SvxRuler::SetTabsRelativeToIndent( bool bRel ) { - mpRulerImpl->bIsTabsRelativeToIndent = bRel; + mxRulerImpl->bIsTabsRelativeToIndent = bRel; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx index f2d1390580a2..5a1971ad4e68 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx @@ -32,21 +32,15 @@ AreaTransparencyGradientPopup::AreaTransparencyGradientPopup ( { } - - - AreaTransparencyGradientPopup::~AreaTransparencyGradientPopup (void) { } - - - void AreaTransparencyGradientPopup::Rearrange (XFillFloatTransparenceItem* pItem) { ProvideContainerAndControl(); - AreaTransparencyGradientControl* pControl = dynamic_cast<AreaTransparencyGradientControl*>(mpControl.get()); + AreaTransparencyGradientControl* pControl = dynamic_cast<AreaTransparencyGradientControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(pItem); } diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index fe464a415700..5e587821b21a 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -38,31 +38,22 @@ LineWidthPopup::LineWidthPopup ( SetPopupModeEndHandler(::boost::bind(&LineWidthPopup::PopupModeEndCallback, this)); } - - - LineWidthPopup::~LineWidthPopup (void) { } - - - void LineWidthPopup::SetWidthSelect (long lValue, bool bValuable, SfxMapUnit eMapUnit) { ProvideContainerAndControl(); - LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mpControl.get()); + LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get()); if (pControl != NULL) pControl->SetWidthSelect(lValue, bValuable, eMapUnit); } - - - void LineWidthPopup::PopupModeEndCallback (void) { - LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mpControl.get()); + LineWidthControl* pControl = dynamic_cast<LineWidthControl*>(mxControl.get()); if (pControl != NULL) { if (pControl->IsCloseByEdit()) diff --git a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx index 7a4fe17f94db..57ea21ad0c52 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingPopup.cxx @@ -34,21 +34,15 @@ TextCharacterSpacingPopup::TextCharacterSpacingPopup ( SetPopupModeEndHandler(::boost::bind(&TextCharacterSpacingPopup::PopupModeEndCallback, this)); } - - - TextCharacterSpacingPopup::~TextCharacterSpacingPopup (void) { } - - - void TextCharacterSpacingPopup::Rearrange (bool bLBAvailable,bool bAvailable, long nKerning) { ProvideContainerAndControl(); - TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mpControl.get()); + TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(bLBAvailable,bAvailable,nKerning); } @@ -56,7 +50,7 @@ void TextCharacterSpacingPopup::Rearrange (bool bLBAvailable,bool bAvailable, lo void TextCharacterSpacingPopup::PopupModeEndCallback (void) { ProvideContainerAndControl(); - TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mpControl.get()); + TextCharacterSpacingControl* pControl = dynamic_cast<TextCharacterSpacingControl*>(mxControl.get()); if (pControl == NULL) return; diff --git a/svx/source/sidebar/text/TextUnderlinePopup.cxx b/svx/source/sidebar/text/TextUnderlinePopup.cxx index b71e33b4303c..0aab2b4e58a9 100644 --- a/svx/source/sidebar/text/TextUnderlinePopup.cxx +++ b/svx/source/sidebar/text/TextUnderlinePopup.cxx @@ -32,21 +32,15 @@ TextUnderlinePopup::TextUnderlinePopup ( { } - - - TextUnderlinePopup::~TextUnderlinePopup (void) { } - - - void TextUnderlinePopup::Rearrange (FontUnderline eLine) { ProvideContainerAndControl(); - TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mpControl.get()); + TextUnderlineControl* pControl = dynamic_cast<TextUnderlineControl*>(mxControl.get()); if (pControl != NULL) pControl->Rearrange(eLine); } diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx index 2744547cbec3..18109ec39f9d 100644 --- a/svx/source/sidebar/tools/Popup.cxx +++ b/svx/source/sidebar/tools/Popup.cxx @@ -29,86 +29,71 @@ Popup::Popup ( vcl::Window* pParent, const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator, const ::rtl::OUString& rsAccessibleName) - : mpControl(), + : mxControl(), mpParent(pParent), maControlCreator(rControlCreator), maPopupModeEndCallback(), msAccessibleName(rsAccessibleName), - mpContainer() + mxContainer() { OSL_ASSERT(mpParent!=NULL); OSL_ASSERT(maControlCreator); } - - - Popup::~Popup (void) { - mpControl.reset(); - mpContainer.reset(); + mxControl.reset(); + mxContainer.reset(); } - - - void Popup::Show (ToolBox& rToolBox) { rToolBox.SetItemDown(rToolBox.GetCurItemId(), true); ProvideContainerAndControl(); - if ( ! (mpContainer && mpControl)) + if ( ! (mxContainer && mxControl)) { - OSL_ASSERT(mpContainer); - OSL_ASSERT(mpControl); + OSL_ASSERT(mxContainer); + OSL_ASSERT(mxControl); return; } - if ( !mpContainer->IsInPopupMode() ) + if ( !mxContainer->IsInPopupMode() ) { - mpContainer->SetSizePixel(mpControl->GetOutputSizePixel()); + mxContainer->SetSizePixel(mxControl->GetOutputSizePixel()); const Point aPos (rToolBox.GetParent()->OutputToScreenPixel(rToolBox.GetPosPixel())); const Size aSize (rToolBox.GetSizePixel()); const Rectangle aRect (aPos, aSize); - mpContainer->StartPopupMode( + mxContainer->StartPopupMode( aRect, FLOATWIN_POPUPMODE_NOFOCUSCLOSE|FLOATWIN_POPUPMODE_DOWN); - mpContainer->SetPopupModeFlags( - mpContainer->GetPopupModeFlags() + mxContainer->SetPopupModeFlags( + mxContainer->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE); - mpControl->GetFocus(); + mxControl->GetFocus(); } } - - - void Popup::Hide (void) { - if (mpContainer) - if (mpContainer->IsInPopupMode()) - mpContainer->EndPopupMode(); + if (mxContainer) + if (mxContainer->IsInPopupMode()) + mxContainer->EndPopupMode(); } - - - void Popup::SetPopupModeEndHandler (const ::boost::function<void(void)>& rCallback) { maPopupModeEndCallback = rCallback; - if (mpContainer) - mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); + if (mxContainer) + mxContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); } - - - void Popup::ProvideContainerAndControl (void) { - if ( ! (mpContainer && mpControl) + if ( ! (mxContainer && mxControl) && mpParent!=NULL && maControlCreator) { @@ -116,30 +101,24 @@ void Popup::ProvideContainerAndControl (void) } } - - - void Popup::CreateContainerAndControl (void) { - mpContainer.reset(new PopupContainer(mpParent)); - mpContainer->SetAccessibleName(msAccessibleName); - mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); - mpContainer->SetBorderStyle(mpContainer->GetBorderStyle() | WindowBorderStyle::MENU); + mxContainer.reset(new PopupContainer(mpParent)); + mxContainer->SetAccessibleName(msAccessibleName); + mxContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler)); + mxContainer->SetBorderStyle(mxContainer->GetBorderStyle() | WindowBorderStyle::MENU); - mpControl.reset(maControlCreator(mpContainer.get())); + mxControl.reset(maControlCreator(mxContainer.get())); } - - - IMPL_LINK(Popup, PopupModeEndHandler, void*, EMPTYARG) { if (maPopupModeEndCallback) maPopupModeEndCallback(); // Popup control is no longer needed and can be destroyed. - mpControl.reset(); - mpContainer.reset(); + mxControl.reset(); + mxContainer.reset(); return 0; } diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index c2e0f218c6e9..52ef58c81f30 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -74,23 +74,23 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const sal_uInt16 nRet = 0; if ( nOffset < nSliderXOffset ) - return mpImpl->mnMinZoom; + return mxImpl->mnMinZoom; if ( nOffset > nControlWidth - nSliderXOffset ) - return mpImpl->mnMaxZoom; + return mxImpl->mnMaxZoom; // check for snapping points: sal_uInt16 nCount = 0; std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); + for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); + aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); ++aSnappingPointIter ) { const long nCurrent = *aSnappingPointIter; if ( std::abs(nCurrent - nOffset) < nSnappingEpsilon ) { nOffset = nCurrent; - nRet = mpImpl->maSnappingPointZooms[ nCount ]; + nRet = mxImpl->maSnappingPointZooms[ nCount ]; break; } ++nCount; @@ -101,27 +101,27 @@ sal_uInt16 SvxZoomSliderControl::Offset2Zoom( long nOffset ) const if ( nOffset < nControlWidth / 2 ) { // first half of slider - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth; const long nOffsetToSliderLeft = nOffset - nSliderXOffset; - nRet = mpImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); + nRet = mxImpl->mnMinZoom + sal_uInt16( nOffsetToSliderLeft * nZoomPerSliderPixel / 1000 ); } else { // second half of slider - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth; const long nOffsetToSliderCenter = nOffset - nControlWidth/2; - nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); + nRet = mxImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); } } - if ( nRet < mpImpl->mnMinZoom ) - nRet = mpImpl->mnMinZoom; - else if ( nRet > mpImpl->mnMaxZoom ) - nRet = mpImpl->mnMaxZoom; + if ( nRet < mxImpl->mnMinZoom ) + nRet = mxImpl->mnMinZoom; + else if ( nRet > mxImpl->mnMaxZoom ) + nRet = mxImpl->mnMaxZoom; return nRet; } @@ -134,18 +134,18 @@ long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; - if ( nCurrentZoom <= mpImpl->mnSliderCenter ) + if ( nCurrentZoom <= mxImpl->mnSliderCenter ) { - nCurrentZoom = nCurrentZoom - mpImpl->mnMinZoom; - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + nCurrentZoom = nCurrentZoom - mxImpl->mnMinZoom; + const long nFirstHalfRange = mxImpl->mnSliderCenter - mxImpl->mnMinZoom; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nFirstHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRet += nOffset; } else { - nCurrentZoom = nCurrentZoom - mpImpl->mnSliderCenter; - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + nCurrentZoom = nCurrentZoom - mxImpl->mnSliderCenter; + const long nSecondHalfRange = mxImpl->mnMaxZoom - mxImpl->mnSliderCenter; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nSecondHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRet += nHalfSliderWidth + nOffset; @@ -156,17 +156,17 @@ long SvxZoomSliderControl::Zoom2Offset( sal_uInt16 nCurrentZoom ) const SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStatusBar ) : SfxStatusBarControl( _nSlotId, _nId, rStatusBar ), - mpImpl( new SvxZoomSliderControl_Impl ) + mxImpl( new SvxZoomSliderControl_Impl ) { - mpImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) ); - mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); - mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); + mxImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) ); + mxImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); + mxImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); //#ifndef MACOSX sal_Int32 nScaleFactor = rStatusBar.GetDPIScaleFactor(); if (nScaleFactor != 1) { - Image arr[3] = {mpImpl->maSliderButton, mpImpl->maIncreaseButton, mpImpl->maDecreaseButton}; + Image arr[3] = {mxImpl->maSliderButton, mxImpl->maIncreaseButton, mxImpl->maDecreaseButton}; for (int i = 0; i < 3; i++) { @@ -175,9 +175,9 @@ SvxZoomSliderControl::SvxZoomSliderControl( sal_uInt16 _nSlotId, sal_uInt16 _nI aBitmap.Scale(nScaleFactor, nScaleFactor, i == 0 ? BMP_SCALE_LANCZOS : BMP_SCALE_FAST); arr[i] = Image(aBitmap); } - mpImpl->maSliderButton = arr[0]; - mpImpl->maIncreaseButton = arr[1]; - mpImpl->maDecreaseButton = arr[2]; + mxImpl->maSliderButton = arr[0]; + mxImpl->maIncreaseButton = arr[1]; + mxImpl->maDecreaseButton = arr[2]; } //#endif } @@ -191,30 +191,30 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat if ( (SfxItemState::DEFAULT != eState) || pState->ISA( SfxVoidItem ) ) { GetStatusBar().SetItemText( GetId(), "" ); - mpImpl->mbValuesSet = false; + mxImpl->mbValuesSet = false; } else { OSL_ENSURE( pState->ISA( SvxZoomSliderItem ), "invalid item type: should be a SvxZoomSliderItem" ); - mpImpl->mnCurrentZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetValue(); - mpImpl->mnMinZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMinZoom(); - mpImpl->mnMaxZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMaxZoom(); - mpImpl->mnSliderCenter= 100; - mpImpl->mbValuesSet = true; + mxImpl->mnCurrentZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetValue(); + mxImpl->mnMinZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMinZoom(); + mxImpl->mnMaxZoom = static_cast<const SvxZoomSliderItem*>( pState )->GetMaxZoom(); + mxImpl->mnSliderCenter= 100; + mxImpl->mbValuesSet = true; - if ( mpImpl->mnSliderCenter == mpImpl->mnMaxZoom ) - mpImpl->mnSliderCenter = mpImpl->mnMinZoom + (sal_uInt16)((mpImpl->mnMaxZoom - mpImpl->mnMinZoom) * 0.5); + if ( mxImpl->mnSliderCenter == mxImpl->mnMaxZoom ) + mxImpl->mnSliderCenter = mxImpl->mnMinZoom + (sal_uInt16)((mxImpl->mnMaxZoom - mxImpl->mnMinZoom) * 0.5); - DBG_ASSERT( mpImpl->mnMinZoom <= mpImpl->mnCurrentZoom && - mpImpl->mnMinZoom < mpImpl->mnSliderCenter && - mpImpl->mnMaxZoom >= mpImpl->mnCurrentZoom && - mpImpl->mnMaxZoom > mpImpl->mnSliderCenter, + DBG_ASSERT( mxImpl->mnMinZoom <= mxImpl->mnCurrentZoom && + mxImpl->mnMinZoom < mxImpl->mnSliderCenter && + mxImpl->mnMaxZoom >= mxImpl->mnCurrentZoom && + mxImpl->mnMaxZoom > mxImpl->mnSliderCenter, "Looks like the zoom slider item is corrupted" ); const com::sun::star::uno::Sequence < sal_Int32 > rSnappingPoints = static_cast<const SvxZoomSliderItem*>( pState )->GetSnappingPoints(); - mpImpl->maSnappingPointOffsets.clear(); - mpImpl->maSnappingPointZooms.clear(); + mxImpl->maSnappingPointOffsets.clear(); + mxImpl->maSnappingPointZooms.clear(); // get all snapping points: std::set< sal_uInt16 > aTmpSnappingPoints; @@ -235,20 +235,20 @@ void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eStat if ( nCurrentOffset - nLastOffset >= nSnappingPointsMinDist ) { - mpImpl->maSnappingPointOffsets.push_back( nCurrentOffset ); - mpImpl->maSnappingPointZooms.push_back( nCurrent ); + mxImpl->maSnappingPointOffsets.push_back( nCurrentOffset ); + mxImpl->maSnappingPointZooms.push_back( nCurrent ); nLastOffset = nCurrentOffset; } } } - if (!mpImpl->mbOmitPaint) + if (!mxImpl->mbOmitPaint) forceRepaint(); } void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) { - if ( !mpImpl->mbValuesSet || mpImpl->mbOmitPaint ) + if ( !mxImpl->mbValuesSet || mxImpl->mbOmitPaint ) return; const Rectangle aControlRect = getControlRect(); @@ -274,8 +274,8 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) // draw snapping points: std::vector< long >::iterator aSnappingPointIter; - for ( aSnappingPointIter = mpImpl->maSnappingPointOffsets.begin(); - aSnappingPointIter != mpImpl->maSnappingPointOffsets.end(); + for ( aSnappingPointIter = mxImpl->maSnappingPointOffsets.begin(); + aSnappingPointIter != mxImpl->maSnappingPointOffsets.end(); ++aSnappingPointIter ) { long nSnapPosX = aRect.Left() + *aSnappingPointIter; @@ -289,20 +289,20 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) // draw slider button Point aImagePoint = aRect.TopLeft(); - aImagePoint.X() += Zoom2Offset( mpImpl->mnCurrentZoom ); - aImagePoint.X() -= mpImpl->maSliderButton.GetSizePixel().Width()/2; - aImagePoint.Y() += (aControlRect.GetHeight() - mpImpl->maSliderButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maSliderButton ); + aImagePoint.X() += Zoom2Offset( mxImpl->mnCurrentZoom ); + aImagePoint.X() -= mxImpl->maSliderButton.GetSizePixel().Width()/2; + aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maSliderButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maSliderButton ); // draw decrease button aImagePoint = aRect.TopLeft(); - aImagePoint.X() += (nSliderXOffset - mpImpl->maDecreaseButton.GetSizePixel().Width())/2; - aImagePoint.Y() += (aControlRect.GetHeight() - mpImpl->maDecreaseButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maDecreaseButton ); + aImagePoint.X() += (nSliderXOffset - mxImpl->maDecreaseButton.GetSizePixel().Width())/2; + aImagePoint.Y() += (aControlRect.GetHeight() - mxImpl->maDecreaseButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maDecreaseButton ); // draw increase button - aImagePoint.X() = aRect.TopLeft().X() + aControlRect.GetWidth() - mpImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mpImpl->maIncreaseButton.GetSizePixel().Height())/2; - pDev->DrawImage( aImagePoint, mpImpl->maIncreaseButton ); + aImagePoint.X() = aRect.TopLeft().X() + aControlRect.GetWidth() - mxImpl->maIncreaseButton.GetSizePixel().Width() - (nSliderXOffset - mxImpl->maIncreaseButton.GetSizePixel().Height())/2; + pDev->DrawImage( aImagePoint, mxImpl->maIncreaseButton ); pDev->SetLineColor( aOldLineColor ); pDev->SetFillColor( aOldFillColor ); @@ -310,40 +310,40 @@ void SvxZoomSliderControl::Paint( const UserDrawEvent& rUsrEvt ) bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) { - if ( !mpImpl->mbValuesSet ) + if ( !mxImpl->mbValuesSet ) return true; const Rectangle aControlRect = getControlRect(); const Point aPoint = rEvt.GetPosPixel(); const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); - long nIncDecWidth = mpImpl->maIncreaseButton.GetSizePixel().Width(); + long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width(); const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2; const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2; - const long nOldZoom = mpImpl->mnCurrentZoom; + const long nOldZoom = mxImpl->mnCurrentZoom; // click to - button if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset ) - mpImpl->mnCurrentZoom = basegfx::zoomtools::zoomOut( static_cast<int>(mpImpl->mnCurrentZoom) ); + mxImpl->mnCurrentZoom = basegfx::zoomtools::zoomOut( static_cast<int>(mxImpl->mnCurrentZoom) ); // click to + button else if ( nXDiff >= aControlRect.GetWidth() - nSliderXOffset + nButtonLeftOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset + nButtonRightOffset ) - mpImpl->mnCurrentZoom = basegfx::zoomtools::zoomIn( static_cast<int>(mpImpl->mnCurrentZoom) ); + mxImpl->mnCurrentZoom = basegfx::zoomtools::zoomIn( static_cast<int>(mxImpl->mnCurrentZoom) ); // click to slider else if( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset ) { - mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); - mpImpl->mbDraggingStarted = true; + mxImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); + mxImpl->mbDraggingStarted = true; } - if ( mpImpl->mnCurrentZoom < mpImpl->mnMinZoom ) - mpImpl->mnCurrentZoom = mpImpl->mnMinZoom; - else if ( mpImpl->mnCurrentZoom > mpImpl->mnMaxZoom ) - mpImpl->mnCurrentZoom = mpImpl->mnMaxZoom; + if ( mxImpl->mnCurrentZoom < mxImpl->mnMinZoom ) + mxImpl->mnCurrentZoom = mxImpl->mnMinZoom; + else if ( mxImpl->mnCurrentZoom > mxImpl->mnMaxZoom ) + mxImpl->mnCurrentZoom = mxImpl->mnMaxZoom; - if ( nOldZoom == mpImpl->mnCurrentZoom ) + if ( nOldZoom == mxImpl->mnCurrentZoom ) return true; repaintAndExecute(); @@ -353,13 +353,13 @@ bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt ) bool SvxZoomSliderControl::MouseButtonUp( const MouseEvent & ) { - mpImpl->mbDraggingStarted = false; + mxImpl->mbDraggingStarted = false; return true; } bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) { - if ( !mpImpl->mbValuesSet ) + if ( !mxImpl->mbValuesSet ) return true; const short nButtons = rEvt.GetButtons(); @@ -368,11 +368,11 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left(); // check mouse move with button pressed - if ( 1 == nButtons && mpImpl->mbDraggingStarted ) + if ( 1 == nButtons && mxImpl->mbDraggingStarted ) { if ( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset ) { - mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); + mxImpl->mnCurrentZoom = Offset2Zoom( nXDiff ); repaintAndExecute(); } @@ -380,7 +380,7 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) // Tooltips - long nIncDecWidth = mpImpl->maIncreaseButton.GetSizePixel().Width(); + long nIncDecWidth = mxImpl->maIncreaseButton.GetSizePixel().Width(); const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2; const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2; @@ -408,11 +408,11 @@ void SvxZoomSliderControl::repaintAndExecute() { forceRepaint(); - mpImpl->mbOmitPaint = true; // optimization: paint before executing command, + mxImpl->mbOmitPaint = true; // optimization: paint before executing command, // then omit painting which is triggered by the execute function // commit state change - SvxZoomSliderItem aZoomSliderItem(mpImpl->mnCurrentZoom); + SvxZoomSliderItem aZoomSliderItem(mxImpl->mnCurrentZoom); css::uno::Any any; aZoomSliderItem.QueryValue(any); @@ -423,7 +423,7 @@ void SvxZoomSliderControl::repaintAndExecute() execute(aArgs); - mpImpl->mbOmitPaint = false; + mxImpl->mbOmitPaint = false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9d21a5eb6eab..2bead84706f1 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -83,13 +83,13 @@ TYPEINIT1( SdrMediaObj, SdrRectObj ); SdrMediaObj::SdrMediaObj() : SdrRectObj() - , m_pImpl( new Impl() ) + , m_xImpl( new Impl() ) { } SdrMediaObj::SdrMediaObj( const Rectangle& rRect ) : SdrRectObj( rRect ) - , m_pImpl( new Impl() ) + , m_xImpl( new Impl() ) { } @@ -169,22 +169,22 @@ SdrMediaObj& SdrMediaObj::operator=(const SdrMediaObj& rObj) return *this; SdrRectObj::operator=( rObj ); - m_pImpl->m_pTempFile = rObj.m_pImpl->m_pTempFile; // before props + m_xImpl->m_pTempFile = rObj.m_xImpl->m_pTempFile; // before props setMediaProperties( rObj.getMediaProperties() ); - m_pImpl->m_xCachedSnapshot = rObj.m_pImpl->m_xCachedSnapshot; + m_xImpl->m_xCachedSnapshot = rObj.m_xImpl->m_xCachedSnapshot; return *this; } const uno::Reference< graphic::XGraphic > SdrMediaObj::getSnapshot() const { - if( !m_pImpl->m_xCachedSnapshot.is() ) + if( !m_xImpl->m_xCachedSnapshot.is() ) { - OUString aRealURL = m_pImpl->m_MediaProperties.getTempURL(); + OUString aRealURL = m_xImpl->m_MediaProperties.getTempURL(); if( aRealURL.isEmpty() ) - aRealURL = m_pImpl->m_MediaProperties.getURL(); - m_pImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_pImpl->m_MediaProperties.getReferer(), m_pImpl->m_MediaProperties.getMimeType()); + aRealURL = m_xImpl->m_MediaProperties.getURL(); + m_xImpl->m_xCachedSnapshot = avmedia::MediaWindow::grabFrame( aRealURL, m_xImpl->m_MediaProperties.getReferer(), m_xImpl->m_MediaProperties.getMimeType()); } - return m_pImpl->m_xCachedSnapshot; + return m_xImpl->m_xCachedSnapshot; } void SdrMediaObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly /* = false */ ) @@ -235,14 +235,14 @@ void SdrMediaObj::setURL( const OUString& rURL, const OUString& rReferer, const { ::avmedia::MediaItem aURLItem; if( !rMimeType.isEmpty() ) - m_pImpl->m_MediaProperties.setMimeType(rMimeType); + m_xImpl->m_MediaProperties.setMimeType(rMimeType); aURLItem.setURL( rURL, "", rReferer ); setMediaProperties( aURLItem ); } const OUString& SdrMediaObj::getURL() const { - return m_pImpl->m_MediaProperties.getURL(); + return m_xImpl->m_MediaProperties.getURL(); } void SdrMediaObj::setMediaProperties( const ::avmedia::MediaItem& rState ) @@ -253,7 +253,7 @@ void SdrMediaObj::setMediaProperties( const ::avmedia::MediaItem& rState ) const ::avmedia::MediaItem& SdrMediaObj::getMediaProperties() const { - return m_pImpl->m_MediaProperties; + return m_xImpl->m_MediaProperties; } Size SdrMediaObj::getPreferredSize() const @@ -263,12 +263,12 @@ Size SdrMediaObj::getPreferredSize() const uno::Reference<io::XInputStream> SdrMediaObj::GetInputStream() { - if (!m_pImpl->m_pTempFile) + if (!m_xImpl->m_pTempFile) { SAL_WARN("svx", "this is only intended for embedded media"); return 0; } - ucbhelper::Content tempFile(m_pImpl->m_pTempFile->m_TempFileURL, + ucbhelper::Content tempFile(m_xImpl->m_pTempFile->m_TempFileURL, uno::Reference<ucb::XCommandEnvironment>(), comphelper::getProcessComponentContext()); return tempFile.openStream(); @@ -367,7 +367,7 @@ static bool lcl_CopyToTempFile( void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream) { - if (m_pImpl->m_pTempFile || m_pImpl->m_LastFailedPkgURL.isEmpty()) + if (m_xImpl->m_pTempFile || m_xImpl->m_LastFailedPkgURL.isEmpty()) { SAL_WARN("svx", "this is only intended for embedded media"); return; @@ -376,11 +376,11 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream bool const bSuccess = lcl_CopyToTempFile(xStream, tempFileURL); if (bSuccess) { - m_pImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL, "")); - m_pImpl->m_MediaProperties.setURL( - m_pImpl->m_LastFailedPkgURL, tempFileURL, ""); + m_xImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL, "")); + m_xImpl->m_MediaProperties.setURL( + m_xImpl->m_LastFailedPkgURL, tempFileURL, ""); } - m_pImpl->m_LastFailedPkgURL.clear(); // once only + m_xImpl->m_LastFailedPkgURL.clear(); // once only } /// copy a stream from XStorage to temp file @@ -424,17 +424,17 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper // use only a subset of MediaItem properties for own own properties if( AVMEDIA_SETMASK_MIME_TYPE & nMaskSet ) - m_pImpl->m_MediaProperties.setMimeType( rNewProperties.getMimeType() ); + m_xImpl->m_MediaProperties.setMimeType( rNewProperties.getMimeType() ); if( ( AVMEDIA_SETMASK_URL & nMaskSet ) && ( rNewProperties.getURL() != getURL() )) { - m_pImpl->m_xCachedSnapshot.clear(); + m_xImpl->m_xCachedSnapshot.clear(); OUString const url(rNewProperties.getURL()); if (url.startsWithIgnoreAsciiCase("vnd.sun.star.Package:")) { - if ( !m_pImpl->m_pTempFile - || (m_pImpl->m_pTempFile->m_TempFileURL != + if ( !m_xImpl->m_pTempFile + || (m_xImpl->m_pTempFile->m_TempFileURL != rNewProperties.getTempURL())) { OUString tempFileURL; @@ -448,44 +448,44 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper bSuccess = lcl_HandlePackageURL(url, GetModel(), tempFileURL); if (bSuccess) { - m_pImpl->m_pTempFile.reset( + m_xImpl->m_pTempFile.reset( new MediaTempFile(tempFileURL, tempDirURL)); - m_pImpl->m_MediaProperties.setURL(url, tempFileURL, ""); + m_xImpl->m_MediaProperties.setURL(url, tempFileURL, ""); } else // this case is for Clone via operator= { - m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL("", "", ""); + m_xImpl->m_pTempFile.reset(); + m_xImpl->m_MediaProperties.setURL("", "", ""); // UGLY: oox import also gets here, because unlike ODF // getDocumentStorage() is not the imported file... - m_pImpl->m_LastFailedPkgURL = url; + m_xImpl->m_LastFailedPkgURL = url; } } else { - m_pImpl->m_MediaProperties.setURL(url, + m_xImpl->m_MediaProperties.setURL(url, rNewProperties.getTempURL(), ""); } } else { - m_pImpl->m_pTempFile.reset(); - m_pImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer()); + m_xImpl->m_pTempFile.reset(); + m_xImpl->m_MediaProperties.setURL(url, "", rNewProperties.getReferer()); } bBroadcastChanged = true; } if( AVMEDIA_SETMASK_LOOP & nMaskSet ) - m_pImpl->m_MediaProperties.setLoop( rNewProperties.isLoop() ); + m_xImpl->m_MediaProperties.setLoop( rNewProperties.isLoop() ); if( AVMEDIA_SETMASK_MUTE & nMaskSet ) - m_pImpl->m_MediaProperties.setMute( rNewProperties.isMute() ); + m_xImpl->m_MediaProperties.setMute( rNewProperties.isMute() ); if( AVMEDIA_SETMASK_VOLUMEDB & nMaskSet ) - m_pImpl->m_MediaProperties.setVolumeDB( rNewProperties.getVolumeDB() ); + m_xImpl->m_MediaProperties.setVolumeDB( rNewProperties.getVolumeDB() ); if( AVMEDIA_SETMASK_ZOOM & nMaskSet ) - m_pImpl->m_MediaProperties.setZoom( rNewProperties.getZoom() ); + m_xImpl->m_MediaProperties.setZoom( rNewProperties.getZoom() ); if( bBroadcastChanged ) { diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index fedc9de7b736..51204177543e 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -75,7 +75,7 @@ TYPEINIT0(SdrObjList); SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewUpList): maList(), - mpNavigationOrder(), + mxNavigationOrder(), mbIsNavigationOrderDirty(false) { maList.reserve(InitialObjectContainerCapacity); @@ -90,7 +90,7 @@ SdrObjList::SdrObjList(SdrModel* pNewModel, SdrPage* pNewPage, SdrObjList* pNewU SdrObjList::SdrObjList(): maList(), - mpNavigationOrder(), + mxNavigationOrder(), mbIsNavigationOrderDirty(false) { maList.reserve(InitialObjectContainerCapacity); @@ -766,7 +766,7 @@ void SdrObjList::UnGroupObj( size_t nObjNum ) bool SdrObjList::HasObjectNavigationOrder (void) const { - return mpNavigationOrder.get() != NULL; + return mxNavigationOrder.get() != NULL; } @@ -779,43 +779,43 @@ void SdrObjList::SetObjectNavigationPosition ( // When the navigation order container has not yet been created then // create one now. It is initialized with the z-order taken from // maList. - if (mpNavigationOrder.get() == NULL) + if (mxNavigationOrder.get() == NULL) { - mpNavigationOrder.reset(new WeakSdrObjectContainerType(maList.size())); + mxNavigationOrder.reset(new WeakSdrObjectContainerType(maList.size())); ::std::copy( maList.begin(), maList.end(), - mpNavigationOrder->begin()); + mxNavigationOrder->begin()); } - OSL_ASSERT(mpNavigationOrder.get()!=NULL); - OSL_ASSERT( mpNavigationOrder->size() == maList.size()); + OSL_ASSERT(mxNavigationOrder.get()!=NULL); + OSL_ASSERT( mxNavigationOrder->size() == maList.size()); SdrObjectWeakRef aReference (&rObject); // Look up the object whose navigation position is to be changed. WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject == mpNavigationOrder->end()) + if (iObject == mxNavigationOrder->end()) { // The given object is not a member of the navigation order. return; } // Move the object to its new position. - const sal_uInt32 nOldPosition = ::std::distance(mpNavigationOrder->begin(), iObject); + const sal_uInt32 nOldPosition = ::std::distance(mxNavigationOrder->begin(), iObject); if (nOldPosition != nNewPosition) { - mpNavigationOrder->erase(iObject); + mxNavigationOrder->erase(iObject); sal_uInt32 nInsertPosition (nNewPosition); // Adapt insertion position for the just erased object. if (nNewPosition >= nOldPosition) nInsertPosition -= 1; - if (nInsertPosition >= mpNavigationOrder->size()) - mpNavigationOrder->push_back(aReference); + if (nInsertPosition >= mxNavigationOrder->size()) + mxNavigationOrder->push_back(aReference); else - mpNavigationOrder->insert(mpNavigationOrder->begin()+nInsertPosition, aReference); + mxNavigationOrder->insert(mxNavigationOrder->begin()+nInsertPosition, aReference); mbIsNavigationOrderDirty = true; @@ -833,13 +833,13 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat if (HasObjectNavigationOrder()) { // There is a user defined navigation order. Make sure the object - // index is correct and look up the object in mpNavigationOrder. - if (nNavigationPosition >= mpNavigationOrder->size()) + // index is correct and look up the object in mxNavigationOrder. + if (nNavigationPosition >= mxNavigationOrder->size()) { - OSL_ASSERT(nNavigationPosition < mpNavigationOrder->size()); + OSL_ASSERT(nNavigationPosition < mxNavigationOrder->size()); } else - return (*mpNavigationOrder)[nNavigationPosition].get(); + return (*mxNavigationOrder)[nNavigationPosition].get(); } else { @@ -860,7 +860,7 @@ SdrObject* SdrObjList::GetObjectForNavigationPosition (const sal_uInt32 nNavigat void SdrObjList::ClearObjectNavigationOrder (void) { - mpNavigationOrder.reset(); + mxNavigationOrder.reset(); mbIsNavigationOrderDirty = true; } @@ -871,19 +871,19 @@ bool SdrObjList::RecalcNavigationPositions (void) { if (mbIsNavigationOrderDirty) { - if (mpNavigationOrder.get() != NULL) + if (mxNavigationOrder.get() != NULL) { mbIsNavigationOrderDirty = false; WeakSdrObjectContainerType::iterator iObject; - WeakSdrObjectContainerType::const_iterator iEnd (mpNavigationOrder->end()); + WeakSdrObjectContainerType::const_iterator iEnd (mxNavigationOrder->end()); sal_uInt32 nIndex (0); - for (iObject=mpNavigationOrder->begin(); iObject!=iEnd; ++iObject,++nIndex) + for (iObject=mxNavigationOrder->begin(); iObject!=iEnd; ++iObject,++nIndex) (*iObject)->SetNavigationPosition(nIndex); } } - return mpNavigationOrder.get() != NULL; + return mxNavigationOrder.get() != NULL; } @@ -897,8 +897,8 @@ void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAcces if ((sal_uInt32)nCount != maList.size()) return; - if (mpNavigationOrder.get() == NULL) - mpNavigationOrder.reset(new WeakSdrObjectContainerType(nCount)); + if (mxNavigationOrder.get() == NULL) + mxNavigationOrder.reset(new WeakSdrObjectContainerType(nCount)); for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex) { @@ -906,7 +906,7 @@ void SdrObjList::SetNavigationOrder (const uno::Reference<container::XIndexAcces SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xShape); if (pObject == NULL) break; - (*mpNavigationOrder)[nIndex] = pObject; + (*mxNavigationOrder)[nIndex] = pObject; } mbIsNavigationOrderDirty = true; @@ -929,8 +929,8 @@ void SdrObjList::InsertObjectIntoContainer ( { // The new object does not have a user defined position so append it // to the list. - rObject.SetNavigationPosition(mpNavigationOrder->size()); - mpNavigationOrder->push_back(&rObject); + rObject.SetNavigationPosition(mxNavigationOrder->size()); + mxNavigationOrder->push_back(&rObject); } // Insert object into object list. Because the insert() method requires @@ -965,13 +965,13 @@ void SdrObjList::ReplaceObjectInContainer ( OSL_ASSERT(nObjectPosition < maList.size()); SdrObjectWeakRef aReference (maList[nObjectPosition]); WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject != mpNavigationOrder->end()) - mpNavigationOrder->erase(iObject); + if (iObject != mxNavigationOrder->end()) + mxNavigationOrder->erase(iObject); - mpNavigationOrder->push_back(&rNewObject); + mxNavigationOrder->push_back(&rNewObject); mbIsNavigationOrderDirty = true; } @@ -997,11 +997,11 @@ void SdrObjList::RemoveObjectFromContainer ( { SdrObjectWeakRef aReference (maList[nObjectPosition]); WeakSdrObjectContainerType::iterator iObject (::std::find( - mpNavigationOrder->begin(), - mpNavigationOrder->end(), + mxNavigationOrder->begin(), + mxNavigationOrder->end(), aReference)); - if (iObject != mpNavigationOrder->end()) - mpNavigationOrder->erase(iObject); + if (iObject != mxNavigationOrder->end()) + mxNavigationOrder->erase(iObject); mbIsNavigationOrderDirty = true; } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 57a960290645..ff96a359b0cd 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2482,8 +2482,8 @@ SvxColorToolBoxControl::SvxColorToolBoxControl( else rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); - pBtnUpdater.reset( new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox() ) ); - mPaletteManager.SetBtnUpdater( pBtnUpdater.get() ); + m_xBtnUpdater.reset( new ::svx::ToolboxButtonColorUpdater( nSlotId, nId, &GetToolBox() ) ); + mPaletteManager.SetBtnUpdater( m_xBtnUpdater.get() ); } SvxColorToolBoxControl::~SvxColorToolBoxControl() @@ -2545,7 +2545,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow() IMPL_LINK(SvxColorToolBoxControl, SelectedHdl, Color*, pColor) { - pBtnUpdater->Update( *pColor ); + m_xBtnUpdater->Update( *pColor ); mPaletteManager.SetLastColor( *pColor ); return 0; } @@ -2575,7 +2575,7 @@ void SvxColorToolBoxControl::StateChanged( else if ( pState->ISA( XFillColorItem ) ) aColor = static_cast< const XFillColorItem* >(pState)->GetColorValue(); } - pBtnUpdater->Update( aColor ); + m_xBtnUpdater->Update( aColor ); } } |