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 36 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 40 of file ftools.hxx.
typedef ::std::vector< sal_Int16 > ScfInt16Vec |
Definition at line 255 of file ftools.hxx.
typedef ::std::vector< sal_Int32 > ScfInt32Vec |
Definition at line 257 of file ftools.hxx.
typedef ::std::vector< OUString > ScfStringVec |
Definition at line 259 of file ftools.hxx.
typedef ::std::vector< sal_uInt16 > ScfUInt16Vec |
Definition at line 256 of file ftools.hxx.
typedef ::std::vector< sal_uInt32 > ScfUInt32Vec |
Definition at line 258 of file ftools.hxx.
typedef ::std::vector< sal_uInt8 > ScfUInt8Vec |
Definition at line 254 of file ftools.hxx.
|
inline |
Extracts a value from a bit field.
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 89 of file ftools.hxx.
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition at line 76 of file ftools.hxx.
Referenced by XclExpAutofilter::AddEntry(), XclTokenArrayHelper::ChangeTokenClass(), ImportExcel::Colinfo(), XclImpColRowSettings::Convert(), XclImpPivotTable::Convert(), XclImpChChart3d::Convert(), XclImpChLabelRange::Convert(), XclImpChValueRange::Convert(), XclImpChChart::Convert(), XclExpChLabelRange::ConvertAxisPosition(), XclImpChLabelRange::ConvertAxisPosition(), XclImpChValueRange::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(), XclImpCellProt::FillFromXF3(), XclImpCellAlign::FillFromXF3(), XclImpCellAlign::FillFromXF5(), XclImpCellAlign::FillFromXF8(), XclImpCellBorder::FillFromXF8(), XclFunctionProvider::FillScFuncMap(), XclFunctionProvider::FillXclFuncMap(), XclImpDocViewSettings::Finalize(), get_flagvalue(), XclPTFieldExtInfo::GetApiLayoutMode(), XclPTFieldExtInfo::GetApiSortMode(), XclExpChText::GetAttLabelFlags(), XclTools::GetDoubleFromRK(), XclImpChText::GetFontColor(), XclImpChTick::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(), XclImpChLineFormat::IsAuto(), XclExpChAreaFormat::IsAuto(), XclImpChAreaFormat::IsAuto(), XclObjLineData::IsAuto(), XclObjFillData::IsAuto(), XclImpChMarkerFormat::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(), XclExpWindow1::SaveXml(), XclExpDV::SaveXml(), XclExpAutofilter::SaveXml(), XclExpColinfo::SaveXml(), XclExpRow::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 81 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.
Inserts the lower nBitCount bits of nValue into rnBitField, starting there at bit nStartBit. Other contents of rnBitField keep unchanged.
Definition at line 103 of file ftools.hxx.
Referenced by XclExpChText::ConvertDataLabel(), XclExpChText::ConvertTitle(), XclExpCellBorder::FillToCF8(), XclExpCellArea::FillToCF8(), XclExpCellAlign::FillToXF5(), XclExpCellBorder::FillToXF5(), XclExpCellArea::FillToXF5(), XclExpCellAlign::FillToXF8(), XclExpCellBorder::FillToXF8(), XclExpCellArea::FillToXF8(), XclChPropSetHelper::ReadEscherProperties(), XclExpWebQuery::Save(), XclTxo::SaveCont(), XclPTFieldExtInfo::SetApiAutoShowCount(), XclExpChText::SetRotation(), XclExpChTick::SetRotation(), XclPCNumGroupInfo::SetXclDataType(), XclExpXF::WriteBody5(), XclExpXF::WriteBody8(), XclObjDropDown::WriteSubRecs(), XclExpTbxControlObj::WriteSubRecs(), XclExpColinfo::XclExpColinfo(), and XclExpRow::XclExpRow().
|
inline |
Returns the value, if it is not less than nMin and not greater than nMax, otherwise one of the limits.
Definition at line 64 of file ftools.hxx.
Referenced by XclExpChRoot::CalcChartXFromHmm(), XclExpChRoot::CalcChartYFromHmm(), XclExpChType::Convert(), XclExpChChart3d::Convert(), XclImpChChart3d::Convert(), XclExpChLabelRange::Convert(), XclExpChLabelRange::ConvertAxisPosition(), XclImpLineObj::DoCreateSdrObj(), ScCellShell::ExecuteEdit(), XclExpCellAlign::FillFromItemSet(), XclImpChSourceLink::GetCellCount(), XclTools::GetScColumnWidth(), XclTokenArray::GetSize(), XclTools::GetXclColumnWidth(), limit_cast(), XclExpFmlaCompImpl::ProcessMatrix(), ImportExcel::ReadDimensions(), XclImpTabViewSettings::ReadScl(), XclExpPCField::SetDateGroupLimit(), XclExpString::SetStrLen(), and XclExpTbxControlObj::WriteSubRecs().
|
inline |
Returns the value, if it fits into ReturnType, otherwise one of the limits of ReturnType.
Definition at line 69 of file ftools.hxx.
References limit_cast().
|
inline |
Returns the value, if it is not less than nMin, otherwise nMin.
Definition at line 49 of file ftools.hxx.
Referenced by XclExpSstImpl::Save().
Sets or clears (according to bSet) all set bits of nMask in rnBitField.
Definition at line 96 of file ftools.hxx.
Referenced by XclImpColRowSettings::ApplyColFlag(), XclTokenArrayHelper::ChangeTokenClass(), XclExpChLineFormat::Convert(), XclExpChAreaFormat::Convert(), XclExpChFrLabelProps::Convert(), XclExpChType::Convert(), XclExpChChart3d::Convert(), XclExpChLegend::Convert(), XclExpChLabelRange::Convert(), XclExpChValueRange::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(), XclExpRow::Finalize(), XclImpChAxis::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(), XclExpSetup::WriteBody(), XclExpArray::WriteBody(), XclExpFont::WriteBody(), XclExpTableop::WriteBody(), XclExpNote::WriteBody(), XclExpStyle::WriteBody(), XclExpCFImpl::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().
|
inline |
Returns the value, if it is not greater than nMax, otherwise nMax.
Definition at line 54 of file ftools.hxx.
Referenced by XclExpHFConverter::AppendPortion(), XclExpChSourceLink::ConvertDataSequence(), XclImpSupbook::GetTabCount(), XclImpPivotTable::ReadSxivd(), XclImpPivotTable::ReadSxpi(), ulimit_cast(), XclExpSheetEnhancedProtection::WriteBody(), XclRangeList::WriteSubList(), XclExpCellTable::XclExpCellTable(), and XclExpGuts::XclExpGuts().
|
inline |
Returns the value, if it fits into ReturnType, otherwise the maximum value of ReturnType.
Definition at line 59 of file ftools.hxx.
References ulimit_cast().