LibreOffice Module sc (master) 1
|
#include <algorithm>
#include <vector>
#include <limits>
#include <string_view>
#include <tools/ref.hxx>
#include <filter.hxx>
Go to the source code of this file.
Classes | |
class | ScfTools |
Contains static methods used anywhere in the filters. More... | |
class | ScFormatFilterPluginImpl |
Macros | |
#define | GETITEM(itemset, itemtype, which) static_cast< const itemtype & >( (itemset).Get( which ) ) |
Expands to the item (with type 'itemtype') with Which-ID 'which'. More... | |
#define | GETITEMBOOL(itemset, which) (static_cast<const SfxBoolItem &>( (itemset).Get( which )).GetValue() ) |
Expands to the value of the SfxBoolItem with Which-ID 'which'. More... | |
Typedefs | |
typedef ::std::vector< sal_uInt8 > | ScfUInt8Vec |
typedef ::std::vector< sal_Int16 > | ScfInt16Vec |
typedef ::std::vector< sal_uInt16 > | ScfUInt16Vec |
typedef ::std::vector< sal_Int32 > | ScfInt32Vec |
typedef ::std::vector< sal_uInt32 > | ScfUInt32Vec |
typedef ::std::vector< OUString > | ScfStringVec |
Functions | |
template<typename ReturnType , typename Type > | |
ReturnType | llimit_cast (Type nValue, ReturnType nMin) |
Returns the value, if it is not less than nMin, otherwise nMin. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | ulimit_cast (Type nValue, ReturnType nMax) |
Returns the value, if it is not greater than nMax, otherwise nMax. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | ulimit_cast (Type nValue) |
Returns the value, if it fits into ReturnType, otherwise the maximum value of ReturnType. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | limit_cast (Type nValue, ReturnType nMin, ReturnType nMax) |
Returns the value, if it is not less than nMin and not greater than nMax, otherwise one of the limits. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | limit_cast (Type nValue) |
Returns the value, if it fits into ReturnType, otherwise one of the limits of ReturnType. More... | |
template<typename Type > | |
bool | get_flag (Type nBitField, Type nMask) |
Returns true, if at least one of the bits set in nMask is set in nBitField. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | get_flagvalue (Type nBitField, Type nMask, ReturnType nSet, ReturnType nUnset) |
Returns nSet, if at least one bit of nMask is set in nBitField, otherwise nUnset. More... | |
template<typename ReturnType , typename Type > | |
ReturnType | extract_value (Type nBitField, sal_uInt8 nStartBit, sal_uInt8 nBitCount) |
Extracts a value from a bit field. More... | |
template<typename Type > | |
void | set_flag (Type &rnBitField, Type nMask, bool bSet=true) |
Sets or clears (according to bSet) all set bits of nMask in rnBitField. More... | |
template<typename Type , typename InsertType > | |
void | insert_value (Type &rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal_uInt8 nBitCount) |
Inserts a value into a bitfield. More... | |
#define GETITEM | ( | itemset, | |
itemtype, | |||
which | |||
) | static_cast< const itemtype & >( (itemset).Get( which ) ) |
Expands to the item (with type 'itemtype') with Which-ID 'which'.
Definition at line 35 of file ftools.hxx.
#define GETITEMBOOL | ( | itemset, | |
which | |||
) | (static_cast<const SfxBoolItem &>( (itemset).Get( which )).GetValue() ) |
Expands to the value of the SfxBoolItem with Which-ID 'which'.
Definition at line 39 of file ftools.hxx.
typedef ::std::vector< sal_Int16 > ScfInt16Vec |
Definition at line 254 of file ftools.hxx.
typedef ::std::vector< sal_Int32 > ScfInt32Vec |
Definition at line 256 of file ftools.hxx.
typedef ::std::vector< OUString > ScfStringVec |
Definition at line 258 of file ftools.hxx.
typedef ::std::vector< sal_uInt16 > ScfUInt16Vec |
Definition at line 255 of file ftools.hxx.
typedef ::std::vector< sal_uInt32 > ScfUInt32Vec |
Definition at line 257 of file ftools.hxx.
typedef ::std::vector< sal_uInt8 > ScfUInt8Vec |
Definition at line 253 of file ftools.hxx.
|
inline |
Extracts a value from a bit field.
@descr Returns in rnRet the data fragment from nBitField, that starts at bit nStartBit (0-based, bit 0 is rightmost) with the width of nBitCount. rnRet will be right-aligned (normalized). For instance: extract_value( n, 0x4321, 8, 4 ) stores 3 in n (value in bits 8-11).
Definition at line 88 of file ftools.hxx.
References nBitCount.
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition at line 75 of file ftools.hxx.
Referenced by XclExpAutofilter::AddEntry(), XclTokenArrayHelper::ChangeTokenClass(), ImportExcel::Colinfo(), XclImpPivotTable::Convert(), XclImpChChart::Convert(), XclImpChValueRange::Convert(), XclImpChChart3d::Convert(), XclImpChLabelRange::Convert(), XclImpColRowSettings::Convert(), XclExpChLabelRange::ConvertAxisPosition(), XclImpChValueRange::ConvertAxisPosition(), XclImpChLabelRange::ConvertAxisPosition(), XclImpChText::ConvertDataLabel(), XclImpPTField::ConvertFieldInfo(), XclImpDrawObjBase::ConvertFrameStyle(), XclImpColRowSettings::ConvertHiddenFlags(), XclImpPTItem::ConvertItem(), XclImpChSourceLink::ConvertNumFmt(), XclImpPTField::ConvertRCPField(), XclImpChAttachedLabel::CreateDataLabel(), XclImpPolygonObj::DoCreateSdrObj(), XclImpTextObj::DoCreateSdrObj(), XclImpNoteObj::DoPreProcessSdrObj(), XclImpButtonObj::DoProcessControl(), XclImpCellAlign::FillFromCF(), XclImpCellBorder::FillFromCF8(), XclImpCellArea::FillFromCF8(), XclImpCellProt::FillFromXF2(), XclImpCellAlign::FillFromXF3(), XclImpCellProt::FillFromXF3(), XclImpCellAlign::FillFromXF5(), XclImpCellAlign::FillFromXF8(), XclImpCellBorder::FillFromXF8(), XclFunctionProvider::FillScFuncMap(), XclFunctionProvider::FillXclFuncMap(), XclImpDocViewSettings::Finalize(), get_flagvalue(), XclPTFieldExtInfo::GetApiLayoutMode(), XclPTFieldExtInfo::GetApiSortMode(), XclExpChText::GetAttLabelFlags(), XclTools::GetDoubleFromRK(), XclImpChTick::GetFontColor(), XclImpChText::GetFontColor(), XclImpChTick::GetRotation(), XclImpPCField::GetScDateGroupInfo(), XclImpPCField::GetScNumGroupInfo(), XclTokenArrayHelper::GetTokenId(), XclPCField::Has16BitIndexes(), XclImpChType::HasCategoryLabels(), XclExpChMarkerFormat::HasFillColor(), XclExpPivotCache::HasItemIndexList(), XclExpChMarkerFormat::HasLineColor(), XclPCField::HasPostponedItems(), XclImpChSeriesFormat::HasSpline(), XclExpAutofilter::HasTop10(), XclImpChTypeGroup::HasVarPointFormat(), XclImpDrawObjBase::ImplReadObj3(), XclImpDrawObjBase::ImplReadObj4(), XclImpDrawObjBase::ImplReadObj5(), XclImpDrawObjBase::ImplReadObj8(), XclExpChLineFormat::IsAuto(), XclExpChAreaFormat::IsAuto(), XclImpChLineFormat::IsAuto(), XclImpChAreaFormat::IsAuto(), XclImpChMarkerFormat::IsAuto(), XclObjLineData::IsAuto(), XclObjFillData::IsAuto(), XclExpChChart3d::IsClustered(), XclImpChChart3d::IsClustered(), XclExpRow::IsDefaultable(), XclImpChText::IsDeleted(), XclPCField::IsGroupBaseField(), XclExpDefaultRowData::IsHidden(), XclExpRow::IsHidden(), XclImpChChart::IsManualPlotArea(), XclFunctionInfo::IsParamPairs(), XclImpChType::IsPercent(), XclImpChLineFormat::IsShowAxis(), XclImpChType::IsStacked(), XclExpDefaultRowData::IsUnsynced(), XclExpRow::IsUnsynced(), XclFunctionInfo::IsVolatile(), XclImpStream::JumpToNextStringContinue(), XclImpAutoFilterData::ReadAutoFilter(), XclImpCondFormat::ReadCF(), XclImpFont::ReadCFFontBlock(), XclImpValidationManager::ReadDV(), XclImpHyperlink::ReadEmbeddedData(), XclImpPictureObj::ReadFlags3(), XclImpPictureObj::ReadFlags8(), XclImpFont::ReadFontData2(), XclImpFont::ReadFontData5(), XclImpChLegend::ReadHeaderRecord(), XclImpWebQuery::ReadParamqry(), XclImpPageSettings::ReadSetup(), XclImpStyle::ReadStyle(), XclImpPCField::ReadSxfield(), XclImpStream::ReadUniStringExtHeader(), XclImpTabViewSettings::ReadWindow2(), XclImpWebQuery::ReadWqsettings(), XclImpXF::ReadXF3(), XclImpXF::ReadXF4(), XclImpXF::ReadXF5(), XclImpXF::ReadXF8(), ImportExcel::Row25(), ImportExcel::Row34(), XclExpAutofilter::SaveXml(), XclExpDV::SaveXml(), XclExpColinfo::SaveXml(), XclExpRow::SaveXml(), XclExpWindow1::SaveXml(), XclExpPCField::SetGroupChildField(), XclImpColRowSettings::SetHeight(), XclImpColRowSettings::SetRowSettings(), XclImpXF::SetUsedFlags(), XclImpChText::UpdateText(), XclChPropSetHelper::WriteMarkerProperties(), ImportExcel::Wsbool(), XclImpExtName::XclImpExtName(), and XclImpName::XclImpName().
|
inline |
Returns nSet, if at least one bit of nMask is set in nBitField, otherwise nUnset.
Definition at line 80 of file ftools.hxx.
References get_flag().
Referenced by XclImpChLegend::CreateLegend(), XclImpCheckBoxObj::DoProcessControl(), XclImpScrollBarObj::DoProcessControl(), XclImpCellBorder::FillFromXF2(), XclImpCellArea::FillFromXF2(), XclImpChType::Finalize(), XclPTFieldExtInfo::GetApiAutoShowMode(), XclImpAutoFilterData::ReadAutoFilter(), XclImpValidationManager::ReadDV(), XclImpFont::ReadFontData2(), XclImpTbxObjListBase::SetBoxFormatting(), and XclImpExtName::XclImpExtName().
void insert_value | ( | Type & | rnBitField, |
InsertType | nValue, | ||
sal_uInt8 | nStartBit, | ||
sal_uInt8 | nBitCount | ||
) |
Inserts a value into a bitfield.
@descr Inserts the lower nBitCount bits of nValue into rnBitField, starting there at bit nStartBit. Other contents of rnBitField keep unchanged.
Definition at line 102 of file ftools.hxx.
References nBitCount, and nValue.
Referenced by XclExpChText::ConvertDataLabel(), XclExpChText::ConvertTitle(), XclExpCellBorder::FillToCF8(), XclExpCellArea::FillToCF8(), XclExpCellAlign::FillToXF5(), XclExpCellArea::FillToXF5(), XclExpCellBorder::FillToXF5(), XclExpCellAlign::FillToXF8(), XclExpCellBorder::FillToXF8(), XclExpCellArea::FillToXF8(), XclChPropSetHelper::ReadEscherProperties(), XclExpWebQuery::Save(), XclTxo::SaveCont(), XclPTFieldExtInfo::SetApiAutoShowCount(), XclExpChTick::SetRotation(), XclExpChText::SetRotation(), XclPCNumGroupInfo::SetXclDataType(), XclExpXF::WriteBody5(), XclExpXF::WriteBody8(), XclObjDropDown::WriteSubRecs(), XclExpTbxControlObj::WriteSubRecs(), XclExpColinfo::XclExpColinfo(), and XclExpRow::XclExpRow().
Returns the value, if it fits into ReturnType, otherwise one of the limits of ReturnType.
Definition at line 68 of file ftools.hxx.
References limit_cast(), and nValue.
|
inline |
Returns the value, if it is not less than nMin and not greater than nMax, otherwise one of the limits.
Definition at line 63 of file ftools.hxx.
References nValue.
Referenced by limit_cast().
|
inline |
Returns the value, if it is not less than nMin, otherwise nMin.
Definition at line 48 of file ftools.hxx.
References nValue.
Sets or clears (according to bSet) all set bits of nMask in rnBitField.
Definition at line 95 of file ftools.hxx.
Referenced by XclImpColRowSettings::ApplyColFlag(), XclTokenArrayHelper::ChangeTokenClass(), XclExpChValueRange::Convert(), XclExpChLabelRange::Convert(), XclExpChLegend::Convert(), XclExpChChart3d::Convert(), XclExpChFrLabelProps::Convert(), XclExpChLineFormat::Convert(), XclExpChAreaFormat::Convert(), XclExpChType::Convert(), XclExpChLabelRange::ConvertAxisPosition(), XclExpChValueRange::ConvertAxisPosition(), XclExpChText::ConvertDataLabel(), XclExpChText::ConvertLegend(), XclExpChSourceLink::ConvertNumFmt(), XclExpFmlaCompImpl::ConvertRefData(), XclExpChTypeGroup::ConvertSeries(), XclExpChMarkerFormat::ConvertStockSymbol(), XclExpChText::ConvertTitle(), XclExpChText::ConvertTrendLineEquation(), XclExpCellProt::FillToXF3(), XclExpCellAlign::FillToXF5(), XclExpCellAlign::FillToXF8(), XclExpCellBorder::FillToXF8(), XclExpPCField::Finalize(), XclImpChAxis::Finalize(), XclExpRow::Finalize(), XclExpChText::GetAttLabelFlags(), XclExpXF::GetUsedFlags(), XclExpRow::InsertCell(), lcl_FillProps(), XclChPropSetHelper::ReadAreaProperties(), XclChPropSetHelper::ReadLineProperties(), XclChPropSetHelper::ReadMarkerProperties(), XclExpWebQuery::Save(), XclPTFieldExtInfo::SetApiAutoShowMode(), XclPTFieldExtInfo::SetApiLayoutMode(), XclPTFieldExtInfo::SetApiSortMode(), XclExpChLineFormat::SetAuto(), XclExpChAreaFormat::SetAuto(), XclExpChFrame::SetAutoFlags(), XclExpChChart3d::SetClustered(), XclExpPCField::SetDateGroupLimit(), XclImpColRowSettings::SetDefHeight(), XclImpTbxObjBase::SetDffProperties(), XclExpChText::SetFont(), XclExpChTick::SetFontColor(), XclExpPCField::SetGroupChildField(), XclImpColRowSettings::SetHeight(), XclExpChChart::SetManualPlotArea(), XclExpPCField::SetNumGroupLimit(), XclExpPTField::SetPropertiesFromDim(), XclExpPivotTable::SetPropertiesFromDP(), XclExpPTItem::SetPropertiesFromMember(), XclExpChTick::SetRotation(), XclImpColRowSettings::SetRowSettings(), XclExpChLineFormat::SetShowAxis(), XclExpChType::SetStacked(), XclExpChLabelRange::SetTicksBetweenCateg(), XclImpChText::UpdateDataLabel(), XclImpChFrame::UpdateObjFrame(), XclImpChText::UpdateText(), XclExpCFImpl::WriteBody(), XclExpNote::WriteBody(), XclExpSetup::WriteBody(), XclExpFont::WriteBody(), XclExpStyle::WriteBody(), XclExpArray::WriteBody(), XclExpTableop::WriteBody(), XclExpXF::WriteBody5(), XclExpXF::WriteBody8(), XclExpFormulaCell::WriteContents(), XclExpTbxControlObj::WriteSbs(), XclObjDropDown::WriteSubRecs(), XclObjOle::WriteSubRecs(), XclExpTbxControlObj::WriteSubRecs(), XclExpChChart::XclExpChChart(), XclExpColinfo::XclExpColinfo(), XclExpDefaultRowData::XclExpDefaultRowData(), XclExpDV::XclExpDV(), XclExpPivotCache::XclExpPivotCache(), XclExpRow::XclExpRow(), XclExpWindow1::XclExpWindow1(), XclExpWindow2::XclExpWindow2(), XclImpChFrameBase::XclImpChFrameBase(), and XclImpName::XclImpName().
Returns the value, if it fits into ReturnType, otherwise the maximum value of ReturnType.
Definition at line 58 of file ftools.hxx.
References nValue, and ulimit_cast().
|
inline |
Returns the value, if it is not greater than nMax, otherwise nMax.
Definition at line 53 of file ftools.hxx.
References nValue.
Referenced by ulimit_cast().