summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2013-08-21 15:25:59 +0200
committerKatarina Behrens <bubli@bubli.org>2013-08-21 16:43:04 +0200
commit463cbf54a1629a2ab1312641be3e609803f67da0 (patch)
treee5d3a8afc004fcacb231708ee9f8bbd40bafc87b /sd
parent16428c9600964a4945cf6fd0d938dea047d1248b (diff)
Removed dead (mostly widget-placing) code
Change-Id: I26f0d7797325d8b907a92dd0b7c46cb8c5c6ac30
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx197
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.hxx1
2 files changed, 0 insertions, 198 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index affd1457e1e9..61743f3bfc6f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -476,7 +476,6 @@ SlideTransitionPane::SlideTransitionPane(
mpCB_AUTO_PREVIEW->Check(); // automatic preview on
// update control states before adding handlers
- //updateLayout();
updateControls();
// set handlers
@@ -509,13 +508,6 @@ SlideTransitionPane::~SlideTransitionPane()
removeListener();
}
-void SlideTransitionPane::Resize()
-{
- //updateLayout();
-}
-
-
-
void SlideTransitionPane::DataChanged (const DataChangedEvent& rEvent)
{
@@ -570,195 +562,6 @@ void SlideTransitionPane::onChangeCurrentPage()
return pSelection;
}
-/*void SlideTransitionPane::updateLayout()
-{
- ::Size aPaneSize( GetSizePixel() );
- if( aPaneSize.Width() < maMinSize.Width() )
- aPaneSize.Width() = maMinSize.Width();
-
- if( aPaneSize.Height() < maMinSize.Height() )
- aPaneSize.Height() = maMinSize.Height();
-
- // start layouting elements from bottom to top. The remaining space is used
- // for the topmost list box
- ::Point aOffset( LogicToPixel( Point( 3, 3 ), MAP_APPFONT ) );
- long nOffsetX = aOffset.getX();
- long nOffsetY = aOffset.getY();
- long nOffsetBtnX = LogicToPixel( Point( 6, 1 ), MAP_APPFONT ).getX();
-
- const long nMinCtrlWidth = LogicToPixel( ::Point( 32, 1 ), MAP_APPFONT ).getX();
- const long nTextIndent = LogicToPixel( ::Point( RSC_SP_CHK_TEXTINDENT, 1 ), MAP_APPFONT ).getX();
-
- ::Point aUpperLeft( nOffsetX, aPaneSize.getHeight() - nOffsetY );
- long nMaxWidth = aPaneSize.getWidth() - 2 * nOffsetX;
-
- // auto preview check-box
- ::Size aCtrlSize = mpCB_AUTO_PREVIEW.GetSizePixel();
- aCtrlSize.setWidth( mpCB_AUTO_PREVIEW.CalcMinimumSize( nMaxWidth ).getWidth());
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- mpCB_AUTO_PREVIEW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above check-box
- aCtrlSize = maFL_EMPTY2.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY2.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // buttons "Play" and "Slide Show"
- long nPlayButtonWidth = mpPB_PLAY.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
- long nSlideShowButtonWidth = mpPB_SLIDE_SHOW.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
-
- if( (nPlayButtonWidth + nSlideShowButtonWidth + nOffsetX) <= nMaxWidth )
- {
- // place buttons side by side
- aCtrlSize = mpPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nPlayButtonWidth );
- mpPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aUpperLeft.setX( aUpperLeft.getX() + nPlayButtonWidth + nOffsetX );
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- mpPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
- else
- {
- // place buttons on top of each other
- aCtrlSize = mpPB_SLIDE_SHOW.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- mpPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = mpPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aCtrlSize.setWidth( nPlayButtonWidth );
- mpPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
- }
-
- // "Apply to All Slides" button
- aCtrlSize = mpPB_APPLY_TO_ALL.GetSizePixel();
- aCtrlSize.setWidth( mpPB_APPLY_TO_ALL.CalcMinimumSize( nMaxWidth ).getWidth() + 2 * nOffsetBtnX );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- mpPB_APPLY_TO_ALL.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above "Apply to All Slides" button
- aCtrlSize = maFL_EMPTY1.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY1.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // advance automatically after ... seconds
- long nItemWidth = mpRB_ADVANCE_AUTO.CalcMinimumSize().getWidth();
-
- if( (nItemWidth + nMinCtrlWidth + nOffsetX) <= nMaxWidth )
- {
- long nBase = aUpperLeft.getY();
-
- // place controls side by side
- aCtrlSize = mpRB_ADVANCE_AUTO.GetSizePixel();
- aUpperLeft.setY( nBase - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nItemWidth );
- mpRB_ADVANCE_AUTO.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = mpMF_ADVANCE_AUTO_AFTER.GetSizePixel();
- aUpperLeft.setY( nBase - aCtrlSize.getHeight() );
- aUpperLeft.setX( aUpperLeft.getX() + nItemWidth + nOffsetX );
- aCtrlSize.setWidth( nMinCtrlWidth );
- mpMF_ADVANCE_AUTO_AFTER.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
- else
- {
- // place controls on top of each other
- aCtrlSize = mpMF_ADVANCE_AUTO_AFTER.GetSizePixel();
- aUpperLeft.setX( nOffsetX + nTextIndent );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nMinCtrlWidth );
- mpMF_ADVANCE_AUTO_AFTER.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = mpRB_ADVANCE_AUTO.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aUpperLeft.setX( nOffsetX );
- aCtrlSize.setWidth( nItemWidth );
- mpRB_ADVANCE_AUTO.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
-
- // check box "On mouse click"
- aCtrlSize = mpRB_ADVANCE_ON_MOUSE.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- mpRB_ADVANCE_ON_MOUSE.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Advance slide"
- aCtrlSize = maFL_ADVANCE_SLIDE.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- maFL_ADVANCE_SLIDE.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // check box "Loop until next sound"
- long nFTSpeedWidth = mpFT_SPEED->CalcMinimumSize().getWidth() + 2 * nOffsetX;
- long nFTSoundWidth = mpFT_SOUND.CalcMinimumSize().getWidth() + 2 * nOffsetX;
- long nIndent = ::std::max( nFTSoundWidth, nFTSpeedWidth );
-
- bool bStack = ( (nIndent + nMinCtrlWidth + nOffsetX) > nMaxWidth );
-
- if( bStack )
- nIndent = nTextIndent;
-
- aCtrlSize = mpCB_LOOP_SOUND.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth - nIndent );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aUpperLeft.setX( nIndent );
- mpCB_LOOP_SOUND.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = mpLB_SOUND.GetSizePixel();
- aCtrlSize.setWidth( ::std::max( nMaxWidth - nIndent, nMinCtrlWidth ) );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- mpLB_SOUND.SetPosSizePixel( aUpperLeft, aCtrlSize );
- mpLB_SOUND.SetDropDownLineCount( 8 );
- aUpperLeft.setX( nOffsetX );
-
- aCtrlSize = mpFT_SOUND.GetSizePixel();
- if( bStack )
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nFTSoundWidth - 2 * nOffsetX );
- mpFT_SOUND.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aUpperLeft.setX( nIndent );
- aCtrlSize = mpLB_SPEED.GetSizePixel();
- aCtrlSize.setWidth( ::std::max( nMaxWidth - nIndent, nMinCtrlWidth ) );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- mpLB_SPEED.SetPosSizePixel( aUpperLeft, aCtrlSize );
- mpLB_SPEED.SetDropDownLineCount( 3 );
- aUpperLeft.setX( nOffsetX );
-
- aCtrlSize = mpFT_SPEED.GetSizePixel();
- if( bStack )
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nFTSpeedWidth - 2 * nOffsetX );
- mpFT_SPEED.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Modify Transition"
- aCtrlSize = maFL_MODIFY_TRANSITION.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- maFL_MODIFY_TRANSITION.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Apply to selected slides"
- aCtrlSize = maFL_APPLY_TRANSITION.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- ::Point aUpperLeftCorner( nOffsetX, nOffsetY );
- maFL_APPLY_TRANSITION.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
- aUpperLeftCorner.setY( aUpperLeftCorner.getY() + aCtrlSize.getHeight() + nOffsetY );
- aUpperLeft.setY( aUpperLeft.getY() - nOffsetY );
-
- // list box slide transitions
- aCtrlSize.setWidth( nMaxWidth );
- aCtrlSize.setHeight( aUpperLeft.getY() - aUpperLeftCorner.getY() );
- mpLB_SLIDE_TRANSITIONS->SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
-}*/
-
void SlideTransitionPane::updateControls()
{
::sd::slidesorter::SharedPageSelection pSelectedPages(getSelectedPages());
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx
index 5f04e4c7d149..3948d380e253 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -60,7 +60,6 @@ public:
virtual ~SlideTransitionPane();
// Window
- virtual void Resize();
virtual void DataChanged (const DataChangedEvent& rEvent);
void onSelectionChanged();