33 : aMacName(
std::move( _aMacName )), aLibName( rLanguage),
76 [](
const SvxMacroTable::value_type& rOwnEntry,
const SvxMacroTable::value_type& rOtherEntry) {
77 const SvxMacro& rOwnMac = rOwnEntry.second;
78 const SvxMacro& rOtherMac = rOtherEntry.second;
79 return rOwnEntry.first == rOtherEntry.first
80 && rOwnMac.GetLibName() == rOtherMac.GetLibName()
81 && rOwnMac.GetMacName() == rOtherMac.GetMacName();
94 SAL_WARN(
"editeng",
"Parsing error: negative value " << nReadMacro);
101 size_t nMinRecordSize = 2 + 2*nMinStringSize;
106 if (nMacro > nMaxRecords)
108 SAL_WARN(
"editeng",
"Parsing error: " << nMaxRecords <<
109 " max possible entries, but " << nMacro<<
" claimed, truncating");
110 nMacro = nMaxRecords;
113 for (
decltype(nMacro)
i = 0;
i < nMacro; ++
i)
116 OUString aLibName, aMacName;
143 const SvxMacro& rMac = rEntry.second;
144 rStream.
WriteUInt16(
static_cast<sal_uInt16
>(rEntry.first) );
193 assert(SfxPoolItem::operator==(rAttr));
198 return rOwn == rOther;
Base class for providers of defaults of SfxPoolItems.
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
sal_Int32 GetVersion() const
rtl_TextEncoding GetStreamCharSet() const
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvxMacroTableDtor aMacroTable
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasse...
virtual SvxMacroItem * Clone(SfxItemPool *pPool=nullptr) const override
virtual bool operator==(const SfxPoolItem &) const override
SvxMacroItem(const sal_uInt16 nId)
void SetMacro(SvMacroItemId nEvent, const SvxMacro &)
SvxMacroTable aSvxMacroTable
void Erase(SvMacroItemId nEvent)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
SvStream & Write(SvStream &) const
bool IsKeyValid(SvMacroItemId nEvent) const
bool operator==(const SvxMacroTableDtor &rOther) const
SvxMacroTableDtor & operator=(const SvxMacroTableDtor &rCpy)
const SvxMacro * Get(SvMacroItemId nEvent) const
SvxMacro(OUString aMacName, const OUString &rLanguage)
const OUString & GetMacName() const
OUString GetLanguage() const
ScriptType GetScriptType() const
const OUString & GetLibName() const
#define SAL_WARN(area, stream)
constexpr OUStringLiteral SVX_MACRO_LANGUAGE_JAVASCRIPT
constexpr OUStringLiteral SVX_MACRO_LANGUAGE_STARBASIC
#define SVX_MACROTBL_VERSION31
#define SVX_MACROTBL_VERSION40
constexpr OUStringLiteral SVX_MACRO_LANGUAGE_SF
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OUString readByteString(SvStream &rStream)
Read in a Unicode string from a streamed byte string representation.
void writeByteString(SvStream &rStream, std::u16string_view rString)
Write a byte string representation of a Unicode string into a stream.