31 #include <svx/strings.hrc>
53 #include <osl/diagnose.h>
54 #include <osl/thread.hxx>
57 #include <globstr.hrc>
60 #include <document.hxx>
99 sal_uInt64 endOfBlob = 0;
102 const sal_uInt64 currentPosition = stream.
Tell();
103 const sal_uInt64 blobSize = endOfBlob - currentPosition;
109 blob.
size =
static_cast<std::size_t
>(blobSize);
119 const sal_uInt64 endOfBlob = stream.
Tell() +
sizeof(sal_uInt64) + blob.
size;
186 m_aAdjust = std::make_unique<SvxAdjustItem>(SvxAdjust::Left, 0);
189 m_aStacked = std::make_unique<ScVerticalStackCell>();
199 aNumFormat( rCopy.aNumFormat )
226 rtl_TextEncoding eSysSet = osl_getThreadTextEncoding();
228 if( eSrcSet != eSysSet &&
m_aFont->GetCharSet() == eSrcSet )
268 nStrResId( rData.nStrResId ),
269 bIncludeFont( rData.bIncludeFont ),
270 bIncludeJustify( rData.bIncludeJustify ),
271 bIncludeFrame( rData.bIncludeFrame ),
272 bIncludeBackground( rData.bIncludeBackground ),
273 bIncludeValueFormat( rData.bIncludeValueFormat ),
274 bIncludeWidthHeight( rData.bIncludeWidthHeight )
286 OSL_ENSURE( nIndex < 16,
"ScAutoFormatData::GetField - illegal index" );
287 OSL_ENSURE(
ppDataField[ nIndex ],
"ScAutoFormatData::GetField - no data" );
293 OSL_ENSURE( nIndex < 16,
"ScAutoFormatData::GetField - illegal index" );
294 OSL_ENSURE(
ppDataField[ nIndex ],
"ScAutoFormatData::GetField - no data" );
339 switch( rItem.
Which() )
341 case ATTR_FONT: rField.
SetFont( static_cast<const SvxFontItem&>(rItem) );
break;
453 rItemSet.
Put( aValueFormat );
466 rItemSet.
Put( rCJKFont );
475 rItemSet.
Put( aFontHeightItem );
478 rItemSet.
Put( aWeightItem );
481 rItemSet.
Put( aPostureItem );
487 rItemSet.
Put( rCTLFont );
496 rItemSet.
Put( aFontHeightItem );
499 rItemSet.
Put( aWeightItem );
502 rItemSet.
Put( aPostureItem );
568 RID_SVXSTR_TBLAFMT_3D,
569 RID_SVXSTR_TBLAFMT_BLACK1,
570 RID_SVXSTR_TBLAFMT_BLACK2,
571 RID_SVXSTR_TBLAFMT_BLUE,
572 RID_SVXSTR_TBLAFMT_BROWN,
573 RID_SVXSTR_TBLAFMT_CURRENCY,
574 RID_SVXSTR_TBLAFMT_CURRENCY_3D,
575 RID_SVXSTR_TBLAFMT_CURRENCY_GRAY,
576 RID_SVXSTR_TBLAFMT_CURRENCY_LAVENDER,
577 RID_SVXSTR_TBLAFMT_CURRENCY_TURQUOISE,
578 RID_SVXSTR_TBLAFMT_GRAY,
579 RID_SVXSTR_TBLAFMT_GREEN,
580 RID_SVXSTR_TBLAFMT_LAVENDER,
581 RID_SVXSTR_TBLAFMT_RED,
582 RID_SVXSTR_TBLAFMT_TURQUOISE,
583 RID_SVXSTR_TBLAFMT_YELLOW,
584 RID_SVXSTR_TBLAFMT_LO6_ACADEMIC,
585 RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_BLUE,
586 RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_GREEN,
587 RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_RED,
588 RID_SVXSTR_TBLAFMT_LO6_BOX_LIST_YELLOW,
589 RID_SVXSTR_TBLAFMT_LO6_ELEGANT,
590 RID_SVXSTR_TBLAFMT_LO6_FINANCIAL,
591 RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_COLUMNS,
592 RID_SVXSTR_TBLAFMT_LO6_SIMPLE_GRID_ROWS,
593 RID_SVXSTR_TBLAFMT_LO6_SIMPLE_LIST_SHADED
608 RTL_TEXTENCODING_UTF8);
634 for( sal_uInt16
i = 0; bRet &&
i < 16; ++i )
660 for (sal_uInt16
i = 0; bRet && (
i < 16);
i++)
672 pData->SetName(aName);
684 aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
690 aStdFont.GetFamilyType(), aStdFont.GetFamilyName(), aStdFont.GetStyleName(),
699 aBox.
SetLine(&aLine, SvxBoxItemLine::LEFT);
700 aBox.
SetLine(&aLine, SvxBoxItemLine::TOP);
701 aBox.
SetLine(&aLine, SvxBoxItemLine::RIGHT);
702 aBox.
SetLine(&aLine, SvxBoxItemLine::BOTTOM);
712 for (sal_uInt16
i=0;
i<16;
i++)
714 pData->PutItem(
i, aBox );
715 pData->PutItem(
i, aFontItem );
716 pData->PutItem(
i, aCJKFontItem );
717 pData->PutItem(
i, aCTLFontItem );
719 pData->PutItem(
i, aHeight );
721 pData->PutItem(
i, aHeight );
723 pData->PutItem(
i, aHeight );
726 pData->PutItem(
i, aWhiteText );
727 pData->PutItem(
i, aBlueBack );
731 pData->PutItem(
i, aWhiteText );
732 pData->PutItem(
i, aGray70Back );
734 else if (
i%4 == 3 ||
i >= 12 )
736 pData->PutItem(
i, aBlackText );
737 pData->PutItem(
i, aGray20Back );
741 pData->PutItem(
i, aBlackText );
742 pData->PutItem(
i, aWhiteBack );
751 OUString aStrStandard(
ScResId(STR_STYLENAME_STANDARD));
768 if (nIndex >=
m_Data.size())
771 MapType::const_iterator it =
m_Data.begin();
772 std::advance(it, nIndex);
773 return it->second.get();
778 if (nIndex >=
m_Data.size())
781 MapType::iterator it =
m_Data.begin();
782 std::advance(it, nIndex);
783 return it->second.get();
788 return m_Data.find(rName);
793 OUString
aName = pNew->GetName();
794 return m_Data.insert(std::make_pair(aName, std::move(pNew))).first;
836 SvStream* pStream = aMedium.GetInStream();
837 bool bRet = (pStream && pStream->GetError() ==
ERRCODE_NONE);
856 OSL_FAIL(
"header contains more/newer data" );
857 rStream.
Seek( nPos + nCnt );
871 for (sal_uInt16
i=0; bRet && (
i < nCnt);
i++)
892 SvStream* pStream = aMedium.GetOutStream();
893 bool bRet = (pStream && pStream->GetError() ==
ERRCODE_NONE);
904 osl_getThreadTextEncoding() ) );
911 MapType::iterator it =
m_Data.begin(), itEnd =
m_Data.end();
914 for (++it; bRet && it != itEnd; ++it)
916 bRet &= it->second->Save(rStream, fileVersion);
SvStream & WriteBool(bool b)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
SvStream & WriteUInt64(sal_uInt64 nuInt64)
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
const OUString & GetFamilyName() const
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
#define LANGUAGE_ENGLISH_US
static SC_DLLPUBLIC::utl::TransliterationWrapper * GetpTransliteration()
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
std::unique_ptr< ContentProperties > pData
const OUString & GetStyleName() const
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
SvStream & ReadCharAsBool(bool &rBool)
static SC_DLLPUBLIC CollatorWrapper * GetCollator()
sal_uInt64 Seek(sal_uInt64 nPos)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
rtl_TextEncoding GetSOStoreTextEncoding(rtl_TextEncoding eEncoding)
SvStream & ReadUInt64(sal_uInt64 &rUInt64)
FontFamily GetFamilyType()
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
OUString SvxResId(const char *pId)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
AutoFormatSwBlob swVersions
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
const OUString & GetStyleName() const
#define SAL_N_ELEMENTS(arr)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
const OUString & GetUserConfigPath() const
OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
bool Append(OUString const &rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
OUString ScResId(const char *pId)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
XclImpStream & operator>>(XclImpStream &rStrm, XclImpDffPropSet &rPropSet)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
SvStream & ReadUChar(unsigned char &rChar)
void SetVersion(sal_Int32 n)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
rtl_TextEncoding GetSOLoadTextEncoding(rtl_TextEncoding eEncoding)
Reference< XOutputStream > stream
std::size_t ReadBytes(void *pData, std::size_t nSize)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void Load(SvStream &rStream, sal_uInt16 nVer)
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
SvStream & WriteUChar(unsigned char nChar)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
void SetStreamCharSet(rtl_TextEncoding eCharSet)
rtl_TextEncoding GetStreamCharSet() const
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
bool operator()(const OUString &left, const OUString &right) const
Struct with version numbers of the Items.
void SetValue(sal_uInt32 nTheValue)
constexpr::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
void Write(SvStream &rStream, sal_uInt16 fileVersion)
rtl_TextEncoding GetCharSet() const
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
bool SetSmartURL(OUString const &rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)