/* -*- 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/.
*/
/** * DropDown formfields are inline text objects that are only found in MS Word. * They cannot be created in Excel or in Calc. * * Note that VBA might call this a DropDown, but it might not actually be one, * so make good use of getValid()
*/
SwVbaFormFieldDropDown::SwVbaFormFieldDropDown( const uno::Reference<ooo::vba::XHelperInterface>& rParent, const uno::Reference<uno::XComponentContext>& rContext, ::sw::mark::Fieldmark& rFormField)
: SwVbaFormFieldDropDown_BASE(rParent, rContext)
, m_pDropDown(dynamic_cast<sw::mark::DropDownFieldmark*>(&rFormField))
{
}
void SwVbaFormFieldDropDown::setDefault(sal_Int32 nSet)
{ // Hard to know what to do here, since LO doesn't have a default property for DropDowns. // Setting this really only makes sense when macro-adding a DropDown. // In that case, we want it to affect the actual text content. // However, if an item has already been selected by the user, then this shouldn't do anything. // Assuming this is only ever set when adding a DropDown seems the sanest approach.
setValue(nSet);
}
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.