/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
void OptimizerDialog::UpdateControlStatesPage0()
{ int nSelectedItem = -1;
std::vector<OUString> aItemList; const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() ); if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
{ for ( std::vector<OptimizerSettings>::size_type i = 1; i < rList.size(); i++ )
{
aItemList.push_back(rList[i].maName); if ( nSelectedItem < 0 )
{ if ( rList[ i ] == rList[ 0 ] )
nSelectedItem = static_cast< short >( i - 1 );
}
}
} bool bRemoveButtonEnabled = false; if ( nSelectedItem >= 0 )
{ if ( nSelectedItem > 2 ) // only allowing to delete custom themes, the first can|t be deleted
bRemoveButtonEnabled = true;
}
mpPage0->UpdateControlStates(aItemList, nSelectedItem, bRemoveButtonEnabled);
}
std::vector<OUString> aItemList; const std::vector< OptimizerSettings >& rList( GetOptimizerSettings() ); if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
{ for ( std::vector<OptimizerSettings>::size_type w = 1; w < rList.size(); w++ )
aItemList.push_back(rList[ w ].maName);
}
// now check if it is sensible to enable the combo box bool bSaveSettingsEnabled = true; if ( rList.size() > 1 ) // the first session in the list is the actual one -> skipping first one
{ for ( std::vector<OptimizerSettings>::size_type w = 1; w < rList.size(); w++ )
{ if ( rList[ w ] == rList[ 0 ] )
{
bSaveSettingsEnabled = false; break;
}
}
}
std::vector< OUString > aSummaryStrings;
// taking care of deleted slides
sal_Int32 nDeletedSlides = 0;
OUString sTKCustomShowName(mpPage1->Get_TK_CustomShowName()); if (!sTKCustomShowName.isEmpty())
SetConfigProperty(TK_CustomShowName, Any(sTKCustomShowName)); if ( GetConfigProperty( TK_DeleteHiddenSlides, false ) )
{
Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW ); for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
{
Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.