20#ifndef INCLUDED_EDITENG_BOXITEM_HXX
21#define INCLUDED_EDITENG_BOXITEM_HXX
25#include <com/sun/star/table/BorderLine2.hpp>
32namespace editeng {
class SvxBorderLine; }
64 sal_Int16 mnTopDistance = 0;
65 sal_Int16 mnBottomDistance = 0;
66 sal_Int16 mnLeftDistance = 0;
67 sal_Int16 mnRightDistance = 0;
72 bool mbRemoveAdjCellBorder =
false;
91 OUString &rText,
const IntlWrapper& )
const override;
100 return mpTopBorderLine.get();
104 return mpBottomBorderLine.get();
108 return mpLeftBorderLine.get();
112 return mpRightBorderLine.get();
117 return mpTopBorderLine.get();
121 return mpBottomBorderLine.get();
125 return mpLeftBorderLine.get();
129 return mpRightBorderLine.get();
137 sal_Int16 GetDistance(
SvxBoxItemLine nLine,
bool bAllowNegative =
false )
const;
138 sal_uInt16 GetSmallestDistance()
const;
145 mnTopDistance = mnBottomDistance = mnLeftDistance = mnRightDistance = nNew;
153 sal_Int16 CalcLineSpace(
SvxBoxItemLine nLine,
bool bEvenIfNoLine =
false,
bool bAllowNegative =
false )
const;
154 bool HasBorder(
bool bTreatPaddingAsBorder )
const;
159 virtual boost::property_tree::ptree
dumpAsJSON()
const override;
201 bool mbEnableHorizontalLine =
false;
202 bool mbEnableVerticalLine =
false;
218 sal_uInt16 mnDefaultMinimumDistance = 0;
232 OUString &rText,
const IntlWrapper& )
const override;
234 virtual bool PutValue(
const css::uno::Any& rVal,
sal_uInt8 nMemberId )
override;
246 bool IsTable()
const {
return mbEnableHorizontalLine && mbEnableVerticalLine; }
247 void SetTable(
bool bNew) { mbEnableHorizontalLine = mbEnableVerticalLine = bNew; }
250 void EnableHor(
bool bEnable ) { mbEnableHorizontalLine = bEnable; }
252 void EnableVer(
bool bEnable ) { mbEnableVerticalLine = bEnable; }
254 bool IsDist()
const {
return mbDistance; }
261 sal_uInt16
GetDefDist()
const {
return mnDefaultMinimumDistance; }
262 void SetDefDist(sal_uInt16 nNew) { mnDefaultMinimumDistance = nNew; }
266 return bool(mnValidFlags & nValid);
271 mnValidFlags |= nValid;
273 mnValidFlags &= ~nValid;
277 virtual boost::property_tree::ptree
dumpAsJSON()
const override;
284 sal_Int32& nBorderDistance, sal_Int32 nBorderWidth);
288 sal_uInt16 nLeft = 0;
289 sal_uInt16 nRight = 0;
291 sal_uInt16 nBottom = 0;
296 bool bFromEdge =
false;
297 sal_uInt16 nLeft = 0;
298 sal_uInt16 nRight = 0;
300 sal_uInt16 nBottom = 0;
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...
virtual void ScaleMetrics(tools::Long lMult, tools::Long lDiv)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
virtual bool operator==(const SfxPoolItem &) const=0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
virtual boost::property_tree::ptree dumpAsJSON() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
virtual bool HasMetrics() const
SvxBoxInfoItemValidFlags mnValidFlags
bool mbDistance
true = Enable inner vertical line.
std::unique_ptr< editeng::SvxBorderLine > mpVerticalLine
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
bool IsHorEnabled() const
void EnableVer(bool bEnable)
void SetMinDist(bool bNew)
void SetDefDist(sal_uInt16 nNew)
std::unique_ptr< editeng::SvxBorderLine > mpHorizontalLine
const editeng::SvxBorderLine * GetHori() const
sal_uInt16 GetDefDist() const
bool IsVerEnabled() const
const editeng::SvxBorderLine * GetVert() const
void EnableHor(bool bEnable)
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
void SetRemoveAdjacentCellBorder(bool bSet)
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
const editeng::SvxBorderLine * GetTop() const
editeng::SvxBorderLine * GetRight()
bool IsRemoveAdjacentCellBorder() const
std::unique_ptr< editeng::SvxBorderLine > mpBottomBorderLine
const editeng::SvxBorderLine * GetRight() const
std::unique_ptr< editeng::SvxBorderLine > mpTopBorderLine
editeng::SvxBorderLine * GetLeft()
const editeng::SvxBorderLine * GetLeft() const
editeng::SvxBorderLine * GetBottom()
std::array< model::ComplexColor, 4 > maTempComplexColors
std::unique_ptr< editeng::SvxBorderLine > mpLeftBorderLine
static bool LineToSvxLine(const css::table::BorderLine2 &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
editeng::SvxBorderLine * GetTop()
std::unique_ptr< editeng::SvxBorderLine > mpRightBorderLine
const editeng::SvxBorderLine * GetBottom() const
void SetAllDistances(sal_Int16 nNew)
#define EDITENG_DLLPUBLIC
struct _xmlTextWriter * xmlTextWriterPtr
void BorderDistanceFromWord(bool bFromEdge, sal_Int32 &nMargin, sal_Int32 &nBorderDistance, sal_Int32 nBorderWidth)
void BorderDistancesToWord(const SvxBoxItem &rBox, const WordPageMargins &rMargins, WordBorderDistances &rDistances)