21#include <document.hxx>
22#include <com/sun/star/beans/PropertyValue.hpp>
31 uno::Sequence<beans::PropertyValue> aProps;
32 if( !(aAny >>= aProps) )
35 for(
const auto& rProp : std::as_const(aProps) )
37 if( rProp.Name ==
"CodeName" )
40 if( rProp.Value >>= sCodeName )
42 rCodeName = sCodeName;
69 OUString sSheetName, sCodeName;
75 return !sCodeName.isEmpty();
93 OUString sSheetName, sCodeName;
110 std::vector< OUString > aNames;
116 OUString sSheetName, sCodeName;
120 if (!sCodeName.isEmpty())
123 aNames.push_back(sSheetName);
141 OUString sSheetName, sCodeName;
155 OUString sDocName(
"*doc*");
157 if( xNameAccess->hasByName( sDocName ) )
159 aAny = xNameAccess->getByName( sDocName );
168 if( pDoc->
GetName(
i, sSheetName ) &&
169 xNameAccess->hasByName( sSheetName ) )
171 aAny = xNameAccess->getByName( sSheetName );
constexpr OUStringLiteral gsCodeNameProp(u"CodeName")
constexpr OUStringLiteral gsDocName(u"*doc*")
void SetCodeName(const OUString &r)
const OUString & GetCodeName() const
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
SC_DLLPUBLIC SCTAB GetTableCount() const
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
static bool _getCodeName(const css::uno::Any &aAny, OUString &rCodeName)
XMLCodeNameProvider(ScDocument *pDoc)
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual css::uno::Type SAL_CALL getElementType() override
static void set(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, ScDocument *pDoc)
virtual ~XMLCodeNameProvider() override
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)