28#include <osl/diagnose.h>
67 sal_uInt8 _eFamily, eFontPitch, eFontTextEncoding;
68 OUString
aName, aStyle;
83 if ( RTL_TEXTENCODING_SYMBOL != eFontTextEncoding &&
aName ==
"StarBats" )
84 eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
87 sal_uInt64
const nStreamPos =
rStrm.
Tell();
89 sal_uInt32
nMagic = 0xFE331188;
91 if (
nMagic == 0xFE331188 )
105 rItem.
SetCharSet(
static_cast<rtl_TextEncoding
>(eFontTextEncoding));
113 RTL_TEXTENCODING_SYMBOL :
116 const OUString aStoreFamilyName(bToBats ?
"StarBats" : rItem.
GetFamilyName());
125 namespace SvxFontHeight
136 sal_uInt16 nsize, nprop = 0;
137 MapUnit nPropUnit = MapUnit::MapRelative;
147 nprop =
static_cast<sal_uInt16
>(nP);
154 nPropUnit =
static_cast<MapUnit>(nTmp);
170 sal_uInt16 _nProp = rItem.
GetProp();
221 namespace SvxTextLine
244 namespace SvxCrossedOut
272 "SvxColorItem: Is there a new file format? ");
302 "SvxBoxItem: Is there a new file format?" );
315 sal_uInt16 nOutline, nInline, nDistance;
316 sal_uInt16 nStyle = css::table::BorderLineStyle::NONE;
320 stream.ReadUInt16( nOutline ).ReadUInt16( nInline ).ReadUInt16( nDistance );
323 stream.ReadUInt16( nStyle );
338 sal_uInt16 nDistance(0);
352 rItem.
SetLine( &aBorder, aLineMap[cLine] );
376 stream.WriteUInt16( l.GetOutWidth() )
377 .WriteUInt16( l.GetInWidth() )
378 .WriteUInt16( l.GetDistance() );
381 stream.WriteUInt16(
static_cast<sal_uInt16
>(l.GetBorderLineStyle()) );
389 const ::editeng::SvxBorderLine* pLine[ 4 ];
390 pLine[ 0 ] = rItem.
GetTop();
395 for(
int i = 0;
i < 4;
i++ )
397 const ::editeng::SvxBorderLine* l = pLine[
i ];
411 !(nTopDist == nLeftDist &&
412 nTopDist == nRightDist &&
413 nTopDist == nBottomDist) )
441 short nOutline, nInline, nDistance;
457 const ::editeng::SvxBorderLine* pLine(rItem.
GetLine());
493 Color aTempFillColor;
498 aSerializer.readColor(aTempColor);
499 aSerializer.readColor(aTempFillColor);
506 sal_uInt32 nRed = aTempColor.
GetRed();
507 sal_uInt32 nGreen = aTempColor.
GetGreen();
508 sal_uInt32 nBlue = aTempColor.
GetBlue();
509 nRed +=
static_cast<sal_uInt32
>(aTempFillColor.
GetRed())*2;
510 nGreen +=
static_cast<sal_uInt32
>(aTempFillColor.
GetGreen())*2;
511 nBlue +=
static_cast<sal_uInt32
>(aTempFillColor.
GetBlue())*2;
518 sal_uInt32 nRed = aTempColor.
GetRed();
519 sal_uInt32 nGreen = aTempColor.
GetGreen();
520 sal_uInt32 nBlue = aTempColor.
GetBlue();
521 nRed +=
static_cast<sal_uInt32
>(aTempFillColor.
GetRed());
522 nGreen +=
static_cast<sal_uInt32
>(aTempFillColor.
GetGreen());
523 nBlue +=
static_cast<sal_uInt32
>(aTempFillColor.
GetBlue());
530 sal_uInt32 nRed = aTempColor.
GetRed()*2;
531 sal_uInt32 nGreen = aTempColor.
GetGreen()*2;
532 sal_uInt32 nBlue = aTempColor.
GetBlue()*2;
533 nRed +=
static_cast<sal_uInt32
>(aTempFillColor.
GetRed());
534 nGreen +=
static_cast<sal_uInt32
>(aTempFillColor.
GetGreen());
535 nBlue +=
static_cast<sal_uInt32
>(aTempFillColor.
GetBlue());
551 sal_uInt16 nDoLoad = 0;
575 OSL_FAIL(
"No BaseURL!");
577 DBG_ASSERT( !aAbs.isEmpty(),
"Invalid URL!" );
596 aSerializer.writeColor(rItem.
GetColor());
597 aSerializer.writeColor(rItem.
GetColor());
600 sal_uInt16 nDoLoad = 0;
603 if (
nullptr != pGraphicObject && rItem.
GetGraphicLink().isEmpty())
611 if (
nullptr != pGraphicObject && rItem.
GetGraphicLink().isEmpty())
617 OSL_FAIL(
"No BaseURL!");
667 namespace SvxHorJustify
688 namespace SvxVerJustify
730 namespace SvxFormatBreak
737 "SvxFormatBreakItem: Is there a new file format? ");
760 namespace SvxFormatKeep
773 rItem.
SetValue(
static_cast<bool>(bIsKeep));
constexpr sal_uInt16 ADJUST_LASTBLOCK_VERSION
constexpr sal_uInt16 BOX_BORDER_STYLE_VERSION
This version causes SvxBoxItem to store the styles for its border lines when serializing to stream.
constexpr sal_uInt16 BOX_4DISTS_VERSION
This version causes SvxBoxItem to store the 4 cell spacing distances separately when serializing to s...
constexpr sal_uInt16 BRUSH_GRAPHIC_VERSION
sal_uInt8 GetBlue() const
bool IsTransparent() const
sal_uInt8 GetGreen() const
void SetAlpha(sal_uInt8 nAlpha)
const Graphic & GetGraphic() const
static OUString GetAbsURL(std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
static OUString GetRelURL(std::u16string_view rTheBaseURIRef, OUString const &rTheAbsURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
void SetValue(bool const bTheValue)
virtual sal_uInt16 GetEnumValue() const override
void SetValue(EnumT nTheValue)
virtual void ResetError()
SvStream & ReadCharAsBool(bool &rBool)
SvStream & WriteUniOrByteString(std::u16string_view rStr, rtl_TextEncoding eDestCharSet)
OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet)
SvStream & ReadInt16(sal_Int16 &rInt16)
SvStream & WriteBool(bool b)
SvStream & WriteInt16(sal_Int16 nInt16)
SvStream & WriteUChar(unsigned char nChar)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
void SetError(ErrCode nErrorCode)
SvStream & ReadChar(char &rChar)
sal_uInt64 Seek(sal_uInt64 nPos)
SvStream & WriteChar(char nChar)
rtl_TextEncoding GetStreamCharSet() const
SvStream & ReadSChar(signed char &rChar)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
SvStream & WriteSChar(signed char nChar)
SvStream & ReadUChar(unsigned char &rChar)
SvxAdjust GetAdjust() const
void SetAdjust(const SvxAdjust eType)
void SetAsFlags(sal_Int8 nFlags)
sal_Int8 GetAsFlags() const
const editeng::SvxBorderLine * GetTop() const
sal_uInt16 GetSmallestDistance() const
const editeng::SvxBorderLine * GetRight() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
void SetDistance(sal_Int16 nNew, SvxBoxItemLine nLine)
const editeng::SvxBorderLine * GetBottom() const
void SetAllDistances(sal_Int16 nNew)
void SetGraphicPos(SvxGraphicPosition eNew)
const GraphicObject * GetGraphicObject(OUString const &referer=OUString()) const
const Color & GetColor() const
void SetGraphicLink(const OUString &rNew)
const OUString & GetGraphicFilter() const
void SetColor(const Color &rCol)
const OUString & GetGraphicLink() const
void SetGraphicObject(const GraphicObject &rNewObj)
SvxGraphicPosition GetGraphicPos() const
void SetGraphicFilter(const OUString &rNew)
SvxColorItem item describes a color.
const Color & GetValue() const
void SetValue(const Color &rNewColor)
void SetValue(EnumT nTheValue)
sal_uInt32 GetHeight() const
MapUnit GetPropUnit() const
void legacy_direct_set(sal_uInt32 nH, sal_uInt16 nP, MapUnit eP)
sal_uInt16 GetProp() const
This item describes a Font.
void SetStyleName(const OUString &rStyleName)
FontFamily GetFamily() const
FontPitch GetPitch() const
void SetFamily(FontFamily _eFamily)
void SetPitch(FontPitch _ePitch)
const OUString & GetStyleName() const
void SetFamilyName(const OUString &rFamilyName)
rtl_TextEncoding GetCharSet() const
const OUString & GetFamilyName() const
void SetCharSet(rtl_TextEncoding _eEncoding)
const editeng::SvxBorderLine * GetLine() const
void SetLine(const editeng::SvxBorderLine *pNew)
sal_uInt16 GetWidth() const
const Color & GetColor() const
void SetLocation(SvxShadowLocation eNew)
SvxShadowLocation GetLocation() const
void SetWidth(sal_uInt16 nNew)
void SetColor(const Color &rNew)
void SetValue(EnumT nTheValue)
void readGraphic(Graphic &rGraphic)
void writeGraphic(const Graphic &rGraphic)
void GuessLinesWidths(SvxBorderLineStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn=0, sal_uInt16 nDist=0)
Guess the style and width from the three lines widths values.
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define VERSION_USEAUTOCOLOR
#define DBG_ASSERT(sCon, aError)
Reference< XOutputStream > stream
#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT
#define SVSTREAM_FILEFORMAT_ERROR
constexpr sal_uInt16 FONTHEIGHT_16_VERSION
constexpr sal_uInt16 FONTHEIGHT_UNIT_VERSION
UNOTOOLS_DLLPUBLIC bool IsOpenSymbol(std::u16string_view rFontName)
SvxFrameDirection
Defines possible text directions in frames.
void Create_legacy_direct_set(SvxFontHeightItem &rItem, sal_uInt32 nH, sal_uInt16 nP, MapUnit eP)
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
void Create(SvxAdjustItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
SvStream & Store(const SvxAdjustItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
void SvStream sal_uInt16 nItemVersion
SvStream & Store(const SvxBoxItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
const int BORDER_LINE_WITH_STYLE_VERSION
Item version for saved border lies. The new version includes line style.
void Create(SvxBoxItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
void SvStream sal_uInt16 nItemVersion
::editeng::SvxBorderLine CreateBorderLine(SvStream &stream, sal_uInt16 version)
Creates a border line from a stream.
static sal_uInt16 BorderLineVersionFromBoxVersion(sal_uInt16 boxVersion)
Retrieves a BORDER_LINE_* version from a BOX_BORDER_* version.
static SvStream & StoreBorderLine(SvStream &stream, const ::editeng::SvxBorderLine &l, sal_uInt16 version)
Store a border line to a stream.
const int BORDER_LINE_OLD_VERSION
Item version for saved border lines. The old version saves the line without style information.
sal_uInt16 GetVersion(sal_uInt16)
SvStream & Store(const SvxBrushItem &rItem, SvStream &rStrm, sal_uInt16)
void SvStream sal_uInt16 nItemVersion
const sal_uInt16 LOAD_LINK
const sal_uInt16 LOAD_FILTER
const sal_uInt16 LOAD_GRAPHIC
void Create(SvxBrushItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
SvStream & Store(const SvxColorItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
void Create(SvxColorItem &rItem, SvStream &rStrm, sal_uInt16)
void SvStream sal_uInt16 nItemVersion
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
void Create(SvxCrossedOutItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxCrossedOutItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
void Create(SvxFontHeightItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
SvStream & Store(const SvxFontHeightItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
void SvStream sal_uInt16 nItemVersion
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
void SvStream sal_uInt16 nItemVersion
SvStream & Store(const SvxFontItem &rItem, SvStream &rStrm, sal_uInt16)
void Create(SvxFontItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
void Create(SvxFrameDirectionItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxFrameDirectionItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxHorJustifyItem &rItem, SvStream &rStrm, sal_uInt16)
void Create(SvxHorJustifyItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
void Create(SvxLineItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
SvStream & Store(const SvxLineItem &rItem, SvStream &rStrm, sal_uInt16)
void Create(SvxPostureItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxPostureItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
SvStream & Store(const SvxShadowItem &rItem, SvStream &rStrm, sal_uInt16)
void Create(SvxShadowItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
void Create(SvxTextLineItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxTextLineItem &rItem, SvStream &rStrm, sal_uInt16)
void Create(SvxVerJustifyItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
SvStream & Store(const SvxVerJustifyItem &rItem, SvStream &rStrm, sal_uInt16)
SvStream & Store(const SvxWeightItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt16 GetVersion(sal_uInt16)
void Create(SvxWeightItem &rItem, SvStream &rStrm, sal_uInt16)
TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding(rtl_TextEncoding eEncoding)
TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding(rtl_TextEncoding eEncoding)