33 #include <com/sun/star/text/HoriOrientation.hpp>
34 #include <com/sun/star/text/VertOrientation.hpp>
35 #include <com/sun/star/text/RelOrientation.hpp>
36 #include <svx/svxids.hrc>
64 struct StringIdPair_Impl
75 VertPrintArea = 0x000008,
76 RelFrameLeft = 0x000010,
77 RelFrameRight = 0x000020,
79 RelPageLeft = 0x000040,
80 RelPageRight = 0x000080,
81 RelPageFrame = 0x000100,
82 RelPagePrintArea = 0x000200,
84 FlyRelPageLeft = 0x000400,
85 FlyRelPageRight = 0x000800,
86 FlyRelPageFrame = 0x001000,
87 FlyRelPagePrintArea = 0x002000,
94 FlyVertFrame = 0x020000,
95 FlyVertPrintArea = 0x040000,
100 RelPagePrintAreaBottom = 0x100000,
101 RelPagePrintAreaTop = 0x200000,
109 template<>
struct typed_flags<
LB> : is_typed_flags<LB, 0x3fffff> {};
153 constexpr
auto HORI_PAGE_REL = LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPageLeft|
169 #define VERT_PAGE_REL (LB::RelPageFrame|LB::RelPagePrintArea)
189 LB::FlyRelPageLeft|LB::FlyRelPageRight;
207 #define VERT_FRAME_REL (LB::VertFrame|LB::FlyVertPrintArea)
236 constexpr
auto HORI_PARA_REL = LB::Frame|LB::PrintArea|LB::RelPageLeft|LB::RelPageRight|
237 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft|
248 #define HTML_HORI_PARA_REL (LB::Frame|LB::PrintArea)
264 LB::RelPageFrame|LB::RelPagePrintArea| LB::RelPagePrintAreaTop |LB::RelPagePrintAreaBottom;
283 constexpr
auto HORI_CHAR_REL = LB::Frame|LB::PrintArea|LB::RelPageLeft|LB::RelPageRight|
284 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelFrameLeft|
285 LB::RelFrameRight|LB::RelChar;
295 #define HTML_HORI_CHAR_REL (LB::Frame|LB::PrintArea|LB::RelChar)
313 LB::RelPageFrame|LB::RelPagePrintArea|LB::RelPagePrintAreaBottom;
383 if( pMap == aVParaHtmlMap )
385 if( pMap == aVAsCharHtmlMap )
387 if( pMap == aHParaHtmlMap )
389 if( pMap == aHParaHtmlAbsMap )
391 if( pMap == aVPageMap )
393 if( pMap == aVPageHtmlMap )
395 if( pMap == aVAsCharMap )
397 if( pMap == aVParaMap )
399 if( pMap == aHParaMap )
401 if( pMap == aHFrameMap )
403 if( pMap == aVFrameMap )
405 if( pMap == aHCharMap )
407 if( pMap == aHCharHtmlMap )
409 if( pMap == aHCharHtmlAbsMap )
411 if( pMap == aVCharMap )
413 if( pMap == aVCharHtmlMap )
415 if( pMap == aVCharHtmlAbsMap )
417 if( pMap == aHPageHtmlMap )
419 if( pMap == aHFlyHtmlMap )
421 if( pMap == aVFlyHtmlMap )
423 if( pMap == aVMultiSelectionMap )
425 if( pMap == aHMultiSelectionMap )
438 eStringId = bVertical ?
446 static const StringIdPair_Impl aHoriIds[] =
457 static const StringIdPair_Impl aVertIds[] =
470 if(aHoriIds[
nIndex].eHori == eStringId)
472 eStringId = aHoriIds[
nIndex].eVert;
478 if(aVertIds[
nIndex].eHori == eStringId)
480 eStringId = aVertIds[
nIndex].eVert;
491 LB nLBRelations = LB::NONE;
493 for (RelationMap
const & nRelMapPos : aRelationMap)
495 if ( nRelMapPos.nRelation == _nRel )
497 nLBRelations |= nRelMapPos.nLBRelation;
508 const bool _bUseMirrorStr )
510 LB nLBRelations = LB::NONE;
513 for ( std::size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
515 if ( ( !_bUseMirrorStr && _pMap[nRelMapPos].eStrId == _eStrId ) ||
516 ( _bUseMirrorStr && _pMap[nRelMapPos].eMirrorStrId == _eStrId ) )
526 :
SfxTabPage(pPage, pController,
"cui/ui/swpossizepage.ui",
"SwPosSizePage", &rInAttrs)
529 , m_pSdrView(nullptr)
530 , m_nOldH(HoriOrientation::
CENTER)
531 , m_nOldHRel(RelOrientation::
FRAME)
532 , m_nOldV(VertOrientation::
TOP)
533 , m_nOldVRel(RelOrientation::PRINT_AREA)
534 , m_fWidthHeightRatio(1.0)
536 , m_bIsVerticalFrame(false)
537 , m_bPositioningDisabled(false)
538 , m_bIsMultiSelection(false)
539 , m_bIsInRightToLeft(false)
541 , m_xWidthMF(m_xBuilder->weld_metric_spin_button(
"width",
FieldUnit::
CM))
542 , m_xHeightMF(m_xBuilder->weld_metric_spin_button(
"height",
FieldUnit::
CM))
543 , m_xKeepRatioCB(m_xBuilder->weld_check_button(
"ratio"))
544 , m_xToPageRB(m_xBuilder->weld_radio_button(
"topage"))
545 , m_xToParaRB(m_xBuilder->weld_radio_button(
"topara"))
546 , m_xToCharRB(m_xBuilder->weld_radio_button(
"tochar"))
547 , m_xAsCharRB(m_xBuilder->weld_radio_button(
"aschar"))
548 , m_xToFrameRB(m_xBuilder->weld_radio_button(
"toframe"))
549 , m_xPositionCB(m_xBuilder->weld_check_button(
"pos"))
550 , m_xSizeCB(m_xBuilder->weld_check_button(
"size"))
551 , m_xPosFrame(m_xBuilder->weld_widget(
"posframe"))
552 , m_xHoriFT(m_xBuilder->weld_label(
"horiposft"))
553 , m_xHoriLB(m_xBuilder->weld_combo_box(
"horipos"))
554 , m_xHoriByFT(m_xBuilder->weld_label(
"horibyft"))
555 , m_xHoriByMF(m_xBuilder->weld_metric_spin_button(
"byhori",
FieldUnit::
CM))
556 , m_xHoriToFT(m_xBuilder->weld_label(
"horitoft"))
557 , m_xHoriToLB(m_xBuilder->weld_combo_box(
"horianchor"))
558 , m_xHoriMirrorCB(m_xBuilder->weld_check_button(
"mirror"))
559 , m_xVertFT(m_xBuilder->weld_label(
"vertposft"))
560 , m_xVertLB(m_xBuilder->weld_combo_box(
"vertpos"))
561 , m_xVertByFT(m_xBuilder->weld_label(
"vertbyft"))
562 , m_xVertByMF(m_xBuilder->weld_metric_spin_button(
"byvert",
FieldUnit::
CM))
563 , m_xVertToFT(m_xBuilder->weld_label(
"verttoft"))
564 , m_xVertToLB(m_xBuilder->weld_combo_box(
"vertanchor"))
565 , m_xFollowCB(m_xBuilder->weld_check_button(
"followtextflow"))
566 , m_xExampleWN(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aExampleWN))
628 static const FrmMaps aMaps[] = {
652 std::vector<SvxSwFramePosString::StringId> aFrames;
653 for (
const FrmMaps&
aMap : aMaps)
655 for (
size_t j = 0; j <
aMap.nCount; ++j)
657 aFrames.push_back(
aMap.pMap[j].eStrId);
658 aFrames.push_back(
aMap.pMap[j].eMirrorStrId);
662 std::sort(aFrames.begin(), aFrames.end());
663 aFrames.erase(std::unique(aFrames.begin(), aFrames.end()), aFrames.end());
665 for (
auto const&
frame : aFrames)
671 m_xHoriLB->set_size_request(aBiggest.Width(), -1);
672 m_xVertLB->set_size_request(aBiggest.Width(), -1);
680 RelationMap
const *pMap;
687 static const RelationMaps aMaps[] = {
692 std::vector<SvxSwFramePosString::StringId> aRels;
693 for (
const RelationMaps&
aMap : aMaps)
695 for (
size_t j = 0; j <
aMap.nCount; ++j)
697 aRels.push_back(
aMap.pMap[j].eStrId);
698 aRels.push_back(
aMap.pMap[j].eMirrorStrId);
702 std::sort(aRels.begin(), aRels.end());
703 aRels.erase(std::unique(aRels.begin(), aRels.end()), aRels.end());
705 for (
auto const& elem : aRels)
711 m_xHoriLB->set_size_request(aBiggest.Width(), -1);
712 m_xVertLB->set_size_request(aBiggest.Width(), -1);
718 return std::make_unique<SvxSwPosSizeTabPage>(pPage, pController, *rSet);
723 static const sal_uInt16 pSwPosRanges[] =
725 SID_ATTR_TRANSFORM_POS_X,
726 SID_ATTR_TRANSFORM_POS_Y,
727 SID_ATTR_TRANSFORM_PROTECT_POS,
728 SID_ATTR_TRANSFORM_PROTECT_POS,
729 SID_ATTR_TRANSFORM_INTERN,
730 SID_ATTR_TRANSFORM_INTERN,
731 SID_ATTR_TRANSFORM_ANCHOR,
732 SID_ATTR_TRANSFORM_VERT_ORIENT,
733 SID_ATTR_TRANSFORM_WIDTH,
734 SID_ATTR_TRANSFORM_SIZE_POINT,
735 SID_ATTR_TRANSFORM_PROTECT_POS,
736 SID_ATTR_TRANSFORM_INTERN,
737 SID_ATTR_TRANSFORM_AUTOWIDTH,
738 SID_ATTR_TRANSFORM_VERT_ORIENT,
741 SID_SW_FOLLOW_TEXT_FLOW,
742 SID_SW_FOLLOW_TEXT_FLOW,
743 SID_ATTR_TRANSFORM_HORI_POSITION,
744 SID_ATTR_TRANSFORM_VERT_POSITION,
752 bool bAnchorChanged =
false;
754 bool bModified =
false;
757 rSet->
Put(
SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, static_cast<sal_Int16>(nAnchor)));
771 if (
m_xSizeCB->get_state_changed_from_saved())
812 static_cast<const SfxInt16Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_ORIENT));
814 static_cast<const SfxInt16Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_RELATION));
816 static_cast<const SfxInt32Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_HORI_POSITION)) ;
841 static_cast<const SfxInt16Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_ORIENT));
843 static_cast<const SfxInt16Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_RELATION));
845 static_cast<const SfxInt32Item&
>(rOldSet.
Get( SID_ATTR_TRANSFORM_VERT_POSITION));
857 if ( nAlign != rVertOrient.
GetValue() ||
860 nVertByPos != rVertPosition.
GetValue() ) )
877 std::unique_ptr<SfxBoolItem> pFollow(static_cast<SfxBoolItem*>(pItem->
Clone()));
879 bModified |=
nullptr != rSet->
Put(*pFollow);
886 sal_uInt32 nWidth =
static_cast<sal_uInt32
>(
m_xWidthMF->denormalize(
m_xWidthMF->get_value(FieldUnit::TWIP)));
887 sal_uInt32 nHeight =
static_cast<sal_uInt32
>(
m_xHeightMF->denormalize(
m_xHeightMF->get_value(FieldUnit::TWIP)));
902 bool bInvalidateAnchor =
false;
903 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA;
909 case RndStdIds::FLY_AT_PAGE:
m_xToPageRB->set_active(
true);
break;
910 case RndStdIds::FLY_AT_PARA:
m_xToParaRB->set_active(
true);
break;
911 case RndStdIds::FLY_AT_CHAR:
m_xToCharRB->set_active(
true);
break;
912 case RndStdIds::FLY_AS_CHAR:
m_xAsCharRB->set_active(
true);
break;
913 case RndStdIds::FLY_AT_FLY:
m_xToFrameRB->set_active(
true);
break;
914 default : bInvalidateAnchor =
true;
922 if (bInvalidateAnchor)
931 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_PROTECT_POS );
945 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_PROTECT_SIZE );
955 pItem =
GetItem( *rSet, SID_HTML_MODE );
963 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT );
964 if(pItem && static_cast<const SfxBoolItem*>(pItem)->
GetValue())
966 OUString sHLabel =
m_xHoriFT->get_label();
971 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_IN_RTL_TEXT);
975 pItem =
GetItem( *rSet, SID_SW_FOLLOW_TEXT_FLOW);
978 const bool bFollowTextFlow =
1001 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_WIDTH );
1002 sal_Int32 nWidth = std::max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->
GetValue()) : 0, sal_uInt32(1) );
1007 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_HEIGHT );
1008 sal_Int32 nHeight = std::max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->
GetValue()) : 0, sal_uInt32(1) );
1016 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_HORI_ORIENT);
1022 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_VERT_ORIENT);
1028 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_HORI_RELATION);
1034 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_VERT_RELATION);
1039 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_HORI_MIRROR);
1044 sal_Int32 nHoriPos = 0;
1045 sal_Int32 nVertPos = 0;
1046 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_HORI_POSITION);
1049 pItem =
GetItem( *rSet, SID_ATTR_TRANSFORM_VERT_POSITION);
1073 return DeactivateRC::LeavePage;
1078 if (nAnchorEnable & SvxAnchorIds::Fly)
1080 if (!(nAnchorEnable & SvxAnchorIds::Page))
1092 nRet = RndStdIds::FLY_AT_PAGE;
1097 nRet = RndStdIds::FLY_AT_PARA;
1102 nRet = RndStdIds::FLY_AT_CHAR;
1107 nRet = RndStdIds::FLY_AS_CHAR;
1112 nRet = RndStdIds::FLY_AT_FLY;
1121 *pbHasChanged =
false;
1128 RangeModifyHdl(m_xWidthMF->get_widget());
1133 if (m_bPositioningDisabled)
1139 aVal.
bMirror = m_xHoriMirrorCB->get_active();
1146 sal_uInt16 nMapPos = GetMapPos(m_pHMap, *m_xHoriToLB);
1147 sal_uInt16 nAlign = GetAlignment(m_pHMap, nMapPos, *m_xHoriToLB);
1148 sal_uInt16 nRel = GetRelation(*m_xHoriToLB);
1159 sal_uInt16 nMapPos = GetMapPos(m_pVMap, *m_xVertLB);
1160 sal_uInt16 nAlign = GetAlignment(m_pVMap, nMapPos, *m_xVertToLB);
1161 sal_uInt16 nRel = GetRelation(*m_xVertToLB);
1169 const auto nAtHorzPosVal = m_xHoriByMF->denormalize(m_xHoriByMF->get_value(FieldUnit::TWIP));
1170 const auto nAtVertPosVal = m_xVertByMF->denormalize(m_xVertByMF->get_value(FieldUnit::TWIP));
1172 aVal.
nHPos = nAtHorzPosVal;
1173 aVal.
nVPos = nAtVertPosVal;
1175 sal_Int32 nWidth =
static_cast<sal_uInt32
>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::TWIP)));
1176 sal_Int32 nHeight =
static_cast<sal_uInt32
>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::TWIP)));
1180 m_aValidateLink.Call(aVal);
1183 m_xHeightMF->set_min(m_xHeightMF->normalize(aVal.
nMinHeight), FieldUnit::TWIP);
1184 m_xWidthMF->set_min(m_xWidthMF->normalize(aVal.
nMinWidth), FieldUnit::TWIP);
1189 sal_Int64 nTmp = m_xHeightMF->normalize(nMaxHeight);
1190 m_xHeightMF->set_max(nTmp, FieldUnit::TWIP);
1192 nTmp = m_xWidthMF->normalize(nMaxWidth);
1193 m_xWidthMF->set_max(nTmp, FieldUnit::TWIP);
1195 m_xHoriByMF->set_range(m_xHoriByMF->normalize(aVal.
nMinHPos),
1196 m_xHoriByMF->normalize(aVal.
nMaxHPos), FieldUnit::TWIP);
1197 if ( aVal.
nHPos != nAtHorzPosVal )
1198 m_xHoriByMF->set_value(m_xHoriByMF->normalize(aVal.
nHPos), FieldUnit::TWIP);
1200 m_xVertByMF->set_range(m_xVertByMF->normalize(aVal.
nMinVPos),
1201 m_xVertByMF->normalize(aVal.
nMaxVPos), FieldUnit::TWIP);
1202 if ( aVal.
nVPos != nAtVertPosVal )
1203 m_xVertByMF->set_value(m_xVertByMF->normalize(aVal.
nVPos), FieldUnit::TWIP);
1208 m_xHoriMirrorCB->set_sensitive(!m_xAsCharRB->get_active() && !m_bIsMultiSelection);
1212 m_xFollowCB->set_sensitive(m_xToParaRB->get_active() || m_xToCharRB->get_active());
1217 RangeModifyHdl(m_xWidthMF->get_widget());
1234 bool bHori = &rLB == m_xHoriToLB.get();
1238 if (m_bHtmlMode && RndStdIds::FLY_AT_CHAR == GetAnchorType())
1242 sal_uInt16 nRel = GetRelation(*m_xHoriToLB);
1243 if(RelOrientation::PRINT_AREA == nRel && 0 == m_xVertLB->get_active())
1245 m_xVertLB->set_active(1);
1247 else if(RelOrientation::CHAR == nRel && 1 == m_xVertLB->get_active())
1249 m_xVertLB->set_active(0);
1253 RangeModifyHdl(m_xWidthMF->get_widget());
1258 bool bHori = &rLB == m_xHoriLB.get();
1259 weld::ComboBox* pRelLB = bHori ? m_xHoriToLB.get() : m_xVertToLB.get();
1260 weld::Label* pRelFT = bHori ? m_xHoriToFT.get() : m_xVertToFT.get();
1261 FrmMap const *pMap = bHori ? m_pHMap : m_pVMap;
1264 sal_uInt16 nMapPos = GetMapPos(pMap, rLB);
1265 sal_uInt16 nAlign = GetAlignment(pMap, nMapPos, *pRelLB);
1269 bool bEnable = HoriOrientation::NONE == nAlign;
1270 m_xHoriByMF->set_sensitive( bEnable );
1271 m_xHoriByFT->set_sensitive( bEnable );
1275 bool bEnable = VertOrientation::NONE == nAlign;
1276 m_xVertByMF->set_sensitive( bEnable );
1277 m_xVertByFT->set_sensitive( bEnable );
1280 RangeModifyHdl(m_xWidthMF->get_widget());
1283 if (rLB.get_active() != -1)
1286 nRel = reinterpret_cast<RelationMap*>(pRelLB->
get_active_id().toUInt64())->nRelation;
1288 FillRelLB(pMap, nMapPos, nAlign, nRel, *pRelLB, *pRelFT);
1296 if (!(m_bHtmlMode && RndStdIds::FLY_AT_CHAR == GetAnchorType()))
1304 if((HoriOrientation::LEFT == nAlign || HoriOrientation::RIGHT == nAlign) &&
1305 0 == m_xVertLB->get_active())
1307 if(RelOrientation::FRAME == nRel)
1308 m_xVertLB->set_active(1);
1310 m_xVertLB->set_active(0);
1313 else if(HoriOrientation::LEFT == nAlign && 1 == m_xVertLB->get_active())
1315 m_xVertLB->set_active(0);
1318 else if(HoriOrientation::NONE == nAlign && 1 == m_xVertLB->get_active())
1320 m_xVertLB->set_active(0);
1328 if(VertOrientation::TOP == nAlign)
1330 if(1 == m_xHoriLB->get_active())
1332 m_xHoriLB->set_active(0);
1335 m_xHoriToLB->set_active(1);
1337 else if(VertOrientation::CHAR_BOTTOM == nAlign)
1339 if(2 == m_xHoriLB->get_active())
1341 m_xHoriLB->set_active(0);
1344 m_xHoriToLB->set_active(0) ;
1353 auto nWidth = m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::TWIP));
1354 auto nHeight = m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::TWIP));
1355 if (m_xKeepRatioCB->get_active())
1357 if ( &
rEdit == m_xWidthMF.get() )
1359 nHeight =
int(static_cast<double>(nWidth) / m_fWidthHeightRatio);
1360 m_xHeightMF->set_value(m_xHeightMF->normalize(nHeight), FieldUnit::TWIP);
1362 else if(&
rEdit == m_xHeightMF.get())
1364 nWidth =
int(static_cast<double>(nHeight) * m_fWidthHeightRatio);
1365 m_xWidthMF->set_value(m_xWidthMF->normalize(nWidth), FieldUnit::TWIP);
1368 m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
1374 if (m_xSizeCB->get_sensitive())
1376 m_nProtectSizeState = m_xSizeCB->get_state();
1380 m_xSizeCB->set_sensitive(m_xPositionCB->get_sensitive() && !m_xPositionCB->get_active());
1389 RelationMap *pEntry =
reinterpret_cast<RelationMap*
>(rRelationLB.
get_id(nPos).toUInt64());
1390 nRel = pEntry->nRelation;
1402 if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap ||
1407 LB nRel =
reinterpret_cast<RelationMap*
>(rRelationLB.
get_active_id().toUInt64())->nLBRelation;
1411 for (std::size_t
i = 0;
i < nMapCount;
i++)
1413 if (pMap[
i].eStrId == eStrId)
1416 if (nLBRelations & nRel)
1426 nAlign = pMap[nMapPos].
nAlign;
1433 sal_uInt16 nMapPos = 0;
1436 if (nLBSelPos != -1)
1438 if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap)
1443 for (std::size_t
i = 0;
i < nMapCount;
i++)
1449 if (sEntry == sSelEntry)
1451 nMapPos = sal::static_int_cast< sal_uInt16 >(
i);
1457 nMapPos = nLBSelPos;
1490 bool bEnable =
true;
1496 else if (nAnchor == RndStdIds::FLY_AT_PAGE)
1501 else if (nAnchor == RndStdIds::FLY_AT_FLY)
1508 else if (nAnchor == RndStdIds::FLY_AT_PARA)
1521 else if (nAnchor == RndStdIds::FLY_AT_CHAR)
1534 else if (nAnchor == RndStdIds::FLY_AS_CHAR)
1565 bEnable = nH == HoriOrientation::NONE && nAnchor != RndStdIds::FLY_AS_CHAR;
1582 bEnable = nV == VertOrientation::NONE;
1593 if (nAnchor == RndStdIds::FLY_AS_CHAR)
1645 LB nLBRelations = LB::NONE;
1650 if (nMapPos < nMapCount)
1652 if (pMap == aVAsCharHtmlMap || pMap == aVAsCharMap)
1657 for (std::size_t _nMapPos = 0; _nMapPos < nMapCount; _nMapPos++)
1659 if (pMap[_nMapPos].eStrId == eStrId)
1662 for (
size_t nRelPos = 0; nRelPos <
SAL_N_ELEMENTS(aAsCharRelationMap); nRelPos++)
1664 if (nLBRelations & aAsCharRelationMap[nRelPos].nLBRelation)
1670 rLB.
append(OUString::number(reinterpret_cast<sal_uInt64>(&aAsCharRelationMap[nRelPos])), sEntry);
1671 if (pMap[_nMapPos].nAlign == nAlign)
1678 if (!sSelEntry.isEmpty())
1687 RelationMap *pEntry =
reinterpret_cast<RelationMap*
>(rLB.
get_id(
i).toUInt64());
1688 if (pEntry->nLBRelation == LB::RelChar)
1701 if ( pMap == aVCharMap )
1706 : pMap[nMapPos].
eStrId ),
1716 if (nLBRelations & static_cast<LB>(
nBit))
1718 for (
size_t nRelPos = 0; nRelPos <
SAL_N_ELEMENTS(aRelationMap); nRelPos++)
1720 if (aRelationMap[nRelPos].nLBRelation == static_cast<LB>(
nBit))
1725 rLB.
append(OUString::number(reinterpret_cast<sal_uInt64>(&aRelationMap[nRelPos])), sEntry);
1726 if (sSelEntry.isEmpty() && aRelationMap[nRelPos].nRelation == nRel)
1732 if (!sSelEntry.isEmpty())
1739 case RelOrientation::FRAME: nRel = RelOrientation::PAGE_FRAME;
break;
1740 case RelOrientation::PRINT_AREA: nRel = RelOrientation::PAGE_PRINT_AREA;
break;
1741 case RelOrientation::PAGE_LEFT: nRel = RelOrientation::FRAME_LEFT;
break;
1742 case RelOrientation::PAGE_RIGHT: nRel = RelOrientation::FRAME_RIGHT;
break;
1743 case RelOrientation::FRAME_LEFT: nRel = RelOrientation::PAGE_LEFT;
break;
1744 case RelOrientation::FRAME_RIGHT: nRel = RelOrientation::PAGE_RIGHT;
break;
1745 case RelOrientation::PAGE_FRAME: nRel = RelOrientation::FRAME;
break;
1746 case RelOrientation::PAGE_PRINT_AREA: nRel = RelOrientation::PRINT_AREA;
break;
1751 RelationMap *pEntry =
reinterpret_cast<RelationMap*
>(rLB.
get_id(rLB.
get_count() - 1).toUInt64());
1752 nRel = pEntry->nRelation;
1759 RelationMap *pEntry =
reinterpret_cast<RelationMap*
>(rLB.
get_id(
i).toUInt64());
1760 if (pEntry->nRelation == nRel)
1781 const sal_uInt16 _nRel,
1784 OUString sSelEntry, sOldEntry;
1797 for (std::size_t
i = 0; _pMap &&
i < nCount; ++
i)
1809 if ( _pMap[
i].nAlign == _nAlign &&
1810 ( _pMap != aVCharMap || _pMap[
i].nLBRelations & nLBRelations ) )
1833 OSL_FAIL(
"No SdrView* set");
1878 #if OSL_DEBUG_LEVEL > 1
1887 OSL_FAIL(
"AutoWidth/AutoHeight should be enabled");
virtual bool FillItemSet(SfxItemSet *) override
SvxSwFramePosString::StringId eMirrorStrId
#define LINK(Instance, Class, Member)
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
sal_Int32 GetValue() const
void setOptimalFrmWidth()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
std::unique_ptr< weld::Label > m_xVertByFT
size_t GetMarkCount() const
::tools::Rectangle m_aWorkArea
static sal_uInt16 GetMapPos(FrmMap const *pMap, const weld::ComboBox &rAlignLB)
static FrmMap aHCharHtmlAbsMap[]
FrmMap const aHMultiSelectionMap[]
FrmMap const aHFlyHtmlMap[]
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
RelationMap const aRelationMap[]
FrmMap const aHPageHtmlMap[]
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
virtual bool HasText() const
virtual int find_text(const OUString &rStr) const =0
void InvalidateItem(sal_uInt16 nWhich)
static LB lcl_GetLBRelationsForStrID(const FrmMap *_pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr)
std::unique_ptr< weld::CheckButton > m_xPositionCB
SdrMark * GetMark(size_t nNum) const
std::unique_ptr< weld::RadioButton > m_xToFrameRB
void append(const OUString &rId, const OUString &rStr)
sal_uInt16 FillPosLB(FrmMap const *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, weld::ComboBox &rLB)
virtual OUString get_active_id() const =0
FrmMap const aVCharHtmlAbsMap[]
virtual SdrObjKind GetObjIdentifier() const
std::unique_ptr< weld::CheckButton > m_xKeepRatioCB
virtual int get_active() const =0
static const SfxPoolItem * GetItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
virtual int get_count() const =0
FrmMap const aHParaHtmlMap[]
std::unique_ptr< weld::Widget > m_xPosFrame
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
std::unique_ptr< weld::Label > m_xVertFT
static const sal_uInt16 * GetRanges()
std::unique_ptr< weld::Label > m_xHoriByFT
HashMap_OWString_Interface aMap
void LogicToPagePos(Point &rPnt) const
void SetVertRel(short nR)
std::unique_ptr< weld::MetricSpinButton > m_xVertByMF
std::unique_ptr< weld::CheckButton > m_xHoriMirrorCB
std::unique_ptr< weld::RadioButton > m_xToPageRB
void SetExchangeSupport()
std::unique_ptr< weld::ComboBox > m_xHoriToLB
static OUString GetString(StringId eId)
constexpr auto HORI_PAGE_REL
std::unique_ptr< weld::ComboBox > m_xVertToLB
const SfxItemSet & GetItemSet() const
#define SAL_N_ELEMENTS(arr)
SvxSwFramePosString::StringId eStrId
SdrObject * GetMarkedSdrObj() const
static std::size_t lcl_GetFrmMapCount(const FrmMap *pMap)
SwFrameExample m_aExampleWN
FrmMap const aVMultiSelectionMap[]
constexpr auto VERT_PARA_REL
void set_active_text(const OUString &rStr)
FrmMap const aVPageHtmlMap[]
sal_Int16 GetValue() const
std::unique_ptr< weld::CheckButton > m_xSizeCB
static FrmMap aVCharMap[]
static LB lcl_GetLBRelationsForRelations(const sal_uInt16 _nRel)
std::unique_ptr< weld::CheckButton > m_xFollowCB
constexpr auto HORI_CHAR_REL
static FrmMap aHCharMap[]
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
const SdrMarkList & GetMarkedObjectList() const
FrmMap const aHParaHtmlAbsMap[]
virtual void Reset(const SfxItemSet *) override
RelationMap const aAsCharRelationMap[]
std::unique_ptr< weld::Label > m_xHoriToFT
std::unique_ptr< weld::ComboBox > m_xVertLB
virtual void set_active(int pos)=0
std::unique_ptr< weld::RadioButton > m_xAsCharRB
std::unique_ptr< weld::MetricSpinButton > m_xWidthMF
constexpr auto HORI_PARA_REL
std::unique_ptr< weld::MetricSpinButton > m_xHoriByMF
void SetAnchor(RndStdIds nA)
const tools::Rectangle & GetAllMarkedRect() const
virtual SdrInventor GetObjInventor() const
void setOptimalRelWidth()
std::unique_ptr< weld::Label > m_xVertToFT
::tools::Rectangle m_aRect
bool m_bPositioningDisabled
FrmMap const aHFrameMap[]
std::unique_ptr< weld::ComboBox > m_xHoriLB
static short GetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, const weld::ComboBox &rRelationLB)
RndStdIds GetAnchorType(bool *pbHasChanged=nullptr)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
FrmMap const aVCharHtmlMap[]
IMPL_LINK(SvxSwPosSizeTabPage, RelHdl, weld::ComboBox &, rLB, void)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, bool bVertical, bool bRTL)
const SdrView * m_pSdrView
IMPL_LINK_NOARG(SvxSwPosSizeTabPage, RangeModifyClickHdl, weld::ToggleButton &, void)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
FrmMap const aVAsCharMap[]
#define HTML_HORI_PARA_REL
void SetHoriRel(short nR)
FrmMap const aVParaHtmlMap[]
#define HTML_HORI_CHAR_REL
virtual OUString get_id(int pos) const =0
static short GetRelation(const weld::ComboBox &rRelationLB)
const Point & GetAnchorPos() const
SvxSwPosSizeTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
void SetRelPos(const Point &rP)
SdrPageView * GetSdrPageView() const
std::unique_ptr< weld::MetricSpinButton > m_xHeightMF
void InitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, sal_uInt16 nV, sal_uInt16 nVRel, tools::Long nX, tools::Long nY)
constexpr auto VERT_CHAR_REL
std::unique_ptr< weld::RadioButton > m_xToCharRB
void append_text(const OUString &rStr)
FrmMap const aVAsCharHtmlMap[]
static FrmMap aHCharHtmlMap[]
std::unique_ptr< weld::RadioButton > m_xToParaRB
constexpr auto HORI_FRAME_REL
void EnableAnchorTypes(SvxAnchorIds nAnchorEnable)
FrmMap const aVFlyHtmlMap[]
double m_fWidthHeightRatio
const tools::Rectangle & GetWorkArea() const
void FillRelLB(FrmMap const *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, weld::ComboBox &rLB, weld::Label &rFT)
virtual ~SvxSwPosSizeTabPage() override
FrmMap const aVFrameMap[]
std::unique_ptr< weld::Label > m_xHoriFT
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
virtual OUString get_active_text() const =0
void SetView(const SdrView *pSdrView)