"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sd/source/ui/animations/SlideTransitionPane.cxx" between
libreoffice-7.1.5.1.tar.xz and libreoffice-7.1.5.2.tar.xz

About: LibreOffice source code (core). "Fresh" packages (pre-release version).

SlideTransitionPane.cxx  (libreoffice-7.1.5.1.tar.xz):SlideTransitionPane.cxx  (libreoffice-7.1.5.2.tar.xz)
skipping to change at line 409 skipping to change at line 409
mrBase( rBase ), mrBase( rBase ),
mpDrawDoc( pDoc ), mpDrawDoc( pDoc ),
mbHasSelection( false ), mbHasSelection( false ),
mbUpdatingControls( false ), mbUpdatingControls( false ),
mbIsMainViewChangePending( false ), mbIsMainViewChangePending( false ),
maLateInitTimer() maLateInitTimer()
{ {
Initialize(pDoc); Initialize(pDoc);
} }
constexpr sal_uInt16 nNoneId = std::numeric_limits<sal_uInt16>::max();
void SlideTransitionPane::Initialize(SdDrawDocument* pDoc) void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
{ {
mxFT_VARIANT = m_xBuilder->weld_label("variant_label"); mxFT_VARIANT = m_xBuilder->weld_label("variant_label");
mxLB_VARIANT = m_xBuilder->weld_combo_box("variant_list"); mxLB_VARIANT = m_xBuilder->weld_combo_box("variant_list");
mxFT_duration = m_xBuilder->weld_label("duration_label"); mxFT_duration = m_xBuilder->weld_label("duration_label");
mxCBX_duration = m_xBuilder->weld_metric_spin_button("transition_duration", FieldUnit::SECOND); mxCBX_duration = m_xBuilder->weld_metric_spin_button("transition_duration", FieldUnit::SECOND);
mxFT_SOUND = m_xBuilder->weld_label("sound_label"); mxFT_SOUND = m_xBuilder->weld_label("sound_label");
mxLB_SOUND = m_xBuilder->weld_combo_box("sound_list"); mxLB_SOUND = m_xBuilder->weld_combo_box("sound_list");
mxCB_LOOP_SOUND = m_xBuilder->weld_check_button("loop_sound"); mxCB_LOOP_SOUND = m_xBuilder->weld_check_button("loop_sound");
mxRB_ADVANCE_ON_MOUSE = m_xBuilder->weld_radio_button("rb_mouse_click"); mxRB_ADVANCE_ON_MOUSE = m_xBuilder->weld_radio_button("rb_mouse_click");
skipping to change at line 444 skipping to change at line 446
mxVS_TRANSITION_ICONSWin.reset(new weld::CustomWeld(*m_xBuilder, "transition s_icons", *mxVS_TRANSITION_ICONS)); mxVS_TRANSITION_ICONSWin.reset(new weld::CustomWeld(*m_xBuilder, "transition s_icons", *mxVS_TRANSITION_ICONS));
if( pDoc ) if( pDoc )
mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY ); mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY );
// TODO: get correct view // TODO: get correct view
if( mxModel.is()) if( mxModel.is())
mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY ); mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY );
// dummy list box of slide transitions for startup. // dummy list box of slide transitions for startup.
mxVS_TRANSITION_ICONS->InsertItem( mxVS_TRANSITION_ICONS->InsertItem(
0, Image( StockImage::Yes, "sd/cmd/transition-none.png" ), nNoneId, Image( StockImage::Yes, "sd/cmd/transition-none.png" ),
SdResId( STR_SLIDETRANSITION_NONE ), SdResId( STR_SLIDETRANSITION_NONE ),
VALUESET_APPEND, /* show legend */ true ); VALUESET_APPEND, /* show legend */ true );
mxVS_TRANSITION_ICONS->Recalculate(); mxVS_TRANSITION_ICONS->Recalculate();
// set defaults // set defaults
mxCB_AUTO_PREVIEW->set_active(true); // automatic preview on mxCB_AUTO_PREVIEW->set_active(true); // automatic preview on
// update control states before adding handlers // update control states before adding handlers
updateControls(); updateControls();
skipping to change at line 583 skipping to change at line 585
for( const auto& rpPage : *pSelectedPages ) for( const auto& rpPage : *pSelectedPages )
{ {
if( rpPage ) if( rpPage )
aEffect.compareWith( *rpPage ); aEffect.compareWith( *rpPage );
} }
// detect current slide effect // detect current slide effect
if( aEffect.mbEffectAmbiguous ) if( aEffect.mbEffectAmbiguous )
{ {
SAL_WARN( "sd.transitions", "Unusual, ambiguous transition effect" ); SAL_WARN( "sd.transitions", "Unusual, ambiguous transition effect" );
mxVS_TRANSITION_ICONS->SetNoSelection(); mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
} }
else else
{ {
// ToDo: That 0 is "no transition" is documented nowhere except in the // ToDo: That 0 is "no transition" is documented nowhere except in the
// CTOR of sdpage // CTOR of sdpage
if( aEffect.mnType == 0 ) if( aEffect.mnType == 0 )
mxVS_TRANSITION_ICONS->SetNoSelection(); mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
else else
updateVariants( getPresetOffset( aEffect ) ); updateVariants( getPresetOffset( aEffect ) );
} }
if( aEffect.mbDurationAmbiguous ) if( aEffect.mbDurationAmbiguous )
{ {
mxCBX_duration->set_text(""); mxCBX_duration->set_text("");
//TODO mxCBX_duration->SetNoSelection(); //TODO mxCBX_duration->SetNoSelection();
} }
else else
skipping to change at line 774 skipping to change at line 776
} }
else else
mxLB_SOUND->set_active( 0 ); // NONE mxLB_SOUND->set_active( 0 ); // NONE
} }
impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co nst impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co nst
{ {
impl::TransitionEffect aResult; impl::TransitionEffect aResult;
aResult.setAllAmbiguous(); aResult.setAllAmbiguous();
bool bNoneSelected = mxVS_TRANSITION_ICONS->IsNoSelection() || mxVS_TRANSITI
ON_ICONS->GetSelectedItemId() == nNoneId;
// check first (aResult might be overwritten) // check first (aResult might be overwritten)
if( mxVS_TRANSITION_ICONSWin->get_sensitive() && if( mxVS_TRANSITION_ICONSWin->get_sensitive() &&
!mxVS_TRANSITION_ICONS->IsNoSelection() && !bNoneSelected &&
mxVS_TRANSITION_ICONS->GetSelectedItemId() > 0 ) mxVS_TRANSITION_ICONS->GetSelectedItemId() > 0 )
{ {
const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getT ransitionPresetList(); const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getT ransitionPresetList();
auto aSelected = rPresetList.begin(); auto aSelected = rPresetList.begin();
std::advance( aSelected, mxVS_TRANSITION_ICONS->GetSelectedItemId() - 1) ; std::advance( aSelected, mxVS_TRANSITION_ICONS->GetSelectedItemId() - 1) ;
if (mxLB_VARIANT->get_active() == -1) if (mxLB_VARIANT->get_active() == -1)
{ {
// Transition with just one effect. // Transition with just one effect.
aResult = impl::TransitionEffect( **aSelected ); aResult = impl::TransitionEffect( **aSelected );
skipping to change at line 817 skipping to change at line 821
} }
} }
} }
if( !bFound ) if( !bFound )
{ {
aResult.mnType = 0; aResult.mnType = 0;
} }
} }
aResult.mbEffectAmbiguous = false; aResult.mbEffectAmbiguous = false;
} }
else if (mxVS_TRANSITION_ICONS->IsNoSelection()) else if (bNoneSelected)
{ {
aResult.mbEffectAmbiguous = false; aResult.mbEffectAmbiguous = false;
} }
//duration //duration
if( mxCBX_duration->get_sensitive() && (!(mxCBX_duration->get_text()).isEmpt y()) ) if( mxCBX_duration->get_sensitive() && (!(mxCBX_duration->get_text()).isEmpt y()) )
{ {
aResult.mfDuration = static_cast<double>(mxCBX_duration->get_value(Field Unit::SECOND))/100.0; aResult.mfDuration = static_cast<double>(mxCBX_duration->get_value(Field Unit::SECOND))/100.0;
aResult.mbDurationAmbiguous = false; aResult.mbDurationAmbiguous = false;
skipping to change at line 1024 skipping to change at line 1028
{ {
updateVariants( mxVS_TRANSITION_ICONS->GetSelectedItemId() - 1 ); updateVariants( mxVS_TRANSITION_ICONS->GetSelectedItemId() - 1 );
applyToSelectedPages(); applyToSelectedPages();
} }
/// we use an integer offset into the list of transition presets /// we use an integer offset into the list of transition presets
void SlideTransitionPane::updateVariants( size_t nPresetOffset ) void SlideTransitionPane::updateVariants( size_t nPresetOffset )
{ {
const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTrans itionPresetList(); const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTrans itionPresetList();
mxLB_VARIANT->clear(); mxLB_VARIANT->clear();
mxVS_TRANSITION_ICONS->SetNoSelection(); mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
if( nPresetOffset >= rPresetList.size() ) if( nPresetOffset >= rPresetList.size() )
{ {
mxLB_VARIANT->set_sensitive( false ); mxLB_VARIANT->set_sensitive( false );
} }
else else
{ {
auto pFound = rPresetList.begin(); auto pFound = rPresetList.begin();
std::advance( pFound, nPresetOffset ); std::advance( pFound, nPresetOffset );
 End of changes. 8 change blocks. 
6 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)