34#include <com/sun/star/text/HoriOrientation.hpp>
35#include <com/sun/star/text/VertOrientation.hpp>
36#include <com/sun/star/text/RelOrientation.hpp>
37#include <svx/svxids.hrc>
39#include <osl/diagnose.h>
66struct StringIdPair_Impl
77 VertPrintArea = 0x000008,
78 RelFrameLeft = 0x000010,
79 RelFrameRight = 0x000020,
81 RelPageLeft = 0x000040,
82 RelPageRight = 0x000080,
83 RelPageFrame = 0x000100,
84 RelPagePrintArea = 0x000200,
86 FlyRelPageLeft = 0x000400,
87 FlyRelPageRight = 0x000800,
88 FlyRelPageFrame = 0x001000,
89 FlyRelPagePrintArea = 0x002000,
96 FlyVertFrame = 0x020000,
97 FlyVertPrintArea = 0x040000,
102 RelPagePrintAreaBottom = 0x100000,
103 RelPagePrintAreaTop = 0x200000,
111 template<>
struct typed_flags<LB> : is_typed_flags<LB, 0x3fffff> {};
155constexpr auto HORI_PAGE_REL = LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPageLeft|
171#define VERT_PAGE_REL (LB::RelPageFrame|LB::RelPagePrintArea)
191 LB::FlyRelPageLeft|LB::FlyRelPageRight;
209#define VERT_FRAME_REL (LB::FlyVertFrame|LB::FlyVertPrintArea)
238constexpr auto HORI_PARA_REL = LB::Frame|LB::PrintArea|LB::RelPageLeft|LB::RelPageRight|
239 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft|
250#define HTML_HORI_PARA_REL (LB::Frame|LB::PrintArea)
266 LB::RelPageFrame|LB::RelPagePrintArea| LB::RelPagePrintAreaTop |LB::RelPagePrintAreaBottom;
285constexpr auto HORI_CHAR_REL = LB::Frame|LB::PrintArea|LB::RelPageLeft|LB::RelPageRight|
286 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft|
287 LB::RelFrameRight|LB::RelChar;
297#define HTML_HORI_CHAR_REL (LB::Frame|LB::PrintArea|LB::RelChar)
315 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPagePrintAreaBottom;
439 eStringId = bVertical ?
447 static const StringIdPair_Impl aHoriIds[] =
458 static const StringIdPair_Impl aVertIds[] =
469 for(
const auto &
a : aHoriIds)
471 if(
a.eHori == eStringId)
477 for(
const auto &
a : aVertIds)
479 if(
a.eHori == eStringId)
492 LB nLBRelations = LB::NONE;
496 if ( nRelMapPos.nRelation == _nRel )
498 nLBRelations |= nRelMapPos.nLBRelation;
509 const bool _bUseMirrorStr )
511 LB nLBRelations = LB::NONE;
514 for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
516 if ( ( !_bUseMirrorStr && _pMap[nRelMapPos].eStrId == _eStrId ) ||
517 ( _bUseMirrorStr && _pMap[nRelMapPos].eMirrorStrId == _eStrId ) )
527 :
SfxTabPage(pPage, pController,
"cui/ui/swpossizepage.ui",
"SwPosSizePage", &rInAttrs)
530 , m_pSdrView(nullptr)
531 , m_nOldH(HoriOrientation::
CENTER)
532 , m_nOldHRel(RelOrientation::
FRAME)
533 , m_nOldV(VertOrientation::
TOP)
534 , m_nOldVRel(RelOrientation::PRINT_AREA)
535 , m_fWidthHeightRatio(1.0)
537 , m_bIsVerticalFrame(false)
538 , m_bPositioningDisabled(false)
539 , m_bIsMultiSelection(false)
540 , m_bIsInRightToLeft(false)
542 , m_xWidthMF(m_xBuilder->weld_metric_spin_button(
"width",
FieldUnit::
CM))
543 , m_xHeightMF(m_xBuilder->weld_metric_spin_button(
"height",
FieldUnit::
CM))
544 , m_xKeepRatioCB(m_xBuilder->weld_check_button(
"ratio"))
545 , m_xToPageRB(m_xBuilder->weld_radio_button(
"topage"))
546 , m_xToParaRB(m_xBuilder->weld_radio_button(
"topara"))
547 , m_xToCharRB(m_xBuilder->weld_radio_button(
"tochar"))
548 , m_xAsCharRB(m_xBuilder->weld_radio_button(
"aschar"))
549 , m_xToFrameRB(m_xBuilder->weld_radio_button(
"toframe"))
550 , m_xPositionCB(m_xBuilder->weld_check_button(
"pos"))
551 , m_xSizeCB(m_xBuilder->weld_check_button(
"size"))
552 , m_xPosFrame(m_xBuilder->weld_widget(
"posframe"))
553 , m_xHoriFT(m_xBuilder->weld_label(
"horiposft"))
554 , m_xHoriLB(m_xBuilder->weld_combo_box(
"horipos"))
555 , m_xHoriByFT(m_xBuilder->weld_label(
"horibyft"))
556 , m_xHoriByMF(m_xBuilder->weld_metric_spin_button(
"byhori",
FieldUnit::
CM))
557 , m_xHoriToFT(m_xBuilder->weld_label(
"horitoft"))
558 , m_xHoriToLB(m_xBuilder->weld_combo_box(
"horianchor"))
559 , m_xHoriMirrorCB(m_xBuilder->weld_check_button(
"mirror"))
560 , m_xVertFT(m_xBuilder->weld_label(
"vertposft"))
561 , m_xVertLB(m_xBuilder->weld_combo_box(
"vertpos"))
562 , m_xVertByFT(m_xBuilder->weld_label(
"vertbyft"))
563 , m_xVertByMF(m_xBuilder->weld_metric_spin_button(
"byvert",
FieldUnit::
CM))
564 , m_xVertToFT(m_xBuilder->weld_label(
"verttoft"))
565 , m_xVertToLB(m_xBuilder->weld_combo_box(
"vertanchor"))
566 , m_xFollowCB(m_xBuilder->weld_check_button(
"followtextflow"))
567 , m_xExampleWN(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aExampleWN))
629 static const FrmMaps aMaps[] = {
653 std::vector<SvxSwFramePosString::StringId> aFrames;
654 for (
const FrmMaps&
aMap : aMaps)
656 for (
size_t j = 0; j <
aMap.nCount; ++j)
658 aFrames.push_back(
aMap.pMap[j].eStrId);
659 aFrames.push_back(
aMap.pMap[j].eMirrorStrId);
663 std::sort(aFrames.begin(), aFrames.end());
664 aFrames.erase(std::unique(aFrames.begin(), aFrames.end()), aFrames.end());
666 for (
auto const&
frame : aFrames)
681 RelationMap
const *pMap;
688 static const RelationMaps aMaps[] = {
693 std::vector<SvxSwFramePosString::StringId> aRels;
694 for (
const RelationMaps&
aMap : aMaps)
696 for (
size_t j = 0; j <
aMap.nCount; ++j)
698 aRels.push_back(
aMap.pMap[j].eStrId);
699 aRels.push_back(
aMap.pMap[j].eMirrorStrId);
703 std::sort(aRels.begin(), aRels.end());
704 aRels.erase(std::unique(aRels.begin(), aRels.end()), aRels.end());
706 for (
auto const& elem : aRels)
719 return std::make_unique<SvxSwPosSizeTabPage>(pPage, pController, *
rSet);
725 SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y,
726 SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_SIZE_POINT,
727 SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_INTERN,
728 SID_ATTR_TRANSFORM_AUTOWIDTH, SID_ATTR_TRANSFORM_VERT_ORIENT,
729 SID_HTML_MODE, SID_HTML_MODE,
730 SID_SW_FOLLOW_TEXT_FLOW, SID_SW_FOLLOW_TEXT_FLOW,
731 SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION
738 bool bAnchorChanged =
false;
740 bool bModified =
false;
757 if (
m_xSizeCB->get_state_changed_from_saved())
798 rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_ORIENT );
800 rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_RELATION);
802 rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_POSITION);
827 rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_ORIENT);
829 rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_RELATION);
831 rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_POSITION);
843 if ( nAlign != rVertOrient.
GetValue() ||
846 nVertByPos != rVertPosition.
GetValue() ) )
863 std::unique_ptr<SfxBoolItem> pFollow(
static_cast<SfxBoolItem*
>(pItem->
Clone()));
865 bModified |=
nullptr !=
rSet->
Put(std::move(pFollow));
872 sal_uInt32 nWidth =
static_cast<sal_uInt32
>(
m_xWidthMF->denormalize(
m_xWidthMF->get_value(FieldUnit::TWIP)));
873 sal_uInt32 nHeight =
static_cast<sal_uInt32
>(
m_xHeightMF->denormalize(
m_xHeightMF->get_value(FieldUnit::TWIP)));
888 bool bInvalidateAnchor =
false;
889 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA;
895 case RndStdIds::FLY_AT_PAGE:
m_xToPageRB->set_active(
true);
break;
896 case RndStdIds::FLY_AT_PARA:
m_xToParaRB->set_active(
true);
break;
897 case RndStdIds::FLY_AT_CHAR:
m_xToCharRB->set_active(
true);
break;
898 case RndStdIds::FLY_AS_CHAR:
m_xAsCharRB->set_active(
true);
break;
899 case RndStdIds::FLY_AT_FLY:
m_xToFrameRB->set_active(
true);
break;
900 default : bInvalidateAnchor =
true;
908 if (bInvalidateAnchor)
917 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_PROTECT_POS );
931 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_PROTECT_SIZE );
949 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT );
952 OUString sHLabel =
m_xHoriFT->get_label();
957 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_IN_RTL_TEXT);
964 const bool bFollowTextFlow =
987 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_WIDTH );
988 sal_Int32 nWidth = std::max( pItem ? (
static_cast<const SfxUInt32Item*
>(pItem)->
GetValue()) : 0, sal_uInt32(1) );
993 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_HEIGHT );
994 sal_Int32 nHeight = std::max( pItem ? (
static_cast<const SfxUInt32Item*
>(pItem)->
GetValue()) : 0, sal_uInt32(1) );
1002 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_HORI_ORIENT);
1008 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_VERT_ORIENT);
1014 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_HORI_RELATION);
1020 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_VERT_RELATION);
1025 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_HORI_MIRROR);
1030 sal_Int32 nHoriPos = 0;
1031 sal_Int32 nVertPos = 0;
1032 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_HORI_POSITION);
1035 pItem =
GetItem( *
rSet, SID_ATTR_TRANSFORM_VERT_POSITION);
1059 return DeactivateRC::LeavePage;
1064 if (nAnchorEnable & SvxAnchorIds::Fly)
1066 if (!(nAnchorEnable & SvxAnchorIds::Page))
1078 nRet = RndStdIds::FLY_AT_PAGE;
1083 nRet = RndStdIds::FLY_AT_PARA;
1088 nRet = RndStdIds::FLY_AT_CHAR;
1093 nRet = RndStdIds::FLY_AS_CHAR;
1098 nRet = RndStdIds::FLY_AT_FLY;
1107 *pbHasChanged =
false;
1114 RangeModifyHdl(m_xWidthMF->get_widget());
1119 if (m_bPositioningDisabled)
1125 aVal.
bMirror = m_xHoriMirrorCB->get_active();
1132 sal_uInt16 nMapPos = GetMapPos(m_pHMap, *m_xHoriToLB);
1133 sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, *m_xHoriToLB);
1134 sal_uInt16 nRel = GetRelation(*m_xHoriToLB);
1145 sal_uInt16 nMapPos = GetMapPos(m_pVMap, *m_xVertLB);
1146 sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, *m_xVertToLB);
1147 sal_uInt16 nRel = GetRelation(*m_xVertToLB);
1155 const auto nAtHorzPosVal = m_xHoriByMF->denormalize(m_xHoriByMF->get_value(FieldUnit::TWIP));
1156 const auto nAtVertPosVal = m_xVertByMF->denormalize(m_xVertByMF->get_value(FieldUnit::TWIP));
1158 aVal.
nHPos = nAtHorzPosVal;
1159 aVal.
nVPos = nAtVertPosVal;
1161 sal_Int32 nWidth =
static_cast<sal_uInt32
>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::TWIP)));
1162 sal_Int32 nHeight =
static_cast<sal_uInt32
>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::TWIP)));
1166 m_aValidateLink.Call(aVal);
1169 m_xHeightMF->set_min(m_xHeightMF->normalize(aVal.
nMinHeight), FieldUnit::TWIP);
1170 m_xWidthMF->set_min(m_xWidthMF->normalize(aVal.
nMinWidth), FieldUnit::TWIP);
1175 sal_Int64 nTmp = m_xHeightMF->normalize(nMaxHeight);
1176 m_xHeightMF->set_max(nTmp, FieldUnit::TWIP);
1178 nTmp = m_xWidthMF->normalize(nMaxWidth);
1179 m_xWidthMF->set_max(nTmp, FieldUnit::TWIP);
1181 m_xHoriByMF->set_range(m_xHoriByMF->normalize(aVal.
nMinHPos),
1182 m_xHoriByMF->normalize(aVal.
nMaxHPos), FieldUnit::TWIP);
1183 if ( aVal.
nHPos != nAtHorzPosVal )
1184 m_xHoriByMF->set_value(m_xHoriByMF->normalize(aVal.
nHPos), FieldUnit::TWIP);
1186 m_xVertByMF->set_range(m_xVertByMF->normalize(aVal.
nMinVPos),
1187 m_xVertByMF->normalize(aVal.
nMaxVPos), FieldUnit::TWIP);
1188 if ( aVal.
nVPos != nAtVertPosVal )
1189 m_xVertByMF->set_value(m_xVertByMF->normalize(aVal.
nVPos), FieldUnit::TWIP);
1194 m_xHoriMirrorCB->set_sensitive(!m_xAsCharRB->get_active() && !m_bIsMultiSelection);
1198 m_xFollowCB->set_sensitive(m_xToParaRB->get_active() || m_xToCharRB->get_active());
1203 RangeModifyHdl(m_xWidthMF->get_widget());
1220 bool bHori = &rLB == m_xHoriToLB.get();
1224 if (m_bHtmlMode && RndStdIds::FLY_AT_CHAR == GetAnchorType())
1228 sal_uInt16 nRel = GetRelation(*m_xHoriToLB);
1229 if(RelOrientation::PRINT_AREA == nRel && 0 == m_xVertLB->get_active())
1231 m_xVertLB->set_active(1);
1233 else if(RelOrientation::CHAR == nRel && 1 == m_xVertLB->get_active())
1235 m_xVertLB->set_active(0);
1239 RangeModifyHdl(m_xWidthMF->get_widget());
1244 bool bHori = &rLB == m_xHoriLB.get();
1245 weld::ComboBox* pRelLB = bHori ? m_xHoriToLB.get() : m_xVertToLB.get();
1246 weld::Label* pRelFT = bHori ? m_xHoriToFT.get() : m_xVertToFT.get();
1247 FrmMap const *pMap = bHori ? m_pHMap : m_pVMap;
1250 sal_uInt16 nMapPos = GetMapPos(pMap, rLB);
1251 sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pRelLB);
1255 bool bEnable = HoriOrientation::NONE == nAlign;
1256 m_xHoriByMF->set_sensitive( bEnable );
1257 m_xHoriByFT->set_sensitive( bEnable );
1261 bool bEnable = VertOrientation::NONE == nAlign;
1262 m_xVertByMF->set_sensitive( bEnable );
1263 m_xVertByFT->set_sensitive( bEnable );
1266 RangeModifyHdl(m_xWidthMF->get_widget());
1269 if (rLB.get_active() != -1)
1272 nRel = weld::fromId<RelationMap*>(pRelLB->
get_active_id())->nRelation;
1274 FillRelLB(pMap, nMapPos, nAlign, nRel, *pRelLB, *pRelFT);
1282 if (!(m_bHtmlMode && RndStdIds::FLY_AT_CHAR == GetAnchorType()))
1290 if((HoriOrientation::LEFT == nAlign || HoriOrientation::RIGHT == nAlign) &&
1291 0 == m_xVertLB->get_active())
1293 if(RelOrientation::FRAME == nRel)
1294 m_xVertLB->set_active(1);
1296 m_xVertLB->set_active(0);
1299 else if(HoriOrientation::LEFT == nAlign && 1 == m_xVertLB->get_active())
1301 m_xVertLB->set_active(0);
1304 else if(HoriOrientation::NONE == nAlign && 1 == m_xVertLB->get_active())
1306 m_xVertLB->set_active(0);
1314 if(VertOrientation::TOP == nAlign)
1316 if(1 == m_xHoriLB->get_active())
1318 m_xHoriLB->set_active(0);
1321 m_xHoriToLB->set_active(1);
1323 else if(VertOrientation::CHAR_BOTTOM == nAlign)
1325 if(2 == m_xHoriLB->get_active())
1327 m_xHoriLB->set_active(0);
1330 m_xHoriToLB->set_active(0) ;
1339 auto nWidth = m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::TWIP));
1340 auto nHeight = m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::TWIP));
1341 if (m_xKeepRatioCB->get_active())
1343 if ( &rEdit == m_xWidthMF.get() )
1345 nHeight =
int(
static_cast<double>(nWidth) / m_fWidthHeightRatio);
1346 m_xHeightMF->set_value(m_xHeightMF->normalize(nHeight), FieldUnit::TWIP);
1348 else if(&rEdit == m_xHeightMF.get())
1350 nWidth =
int(
static_cast<double>(nHeight) * m_fWidthHeightRatio);
1351 m_xWidthMF->set_value(m_xWidthMF->normalize(nWidth), FieldUnit::TWIP);
1354 m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
1360 if (m_xSizeCB->get_sensitive())
1362 m_nProtectSizeState = m_xSizeCB->get_state();
1366 m_xSizeCB->set_sensitive(m_xPositionCB->get_sensitive() && !m_xPositionCB->get_active());
1375 RelationMap *pEntry = weld::fromId<RelationMap*>(rRelationLB.
get_id(
nPos));
1376 nRel = pEntry->nRelation;
1393 LB nRel = weld::fromId<RelationMap*>(rRelationLB.
get_active_id())->nLBRelation;
1397 for (std::size_t
i = 0;
i < nMapCount;
i++)
1399 if (pMap[
i].eStrId == eStrId)
1402 if (nLBRelations & nRel)
1412 nAlign = pMap[nMapPos].
nAlign;
1419 sal_uInt16 nMapPos = 0;
1422 if (nLBSelPos != -1)
1429 for (std::size_t
i = 0;
i < nMapCount;
i++)
1435 if (sEntry == sSelEntry)
1437 nMapPos = sal::static_int_cast< sal_uInt16 >(
i);
1443 nMapPos = nLBSelPos;
1476 bool bEnable =
true;
1482 else if (nAnchor == RndStdIds::FLY_AT_PAGE)
1487 else if (nAnchor == RndStdIds::FLY_AT_FLY)
1494 else if (nAnchor == RndStdIds::FLY_AT_PARA)
1507 else if (nAnchor == RndStdIds::FLY_AT_CHAR)
1520 else if (nAnchor == RndStdIds::FLY_AS_CHAR)
1531 if ( nH == USHRT_MAX )
1541 if ( nV == USHRT_MAX )
1551 bEnable = nH == HoriOrientation::NONE && nAnchor != RndStdIds::FLY_AS_CHAR;
1568 bEnable = nV == VertOrientation::NONE;
1579 if (nAnchor == RndStdIds::FLY_AS_CHAR)
1631 LB nLBRelations = LB::NONE;
1636 if (nMapPos < nMapCount)
1643 for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++)
1645 if (pMap[_nMapPos].eStrId == eStrId)
1657 if (pMap[_nMapPos].nAlign == nAlign)
1664 if (!sSelEntry.isEmpty())
1673 RelationMap *pEntry = weld::fromId<RelationMap*>(rLB.
get_id(
i));
1674 if (pEntry->nLBRelation == LB::RelChar)
1692 : pMap[nMapPos].
eStrId ),
1702 if (nLBRelations &
static_cast<LB
>(
nBit))
1704 for (
size_t nRelPos = 0; nRelPos < std::size(
aRelationMap); nRelPos++)
1712 if (sSelEntry.isEmpty() &&
aRelationMap[nRelPos].nRelation == nRel)
1718 if (!sSelEntry.isEmpty())
1725 case RelOrientation::FRAME: nRel = RelOrientation::PAGE_FRAME;
break;
1726 case RelOrientation::PRINT_AREA: nRel = RelOrientation::PAGE_PRINT_AREA;
break;
1727 case RelOrientation::PAGE_LEFT: nRel = RelOrientation::FRAME_LEFT;
break;
1728 case RelOrientation::PAGE_RIGHT: nRel = RelOrientation::FRAME_RIGHT;
break;
1729 case RelOrientation::FRAME_LEFT: nRel = RelOrientation::PAGE_LEFT;
break;
1730 case RelOrientation::FRAME_RIGHT: nRel = RelOrientation::PAGE_RIGHT;
break;
1731 case RelOrientation::PAGE_FRAME: nRel = RelOrientation::FRAME;
break;
1732 case RelOrientation::PAGE_PRINT_AREA: nRel = RelOrientation::PRINT_AREA;
break;
1737 RelationMap *pEntry = weld::fromId<RelationMap*>(rLB.
get_id(rLB.
get_count() - 1));
1738 nRel = pEntry->nRelation;
1745 RelationMap *pEntry = weld::fromId<RelationMap*>(rLB.
get_id(
i));
1746 if (pEntry->nRelation == nRel)
1767 const sal_uInt16 _nRel,
1770 OUString sSelEntry, sOldEntry;
1777 const LB nLBRelations = (_pMap !=
aVCharMap)
1783 for (std::size_t
i = 0; _pMap &&
i <
nCount; ++
i)
1795 if ( _pMap[
i].nAlign == _nAlign &&
1796 ( _pMap !=
aVCharMap || _pMap[
i].nLBRelations & nLBRelations ) )
1819 OSL_FAIL(
"No SdrView* set");
1864#if OSL_DEBUG_LEVEL > 1
1870 ( eKind==SdrObjKind::Text || eKind==SdrObjKind::TitleText || eKind==SdrObjKind::OutlineText) &&
1873 OSL_FAIL(
"AutoWidth/AutoHeight should be enabled");
sal_Int32 GetValue() const
constexpr tools::Long Y() const
constexpr tools::Long X() const
const tools::Rectangle & GetWorkArea() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
const tools::Rectangle & GetAllMarkedRect() const
SdrObject * GetMarkedSdrObj() const
const Point & GetAnchorPos() const
virtual bool HasText() const
virtual SdrInventor GetObjInventor() const
virtual SdrObjKind GetObjIdentifier() const
void LogicToPagePos(Point &rPnt) const
SdrPageView * GetSdrPageView() const
sal_Int16 GetValue() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void InvalidateItem(sal_uInt16 nWhich)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
const SfxItemSet & GetItemSet() const
void SetExchangeSupport()
static const SfxPoolItem * GetItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
constexpr tools::Long Width() const
static OUString GetString(StringId eId)
std::unique_ptr< weld::Label > m_xVertFT
void EnableAnchorTypes(SvxAnchorIds nAnchorEnable)
sal_uInt16 FillPosLB(FrmMap const *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, weld::ComboBox &rLB)
static short GetRelation(const weld::ComboBox &rRelationLB)
std::unique_ptr< weld::RadioButton > m_xToFrameRB
std::unique_ptr< weld::ComboBox > m_xVertToLB
void FillRelLB(FrmMap const *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, weld::ComboBox &rLB, weld::Label &rFT)
SwFrameExample m_aExampleWN
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
std::unique_ptr< weld::CheckButton > m_xHoriMirrorCB
std::unique_ptr< weld::CheckButton > m_xSizeCB
std::unique_ptr< weld::Label > m_xHoriToFT
std::unique_ptr< weld::Widget > m_xPosFrame
virtual void Reset(const SfxItemSet *) override
std::unique_ptr< weld::MetricSpinButton > m_xHeightMF
::tools::Rectangle m_aWorkArea
std::unique_ptr< weld::CheckButton > m_xPositionCB
std::unique_ptr< weld::MetricSpinButton > m_xHoriByMF
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
void SetView(const SdrView *pSdrView)
std::unique_ptr< weld::ComboBox > m_xHoriLB
std::unique_ptr< weld::CheckButton > m_xKeepRatioCB
static sal_uInt16 GetMapPos(FrmMap const *pMap, const weld::ComboBox &rAlignLB)
std::unique_ptr< weld::RadioButton > m_xToPageRB
std::unique_ptr< weld::Label > m_xVertToFT
std::unique_ptr< weld::RadioButton > m_xToParaRB
std::unique_ptr< weld::Label > m_xHoriByFT
virtual ~SvxSwPosSizeTabPage() override
double m_fWidthHeightRatio
std::unique_ptr< weld::Label > m_xVertByFT
static short GetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, const weld::ComboBox &rRelationLB)
RndStdIds GetAnchorType(bool *pbHasChanged=nullptr)
void InitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, sal_uInt16 nV, sal_uInt16 nVRel, tools::Long nX, tools::Long nY)
static WhichRangesContainer GetRanges()
std::unique_ptr< weld::MetricSpinButton > m_xWidthMF
SvxSwPosSizeTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
std::unique_ptr< weld::RadioButton > m_xAsCharRB
std::unique_ptr< weld::RadioButton > m_xToCharRB
::tools::Rectangle m_aRect
const SdrView * m_pSdrView
void setOptimalFrmWidth()
virtual bool FillItemSet(SfxItemSet *) override
std::unique_ptr< weld::CheckButton > m_xFollowCB
std::unique_ptr< weld::ComboBox > m_xVertLB
void setOptimalRelWidth()
std::unique_ptr< weld::Label > m_xHoriFT
std::unique_ptr< weld::ComboBox > m_xHoriToLB
bool m_bPositioningDisabled
std::unique_ptr< weld::MetricSpinButton > m_xVertByMF
void SetVertRel(short nR)
void SetHoriRel(short nR)
void SetRelPos(const Point &rP)
void SetAnchor(RndStdIds nA)
virtual int find_text(const OUString &rStr) const=0
virtual OUString get_active_id() const=0
virtual OUString get_active_text() const=0
virtual OUString get_id(int pos) const=0
void append(const weld::ComboBoxEntry &rItem)
virtual void set_active(int pos)=0
void append_text(const OUString &rStr)
virtual int get_active() const=0
virtual int get_count() const=0
void set_active_text(const OUString &rStr)
bool get_state_changed_from_saved() const
virtual tools::Long GetValue() const override
SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit(const SfxItemSet &)
#define LINK(Instance, Class, Member)
constexpr std::underlying_type_t< T > to_underlying(T e)
static constexpr auto Items
OUString toId(const void *pValue)
HashMap_OWString_Interface aMap
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
SvxSwFramePosString::StringId eMirrorStrId
SvxSwFramePosString::StringId eStrId
static FrmMap aHCharHtmlAbsMap[]
constexpr auto HORI_PARA_REL
RelationMap const aAsCharRelationMap[]
FrmMap const aVCharHtmlAbsMap[]
constexpr auto VERT_CHAR_REL
FrmMap const aHMultiSelectionMap[]
static FrmMap aHCharHtmlMap[]
static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, bool bVertical, bool bRTL)
constexpr auto HORI_PAGE_REL
#define HTML_HORI_PARA_REL
FrmMap const aVFrameMap[]
IMPL_LINK(SvxSwPosSizeTabPage, RelHdl, weld::ComboBox &, rLB, void)
FrmMap const aHPageHtmlMap[]
FrmMap const aVCharHtmlMap[]
#define HTML_HORI_CHAR_REL
static FrmMap aVCharMap[]
static LB lcl_GetLBRelationsForStrID(const FrmMap *_pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr)
FrmMap const aVAsCharHtmlMap[]
RelationMap const aRelationMap[]
FrmMap const aHFrameMap[]
FrmMap const aHParaHtmlAbsMap[]
FrmMap const aHParaHtmlMap[]
static LB lcl_GetLBRelationsForRelations(const sal_uInt16 _nRel)
constexpr auto VERT_PARA_REL
static std::size_t lcl_GetFrmMapCount(const FrmMap *pMap)
FrmMap const aHFlyHtmlMap[]
IMPL_LINK_NOARG(SvxSwPosSizeTabPage, RangeModifyClickHdl, weld::Toggleable &, void)
FrmMap const aVAsCharMap[]
static FrmMap aHCharMap[]
FrmMap const aVParaHtmlMap[]
FrmMap const aVPageHtmlMap[]
FrmMap const aVFlyHtmlMap[]
constexpr auto HORI_FRAME_REL
FrmMap const aVMultiSelectionMap[]
constexpr auto HORI_CHAR_REL
SVT_DLLPUBLIC void SetFieldUnit(weld::MetricSpinButton &rCtrl, FieldUnit eUnit, bool bAll=false)