[Libreoffice-commits] core.git: extensions/source forms/source include/toolkit offapi/com offapi/UnoApi_offapi.mk sc/source toolkit/source
Eike Rathke
erack at redhat.com
Sat Feb 11 00:20:04 UTC 2017
extensions/source/propctrlr/cellbindinghandler.cxx | 3
extensions/source/propctrlr/formcomponenthandler.cxx | 10 -
extensions/source/propctrlr/formmetadata.hxx | 1
extensions/source/propctrlr/formstrings.hxx | 1
forms/source/component/ComboBox.cxx | 17 --
forms/source/component/ListBox.cxx | 47 -------
forms/source/component/entrylisthelper.cxx | 54 +-------
forms/source/component/entrylisthelper.hxx | 13 --
forms/source/inc/frm_strings.hxx | 1
forms/source/inc/property.hrc | 2
include/toolkit/helper/property.hxx | 1
offapi/UnoApi_offapi.mk | 1
offapi/com/sun/star/awt/UnoControlComboBoxModel.idl | 13 --
offapi/com/sun/star/awt/UnoControlListBoxModel.idl | 10 -
offapi/com/sun/star/form/binding/XListEntryTypedSource.idl | 47 -------
sc/source/ui/unoobj/celllistsource.cxx | 83 +------------
sc/source/ui/unoobj/celllistsource.hxx | 12 -
toolkit/source/awt/vclxwindows.cxx | 2
toolkit/source/controls/unocontrolmodel.cxx | 7 -
toolkit/source/controls/unocontrols.cxx | 2
toolkit/source/helper/property.cxx | 1
21 files changed, 19 insertions(+), 309 deletions(-)
New commits:
commit d3293c7173210e0246d0dc29377f687f41588da2
Author: Eike Rathke <erack at redhat.com>
Date: Sat Feb 11 01:17:12 2017 +0100
Revert "Resolves: tdf#79250 add typed list to form control listbox"
This reverts commit e387b69967aabc44d5da5aaad8d94191437dc57c.
It breaks toolkit.subsequentcheck with
propertyChangeListener wasn´t called for ´TypedItemList´
Back to the drawing board for the twisted property logic of forms and
toolkit uno control models.
diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx
index 3ac0591..578339a 100644
--- a/extensions/source/propctrlr/cellbindinghandler.cxx
+++ b/extensions/source/propctrlr/cellbindinghandler.cxx
@@ -162,10 +162,7 @@ namespace pcr
try
{
if ( !xSource.is() )
- {
setPropertyValue( PROPERTY_STRINGITEMLIST, makeAny( Sequence< OUString >() ) );
- setPropertyValue( PROPERTY_TYPEDITEMLIST, makeAny( Sequence< Any >() ) );
- }
}
catch( const Exception& )
{
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 0bd51e8..9159e45 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -1547,13 +1547,11 @@ namespace pcr
// available list source values (tables or queries) might have changed
_rxInspectorUI->rebuildPropertyUI( PROPERTY_LISTSOURCE );
aDependentProperties.push_back( PROPERTY_ID_STRINGITEMLIST );
- aDependentProperties.push_back( PROPERTY_ID_TYPEDITEMLIST );
aDependentProperties.push_back( PROPERTY_ID_BOUNDCOLUMN );
SAL_FALLTHROUGH;
// ----- StringItemList -----
case PROPERTY_ID_STRINGITEMLIST:
- aDependentProperties.push_back( PROPERTY_ID_TYPEDITEMLIST );
aDependentProperties.push_back( PROPERTY_ID_SELECTEDITEMS );
aDependentProperties.push_back( PROPERTY_ID_DEFAULT_SELECT_SEQ );
break;
@@ -1561,7 +1559,6 @@ namespace pcr
// ----- ListSource -----
case PROPERTY_ID_LISTSOURCE:
aDependentProperties.push_back( PROPERTY_ID_STRINGITEMLIST );
- aDependentProperties.push_back( PROPERTY_ID_TYPEDITEMLIST );
break;
// ----- DataField -----
@@ -1811,13 +1808,6 @@ namespace pcr
}
break; // case PROPERTY_ID_STRINGITEMLIST
- // ----- TypedItemList -----
- case PROPERTY_ID_TYPEDITEMLIST:
- {
- /* TODO: anything? */
- }
- break; // case PROPERTY_ID_TYPEDITEMLIST
-
// ----- BoundColumn -----
case PROPERTY_ID_BOUNDCOLUMN:
{
diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx
index 0c9f369..7208a00 100644
--- a/extensions/source/propctrlr/formmetadata.hxx
+++ b/extensions/source/propctrlr/formmetadata.hxx
@@ -326,7 +326,6 @@ namespace pcr
#define PROPERTY_ID_SCROLL_HEIGHT 204
#define PROPERTY_ID_SCROLL_TOP 205
#define PROPERTY_ID_SCROLL_LEFT 206
- #define PROPERTY_ID_TYPEDITEMLIST 207
} // namespace pcr
diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx
index a4d8955..c5e8145 100644
--- a/extensions/source/propctrlr/formstrings.hxx
+++ b/extensions/source/propctrlr/formstrings.hxx
@@ -63,7 +63,6 @@ namespace pcr
#define PROPERTY_BUTTONTYPE "ButtonType"
#define PROPERTY_XFORMS_BUTTONTYPE "XFormsButtonType"
#define PROPERTY_STRINGITEMLIST "StringItemList"
- #define PROPERTY_TYPEDITEMLIST "TypedItemList"
#define PROPERTY_DEFAULT_TEXT "DefaultText"
#define PROPERTY_DEFAULT_STATE "DefaultState"
#define PROPERTY_FORMATKEY "FormatKey"
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index dd419a1..57ff1e6 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -193,10 +193,6 @@ void OComboBoxModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) cons
_rValue <<= comphelper::containerToSequence(getStringItemList());
break;
- case PROPERTY_ID_TYPEDITEMLIST:
- _rValue <<= getTypedItemList();
- break;
-
default:
OBoundControlModel::getFastPropertyValue(_rValue, _nHandle);
}
@@ -251,11 +247,6 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
}
break;
- // XXX NOTE: PROPERTY_ID_TYPEDITEMLIST not handled here because only
- // set for external sources in which case not even
- // setNewStringItemList() for PROPERTY_ID_STRINGITEMLIST above should
- // had been called ...
-
default:
OBoundControlModel::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
}
@@ -313,7 +304,6 @@ void OComboBoxModel::describeAggregateProperties( Sequence< Property >& _rAggreg
// superseded properties:
RemoveProperty( _rAggregateProps, PROPERTY_STRINGITEMLIST );
- RemoveProperty( _rAggregateProps, PROPERTY_TYPEDITEMLIST );
}
@@ -442,7 +432,6 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
)
{
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( css::uno::Sequence<OUString>() ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
}
if (nVersion > 0x0004)
@@ -666,8 +655,6 @@ void OComboBoxModel::loadData( bool _bForce )
// Set String-Sequence at ListBox
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( comphelper::containerToSequence(aStringList) ) );
- // Reset TypedItemList, no matching data.
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
}
@@ -778,7 +765,6 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
aStringItemList.getArray()[ nOldLen ] = sNewValue;
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringItemList ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
}
}
}
@@ -824,10 +810,7 @@ Any OComboBoxModel::getDefaultForReset() const
void OComboBoxModel::stringItemListChanged( ControlModelLock& /*_rInstanceLock*/ )
{
if ( m_xAggregateSet.is() )
- {
m_xAggregateSet->setPropertyValue( PROPERTY_STRINGITEMLIST, makeAny( comphelper::containerToSequence(getStringItemList()) ) );
- m_xAggregateSet->setPropertyValue( PROPERTY_TYPEDITEMLIST, makeAny( getTypedItemList()) ) ;
- }
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 5fd3e9b..2b5426f 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -147,7 +147,6 @@ namespace frm
void OListBoxModel::init()
{
startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
- startAggregatePropertyListening( PROPERTY_TYPEDITEMLIST );
}
@@ -287,10 +286,6 @@ namespace frm
_rValue <<= comphelper::containerToSequence(getStringItemList());
break;
- case PROPERTY_ID_TYPEDITEMLIST:
- _rValue <<= getTypedItemList();
- break;
-
default:
OBoundControlModel::getFastPropertyValue(_rValue, _nHandle);
}
@@ -387,10 +382,6 @@ namespace frm
resetNoBroadcast();
break;
- case PROPERTY_ID_TYPEDITEMLIST:
- /* TODO: anything? */
- break;
-
default:
OBoundControlModel::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
}
@@ -443,10 +434,6 @@ namespace frm
bModified = convertNewListSourceProperty( _rConvertedValue, _rOldValue, _rValue );
break;
- case PROPERTY_ID_TYPEDITEMLIST:
- /* TODO: anything? */
- break;
-
default:
return OBoundControlModel::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue);
}
@@ -518,7 +505,6 @@ namespace frm
// <----- SYNCHRONIZED
return;
}
- // XXX NOTE: PROPERTY_TYPEDITEMLIST not handled, used only with external list source.
OBoundControlModel::_propertyChanged( i_rEvent );
}
@@ -529,7 +515,6 @@ namespace frm
// superseded properties:
RemoveProperty( _rAggregateProps, PROPERTY_STRINGITEMLIST );
- RemoveProperty( _rAggregateProps, PROPERTY_TYPEDITEMLIST );
}
@@ -684,7 +669,6 @@ namespace frm
)
{
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( css::uno::Sequence<OUString>() ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
}
if (nVersion > 3)
@@ -1007,7 +991,6 @@ namespace frm
setBoundValues(aValueList);
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( lcl_convertToStringSequence( aDisplayList ) ) );
- setFastPropertyValue( PROPERTY_ID_TYPEDITEMLIST, makeAny( css::uno::Sequence<css::uno::Any>() ) );
}
@@ -1473,26 +1456,6 @@ namespace frm
};
- Any lcl_getSingleSelectedEntryTyped( const Sequence< sal_Int16 >& _rSelectSequence, const Sequence<Any>& _rTypedList )
- {
- Any aReturn;
-
- // by definition, multiple selected entries are transferred as NULL if the
- // binding does not support lists
- if ( _rSelectSequence.getLength() <= 1 )
- {
- if ( _rSelectSequence.getLength() == 1 )
- {
- sal_Int32 nIndex = _rSelectSequence[0];
- if (0 <= nIndex && nIndex < _rTypedList.getLength())
- aReturn = _rTypedList[nIndex];
- }
- }
-
- return aReturn;
- }
-
-
Any lcl_getSingleSelectedEntry( const Sequence< sal_Int16 >& _rSelectSequence, const std::vector< OUString >& _rStringList )
{
Any aReturn;
@@ -1623,14 +1586,7 @@ namespace frm
break;
case eEntry:
- {
- const std::vector<OUString>& rStrings = getStringItemList();
- const Sequence<Any>& rValues = getTypedItemList();
- if (rStrings.size() == static_cast<size_t>(rValues.getLength()))
- aReturn = lcl_getSingleSelectedEntryTyped( aSelectSequence, rValues );
- else
- aReturn = lcl_getSingleSelectedEntry( aSelectSequence, rStrings );
- }
+ aReturn = lcl_getSingleSelectedEntry( aSelectSequence, getStringItemList() );
break;
}
@@ -1733,7 +1689,6 @@ namespace frm
try
{
m_xAggregateSet->setPropertyValue( PROPERTY_STRINGITEMLIST, makeAny( comphelper::containerToSequence(getStringItemList()) ) );
- m_xAggregateSet->setPropertyValue( PROPERTY_TYPEDITEMLIST, makeAny( getTypedItemList() ) );
}
catch( const Exception& )
{
diff --git a/forms/source/component/entrylisthelper.cxx b/forms/source/component/entrylisthelper.cxx
index 4e9202be..b306256 100644
--- a/forms/source/component/entrylisthelper.cxx
+++ b/forms/source/component/entrylisthelper.cxx
@@ -23,7 +23,6 @@
#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
#include <comphelper/property.hxx>
-#include <com/sun/star/form/binding/XListEntryTypedSource.hpp>
#include <algorithm>
@@ -93,8 +92,6 @@ namespace frm
)
{
m_aStringItems[ _rEvent.Position ] = _rEvent.Entries[ 0 ];
- if (m_aTypedItems.getLength())
- m_aTypedItems = Sequence<Any>(); // doesn't match anymore
stringItemListChanged( aLock );
}
}
@@ -115,8 +112,7 @@ namespace frm
)
{
m_aStringItems.insert(m_aStringItems.begin() + _rEvent.Position, _rEvent.Entries.begin(), _rEvent.Entries.end());
- if (m_aTypedItems.getLength())
- m_aTypedItems = Sequence<Any>(); // doesn't match anymore
+
stringItemListChanged( aLock );
}
}
@@ -138,26 +134,6 @@ namespace frm
{
m_aStringItems.erase(m_aStringItems.begin() + _rEvent.Position,
m_aStringItems.begin() + _rEvent.Position + _rEvent.Count );
- if (_rEvent.Position + _rEvent.Count <= m_aTypedItems.getLength())
- {
- Sequence<Any> aTmp( m_aTypedItems.getLength() - _rEvent.Count );
- sal_Int32 nStop = _rEvent.Position;
- sal_Int32 i = 0;
- for ( ; i < nStop; ++i)
- {
- aTmp[i] = m_aTypedItems[i];
- }
- nStop = aTmp.getLength();
- for (sal_Int32 j = _rEvent.Position + _rEvent.Count; i < nStop; ++i, ++j)
- {
- aTmp[i] = m_aTypedItems[j];
- }
- m_aTypedItems = aTmp;
- }
- else if (m_aTypedItems.getLength())
- {
- m_aTypedItems = Sequence<Any>(); // doesn't match anymore
- }
stringItemListChanged( aLock );
}
}
@@ -208,7 +184,10 @@ namespace frm
void OEntryListHelper::impl_lock_refreshList( ControlModelLock& _rInstanceLock )
{
if ( hasExternalListSource() )
- obtainListSourceEntries( _rInstanceLock );
+ {
+ comphelper::sequenceToContainer(m_aStringItems, m_xListSource->getAllListEntries());
+ stringItemListChanged( _rInstanceLock );
+ }
else
refreshInternalEntryList();
}
@@ -272,7 +251,8 @@ namespace frm
// be notified when the list changes ...
m_xListSource->addListEntryListener( this );
- obtainListSourceEntries( _rInstanceLock );
+ comphelper::sequenceToContainer( m_aStringItems, m_xListSource->getAllListEntries() );
+ stringItemListChanged( _rInstanceLock );
// let derivees react on the new list source
connectedExternalListSource();
@@ -280,24 +260,6 @@ namespace frm
}
- void OEntryListHelper::obtainListSourceEntries( ControlModelLock& _rInstanceLock )
- {
- Reference< XListEntryTypedSource > xTyped;
- xTyped.set( m_xListSource, UNO_QUERY);
- if (xTyped.is())
- {
- comphelper::sequenceToContainer( m_aStringItems, xTyped->getAllListEntriesTyped( m_aTypedItems));
- }
- else
- {
- comphelper::sequenceToContainer( m_aStringItems, m_xListSource->getAllListEntries());
- if (m_aTypedItems.getLength())
- m_aTypedItems = Sequence<Any>();
- }
- stringItemListChanged( _rInstanceLock );
- }
-
-
bool OEntryListHelper::convertNewListSourceProperty( Any& _rConvertedValue,
Any& _rOldValue, const Any& _rValue )
{
@@ -315,8 +277,6 @@ namespace frm
css::uno::Sequence<OUString> aTmp;
OSL_VERIFY( _rValue >>= aTmp );
comphelper::sequenceToContainer(m_aStringItems, aTmp);
- if (m_aTypedItems.getLength())
- m_aTypedItems = Sequence<Any>(); // doesn't match anymore
stringItemListChanged( _rInstanceLock );
}
diff --git a/forms/source/component/entrylisthelper.hxx b/forms/source/component/entrylisthelper.hxx
index 3ad407c..3ae722c 100644
--- a/forms/source/component/entrylisthelper.hxx
+++ b/forms/source/component/entrylisthelper.hxx
@@ -53,8 +53,6 @@ namespace frm
m_xListSource; /// our external list source
std::vector< OUString >
m_aStringItems; /// "overridden" StringItemList property value
- css::uno::Sequence< css::uno::Any >
- m_aTypedItems; /// "overridden" TypedItemList property value
::comphelper::OInterfaceContainerHelper2
m_aRefreshListeners;
@@ -68,10 +66,6 @@ namespace frm
inline const std::vector< OUString >&
getStringItemList() const { return m_aStringItems; }
- /// returns the current typed item list
- inline const css::uno::Sequence< css::uno::Any >&
- getTypedItemList() const { return m_aTypedItems; }
-
/// determines whether we actually have an external list source
inline bool hasExternalListSource( ) const { return m_xListSource.is(); }
@@ -167,13 +161,6 @@ namespace frm
ControlModelLock& _rInstanceLock
);
- /** obtains list entries and possibly data values from list source
-
- @precond
- m_xListSource has to hold an external list source
- */
- void obtainListSourceEntries( ControlModelLock& _rInstanceLock );
-
/** refreshes our list entries
In case we have an external list source, its used to obtain the new entries, and then
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index 868772a..7415ebe 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -70,7 +70,6 @@ namespace frm
#define PROPERTY_HIDDEN_VALUE "HiddenValue"
#define PROPERTY_BUTTONTYPE "ButtonType"
#define PROPERTY_STRINGITEMLIST "StringItemList"
- #define PROPERTY_TYPEDITEMLIST "TypedItemList"
#define PROPERTY_DEFAULT_TEXT "DefaultText"
#define PROPERTY_DEFAULT_STATE "DefaultState"
#define PROPERTY_FORMATKEY "FormatKey"
diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc
index 57b6202..2086db0 100644
--- a/forms/source/inc/property.hrc
+++ b/forms/source/inc/property.hrc
@@ -292,8 +292,6 @@ namespace frm
#define PROPERTY_ID_CONTROL_TYPE_IN_MSO ( PROPERTY_ID_START + 261 )
#define PROPERTY_ID_OBJ_ID_IN_MSO ( PROPERTY_ID_START + 262 )
-#define PROPERTY_ID_TYPEDITEMLIST ( PROPERTY_ID_START + 263 ) // Sequence<Any>
-
// start ID fuer aggregierte Properties
#define PROPERTY_ID_AGGREGATE_ID (PROPERTY_ID_START + 10000)
diff --git a/include/toolkit/helper/property.hxx b/include/toolkit/helper/property.hxx
index 34d8918..d3a637d 100644
--- a/include/toolkit/helper/property.hxx
+++ b/include/toolkit/helper/property.hxx
@@ -207,7 +207,6 @@ namespace uno {
#define BASEPROPERTY_INACTIVE_SEL_BACKGROUND_COLOR 166
#define BASEPROPERTY_ACTIVE_SEL_TEXT_COLOR 167
#define BASEPROPERTY_INACTIVE_SEL_TEXT_COLOR 168
-#define BASEPROPERTY_TYPEDITEMLIST 169 // AnySequence
// These properties are not bound, they are always extracted from the BASEPROPERTY_FONTDESCRIPTOR property
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 7c169a4..a76f42a 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2524,7 +2524,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/form/binding,\
XListEntryListener \
XListEntrySink \
XListEntrySource \
- XListEntryTypedSource \
XValueBinding \
))
$(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/form/runtime,\
diff --git a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
index 3a359eb..2ee9d69 100644
--- a/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlComboBoxModel.idl
@@ -192,19 +192,6 @@ published service UnoControlComboBoxModel
#StringItemList property.
*/
[optional] interface XItemList;
-
- /** specifies the list of raw typed (not stringized) items.
-
- <p>This list corresponds with the StringItemList and if given
- has to be of the same length, the elements' positions matching
- those of their string representation in StringItemList.</p>
-
- <p>If a new value is entered via the ComboBox edit then this
- list will be invalidated.</p>
-
- @since LibreOffice 5.4
- */
- [optional, property] sequence<any> TypedItemList;
};
diff --git a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
index 05a102b..8e577f8 100644
--- a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
@@ -186,16 +186,6 @@ published service UnoControlListBoxModel
@since OOo 3.3
*/
[optional, property, maybevoid] short ItemSeparatorPos;
-
- /** specifies the list of raw typed (not stringized) items.
-
- <p>This list corresponds with the StringItemList and if given
- has to be of the same length, the elements' positions matching
- those of their string representation in StringItemList.</p>
-
- @since LibreOffice 5.4
- */
- [optional, property] sequence<any> TypedItemList;
};
diff --git a/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl b/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl
deleted file mode 100644
index 8f8003d..0000000
--- a/offapi/com/sun/star/form/binding/XListEntryTypedSource.idl
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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/.
- */
-
-#ifndef __com_sun_star_form_binding_XListEntryTypedSource_idl__
-#define __com_sun_star_form_binding_XListEntryTypedSource_idl__
-
-#include <com/sun/star/form/binding/XListEntrySource.idl>
-
-
-module com { module sun { module star { module form { module binding {
-
-
-/** specifies a source of string list entries with corresponding underlying data values
-
- @see XListEntrySource
-
- @since LibreOffice 5.4
-*/
-interface XListEntryTypedSource : com::sun::star::form::binding::XListEntrySource
-{
- /** provides access to the entirety of all list entries, along with
- the corresponding underlying data values.
-
- @param DataValues
- The sequence is used by
- com::sun::star::form::component::ListBox for external
- sources such as spreadsheets to return the resulting
- data value if a listbox entry was selected, e.g. set it
- at the specified bound cell using
- com::sun::star::form::binding::XValueBinding::setValue().
- */
- sequence< string > getAllListEntriesTyped( [out] sequence< any > DataValues );
-
-};
-
-
-}; }; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx
index c78b862..b2dec38 100644
--- a/sc/source/ui/unoobj/celllistsource.cxx
+++ b/sc/source/ui/unoobj/celllistsource.cxx
@@ -161,64 +161,16 @@ namespace calc
return aAddress;
}
- OUString OCellListSource::getCellTextContent_noCheck( sal_Int32 _nRangeRelativeRow, css::uno::Any* pAny )
+ OUString OCellListSource::getCellTextContent_noCheck( sal_Int32 _nRangeRelativeRow )
{
- OUString sText;
-
OSL_PRECOND( m_xRange.is(), "OCellListSource::getRangeAddress: invalid range!" );
-
- if (!m_xRange.is())
- return sText;
-
- Reference< XCell > xCell( m_xRange->getCellByPosition( 0, _nRangeRelativeRow ));
- if (!xCell.is())
- {
- if (pAny)
- *pAny <<= sText;
- return sText;
- }
-
Reference< XTextRange > xCellText;
- xCellText.set( xCell, UNO_QUERY);
-
- if (xCellText.is())
- sText = xCellText->getString(); // formatted output string
-
- if (pAny)
- {
- switch (xCell->getType())
- {
- case CellContentType_VALUE:
- *pAny <<= xCell->getValue();
- break;
- case CellContentType_TEXT:
- *pAny <<= sText;
- break;
- case CellContentType_FORMULA:
- if (xCell->getError())
- *pAny <<= sText; // Err:... or #...!
- else
- {
- Reference< XPropertySet > xProp( xCell, UNO_QUERY);
- if (xProp.is())
- {
- CellContentType eResultType;
- if ((xProp->getPropertyValue("FormulaResultType") >>= eResultType) &&
- eResultType == CellContentType_VALUE)
- *pAny <<= xCell->getValue();
- else
- *pAny <<= sText;
- }
- }
- break;
- case CellContentType_EMPTY:
- *pAny <<= OUString();
- break;
- default:
- ; // nothing, if actually occurred it would result in #N/A being displayed if selected
- }
- }
+ if ( m_xRange.is() )
+ xCellText.set(m_xRange->getCellByPosition( 0, _nRangeRelativeRow ), css::uno::UNO_QUERY);
+ OUString sText;
+ if ( xCellText.is() )
+ sText = xCellText->getString();
return sText;
}
@@ -241,7 +193,7 @@ namespace calc
if ( _nPosition >= getListEntryCount() )
throw IndexOutOfBoundsException();
- return getCellTextContent_noCheck( _nPosition, nullptr );
+ return getCellTextContent_noCheck( _nPosition );
}
Sequence< OUString > SAL_CALL OCellListSource::getAllListEntries( )
@@ -254,26 +206,7 @@ namespace calc
OUString* pAllEntries = aAllEntries.getArray();
for ( sal_Int32 i = 0; i < aAllEntries.getLength(); ++i )
{
- *pAllEntries++ = getCellTextContent_noCheck( i, nullptr );
- }
-
- return aAllEntries;
- }
-
- Sequence< OUString > SAL_CALL OCellListSource::getAllListEntriesTyped( Sequence< Any >& rDataValues )
- {
- ::osl::MutexGuard aGuard( m_aMutex );
- checkDisposed();
- checkInitialized();
-
- const sal_Int32 nCount = getListEntryCount();
- Sequence< OUString > aAllEntries( nCount );
- rDataValues = Sequence< Any >( nCount );
- OUString* pAllEntries = aAllEntries.getArray();
- Any* pDataValues = rDataValues.getArray();
- for ( sal_Int32 i = 0; i < nCount; ++i )
- {
- *pAllEntries++ = getCellTextContent_noCheck( i, pDataValues++ );
+ *pAllEntries++ = getCellTextContent_noCheck( i );
}
return aAllEntries;
diff --git a/sc/source/ui/unoobj/celllistsource.hxx b/sc/source/ui/unoobj/celllistsource.hxx
index 5444dfe..2763c76 100644
--- a/sc/source/ui/unoobj/celllistsource.hxx
+++ b/sc/source/ui/unoobj/celllistsource.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_UI_UNOOBJ_CELLLISTSOURCE_HXX
#define INCLUDED_SC_SOURCE_UI_UNOOBJ_CELLLISTSOURCE_HXX
-#include <com/sun/star/form/binding/XListEntryTypedSource.hpp>
+#include <com/sun/star/form/binding/XListEntrySource.hpp>
#include <cppuhelper/compbase4.hxx>
#include <cppuhelper/basemutex.hxx>
#include <comphelper/interfacecontainer2.hxx>
@@ -42,7 +42,7 @@ namespace calc
class OCellListSource;
// the base for our interfaces
- typedef ::cppu::WeakAggComponentImplHelper4 < css::form::binding::XListEntryTypedSource
+ typedef ::cppu::WeakAggComponentImplHelper4 < css::form::binding::XListEntrySource
, css::util::XModifyListener
, css::lang::XServiceInfo
, css::lang::XInitialization
@@ -91,9 +91,6 @@ namespace calc
virtual void SAL_CALL addListEntryListener( const css::uno::Reference< css::form::binding::XListEntryListener >& Listener ) override;
virtual void SAL_CALL removeListEntryListener( const css::uno::Reference< css::form::binding::XListEntryListener >& Listener ) override;
- // XListEntryTypedSource
- virtual css::uno::Sequence< OUString > SAL_CALL getAllListEntriesTyped( css::uno::Sequence< css::uno::Any >& rDataValues ) override;
-
// OComponentHelper/XComponent
virtual void SAL_CALL disposing() override;
@@ -133,15 +130,12 @@ namespace calc
/** retrievs the text of a cell within our range
@param _nRangeRelativeRow
the relative row index of the cell within our range
- @param pAny
- if not <NULL/> then the underlying data value is returned in the Any
@precond
our m_xRange is not <NULL/>
*/
OUString
getCellTextContent_noCheck(
- sal_Int32 _nRangeRelativeRow,
- css::uno::Any* pAny
+ sal_Int32 _nRangeRelativeRow
);
void notifyModified();
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 0759ee4..e475b8e 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -1487,7 +1487,6 @@ void VCLXListBox::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
BASEPROPERTY_PRINTABLE,
BASEPROPERTY_SELECTEDITEMS,
BASEPROPERTY_STRINGITEMLIST,
- BASEPROPERTY_TYPEDITEMLIST,
BASEPROPERTY_TABSTOP,
BASEPROPERTY_READONLY,
BASEPROPERTY_ALIGN,
@@ -4122,7 +4121,6 @@ void VCLXComboBox::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds )
BASEPROPERTY_PRINTABLE,
BASEPROPERTY_READONLY,
BASEPROPERTY_STRINGITEMLIST,
- BASEPROPERTY_TYPEDITEMLIST,
BASEPROPERTY_TABSTOP,
BASEPROPERTY_TEXT,
BASEPROPERTY_HIDEINACTIVESELECTION,
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 876cb9e..3a2cf61 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -309,13 +309,6 @@ css::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
}
break;
- case BASEPROPERTY_TYPEDITEMLIST:
- {
- css::uno::Sequence< css::uno::Any > aAnySeq;
- aDefault <<= aAnySeq;
-
- }
- break;
case BASEPROPERTY_SELECTEDITEMS:
{
css::uno::Sequence<sal_Int16> aINT16Seq;
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index a529d33..9a1e5cb 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2277,8 +2277,6 @@ void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCo
// dependencies we know:
// BASEPROPERTY_STRINGITEMLIST->BASEPROPERTY_SELECTEDITEMS
ImplEnsureHandleOrder( _nCount, _pHandles, _pValues, BASEPROPERTY_STRINGITEMLIST, BASEPROPERTY_SELECTEDITEMS );
- // BASEPROPERTY_STRINGITEMLIST->BASEPROPERTY_TYPEDITEMLIST
- ImplEnsureHandleOrder( _nCount, _pHandles, _pValues, BASEPROPERTY_STRINGITEMLIST, BASEPROPERTY_TYPEDITEMLIST );
UnoControlModel::ImplNormalizePropertySequence( _nCount, _pHandles, _pValues, _pValidHandles );
}
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index 2ea27d5..9e8b544 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -221,7 +221,6 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_DEP_PROP_2 ( "State", STATE, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StrictFormat", STRICTFORMAT, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "StringItemList", STRINGITEMLIST, Sequence< OUString >, BOUND, MAYBEDEFAULT ),
- DECL_PROP_2 ( "TypedItemList", TYPEDITEMLIST, Sequence< Any >, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "VisualEffect", VISUALEFFECT, sal_Int16, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "SymbolColor", SYMBOL_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_3 ( "Tabstop", TABSTOP, bool, BOUND, MAYBEDEFAULT, MAYBEVOID ),
More information about the Libreoffice-commits
mailing list