LibreOffice Module sc (master) 1
|
Contains static methods used anywhere in the filters. More...
#include <ftools.hxx>
Public Member Functions | |
ScfTools ()=delete | |
We don't want anybody to instantiate this class, since it is just a collection of static items. More... | |
ScfTools (const ScfTools &)=delete | |
const ScfTools & | operator= (const ScfTools &)=delete |
Static Public Member Functions | |
static void | ReadLongDouble (SvStream &rStrm, double &fResult) |
Reads a 10-byte-long-double and converts it to double. More... | |
static rtl_TextEncoding | GetSystemTextEncoding () |
Returns system text encoding for byte string conversion. More... | |
static OUString | GetHexStr (sal_uInt16 nValue) |
Returns a string representing the hexadecimal value of nValue. More... | |
static sal_uInt8 | GetMixedColorComp (sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans) |
Mixes RGB components with given transparence. More... | |
static Color | GetMixedColor (const Color &rFore, const Color &rBack, sal_uInt8 nTrans) |
Mixes colors with given transparence. More... | |
static OUString | ConvertToScDefinedName (const OUString &rName) |
Converts a string to a valid Calc defined name or database range name. More... | |
static tools::SvRef< SotStorage > | OpenStorageRead (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrgName) |
Tries to open an existing storage with the specified name in the passed storage (read-only). More... | |
static tools::SvRef< SotStorage > | OpenStorageWrite (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrgName) |
Creates and opens a storage with the specified name in the passed storage (read/write). More... | |
static tools::SvRef< SotStorageStream > | OpenStorageStreamRead (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) |
Tries to open an existing stream with the specified name in the passed storage (read-only). More... | |
static tools::SvRef< SotStorageStream > | OpenStorageStreamWrite (tools::SvRef< SotStorage > const &xStrg, const OUString &rStrmName) |
Creates and opens a stream with the specified name in the passed storage (read/write). More... | |
static bool | CheckItem (const SfxItemSet &rItemSet, sal_uInt16 nWhichId, bool bDeep) |
Returns true, if the passed item set contains the item. More... | |
static bool | CheckItems (const SfxItemSet &rItemSet, const sal_uInt16 *pnWhichIds, bool bDeep) |
Returns true, if the passed item set contains at least one of the items. More... | |
static void | PutItem (SfxItemSet &rItemSet, const SfxPoolItem &rItem, sal_uInt16 nWhichId, bool bSkipPoolDef) |
Puts the item into the passed item set. More... | |
static void | PutItem (SfxItemSet &rItemSet, const SfxPoolItem &rItem, bool bSkipPoolDef) |
Puts the item into the passed item set. More... | |
static ScStyleSheet & | MakeCellStyleSheet (ScStyleSheetPool &rPool, const OUString &rStyleName, bool bForceName) |
Creates and returns a cell style sheet and inserts it into the pool. More... | |
static ScStyleSheet & | MakePageStyleSheet (ScStyleSheetPool &rPool, const OUString &rStyleName, bool bForceName) |
Creates and returns a page style sheet and inserts it into the pool. More... | |
static OString | read_zeroTerminated_uInt8s_ToOString (SvStream &rStrm, sal_Int32 &rnBytesLeft) |
Reads and returns a zero terminated byte string and decreases a stream counter. More... | |
static OUString | read_zeroTerminated_uInt8s_ToOUString (SvStream &rStrm, sal_Int32 &rnBytesLeft, rtl_TextEncoding eTextEnc) |
Reads and returns a zero terminated byte string and decreases a stream counter. More... | |
static void | AppendCString (SvStream &rStrm, OUString &rString, rtl_TextEncoding eTextEnc) |
Appends a zero terminated byte string. More... | |
static const OUString & | GetHTMLDocName () |
Returns the built-in range name for an HTML document. More... | |
static const OUString & | GetHTMLTablesName () |
Returns the built-in range name for all HTML tables. More... | |
static OUString | GetNameFromHTMLIndex (sal_uInt32 nIndex) |
Returns the built-in range name for an HTML table, specified by table index. More... | |
static OUString | GetNameFromHTMLName (std::u16string_view rTabName) |
Returns the built-in range name for an HTML table, specified by table name. More... | |
static bool | IsHTMLDocName (std::u16string_view rSource) |
Returns true, if rSource is the built-in range name for an HTML document. More... | |
static bool | IsHTMLTablesName (std::u16string_view rSource) |
Returns true, if rSource is the built-in range name for all HTML tables. More... | |
static bool | GetHTMLNameFromName (const OUString &rSource, OUString &rName) |
Converts a built-in range name to an HTML table name. More... | |
Static Private Member Functions | |
static const OUString & | GetHTMLIndexPrefix () |
Returns the prefix for table index names. More... | |
static const OUString & | GetHTMLNamePrefix () |
Returns the prefix for table names. More... | |
Contains static methods used anywhere in the filters.
Definition at line 119 of file ftools.hxx.
|
delete |
We don't want anybody to instantiate this class, since it is just a collection of static items.
|
delete |
|
static |
Appends a zero terminated byte string.
Definition at line 278 of file ftools.cxx.
References read_zeroTerminated_uInt8s_ToOUString(), and rStrm.
Referenced by ImportLotus::Read().
|
static |
Returns true, if the passed item set contains the item.
bDeep | true = Searches in parent item sets too. |
Definition at line 200 of file ftools.cxx.
References SfxItemSet::GetItemState().
Referenced by CheckItems(), XclExpColor::FillFromItemSet(), XclExpCellProt::FillFromItemSet(), XclExpCellArea::FillFromItemSet(), XclExpCellBorder::FillFromItemSet(), XclExpCellAlign::FillFromItemSet(), XclExpXF::Init(), XclExpCellTable::XclExpCellTable(), XclExpCFImpl::XclExpCFImpl(), and XclExpPageSettings::XclExpPageSettings().
|
static |
Returns true, if the passed item set contains at least one of the items.
pnWhichIds | Zero-terminated array of Which-IDs. |
bDeep | true = Searches in parent item sets too. |
Definition at line 205 of file ftools.cxx.
References CheckItem().
Referenced by XclExpFontHelper::CheckItems().
|
static |
Converts a string to a valid Calc defined name or database range name.
@descr Defined names in Calc may contain letters, digits (*), underscores, periods (*), colons (*), question marks, and dollar signs. (*) = not allowed at first position.
Definition at line 149 of file ftools.cxx.
References CharName, ScCompiler::IsCharFlagAllConventions(), Name, nPos, sName, and u.
Referenced by OP_NamedRange(), OP_SymphNamedRange(), XclImpExtName::XclImpExtName(), and XclImpName::XclImpName().
|
static |
Returns a string representing the hexadecimal value of nValue.
Definition at line 121 of file ftools.cxx.
Referenced by XclImpPivotCache::ReadPivotCacheStream(), and XclExpPivotCache::WriteCacheStream().
|
static |
Returns the built-in range name for an HTML document.
Definition at line 285 of file ftools.cxx.
Referenced by IsHTMLDocName(), XclImpWebQuery::ReadParamqry(), and ScHTMLImport::WriteToDocument().
|
staticprivate |
Returns the prefix for table index names.
Definition at line 297 of file ftools.cxx.
Referenced by GetHTMLNameFromName(), and GetNameFromHTMLIndex().
|
static |
Converts a built-in range name to an HTML table name.
rSource | The string to be determined. |
rName | The HTML table name. |
Definition at line 332 of file ftools.cxx.
References ScGlobal::AddQuotes(), aIndex, GetHTMLIndexPrefix(), GetHTMLNamePrefix(), getLength(), and CharClass::isAsciiNumeric().
Referenced by XclExpWebQuery::XclExpWebQuery().
|
staticprivate |
Returns the prefix for table names.
Definition at line 304 of file ftools.cxx.
Referenced by GetHTMLNameFromName(), and GetNameFromHTMLName().
|
static |
Returns the built-in range name for all HTML tables.
Definition at line 291 of file ftools.cxx.
Referenced by IsHTMLTablesName(), XclImpWebQuery::ReadParamqry(), and ScHTMLImport::WriteToDocument().
Mixes colors with given transparence.
nTrans | Foreground transparence (0x00 == full rFore ... 0x80 = full rBack). |
Definition at line 137 of file ftools.cxx.
References Color::GetBlue(), Color::GetGreen(), GetMixedColorComp(), and Color::GetRed().
Referenced by XclTools::GetPatternColor(), and XclImpChRoot::GetSeriesFillAutoColor().
Mixes RGB components with given transparence.
nTrans | Foreground transparence (0x00 == full nFore ... 0x80 = full nBack). |
Definition at line 131 of file ftools.cxx.
Referenced by GetMixedColor().
|
static |
Returns the built-in range name for an HTML table, specified by table index.
Definition at line 310 of file ftools.cxx.
References aName, GetHTMLIndexPrefix(), and nIndex.
Referenced by ScHTMLImport::GetHTMLRangeNameList(), XclImpWebQuery::ReadWqtables(), and ScHTMLImport::WriteToDocument().
|
static |
Returns the built-in range name for an HTML table, specified by table name.
Definition at line 317 of file ftools.cxx.
References GetHTMLNamePrefix().
Referenced by XclImpWebQuery::ReadWqtables().
|
static |
Returns system text encoding for byte string conversion.
Definition at line 116 of file ftools.cxx.
Referenced by oox::xls::Font::fillToItemSet(), XclImpFont::FillToItemSet(), and XclExpFontBuffer::InitDefaultFonts().
|
static |
Returns true, if rSource is the built-in range name for an HTML document.
Definition at line 322 of file ftools.cxx.
References o3tl::equalsIgnoreAsciiCase(), and GetHTMLDocName().
Referenced by XclExpWebQuery::XclExpWebQuery().
|
static |
Returns true, if rSource is the built-in range name for all HTML tables.
Definition at line 327 of file ftools.cxx.
References o3tl::equalsIgnoreAsciiCase(), and GetHTMLTablesName().
Referenced by ScHTMLImport::GetHTMLRangeNameList(), and XclExpWebQuery::XclExpWebQuery().
|
static |
Creates and returns a cell style sheet and inserts it into the pool.
@descr If the style sheet is already in the pool, another unused style name is used.
bForceName | Controls behaviour, if the style already exists: true = Old existing style will be renamed; false = New style gets another name. |
Definition at line 257 of file ftools.cxx.
Referenced by oox::xls::StylesBuffer::createDxfStyle(), oox::xls::StylesBuffer::createExtDxfStyle(), and XclImpCondFormat::ReadCF().
|
static |
Creates and returns a page style sheet and inserts it into the pool.
@descr If the style sheet is already in the pool, another unused style name is used.
bForceName | Controls behaviour, if the style already exists: true = Old existing style will be renamed; false = New style gets another name. |
Definition at line 262 of file ftools.cxx.
Referenced by XclImpPageSettings::Finalize().
|
static |
Tries to open an existing storage with the specified name in the passed storage (read-only).
Definition at line 165 of file ftools.cxx.
References tools::SvRef< typename T >::is().
Referenced by XclRoot::OpenStorage().
|
static |
Tries to open an existing stream with the specified name in the passed storage (read-only).
Definition at line 181 of file ftools.cxx.
References tools::SvRef< typename T >::is().
Referenced by XclRoot::OpenStream(), and ScFormatFilterPluginImpl::ScImportExcel().
|
static |
Creates and opens a stream with the specified name in the passed storage (read/write).
Definition at line 189 of file ftools.cxx.
References tools::SvRef< typename T >::is().
Referenced by lcl_ExportExcelBiff(), and XclRoot::OpenStream().
|
static |
Creates and opens a storage with the specified name in the passed storage (read/write).
Definition at line 173 of file ftools.cxx.
References tools::SvRef< typename T >::is().
Referenced by XclRoot::OpenStorage().
|
static |
Puts the item into the passed item set.
@descr The item will be put into the item set, if bSkipPoolDef is false, or if the item differs from the default pool item.
rItemSet | The destination item set. |
rItem | The item to put into the item set. |
bSkipPoolDef | true = Do not put item if it is equal to pool default; false = Always put the item. |
Definition at line 222 of file ftools.cxx.
References PutItem(), and SfxPoolItem::Which().
|
static |
Puts the item into the passed item set.
@descr The item will be put into the item set, if bSkipPoolDef is false, or if the item differs from the default pool item.
rItemSet | The destination item set. |
rItem | The item to put into the item set. |
nWhichId | The Which-ID to set with the item. |
bSkipPoolDef | true = Do not put item if it is equal to pool default; false = Always put the item. |
Definition at line 214 of file ftools.cxx.
References SfxPoolItem::CloneSetWhich(), SfxItemPool::GetDefaultItem(), SfxItemSet::GetPool(), and SfxItemSet::Put().
Referenced by oox::xls::Xf::createPattern(), XclImpXF::CreatePattern(), XclImpNumFmtBuffer::FillScFmtToItemSet(), oox::xls::Font::fillToItemSet(), oox::xls::NumberFormat::fillToItemSet(), oox::xls::Alignment::fillToItemSet(), oox::xls::Protection::fillToItemSet(), oox::xls::Border::fillToItemSet(), oox::xls::Fill::fillToItemSet(), XclImpCellProt::FillToItemSet(), XclImpCellAlign::FillToItemSet(), XclImpCellBorder::FillToItemSet(), XclImpCellArea::FillToItemSet(), XclImpPageSettings::Finalize(), and PutItem().
|
static |
Reads and returns a zero terminated byte string and decreases a stream counter.
Definition at line 269 of file ftools.cxx.
References SvStream::good(), read_zeroTerminated_uInt8s_ToOString(), and rStrm.
Referenced by read_zeroTerminated_uInt8s_ToOString(), and read_zeroTerminated_uInt8s_ToOUString().
|
inlinestatic |
Reads and returns a zero terminated byte string and decreases a stream counter.
Definition at line 215 of file ftools.hxx.
References read_zeroTerminated_uInt8s_ToOString(), and rStrm.
Referenced by AppendCString(), and LotusToSc::Convert().
|
static |
Reads a 10-byte-long-double and converts it to double.
Definition at line 42 of file ftools.cxx.
References rStrm.
Referenced by LotusToSc::Convert(), and ImportLotus::Read().