22#include <com/sun/star/util/NumberFormat.hpp>
23#include <osl/diagnose.h>
35 ScMyStyleNumberFormatSet::iterator aItr(
aSet.find(aStyleNumberFormat));
36 if (aItr ==
aSet.end())
39 return aItr->nNumberFormat;
54 case util::NumberFormat::NUMBER:
61 case util::NumberFormat::TEXT:
68 case util::NumberFormat::TIME:
75 case util::NumberFormat::DATETIME:
89 case util::NumberFormat::LOGICAL:
96 case util::NumberFormat::UNDEFINED:
105 OSL_FAIL(
"wrong type");
119 itPair.first->mpRanges->AddAndPartialCombine(rRange);
143 rCurrency.mpRanges->InsertCol(
static_cast<SCCOL>(nCol),
static_cast<SCTAB>(nTab));
149 const OUString* pStyleName,
const sal_Int16 nCellType,
196 SetStylesToRanges(*rCurrency.mpRanges, pStyleName, util::NumberFormat::CURRENCY, &rCurrency.sCurrency, rImport);
203 aRowDefaultStyle(aCellStyles.
end()),
204 rImport(rTempImport),
207 bPrevRangeAdded(true)
227 it =
aCellStyles.emplace_hint(it, std::piecewise_construct,
228 std::forward_as_tuple(rStyleName), std::forward_as_tuple());
246 OSL_ENSURE(aPrevItr !=
aCellStyles.end(),
"no column default style");
265 OSL_FAIL(
"no column default style");
270 OSL_FAIL(
"too many columns");
300 OSL_ENSURE(
static_cast<sal_uInt32
>(nColumn) ==
aColDefaultStyles.size(),
"some columns are absent");
301 ScMyStylesMap::iterator aItr(
GetIterator(sStyleName));
303 for (sal_Int32
i = 0;
i < nRepeat; ++
i)
313 std::optional<OUString> pCurrencyP,
const sal_Int16 nCellTypeP)
324 bool bAddRange(
false);
369 ScRange aScRange( rAddress, rAddress );
378 rCellStyle.second.InsertCol(nCol, nTab);
395 rCellStyle.second.SetStylesToRanges(&rCellStyle.first,
rImport);
std::set< ScMyCurrencyStyle, LessCurrencyStyle > ScMyCurrencyStylesSet
void AddRange(const ScRange &rRange, const sal_Int16 nType)
static void SetStylesToRanges(const ScRangeList &rList, const OUString *pStyleName, const sal_Int16 nCellType, const OUString *pCurrency, ScXMLImport &rImport)
std::shared_ptr< ScRangeList > mpLogicalList
std::shared_ptr< ScRangeList > mpTextList
std::shared_ptr< ScRangeList > mpDateTimeList
std::unique_ptr< ScMyCurrencyStylesSet > pCurrencyList
void AddCurrencyRange(const ScRange &rRange, const std::optional< OUString > &pCurrency)
std::shared_ptr< ScRangeList > mpPercentList
std::shared_ptr< ScRangeList > mpUndefinedList
std::shared_ptr< ScRangeList > mpTimeList
std::shared_ptr< ScRangeList > mpNumberList
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab)
ScMyStylesMap::iterator aRowDefaultStyle
void AddDefaultRange(const ScRange &rRange)
void AddSingleRange(const ScRange &rRange)
std::optional< OUString > pStyleName
std::optional< OUString > pCurrency
void AddColumnStyle(const OUString &rStyleName, const sal_Int32 nColumn, const sal_Int32 nRepeat)
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab)
void SetRowStyle(const OUString &rStyleName)
void SetAttributes(std::optional< OUString > pStyleName, std::optional< OUString > pCurrency, const sal_Int16 nCellType)
ScMyStylesMap aCellStyles
std::optional< OUString > pPrevCurrency
std::optional< OUString > pPrevStyleName
ScMyStylesMap::iterator GetIterator(const OUString &rStyleName)
ScMyStylesImportHelper(ScXMLImport &rImport)
~ScMyStylesImportHelper()
std::vector< ScMyStylesMap::iterator > aColDefaultStyles
void AddCell(const ScAddress &rAddress)
Use this class to manage solar mutex locking instead of calling LockSolarMutex() and UnlockSolarMutex...
constexpr OUStringLiteral PERCENT(u"Percent")