LibreOffice Module sc (master)  1
Classes | Macros | Typedefs | Functions
ftools.hxx File Reference
#include <vector>
#include <limits>
#include <tools/ref.hxx>
#include <filter.hxx>
Include dependency graph for ftools.hxx:
This graph shows which files directly or indirectly include this file:

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_uInt8ScfUInt8Vec
 
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...
 

Macro Definition Documentation

#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 33 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 37 of file ftools.hxx.

Typedef Documentation

typedef ::std::vector< sal_Int16 > ScfInt16Vec

Definition at line 252 of file ftools.hxx.

typedef ::std::vector< sal_Int32 > ScfInt32Vec

Definition at line 254 of file ftools.hxx.

typedef ::std::vector< OUString > ScfStringVec

Definition at line 256 of file ftools.hxx.

typedef ::std::vector< sal_uInt16 > ScfUInt16Vec

Definition at line 253 of file ftools.hxx.

typedef ::std::vector< sal_uInt32 > ScfUInt32Vec

Definition at line 255 of file ftools.hxx.

typedef ::std::vector< sal_uInt8 > ScfUInt8Vec

Definition at line 251 of file ftools.hxx.

Function Documentation

template<typename ReturnType , typename Type >
ReturnType extract_value ( Type  nBitField,
sal_uInt8  nStartBit,
sal_uInt8  nBitCount 
)
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 86 of file ftools.hxx.

template<typename Type >
bool get_flag ( Type  nBitField,
Type  nMask 
)
inline

Returns true, if at least one of the bits set in nMask is set in nBitField.

Definition at line 73 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().

template<typename ReturnType , typename Type >
ReturnType get_flagvalue ( Type  nBitField,
Type  nMask,
ReturnType  nSet,
ReturnType  nUnset 
)
inline
template<typename Type , typename InsertType >
void insert_value ( Type rnBitField,
InsertType  nValue,
sal_uInt8  nStartBit,
sal_uInt8  nBitCount 
)
template<typename ReturnType , typename Type >
ReturnType limit_cast ( Type  nValue,
ReturnType  nMin,
ReturnType  nMax 
)
inline
template<typename ReturnType , typename Type >
ReturnType limit_cast ( Type  nValue)
inline

Returns the value, if it fits into ReturnType, otherwise one of the limits of ReturnType.

Definition at line 66 of file ftools.hxx.

References limit_cast().

template<typename ReturnType , typename Type >
ReturnType llimit_cast ( Type  nValue,
ReturnType  nMin 
)
inline

Returns the value, if it is not less than nMin, otherwise nMin.

Definition at line 46 of file ftools.hxx.

Referenced by XclExpSstImpl::Save().

template<typename Type >
void set_flag ( Type rnBitField,
Type  nMask,
bool  bSet = true 
)
inline

Sets or clears (according to bSet) all set bits of nMask in rnBitField.

Definition at line 93 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().

template<typename ReturnType , typename Type >
ReturnType ulimit_cast ( Type  nValue,
ReturnType  nMax 
)
inline
template<typename ReturnType , typename Type >
ReturnType ulimit_cast ( Type  nValue)
inline

Returns the value, if it fits into ReturnType, otherwise the maximum value of ReturnType.

Definition at line 56 of file ftools.hxx.

References ulimit_cast().