20 #include <com/sun/star/uno/Sequence.hxx>
22 #include <unitconv.hxx>
33 std::u16string_view rFromUnit, std::u16string_view rToUnit,
double fValue ) :
34 maIndexString(BuildIndexString(rFromUnit, rToUnit)),
38 std::u16string_view rFromUnit, std::u16string_view rToUnit )
40 return rFromUnit + OUStringChar(
cDelim) + rToUnit;
64 OUString* pValNameArray = aValNames.getArray();
65 const OUString sSlash(
'/');
68 for (
const OUString& rNode : aNodeNames)
70 OUString
sPrefix = rNode + sSlash;
79 if (aProperties.getLength() != aValNames.getLength())
82 const Any* pProperties = aProperties.getConstArray();
91 pProperties[nIndex++] >>= sFromUnit;
92 pProperties[nIndex++] >>= sToUnit;
93 pProperties[nIndex++] >>= fFactor;
97 maData.insert(std::make_pair(aIndex, aNew));
104 double& fValue, std::u16string_view rFromUnit, std::u16string_view rToUnit )
const
107 MapType::const_iterator it =
maData.find(aIndex);
114 fValue = it->second.GetValue();
static css::uno::Sequence< OUString > GetNodeNames(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, ConfigNameFormat eFormat)
ScUnitConverterData(std::u16string_view rFromUnit, std::u16string_view rToUnit, double fValue)
PropertiesInfo aProperties
static OUString BuildIndexString(std::u16string_view rFromUnit, std::u16string_view rToUnit)
std::deque< AttacherIndex_Impl > aIndex
const OUString & GetIndexString() const
constexpr OUStringLiteral CFGSTR_UNIT_TO
constexpr OUStringLiteral CFGSTR_UNIT_FACTOR
bool GetValue(double &fValue, std::u16string_view rFromUnit, std::u16string_view rToUnit) const
constexpr OUStringLiteral CFGSTR_UNIT_FROM
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
constexpr OUStringLiteral CFGPATH_UNIT