Kaydet (Commit) 16dbce55 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: document SwRectFnCollection instances

GCC would allow these to be non-comments according to
<https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html#Designated-Inits>,
but still have them as comments for the sake of other compilers.

Change-Id: I4e615a41062edcc563b109753af8c2c457ee4503
Reviewed-on: https://gerrit.libreoffice.org/44443Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst d3a6b6f1
......@@ -58,278 +58,278 @@ long SwDecrement( long nA, long nSub )
{ return nA - nSub; }
static SwRectFnCollection aHorizontal = {
/* fnRectGet */
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Width_,
&SwRect::Height_,
&SwRect::TopLeft,
&SwRect::Size_,
/* fnRectSet */
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Width_,
&SwRect::Height_,
&SwRect::SubTop,
&SwRect::AddBottom,
&SwRect::SubLeft,
&SwRect::AddRight,
&SwRect::AddWidth,
&SwRect::AddHeight,
&SwRect::SetPosX,
&SwRect::SetPosY,
&SwFrame::GetTopMargin,
&SwFrame::GetBottomMargin,
&SwFrame::GetLeftMargin,
&SwFrame::GetRightMargin,
&SwFrame::SetLeftRightMargins,
&SwFrame::SetTopBottomMargins,
&SwFrame::GetPrtTop,
&SwFrame::GetPrtBottom,
&SwFrame::GetPrtLeft,
&SwFrame::GetPrtRight,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwFrame::SetMaxBottom,
&SwRect::OverStepBottom,
&SwRect::SetUpperLeftCorner,
&SwFrame::MakeBelowPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwIncrement,
&o3tl::saturating_add<long>,
&SwRect::SetLeftAndWidth,
&SwRect::SetTopAndHeight
/*.fnGetTop =*/&SwRect::Top_,
/*.fnGetBottom =*/&SwRect::Bottom_,
/*.fnGetLeft =*/&SwRect::Left_,
/*.fnGetRight =*/&SwRect::Rigth_,
/*.fnGetWidth =*/&SwRect::Width_,
/*.fnGetHeight =*/&SwRect::Height_,
/*.fnGetPos =*/&SwRect::TopLeft,
/*.fnGetSize =*/&SwRect::Size_,
/*.fnSetTop =*/&SwRect::Top_,
/*.fnSetBottom =*/&SwRect::Bottom_,
/*.fnSetLeft =*/&SwRect::Left_,
/*.fnSetRight =*/&SwRect::Rigth_,
/*.fnSetWidth =*/&SwRect::Width_,
/*.fnSetHeight =*/&SwRect::Height_,
/*.fnSubTop =*/&SwRect::SubTop,
/*.fnAddBottom =*/&SwRect::AddBottom,
/*.fnSubLeft =*/&SwRect::SubLeft,
/*.fnAddRight =*/&SwRect::AddRight,
/*.fnAddWidth =*/&SwRect::AddWidth,
/*.fnAddHeight =*/&SwRect::AddHeight,
/*.fnSetPosX =*/&SwRect::SetPosX,
/*.fnSetPosY =*/&SwRect::SetPosY,
/*.fnGetTopMargin =*/&SwFrame::GetTopMargin,
/*.fnGetBottomMargin =*/&SwFrame::GetBottomMargin,
/*.fnGetLeftMargin =*/&SwFrame::GetLeftMargin,
/*.fnGetRightMargin =*/&SwFrame::GetRightMargin,
/*.fnSetXMargins =*/&SwFrame::SetLeftRightMargins,
/*.fnSetYMargins =*/&SwFrame::SetTopBottomMargins,
/*.fnGetPrtTop =*/&SwFrame::GetPrtTop,
/*.fnGetPrtBottom =*/&SwFrame::GetPrtBottom,
/*.fnGetPrtLeft =*/&SwFrame::GetPrtLeft,
/*.fnGetPrtRight =*/&SwFrame::GetPrtRight,
/*.fnTopDist =*/&SwRect::GetTopDistance,
/*.fnBottomDist =*/&SwRect::GetBottomDistance,
/*.fnLeftDist =*/&SwRect::GetLeftDistance,
/*.fnRightDist =*/&SwRect::GetRightDistance,
/*.fnSetLimit =*/&SwFrame::SetMaxBottom,
/*.fnOverStep =*/&SwRect::OverStepBottom,
/*.fnSetPos =*/&SwRect::SetUpperLeftCorner,
/*.fnMakePos =*/&SwFrame::MakeBelowPos,
/*.fnXDiff =*/&FirstMinusSecond,
/*.fnYDiff =*/&FirstMinusSecond,
/*.fnXInc =*/&SwIncrement,
/*.fnYInc =*/&o3tl::saturating_add<long>,
/*.fnSetLeftAndWidth =*/&SwRect::SetLeftAndWidth,
/*.fnSetTopAndHeight =*/&SwRect::SetTopAndHeight
};
static SwRectFnCollection aVertical = {
/* fnRectGet */
&SwRect::Rigth_,
&SwRect::Left_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::TopRight,
&SwRect::SwappedSize,
/* fnRectSet */
&SwRect::Rigth_,
&SwRect::Left_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::AddRight,
&SwRect::SubLeft,
&SwRect::SubTop,
&SwRect::AddBottom,
&SwRect::AddHeight,
&SwRect::AddWidth,
&SwRect::SetPosY,
&SwRect::SetPosX,
&SwFrame::GetRightMargin,
&SwFrame::GetLeftMargin,
&SwFrame::GetTopMargin,
&SwFrame::GetBottomMargin,
&SwFrame::SetTopBottomMargins,
&SwFrame::SetRightLeftMargins,
&SwFrame::GetPrtRight,
&SwFrame::GetPrtLeft,
&SwFrame::GetPrtTop,
&SwFrame::GetPrtBottom,
&SwRect::GetRightDistance,
&SwRect::GetLeftDistance,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
&SwFrame::SetMinLeft,
&SwRect::OverStepLeft,
&SwRect::SetUpperRightCorner,
&SwFrame::MakeLeftPos,
&FirstMinusSecond,
&SecondMinusFirst,
&SwIncrement,
&SwDecrement,
&SwRect::SetTopAndHeight,
&SwRect::SetRightAndWidth
/*.fnGetTop =*/&SwRect::Rigth_,
/*.fnGetBottom =*/&SwRect::Left_,
/*.fnGetLeft =*/&SwRect::Top_,
/*.fnGetRight =*/&SwRect::Bottom_,
/*.fnGetWidth =*/&SwRect::Height_,
/*.fnGetHeight =*/&SwRect::Width_,
/*.fnGetPos =*/&SwRect::TopRight,
/*.fnGetSize =*/&SwRect::SwappedSize,
/*.fnSetTop =*/&SwRect::Rigth_,
/*.fnSetBottom =*/&SwRect::Left_,
/*.fnSetLeft =*/&SwRect::Top_,
/*.fnSetRight =*/&SwRect::Bottom_,
/*.fnSetWidth =*/&SwRect::Height_,
/*.fnSetHeight =*/&SwRect::Width_,
/*.fnSubTop =*/&SwRect::AddRight,
/*.fnAddBottom =*/&SwRect::SubLeft,
/*.fnSubLeft =*/&SwRect::SubTop,
/*.fnAddRight =*/&SwRect::AddBottom,
/*.fnAddWidth =*/&SwRect::AddHeight,
/*.fnAddHeight =*/&SwRect::AddWidth,
/*.fnSetPosX =*/&SwRect::SetPosY,
/*.fnSetPosY =*/&SwRect::SetPosX,
/*.fnGetTopMargin =*/&SwFrame::GetRightMargin,
/*.fnGetBottomMargin =*/&SwFrame::GetLeftMargin,
/*.fnGetLeftMargin =*/&SwFrame::GetTopMargin,
/*.fnGetRightMargin =*/&SwFrame::GetBottomMargin,
/*.fnSetXMargins =*/&SwFrame::SetTopBottomMargins,
/*.fnSetYMargins =*/&SwFrame::SetRightLeftMargins,
/*.fnGetPrtTop =*/&SwFrame::GetPrtRight,
/*.fnGetPrtBottom =*/&SwFrame::GetPrtLeft,
/*.fnGetPrtLeft =*/&SwFrame::GetPrtTop,
/*.fnGetPrtRight =*/&SwFrame::GetPrtBottom,
/*.fnTopDist =*/&SwRect::GetRightDistance,
/*.fnBottomDist =*/&SwRect::GetLeftDistance,
/*.fnLeftDist =*/&SwRect::GetTopDistance,
/*.fnRightDist =*/&SwRect::GetBottomDistance,
/*.fnSetLimit =*/&SwFrame::SetMinLeft,
/*.fnOverStep =*/&SwRect::OverStepLeft,
/*.fnSetPos =*/&SwRect::SetUpperRightCorner,
/*.fnMakePos =*/&SwFrame::MakeLeftPos,
/*.fnXDiff =*/&FirstMinusSecond,
/*.fnYDiff =*/&SecondMinusFirst,
/*.fnXInc =*/&SwIncrement,
/*.fnYInc =*/&SwDecrement,
/*.fnSetLeftAndWidth =*/&SwRect::SetTopAndHeight,
/*.fnSetTopAndHeight =*/&SwRect::SetRightAndWidth
};
static SwRectFnCollection aBottomToTop = {
/* fnRectGet */
&SwRect::Bottom_,
&SwRect::Top_,
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Width_,
&SwRect::Height_,
&SwRect::BottomLeft,
&SwRect::Size_,
/* fnRectSet */
&SwRect::Bottom_,
&SwRect::Top_,
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Width_,
&SwRect::Height_,
&SwRect::AddBottom,
&SwRect::SubTop,
&SwRect::SubLeft,
&SwRect::AddRight,
&SwRect::AddWidth,
&SwRect::AddHeight,
&SwRect::SetPosX,
&SwRect::SetPosY,
&SwFrame::GetBottomMargin,
&SwFrame::GetTopMargin,
&SwFrame::GetLeftMargin,
&SwFrame::GetRightMargin,
&SwFrame::SetLeftRightMargins,
&SwFrame::SetBottomTopMargins,
&SwFrame::GetPrtBottom,
&SwFrame::GetPrtTop,
&SwFrame::GetPrtLeft,
&SwFrame::GetPrtRight,
&SwRect::GetBottomDistance,
&SwRect::GetTopDistance,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwFrame::SetMinTop,
&SwRect::OverStepTop,
&SwRect::SetLowerLeftCorner,
&SwFrame::MakeUpperPos,
&FirstMinusSecond,
&SecondMinusFirst,
&SwIncrement,
&SwDecrement,
&SwRect::SetLeftAndWidth,
&SwRect::SetBottomAndHeight
/*.fnGetTop =*/&SwRect::Bottom_,
/*.fnGetBottom =*/&SwRect::Top_,
/*.fnGetLeft =*/&SwRect::Left_,
/*.fnGetRight =*/&SwRect::Rigth_,
/*.fnGetWidth =*/&SwRect::Width_,
/*.fnGetHeight =*/&SwRect::Height_,
/*.fnGetPos =*/&SwRect::BottomLeft,
/*.fnGetSize =*/&SwRect::Size_,
/*.fnSetTop =*/&SwRect::Bottom_,
/*.fnSetBottom =*/&SwRect::Top_,
/*.fnSetLeft =*/&SwRect::Left_,
/*.fnSetRight =*/&SwRect::Rigth_,
/*.fnSetWidth =*/&SwRect::Width_,
/*.fnSetHeight =*/&SwRect::Height_,
/*.fnSubTop =*/&SwRect::AddBottom,
/*.fnAddBottom =*/&SwRect::SubTop,
/*.fnSubLeft =*/&SwRect::SubLeft,
/*.fnAddRight =*/&SwRect::AddRight,
/*.fnAddWidth =*/&SwRect::AddWidth,
/*.fnAddHeight =*/&SwRect::AddHeight,
/*.fnSetPosX =*/&SwRect::SetPosX,
/*.fnSetPosY =*/&SwRect::SetPosY,
/*.fnGetTopMargin =*/&SwFrame::GetBottomMargin,
/*.fnGetBottomMargin =*/&SwFrame::GetTopMargin,
/*.fnGetLeftMargin =*/&SwFrame::GetLeftMargin,
/*.fnGetRightMargin =*/&SwFrame::GetRightMargin,
/*.fnSetXMargins =*/&SwFrame::SetLeftRightMargins,
/*.fnSetYMargins =*/&SwFrame::SetBottomTopMargins,
/*.fnGetPrtTop =*/&SwFrame::GetPrtBottom,
/*.fnGetPrtBottom =*/&SwFrame::GetPrtTop,
/*.fnGetPrtLeft =*/&SwFrame::GetPrtLeft,
/*.fnGetPrtRight =*/&SwFrame::GetPrtRight,
/*.fnTopDist =*/&SwRect::GetBottomDistance,
/*.fnBottomDist =*/&SwRect::GetTopDistance,
/*.fnLeftDist =*/&SwRect::GetLeftDistance,
/*.fnRightDist =*/&SwRect::GetRightDistance,
/*.fnSetLimit =*/&SwFrame::SetMinTop,
/*.fnOverStep =*/&SwRect::OverStepTop,
/*.fnSetPos =*/&SwRect::SetLowerLeftCorner,
/*.fnMakePos =*/&SwFrame::MakeUpperPos,
/*.fnXDiff =*/&FirstMinusSecond,
/*.fnYDiff =*/&SecondMinusFirst,
/*.fnXInc =*/&SwIncrement,
/*.fnYInc =*/&SwDecrement,
/*.fnSetLeftAndWidth =*/&SwRect::SetLeftAndWidth,
/*.fnSetTopAndHeight =*/&SwRect::SetBottomAndHeight
};
static SwRectFnCollection aVerticalRightToLeft = {
/* fnRectGet */
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::BottomRight,
&SwRect::SwappedSize,
/* fnRectSet */
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::SubLeft,
&SwRect::AddRight,
&SwRect::SubTop,
&SwRect::AddBottom,
&SwRect::AddHeight,
&SwRect::AddWidth,
&SwRect::SetPosY,
&SwRect::SetPosX,
&SwFrame::GetLeftMargin,
&SwFrame::GetRightMargin,
&SwFrame::GetTopMargin,
&SwFrame::GetBottomMargin,
&SwFrame::SetTopBottomMargins,
&SwFrame::SetLeftRightMargins,
&SwFrame::GetPrtLeft,
&SwFrame::GetPrtRight,
&SwFrame::GetPrtBottom,
&SwFrame::GetPrtTop,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwRect::GetBottomDistance,
&SwRect::GetTopDistance,
&SwFrame::SetMaxRight,
&SwRect::OverStepRight,
&SwRect::SetLowerLeftCorner,
&SwFrame::MakeRightPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwDecrement,
&SwIncrement,
&SwRect::SetBottomAndHeight,
&SwRect::SetLeftAndWidth
/*.fnGetTop =*/&SwRect::Left_,
/*.fnGetBottom =*/&SwRect::Rigth_,
/*.fnGetLeft =*/&SwRect::Top_,
/*.fnGetRight =*/&SwRect::Bottom_,
/*.fnGetWidth =*/&SwRect::Height_,
/*.fnGetHeight =*/&SwRect::Width_,
/*.fnGetPos =*/&SwRect::BottomRight,
/*.fnGetSize =*/&SwRect::SwappedSize,
/*.fnSetTop =*/&SwRect::Left_,
/*.fnSetBottom =*/&SwRect::Rigth_,
/*.fnSetLeft =*/&SwRect::Top_,
/*.fnSetRight =*/&SwRect::Bottom_,
/*.fnSetWidth =*/&SwRect::Height_,
/*.fnSetHeight =*/&SwRect::Width_,
/*.fnSubTop =*/&SwRect::SubLeft,
/*.fnAddBottom =*/&SwRect::AddRight,
/*.fnSubLeft =*/&SwRect::SubTop,
/*.fnAddRight =*/&SwRect::AddBottom,
/*.fnAddWidth =*/&SwRect::AddHeight,
/*.fnAddHeight =*/&SwRect::AddWidth,
/*.fnSetPosX =*/&SwRect::SetPosY,
/*.fnSetPosY =*/&SwRect::SetPosX,
/*.fnGetTopMargin =*/&SwFrame::GetLeftMargin,
/*.fnGetBottomMargin =*/&SwFrame::GetRightMargin,
/*.fnGetLeftMargin =*/&SwFrame::GetTopMargin,
/*.fnGetRightMargin =*/&SwFrame::GetBottomMargin,
/*.fnSetXMargins =*/&SwFrame::SetTopBottomMargins,
/*.fnSetYMargins =*/&SwFrame::SetLeftRightMargins,
/*.fnGetPrtTop =*/&SwFrame::GetPrtLeft,
/*.fnGetPrtBottom =*/&SwFrame::GetPrtRight,
/*.fnGetPrtLeft =*/&SwFrame::GetPrtBottom,
/*.fnGetPrtRight =*/&SwFrame::GetPrtTop,
/*.fnTopDist =*/&SwRect::GetLeftDistance,
/*.fnBottomDist =*/&SwRect::GetRightDistance,
/*.fnLeftDist =*/&SwRect::GetBottomDistance,
/*.fnRightDist =*/&SwRect::GetTopDistance,
/*.fnSetLimit =*/&SwFrame::SetMaxRight,
/*.fnOverStep =*/&SwRect::OverStepRight,
/*.fnSetPos =*/&SwRect::SetLowerLeftCorner,
/*.fnMakePos =*/&SwFrame::MakeRightPos,
/*.fnXDiff =*/&FirstMinusSecond,
/*.fnYDiff =*/&FirstMinusSecond,
/*.fnXInc =*/&SwDecrement,
/*.fnYInc =*/&SwIncrement,
/*.fnSetLeftAndWidth =*/&SwRect::SetBottomAndHeight,
/*.fnSetTopAndHeight =*/&SwRect::SetLeftAndWidth
};
static SwRectFnCollection aVerticalLeftToRight = {
/* fnRectGet */
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::TopLeft,
&SwRect::SwappedSize,
/* fnRectSet */
&SwRect::Left_,
&SwRect::Rigth_,
&SwRect::Top_,
&SwRect::Bottom_,
&SwRect::Height_,
&SwRect::Width_,
&SwRect::SubLeft,
&SwRect::AddRight,
&SwRect::SubTop,
&SwRect::AddBottom,
&SwRect::AddHeight,
&SwRect::AddWidth,
&SwRect::SetPosY,
&SwRect::SetPosX,
&SwFrame::GetLeftMargin,
&SwFrame::GetRightMargin,
&SwFrame::GetTopMargin,
&SwFrame::GetBottomMargin,
&SwFrame::SetTopBottomMargins,
&SwFrame::SetLeftRightMargins,
&SwFrame::GetPrtLeft,
&SwFrame::GetPrtRight,
&SwFrame::GetPrtTop,
&SwFrame::GetPrtBottom,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
&SwFrame::SetMaxRight,
&SwRect::OverStepRight,
&SwRect::SetUpperLeftCorner,
&SwFrame::MakeRightPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwIncrement,
&SwIncrement,
&SwRect::SetTopAndHeight,
&SwRect::SetLeftAndWidth
/*.fnGetTop =*/&SwRect::Left_,
/*.fnGetBottom =*/&SwRect::Rigth_,
/*.fnGetLeft =*/&SwRect::Top_,
/*.fnGetRight =*/&SwRect::Bottom_,
/*.fnGetWidth =*/&SwRect::Height_,
/*.fnGetHeight =*/&SwRect::Width_,
/*.fnGetPos =*/&SwRect::TopLeft,
/*.fnGetSize =*/&SwRect::SwappedSize,
/*.fnSetTop =*/&SwRect::Left_,
/*.fnSetBottom =*/&SwRect::Rigth_,
/*.fnSetLeft =*/&SwRect::Top_,
/*.fnSetRight =*/&SwRect::Bottom_,
/*.fnSetWidth =*/&SwRect::Height_,
/*.fnSetHeight =*/&SwRect::Width_,
/*.fnSubTop =*/&SwRect::SubLeft,
/*.fnAddBottom =*/&SwRect::AddRight,
/*.fnSubLeft =*/&SwRect::SubTop,
/*.fnAddRight =*/&SwRect::AddBottom,
/*.fnAddWidth =*/&SwRect::AddHeight,
/*.fnAddHeight =*/&SwRect::AddWidth,
/*.fnSetPosX =*/&SwRect::SetPosY,
/*.fnSetPosY =*/&SwRect::SetPosX,
/*.fnGetTopMargin =*/&SwFrame::GetLeftMargin,
/*.fnGetBottomMargin =*/&SwFrame::GetRightMargin,
/*.fnGetLeftMargin =*/&SwFrame::GetTopMargin,
/*.fnGetRightMargin =*/&SwFrame::GetBottomMargin,
/*.fnSetXMargins =*/&SwFrame::SetTopBottomMargins,
/*.fnSetYMargins =*/&SwFrame::SetLeftRightMargins,
/*.fnGetPrtTop =*/&SwFrame::GetPrtLeft,
/*.fnGetPrtBottom =*/&SwFrame::GetPrtRight,
/*.fnGetPrtLeft =*/&SwFrame::GetPrtTop,
/*.fnGetPrtRight =*/&SwFrame::GetPrtBottom,
/*.fnTopDist =*/&SwRect::GetLeftDistance,
/*.fnBottomDist =*/&SwRect::GetRightDistance,
/*.fnLeftDist =*/&SwRect::GetTopDistance,
/*.fnRightDist =*/&SwRect::GetBottomDistance,
/*.fnSetLimit =*/&SwFrame::SetMaxRight,
/*.fnOverStep =*/&SwRect::OverStepRight,
/*.fnSetPos =*/&SwRect::SetUpperLeftCorner,
/*.fnMakePos =*/&SwFrame::MakeRightPos,
/*.fnXDiff =*/&FirstMinusSecond,
/*.fnYDiff =*/&FirstMinusSecond,
/*.fnXInc =*/&SwIncrement,
/*.fnYInc =*/&SwIncrement,
/*.fnSetLeftAndWidth =*/&SwRect::SetTopAndHeight,
/*.fnSetTopAndHeight =*/&SwRect::SetLeftAndWidth
};
SwRectFn fnRectHori = &aHorizontal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment