20#include <com/sun/star/embed/Aspects.hpp>
21#include <com/sun/star/embed/EmbedMisc.hpp>
22#include <com/sun/star/embed/XEmbeddedObject.hpp>
26#include <bitmaps.hlst>
61#include <osl/diagnose.h>
66#include <svx/strings.hrc>
70#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
71#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
72#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
73#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
80using namespace ::
sfx2;
82#define SwFPos SvxSwFramePosString
86struct StringIdPair_Impl
94#define MAX_PERCENT_WIDTH SAL_CONST_INT64(254)
95#define MAX_PERCENT_HEIGHT SAL_CONST_INT64(254)
103 VertFrame = 0x00000004L,
104 VertPrintArea = 0x00000008L,
105 RelFrameLeft = 0x00000010L,
106 RelFrameRight = 0x00000020L,
108 RelPageLeft = 0x00000040L,
109 RelPageRight = 0x00000080L,
110 RelPageFrame = 0x00000100L,
111 RelPagePrintArea = 0x00000200L,
113 FlyRelPageLeft = 0x00000400L,
114 FlyRelPageRight = 0x00000800L,
115 FlyRelPageFrame = 0x00001000L,
116 FlyRelPagePrintArea = 0x00002000L,
118 RelBase = 0x00010000L,
119 RelChar = 0x00020000L,
120 RelRow = 0x00040000L,
122 FlyVertFrame = 0x00100000L,
123 FlyVertPrintArea = 0x00200000L,
125 VertLine = 0x00400000L,
131 template<>
struct typed_flags<LB> : is_typed_flags<LB, 0x00773fffL> {};
157 {SwFPos::FRAME, SwFPos::FRAME, LB::Frame, text::RelOrientation::FRAME},
158 {SwFPos::PRTAREA, SwFPos::PRTAREA, LB::PrintArea, text::RelOrientation::PRINT_AREA},
159 {SwFPos::REL_PG_LEFT, SwFPos::MIR_REL_PG_LEFT, LB::RelPageLeft, text::RelOrientation::PAGE_LEFT},
160 {SwFPos::REL_PG_RIGHT, SwFPos::MIR_REL_PG_RIGHT, LB::RelPageRight, text::RelOrientation::PAGE_RIGHT},
161 {SwFPos::REL_FRM_LEFT, SwFPos::MIR_REL_FRM_LEFT, LB::RelFrameLeft, text::RelOrientation::FRAME_LEFT},
162 {SwFPos::REL_FRM_RIGHT, SwFPos::MIR_REL_FRM_RIGHT, LB::RelFrameRight, text::RelOrientation::FRAME_RIGHT},
163 {SwFPos::REL_PG_FRAME, SwFPos::REL_PG_FRAME, LB::RelPageFrame, text::RelOrientation::PAGE_FRAME},
164 {SwFPos::REL_PG_PRTAREA, SwFPos::REL_PG_PRTAREA, LB::RelPagePrintArea, text::RelOrientation::PAGE_PRINT_AREA},
165 {SwFPos::REL_CHAR, SwFPos::REL_CHAR, LB::RelChar, text::RelOrientation::CHAR},
167 {SwFPos::FLY_REL_PG_LEFT, SwFPos::FLY_MIR_REL_PG_LEFT, LB::FlyRelPageLeft, text::RelOrientation::PAGE_LEFT},
168 {SwFPos::FLY_REL_PG_RIGHT, SwFPos::FLY_MIR_REL_PG_RIGHT, LB::FlyRelPageRight, text::RelOrientation::PAGE_RIGHT},
169 {SwFPos::FLY_REL_PG_FRAME, SwFPos::FLY_REL_PG_FRAME, LB::FlyRelPageFrame, text::RelOrientation::PAGE_FRAME},
170 {SwFPos::FLY_REL_PG_PRTAREA, SwFPos::FLY_REL_PG_PRTAREA, LB::FlyRelPagePrintArea, text::RelOrientation::PAGE_PRINT_AREA},
172 {SwFPos::REL_BORDER, SwFPos::REL_BORDER, LB::VertFrame, text::RelOrientation::FRAME},
173 {SwFPos::REL_PRTAREA, SwFPos::REL_PRTAREA, LB::VertPrintArea, text::RelOrientation::PRINT_AREA},
175 {SwFPos::FLY_REL_PG_FRAME, SwFPos::FLY_REL_PG_FRAME, LB::FlyVertFrame, text::RelOrientation::FRAME},
176 {SwFPos::FLY_REL_PG_PRTAREA, SwFPos::FLY_REL_PG_PRTAREA, LB::FlyVertPrintArea, text::RelOrientation::PRINT_AREA},
178 {SwFPos::REL_LINE, SwFPos::REL_LINE, LB::VertLine, text::RelOrientation::TEXT_LINE}
183 {SwFPos::REL_BASE, SwFPos::REL_BASE, LB::RelBase, text::RelOrientation::FRAME},
184 {SwFPos::REL_CHAR, SwFPos::REL_CHAR, LB::RelChar, text::RelOrientation::FRAME},
185 {SwFPos::REL_ROW, SwFPos::REL_ROW, LB::RelRow, text::RelOrientation::FRAME}
189constexpr auto HORI_PAGE_REL = LB::RelPageFrame | LB::RelPagePrintArea | LB::RelPageLeft |
194 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT,
HORI_PAGE_REL},
195 {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT,
HORI_PAGE_REL},
196 {SwFPos::CENTER_HORI, SwFPos::CENTER_HORI, text::HoriOrientation::CENTER,
HORI_PAGE_REL},
205#define VERT_PAGE_REL (LB::RelPageFrame|LB::RelPagePrintArea)
209 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP,
VERT_PAGE_REL},
210 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM,
VERT_PAGE_REL},
211 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER,
VERT_PAGE_REL},
222 LB::FlyRelPageLeft | LB::FlyRelPageRight;
226 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT,
HORI_FRAME_REL},
227 {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT,
HORI_FRAME_REL},
228 {SwFPos::CENTER_HORI, SwFPos::CENTER_HORI, text::HoriOrientation::CENTER,
HORI_FRAME_REL},
234 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB::FlyRelPageFrame},
239#define VERT_FRAME_REL (LB::FlyVertFrame|LB::FlyVertPrintArea)
243 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP,
VERT_FRAME_REL},
244 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM,
VERT_FRAME_REL},
245 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER,
VERT_FRAME_REL},
251 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB::FlyVertFrame},
256constexpr auto HORI_PARA_REL = LB::Frame | LB::PrintArea | LB::RelPageLeft | LB::RelPageRight |
257 LB::RelPageFrame | LB::RelPagePrintArea | LB::RelFrameLeft |
262 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT,
HORI_PARA_REL},
263 {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT,
HORI_PARA_REL},
264 {SwFPos::CENTER_HORI, SwFPos::CENTER_HORI, text::HoriOrientation::CENTER,
HORI_PARA_REL},
268#define HTML_HORI_PARA_REL (LB::Frame|LB::PrintArea)
284 LB::RelPageFrame | LB::RelPagePrintArea;
288 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP,
VERT_PARA_REL},
289 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM,
VERT_PARA_REL},
290 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER,
VERT_PARA_REL},
296 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB::VertPrintArea}
300constexpr auto HORI_CHAR_REL = LB::Frame|LB::PrintArea | LB::RelPageLeft | LB::RelPageRight |
301 LB::RelPageFrame | LB::RelPagePrintArea | LB::RelFrameLeft |
302 LB::RelFrameRight | LB::RelChar;
306 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT,
HORI_CHAR_REL},
307 {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT,
HORI_CHAR_REL},
308 {SwFPos::CENTER_HORI, SwFPos::CENTER_HORI, text::HoriOrientation::CENTER,
HORI_CHAR_REL},
312#define HTML_HORI_CHAR_REL (LB::Frame|LB::PrintArea|LB::RelChar)
322 {SwFPos::LEFT, SwFPos::MIR_LEFT, text::HoriOrientation::LEFT, LB::PrintArea|LB::RelChar},
323 {SwFPos::RIGHT, SwFPos::MIR_RIGHT, text::HoriOrientation::RIGHT, LB::PrintArea},
329 LB::RelPageFrame | LB::RelPagePrintArea;
339 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP,
VERT_CHAR_REL|LB::RelChar},
340 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM,
VERT_CHAR_REL|LB::RelChar},
341 {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB::RelChar},
342 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER,
VERT_CHAR_REL|LB::RelChar},
345 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::LINE_TOP, LB::VertLine},
346 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::LINE_BOTTOM, LB::VertLine},
347 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB::VertLine}
352 {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB::RelChar}
357 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB::RelChar},
358 {SwFPos::BELOW, SwFPos::BELOW, text::VertOrientation::CHAR_BOTTOM, LB::RelChar}
364 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB::RelBase},
365 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::BOTTOM, LB::RelBase},
366 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER, LB::RelBase},
368 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::CHAR_TOP, LB::RelChar},
369 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::CHAR_BOTTOM, LB::RelChar},
370 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CHAR_CENTER, LB::RelChar},
372 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::LINE_TOP, LB::RelRow},
373 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::LINE_BOTTOM, LB::RelRow},
374 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB::RelRow},
381 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::TOP, LB::RelBase},
382 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::CENTER, LB::RelBase},
384 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::CHAR_TOP, LB::RelChar},
386 {SwFPos::TOP, SwFPos::TOP, text::VertOrientation::LINE_TOP, LB::RelRow},
387 {SwFPos::BOTTOM, SwFPos::BOTTOM, text::VertOrientation::LINE_BOTTOM, LB::RelRow},
388 {SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, text::VertOrientation::LINE_CENTER, LB::RelRow}
455 const std::vector< OUString >& rPrev,
const std::vector< OUString >& rThis,
456 const std::vector< OUString >& rNext,
const std::vector< OUString >& rRemain)
458 for(
const auto& rItem : rPrev)
460 for(
const auto& rItem : rThis)
462 for(
const auto& rItem : rNext)
468 for(
const auto& rItem : rPrev)
470 for(
const auto& rItem : rThis)
472 for(
const auto& rItem : rNext)
474 for(
const auto& rItem : rRemain)
483 if ( SwFPos::FROMLEFT == eStringId )
485 eStringId = bVertical
491 : SwFPos::FROMLEFT );
496 if ( SwFPos::FROMTOP == eStringId &&
497 bVertical && bVerticalL2R )
499 eStringId = SwFPos::FROMLEFT;
505 static const StringIdPair_Impl aHoriIds[] =
507 {SwFPos::LEFT, SwFPos::TOP},
508 {SwFPos::RIGHT, SwFPos::BOTTOM},
509 {SwFPos::CENTER_HORI, SwFPos::CENTER_VERT},
510 {SwFPos::FROMTOP, SwFPos::FROMRIGHT},
511 {SwFPos::REL_PG_LEFT, SwFPos::REL_PG_TOP},
512 {SwFPos::REL_PG_RIGHT, SwFPos::REL_PG_BOTTOM} ,
513 {SwFPos::REL_FRM_LEFT, SwFPos::REL_FRM_TOP},
514 {SwFPos::REL_FRM_RIGHT, SwFPos::REL_FRM_BOTTOM}
516 static const StringIdPair_Impl aVertIds[] =
518 {SwFPos::TOP, SwFPos::RIGHT},
519 {SwFPos::BOTTOM, SwFPos::LEFT },
520 {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI},
521 {SwFPos::FROMTOP, SwFPos::FROMRIGHT },
522 {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT },
523 {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } ,
524 {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
525 {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
528 static const StringIdPair_Impl aVertL2RIds[] =
530 {SwFPos::TOP, SwFPos::LEFT },
531 {SwFPos::BOTTOM, SwFPos::RIGHT },
532 {SwFPos::CENTER_VERT, SwFPos::CENTER_HORI },
533 {SwFPos::FROMTOP, SwFPos::FROMLEFT },
534 {SwFPos::REL_PG_TOP, SwFPos::REL_PG_LEFT },
535 {SwFPos::REL_PG_BOTTOM, SwFPos::REL_PG_RIGHT } ,
536 {SwFPos::REL_FRM_TOP, SwFPos::REL_FRM_LEFT },
537 {SwFPos::REL_FRM_BOTTOM, SwFPos::REL_FRM_RIGHT }
539 for(
const StringIdPair_Impl & rHoriId : aHoriIds)
541 if(rHoriId.eHori == eStringId)
543 eStringId = rHoriId.eVert;
552 if(aVertIds[
nIndex].eHori == eStringId)
554 eStringId = aVertIds[
nIndex].eVert;
560 if(aVertL2RIds[
nIndex].eHori == eStringId)
562 eStringId = aVertL2RIds[
nIndex].eVert;
579 if (
i.nRelation == _nRel )
581 nLBRelations |=
i.nLBRelation;
592 const bool _bUseMirrorStr )
597 for (
size_t nRelMapPos = 0; nRelMapPos < nRelMapSize; ++nRelMapPos )
599 if ( ( !_bUseMirrorStr && _pMap[nRelMapPos].eStrId == _eStrId ) ||
600 ( _bUseMirrorStr && _pMap[nRelMapPos].eMirrorStrId == _eStrId ) )
622 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/frmtypepage.ui",
"FrameTypePage", &
rSet)
623 , m_bAtHorzPosModified(false)
624 , m_bAtVertPosModified(false)
627 , m_bNoModifyHdl(true)
628 , m_bIsVerticalFrame(false)
629 , m_bIsVerticalL2R(false)
630 , m_bIsInRightToLeft(false)
635 , m_fWidthHeightRatio(1.0)
636 , mpToCharContentPos(nullptr)
638 , m_nOldHRel(
text::RelOrientation::
FRAME)
639 , m_nOldV(
text::VertOrientation::
TOP)
640 , m_nOldVRel(
text::RelOrientation::PRINT_AREA)
643 , m_bAllowVertPositioning( true )
644 , m_bIsMathOLE(false)
645 , m_bIsMathBaselineAlignment(true)
646 , m_xWidthFT(m_xBuilder->weld_label(
"widthft"))
647 , m_xWidthAutoFT(m_xBuilder->weld_label(
"autowidthft"))
648 , m_xRelWidthCB(m_xBuilder->weld_check_button(
"relwidth"))
649 , m_xRelWidthRelationLB(m_xBuilder->weld_combo_box(
"relwidthrelation"))
650 , m_xAutoWidthCB(m_xBuilder->weld_check_button(
"autowidth"))
651 , m_xHeightFT(m_xBuilder->weld_label(
"heightft"))
652 , m_xHeightAutoFT(m_xBuilder->weld_label(
"autoheightft"))
653 , m_xRelHeightCB(m_xBuilder->weld_check_button(
"relheight"))
654 , m_xRelHeightRelationLB(m_xBuilder->weld_combo_box(
"relheightrelation"))
655 , m_xAutoHeightCB(m_xBuilder->weld_check_button(
"autoheight"))
656 , m_xFixedRatioCB(m_xBuilder->weld_check_button(
"ratio"))
657 , m_xRealSizeBT(m_xBuilder->weld_button(
"origsize"))
658 , m_xAnchorFrame(m_xBuilder->weld_widget(
"anchorframe"))
659 , m_xAnchorAtPageRB(m_xBuilder->weld_radio_button(
"topage"))
660 , m_xAnchorAtParaRB(m_xBuilder->weld_radio_button(
"topara"))
661 , m_xAnchorAtCharRB(m_xBuilder->weld_radio_button(
"tochar"))
662 , m_xAnchorAsCharRB(m_xBuilder->weld_radio_button(
"aschar"))
663 , m_xAnchorAtFrameRB(m_xBuilder->weld_radio_button(
"toframe"))
664 , m_xHorizontalFT(m_xBuilder->weld_label(
"horiposft"))
665 , m_xHorizontalDLB(m_xBuilder->weld_combo_box(
"horipos"))
666 , m_xAtHorzPosFT(m_xBuilder->weld_label(
"horibyft"))
667 , m_xAtHorzPosED(m_xBuilder->weld_metric_spin_button(
"byhori",
FieldUnit::
CM))
668 , m_xHoriRelationFT(m_xBuilder->weld_label(
"horitoft"))
669 , m_xHoriRelationLB(m_xBuilder->weld_combo_box(
"horianchor"))
670 , m_xMirrorPagesCB(m_xBuilder->weld_check_button(
"mirror"))
671 , m_xVerticalFT(m_xBuilder->weld_label(
"vertposft"))
672 , m_xVerticalDLB(m_xBuilder->weld_combo_box(
"vertpos"))
673 , m_xAtVertPosFT(m_xBuilder->weld_label(
"vertbyft"))
674 , m_xAtVertPosED(m_xBuilder->weld_metric_spin_button(
"byvert",
FieldUnit::
CM))
675 , m_xVertRelationFT(m_xBuilder->weld_label(
"verttoft"))
676 , m_xVertRelationLB(m_xBuilder->weld_combo_box(
"vertanchor"))
677 , m_xFollowTextFlowCB(m_xBuilder->weld_check_button(
"followtextflow"))
678 , m_xFlySplitCB(m_xBuilder->weld_check_button(
"flysplit"))
679 , m_xExampleWN(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aExampleWN))
683 const auto nWidthRequest =
m_xAtHorzPosED->get_preferred_size().Width();
744 static FrameMaps
const aMaps[] = {
768 std::vector<SvxSwFramePosString::StringId> aFrames;
769 for (
const FrameMaps & rMap : aMaps)
771 for (
size_t j = 0; j < rMap.nCount; ++j)
773 aFrames.push_back(rMap.pMap[j].eStrId);
774 aFrames.push_back(rMap.pMap[j].eMirrorStrId);
778 std::sort(aFrames.begin(), aFrames.end());
779 aFrames.erase(std::unique(aFrames.begin(), aFrames.end()), aFrames.end());
781 for (
const auto& rFrame : aFrames)
796 RelationMap
const * pMap;
812 if (!aNodeIndex.GetNode().IsTableNode())
818 SwNodeIndex aEndIndex(*aNodeIndex.GetNode().EndOfSectionNode());
837 static const RelationMaps aMaps[] = {
842 std::vector<SvxSwFramePosString::StringId> aRels;
843 for (
const RelationMaps & rMap : aMaps)
845 for (
size_t j = 0; j < rMap.nCount; ++j)
847 aRels.push_back(rMap.pMap[j].eStrId);
848 aRels.push_back(rMap.pMap[j].eMirrorStrId);
852 std::sort(aRels.begin(), aRels.end());
853 aRels.erase(std::unique(aRels.begin(), aRels.end()), aRels.end());
855 for (
const auto& rRel : aRels)
870 return std::make_unique<SwFramePage>(pPage, pController, *
rSet);
899 OSL_ENSURE(pSh ,
"shell not found");
919 && RndStdIds::FLY_AS_CHAR == rAnchor.
GetAnchorId()) );
958 SetPageTitle(
SwResId(STR_FRMUI_OLE_INSERT));
960 SetPageTitle(
SwResId(STR_FRMUI_OLE_EDIT));
1017 const bool bFollowTextFlow =
1051 if (!pFlyFormat || !ContainsSingleTable(*pFlyFormat) || ContainsChain(*pFlyFormat))
1093 if ( !
m_bFormat || eAnchorId != RndStdIds::FLY_AT_FLY )
1096 if (
m_bNew || !pOldItem || eAnchorId !=
static_cast<const SwFormatAnchor*
>(pOldItem)->GetAnchorId())
1100 OSL_ENSURE( pSh ,
"shell not found");
1104 bRet =
nullptr !=
rSet->
Put( aAnc );
1128 aHoriOrient.
SetPos( nX );
1139 bRet |=
nullptr !=
rSet->
Put( aHoriOrient );
1163 if (eAnchorId == RndStdIds::FLY_AS_CHAR)
1167 aVertOrient.
SetPos( nY );
1181 bRet |=
nullptr !=
rSet->
Put( aVertOrient );
1194 if (nRelWidthRelation != -1)
1196 if (nRelWidthRelation == 0)
1198 else if (nRelWidthRelation == 1)
1202 if (nRelHeightRelation != -1)
1204 if (nRelHeightRelation == 0)
1206 else if (nRelHeightRelation == 1)
1210 bool bValueModified =
m_xWidthED->get_value_changed_from_saved() ||
1212 bool bCheckChanged =
m_xRelWidthCB->get_state_changed_from_saved() ||
1220 if ((
m_bNew && !
m_bFormat) || ((bValueModified || bCheckChanged) && bLegalValue))
1222 sal_Int64 nNewWidth =
m_xWidthED->DenormalizePercent(
m_xWidthED->GetRealValue(FieldUnit::TWIP));
1267 if ((pOldItem && aSz != *pOldItem) || (!pOldItem && !
m_bFormat) ||
1275 bRet |=
nullptr !=
rSet->
Put( aSz );
1317 bool bEnable =
true;
1318 if ( eId == RndStdIds::FLY_AT_PAGE )
1323 else if ( eId == RndStdIds::FLY_AT_FLY )
1330 else if ( eId == RndStdIds::FLY_AT_PARA )
1343 else if ( eId == RndStdIds::FLY_AT_CHAR )
1356 else if ( eId == RndStdIds::FLY_AS_CHAR )
1400 if (eId == RndStdIds::FLY_AS_CHAR)
1416 const sal_Int16 _nAlign,
1417 const sal_Int16 _nRel,
1427 const LB nLBRelations = (_pMap !=
aVCharMap)
1433 for (
size_t i = 0; _pMap &&
i <
nCount; ++
i)
1450 if ( _pMap[
i].nAlign == _nAlign &&
1451 ( (_pMap !=
aVCharMap) || _pMap[
i].nLBRelations & nLBRelations ) )
1470 const sal_uInt16 _nLBSelPos,
1471 const sal_Int16 _nAlign,
1472 const sal_Int16 _nRel,
1482 if (_nLBSelPos < nMapCount)
1489 for (
size_t nMapPos = 0; nMapPos < nMapCount; nMapPos++)
1491 if (_pMap[nMapPos].eStrId == eStrId)
1496 if (nLBRelations & rCharMap.nLBRelation)
1506 if (_pMap[nMapPos].nAlign == _nAlign)
1513 if (!sSelEntry.isEmpty())
1523 RelationMap *pEntry = weld::fromId<RelationMap*>(_rLB.
get_id(
i));
1524 if (pEntry->nLBRelation == LB::RelChar)
1542 : _pMap[_nLBSelPos].
eStrId),
1552 if (nLBRelations &
static_cast<LB
>(
nBit))
1556 if (rMap.nLBRelation ==
static_cast<LB
>(
nBit))
1559 rMap.eMirrorStrId : rMap.eStrId;
1568 if (sSelEntry.isEmpty() && rMap.nRelation == _nRel)
1574 if (!sSelEntry.isEmpty())
1579 sal_Int16 nSimRel = -1;
1582 case text::RelOrientation::FRAME:
1583 nSimRel = text::RelOrientation::PAGE_FRAME;
1585 case text::RelOrientation::PRINT_AREA:
1586 nSimRel = text::RelOrientation::PAGE_PRINT_AREA;
1588 case text::RelOrientation::PAGE_LEFT:
1589 nSimRel = text::RelOrientation::FRAME_LEFT;
1591 case text::RelOrientation::PAGE_RIGHT:
1592 nSimRel = text::RelOrientation::FRAME_RIGHT;
1594 case text::RelOrientation::FRAME_LEFT:
1595 nSimRel = text::RelOrientation::PAGE_LEFT;
1597 case text::RelOrientation::FRAME_RIGHT:
1598 nSimRel = text::RelOrientation::PAGE_RIGHT;
1600 case text::RelOrientation::PAGE_FRAME:
1601 nSimRel = text::RelOrientation::FRAME;
1603 case text::RelOrientation::PAGE_PRINT_AREA:
1604 nSimRel = text::RelOrientation::PRINT_AREA;
1610 RelationMap *pEntry = weld::fromId<RelationMap*>(_rLB.
get_id(_rLB.
get_count() - 1));
1611 nSimRel = pEntry->nRelation;
1618 RelationMap *pEntry = weld::fromId<RelationMap*>(_rLB.
get_id(
i));
1619 if (pEntry->nRelation == nSimRel)
1632 const bool bEnable = _rLB.
get_count() != 0
1645 RelationMap *pEntry = weld::fromId<RelationMap *>(rRelationLB.
get_id(
nPos));
1646 return pEntry->nRelation;
1655 if (!pMap || nMapPos < 0)
1666 return pMap[nMapPos].
nAlign;
1671 const RelationMap *
const pRelationMap = weld::fromId<const RelationMap*>(
1673 const LB nRel = pRelationMap->nLBRelation;
1676 for (
size_t i = 0;
i < nMapCount; ++
i)
1678 if (pMap[
i].eStrId == eStrId && (pMap[
i].nLBRelations & nRel))
1687 sal_Int32 nMapPos = 0;
1690 if (nLBSelPos != -1)
1697 for (
size_t i = 0;
i < nMapCount;
i++)
1704 if (sEntry == sSelEntry)
1706 nMapPos =
static_cast< sal_Int32
>(
i);
1712 nMapPos = nLBSelPos;
1720 RndStdIds nRet = RndStdIds::FLY_AT_PAGE;
1723 nRet = RndStdIds::FLY_AT_PARA;
1727 nRet = RndStdIds::FLY_AT_CHAR;
1731 nRet = RndStdIds::FLY_AS_CHAR;
1735 nRet = RndStdIds::FLY_AT_FLY;
1777 return DeactivateRC::LeavePage;
1789 if (&rBtn == m_xRelWidthCB.get())
1791 m_xWidthED->ShowPercent(rBtn.get_active());
1792 m_xRelWidthRelationLB->set_sensitive(rBtn.get_active());
1793 if (rBtn.get_active())
1798 m_xHeightED->ShowPercent(rBtn.get_active());
1799 m_xRelHeightRelationLB->set_sensitive(rBtn.get_active());
1800 if (rBtn.get_active())
1806 if (&rBtn == m_xRelWidthCB.get())
1807 ModifyHdl(*m_xWidthED->get());
1809 ModifyHdl(*m_xHeightED->get());
1825 OSL_ENSURE(pSh ,
"shell not found");
1862 aVal.
nHPos = nAtHorzPosVal;
1863 aVal.
nVPos = nAtVertPosVal;
1881 if (pExampleSet && SfxItemState::DEFAULT <= pExampleSet->GetItemState(
RES_COL))
1911 nTmp =
std::min(nHeight * nMaxWidth / std::max(nWidth,
SwTwips(1)), nMaxWidth);
1926 if (aVal.
nHPos != nAtHorzPosVal)
1937 if (aVal.
nVPos != nAtVertPosVal)
1943 m_xMirrorPagesCB->set_sensitive(!m_xAnchorAsCharRB->get_active());
1949 m_xFollowTextFlowCB->set_sensitive(m_xAnchorAtParaRB->get_active() ||
1950 m_xAnchorAtCharRB->get_active() ||
1951 m_xAnchorAtFrameRB->get_active());
1952 m_xFlySplitCB->set_sensitive(m_xAnchorAtParaRB->get_active());
1961 PosHdl(*m_xHorizontalDLB);
1962 PosHdl(*m_xVerticalDLB);
1965 EnableVerticalPositioning( !(m_bIsMathOLE && m_bIsMathBaselineAlignment
1966 && RndStdIds::FLY_AS_CHAR == eId) );
1971 bool bHori = &rLB == m_xHorizontalDLB.get();
1972 weld::ComboBox *pRelLB = bHori ? m_xHoriRelationLB.get() : m_xVertRelationLB.get();
1973 weld::Label *pRelFT = bHori ? m_xHoriRelationFT.get() : m_xVertRelationFT.get();
1974 FrameMap const *pMap = bHori ? m_pHMap : m_pVMap;
1976 const sal_Int32 nMapPos = GetMapPos(pMap, rLB);
1977 const sal_Int16 nAlign = GetAlignment(pMap, nMapPos, *pRelLB);
1982 m_xAtHorzPosED->set_sensitive( bEnable );
1983 m_xAtHorzPosFT->set_sensitive( bEnable );
1988 m_xAtVertPosED->set_sensitive( bEnable );
1989 m_xAtVertPosFT->set_sensitive( bEnable );
1995 if (rLB.get_active() != -1)
1998 nRel = weld::fromId<RelationMap*>(pRelLB->
get_active_id())->nRelation;
1999 FillRelLB(pMap, nMapPos, nAlign, nRel, *pRelLB, *pRelFT);
2007 m_bAtHorzPosModified =
true;
2009 m_bAtVertPosModified =
true;
2012 if(!(m_bHtmlMode && (RndStdIds::FLY_AT_CHAR == GetAnchor())))
2020 if((text::HoriOrientation::LEFT == nAlign || text::HoriOrientation::RIGHT == nAlign) &&
2021 0 == m_xVerticalDLB->get_active())
2023 if(text::RelOrientation::FRAME == nRel)
2024 m_xVerticalDLB->set_active(1);
2026 m_xVerticalDLB->set_active(0);
2029 else if(text::HoriOrientation::LEFT == nAlign && 1 == m_xVerticalDLB->get_active())
2031 m_xVerticalDLB->set_active(0);
2036 m_xVerticalDLB->set_active(0);
2040 PosHdl(*m_xVerticalDLB);
2044 if(text::VertOrientation::TOP == nAlign)
2046 if (1 == m_xHorizontalDLB->get_active())
2048 m_xHorizontalDLB->set_active(0);
2051 m_xHoriRelationLB->set_active(1);
2053 else if(text::VertOrientation::CHAR_BOTTOM == nAlign)
2055 if (2 == m_xHorizontalDLB->get_active())
2057 m_xHorizontalDLB->set_active(0);
2060 m_xHoriRelationLB->set_active(0) ;
2063 PosHdl(*m_xHorizontalDLB);
2070 bool bHori = &rLB == m_xHoriRelationLB.get();
2075 m_bAtHorzPosModified =
true;
2077 m_bAtVertPosModified =
true;
2079 if (m_bHtmlMode && (RndStdIds::FLY_AT_CHAR == GetAnchor()))
2083 const sal_Int16 nRel = GetRelation(*m_xHoriRelationLB);
2084 if(text::RelOrientation::PRINT_AREA == nRel && 0 == m_xVerticalDLB->get_active())
2086 m_xVerticalDLB->set_active(1);
2088 else if(text::RelOrientation::CHAR == nRel && 1 == m_xVerticalDLB->get_active())
2090 m_xVerticalDLB->set_active(0);
2099 m_xWidthED->set_value(m_xWidthED->NormalizePercent(m_aGrfSize.Width()), FieldUnit::TWIP);
2100 m_xHeightED->set_value(m_xHeightED->NormalizePercent(m_aGrfSize.Height()), FieldUnit::TWIP);
2101 m_fWidthHeightRatio = m_aGrfSize.Height() ? double(m_aGrfSize.Width()) / double(m_aGrfSize.Height()) : 1.0;
2107 if( !IsInGraficMode() )
2108 HandleAutoCB( m_xAutoWidthCB->get_active(), *m_xWidthFT, *m_xWidthAutoFT, *m_xWidthED->get() );
2113 if (!IsInGraficMode())
2114 HandleAutoCB(m_xAutoHeightCB->get_active(), *m_xHeightFT, *m_xHeightAutoFT, *m_xWidthED->get());
2119 SwTwips nWidth =
static_cast< SwTwips >(m_xWidthED->DenormalizePercent(m_xWidthED->get_value(FieldUnit::TWIP)));
2120 SwTwips nHeight =
static_cast< SwTwips >(m_xHeightED->DenormalizePercent(m_xHeightED->get_value(FieldUnit::TWIP)));
2121 if (m_xFixedRatioCB->get_active())
2123 if (&rEdit == m_xWidthED->get())
2125 nHeight =
SwTwips(
static_cast<double>(nWidth) / m_fWidthHeightRatio);
2126 m_xHeightED->set_value(m_xHeightED->NormalizePercent(nHeight), FieldUnit::TWIP);
2128 else if (&rEdit == m_xHeightED->get())
2130 nWidth =
SwTwips(
static_cast<double>(nHeight) * m_fWidthHeightRatio);
2131 m_xWidthED->set_value(m_xWidthED->NormalizePercent(nWidth), FieldUnit::TWIP);
2134 m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
2183 static struct GlobalNameId {
2186 sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15;
2190 for (
const GlobalNameId & rId : aGlbNmIds) {
2192 rId.b8, rId.b9, rId.b10, rId.b11,
2193 rId.b12, rId.b13, rId.b14, rId.b15 );
2195 if( rFactNm == aGlbNm )
2211 if(0 != (pSh->
GetOLEObject()->getStatus( embed::Aspects::MSOLE_CONTENT ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE ) )
2220 if (nWidth !=
m_xWidthED->get_value(FieldUnit::TWIP))
2221 m_xWidthED->set_value(nWidth, FieldUnit::TWIP);
2223 if (nHeight !=
m_xHeightED->get_value(FieldUnit::TWIP))
2278 if (eAnchorId == RndStdIds::FLY_AT_PAGE)
2280 if (
m_nOldHRel == text::RelOrientation::FRAME)
2281 m_nOldHRel = text::RelOrientation::PAGE_FRAME;
2282 else if (
m_nOldHRel == text::RelOrientation::PRINT_AREA)
2283 m_nOldHRel = text::RelOrientation::PAGE_PRINT_AREA;
2284 if (
m_nOldVRel == text::RelOrientation::FRAME)
2285 m_nOldVRel = text::RelOrientation::PAGE_FRAME;
2286 else if (
m_nOldVRel == text::RelOrientation::PRINT_AREA)
2287 m_nOldVRel = text::RelOrientation::PAGE_PRINT_AREA;
2307 if ( rSurround.
GetSurround() == css::text::WrapTextMode_THROUGH )
2366 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/picturepage.ui",
"PicturePage", &
rSet)
2367 , m_bHtmlMode(false)
2368 , m_xMirror(m_xBuilder->weld_widget(
"flipframe"))
2369 , m_xMirrorVertBox(m_xBuilder->weld_check_button(
"vert"))
2370 , m_xMirrorHorzBox(m_xBuilder->weld_check_button(
"hori"))
2371 , m_xAllPagesRB(m_xBuilder->weld_radio_button(
"allpages"))
2372 , m_xLeftPagesRB(m_xBuilder->weld_radio_button(
"leftpages"))
2373 , m_xRightPagesRB(m_xBuilder->weld_radio_button(
"rightpages"))
2374 , m_xConnectED(m_xBuilder->weld_entry(
"entry"))
2375 , m_xBrowseBT(m_xBuilder->weld_button(
"browse"))
2376 , m_xLinkFrame(m_xBuilder->weld_frame(
"linkframe"))
2378 , m_xFlAngle(m_xBuilder->weld_frame(
"FL_ANGLE"))
2379 , m_xNfAngle(m_xBuilder->weld_metric_spin_button(
"NF_ANGLE",
FieldUnit::
DEGREE))
2380 , m_xCtlAngle(new
svx::DialControl)
2381 , m_xCtlAngleWin(new
weld::CustomWeld(*m_xBuilder,
"CTL_ANGLE", *m_xCtlAngle))
2382 , m_xBmpWin(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aBmpWin))
2384 , m_xLabelGraphicType(m_xBuilder->weld_label(
"label-graphic-type"))
2406 return std::make_unique<SwGrfExtPage>(pPage, pController, *
rSet);
2415 if( pConnectItem && pConnectItem->
GetValue() )
2441 bool bEnable =
false;
2442 bool bEnableMirrorRB =
false;
2445 if (SfxItemState::UNKNOWN != eState && !bProtContent && !
m_bHtmlMode)
2447 if( SfxItemState::SET != eState )
2465 const int nPos = (
static_cast<const SwMirrorGrf*
>(pItem)->IsGrfToggle() ? 1 : 0)
2468 bEnableMirrorRB =
nPos != 0;
2490 if( !pGraphicBrushItem->GetGraphicLink().isEmpty() )
2497 if (it !=
nullptr) {
2500 const Graphic* pGrf = pGraphicBrushItem->GetGraphic(referer);
2528 bool bModified =
false;
2560 SID_ATTR_GRAF_GRAPHIC ));
2577 return DeactivateRC::LeavePage;
2584 m_xGrfDlg.reset(
new FileDialogHelper(
2585 ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
2587 m_xGrfDlg->SetTitle(m_xLinkFrame->get_label());
2589 m_xGrfDlg->SetDisplayDirectory(m_xConnectED->get_text());
2590 uno::Reference < ui::dialogs::XFilePicker3 > xFP = m_xGrfDlg->GetFilePicker();
2591 uno::Reference < ui::dialogs::XFilePickerControlAccess > xCtrlAcc(xFP, uno::UNO_QUERY);
2592 xCtrlAcc->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0,
uno::Any(
true) );
2598 m_aFilterName = m_xGrfDlg->GetCurrentFilter();
2601 m_xConnectED->set_text(m_aNewGrfName);
2604 m_xMirrorVertBox->set_active(
false);
2605 m_xMirrorHorzBox->set_active(
false);
2606 m_xAllPagesRB->set_sensitive(
false);
2607 m_xLeftPagesRB->set_sensitive(
false);
2608 m_xRightPagesRB->set_sensitive(
false);
2609 m_aBmpWin.MirrorHorz(
false);
2610 m_aBmpWin.MirrorVert(
false);
2614 m_aBmpWin.SetGraphic(aGraphic);
2617 bool bEnable = GraphicType::Bitmap == aGraphic.
GetType() ||
2618 GraphicType::GdiMetafile == aGraphic.
GetType();
2619 m_xMirrorVertBox->set_sensitive(bEnable);
2620 m_xMirrorHorzBox->set_sensitive(bEnable);
2621 m_xAllPagesRB->set_sensitive(bEnable);
2622 m_xLeftPagesRB->set_sensitive(bEnable);
2623 m_xRightPagesRB->set_sensitive(bEnable);
2629 bool bEnable = m_xMirrorHorzBox->get_active();
2631 m_aBmpWin.MirrorHorz( m_xMirrorVertBox->get_active() );
2632 m_aBmpWin.MirrorVert( bEnable );
2634 m_xAllPagesRB->set_sensitive(bEnable);
2635 m_xLeftPagesRB->set_sensitive(bEnable);
2636 m_xRightPagesRB->set_sensitive(bEnable);
2638 if (!m_xAllPagesRB->get_active() && !m_xLeftPagesRB->get_active() && !m_xRightPagesRB->get_active())
2639 m_xAllPagesRB->set_active(
true);
2652 CustomWidgetController::SetDrawingArea(pDrawingArea);
2662 rRenderContext.
Erase();
2680 if (nRelGrf < nRelWin)
2706 nMirrorFlags |= BmpMirrorFlags::Vertical;
2708 nMirrorFlags |= BmpMirrorFlags::Horizontal;
2709 aTmpBmp.
Mirror(nMirrorFlags);
2742 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/frmurlpage.ui",
"FrameURLPage", &
rSet)
2743 , m_xURLED(m_xBuilder->weld_entry(
"url"))
2744 , m_xSearchPB(m_xBuilder->weld_button(
"search"))
2745 , m_xNameED(m_xBuilder->weld_entry(
"name"))
2746 , m_xFrameCB(m_xBuilder->weld_combo_box(
"frame"))
2747 , m_xServerCB(m_xBuilder->weld_check_button(
"server"))
2748 , m_xClientCB(m_xBuilder->weld_check_button(
"client"))
2763 size_t nCount = aList.size();
2774 m_xNameED->set_text(pFormatURL->GetName());
2776 m_xClientCB->set_sensitive(pFormatURL->GetMap() !=
nullptr);
2777 m_xClientCB->set_active(pFormatURL->GetMap() !=
nullptr);
2778 m_xServerCB->set_active(pFormatURL->IsServerMap());
2780 m_xFrameCB->set_entry_text(pFormatURL->GetTargetFrameName());
2792 bool bModified =
false;
2794 std::unique_ptr<SwFormatURL> pFormatURL;
2796 pFormatURL.reset(pOldURL->
Clone());
2801 const OUString sText =
m_xURLED->get_text();
2803 if( pFormatURL->GetURL() != sText ||
2804 pFormatURL->GetName() !=
m_xNameED->get_text() ||
2805 m_xServerCB->get_active() != pFormatURL->IsServerMap() )
2807 pFormatURL->SetURL(sText,
m_xServerCB->get_active());
2808 pFormatURL->SetName(
m_xNameED->get_text());
2813 if (!
m_xClientCB->get_active() && pFormatURL->GetMap() !=
nullptr)
2815 pFormatURL->SetMap(
nullptr);
2819 if(pFormatURL->GetTargetFrameName() !=
m_xFrameCB->get_active_text())
2821 pFormatURL->SetTargetFrameName(
m_xFrameCB->get_active_text());
2824 rSet->
Put(std::move(pFormatURL));
2830 return std::make_unique<SwFrameURLPage>(pPage, pController, *
rSet);
2835 FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
2837 uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
2841 const OUString sTemp(m_xURLED->get_text());
2842 if(!sTemp.isEmpty())
2843 xFP->setDisplayDirectory(sTemp);
2845 catch(
const uno::Exception& ) {}
2848 m_xURLED->set_text(xFP->getSelectedFiles().getConstArray()[0]);
2853 :
SfxTabPage(pPage, pController,
"modules/swriter/ui/frmaddpage.ui",
"FrameAddPage", &
rSet)
2855 , m_bHtmlMode(false)
2858 , m_xNameFrame(m_xBuilder->weld_widget(
"nameframe"))
2859 , m_xNameFT(m_xBuilder->weld_label(
"name_label"))
2860 , m_xNameED(m_xBuilder->weld_entry(
"name"))
2861 , m_xAltNameFT(m_xBuilder->weld_label(
"altname_label"))
2862 , m_xAltNameED(m_xBuilder->weld_entry(
"altname"))
2863 , m_xDescriptionFT(m_xBuilder->weld_label(
"description_label"))
2864 , m_xDescriptionED(m_xBuilder->weld_text_view(
"description"))
2865 , m_xDecorativeCB(m_xBuilder->weld_check_button(
"decorative"))
2866 , m_xSequenceFrame(m_xBuilder->weld_widget(
"frmSequence"))
2867 , m_xPrevLB(m_xBuilder->weld_combo_box(
"prev"))
2868 , m_xNextLB(m_xBuilder->weld_combo_box(
"next"))
2869 , m_xProtectFrame(m_xBuilder->weld_widget(
"protect"))
2870 , m_xProtectContentCB(m_xBuilder->weld_check_button(
"protectcontent"))
2871 , m_xProtectFrameCB(m_xBuilder->weld_check_button(
"protectframe"))
2872 , m_xProtectSizeCB(m_xBuilder->weld_check_button(
"protectsize"))
2873 , m_xContentAlignFrame(m_xBuilder->weld_widget(
"contentalign"))
2874 , m_xVertAlignLB(m_xBuilder->weld_combo_box(
"vertalign"))
2875 , m_xPropertiesFrame(m_xBuilder->weld_widget(
"properties"))
2876 , m_xEditInReadonlyCB(m_xBuilder->weld_check_button(
"editinreadonly"))
2877 , m_xPrintFrameCB(m_xBuilder->weld_check_button(
"printframe"))
2878 , m_xTextFlowFT(m_xBuilder->weld_label(
"textflow_label"))
2879 , m_xTextFlowLB(new
svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(
"textflow")))
2885 m_xTextFlowLB->append(SvxFrameDirection::Vertical_LR_BT,
SvxResId(RID_SVXSTR_PAGEDIR_LTR_BTT_VERT));
2899 return std::make_unique<SwFrameAddPage>(pPage, pController, *
rSet);
2942 aTmpName1 = pNameItem->GetValue();
2946 if(
m_bNew || aTmpName1.isEmpty() )
2986 OUString sNextChain, sPrevChain;
2987 pFlyFormat = rChain.
GetPrev();
2988 if (pFlyFormat !=
nullptr)
2990 sPrevChain = pFlyFormat->
GetName();
2993 pFlyFormat = rChain.
GetNext();
2994 if (pFlyFormat !=
nullptr)
2996 sNextChain = pFlyFormat->
GetName();
2999 std::vector< OUString > aPrevPageFrames;
3000 std::vector< OUString > aThisPageFrames;
3001 std::vector< OUString > aNextPageFrames;
3002 std::vector< OUString > aRemainFrames;
3004 aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
3005 for (sal_Int32 nEntry =
m_xPrevLB->get_count(); nEntry > 1; nEntry--)
3008 if(!sPrevChain.isEmpty())
3010 if (
m_xPrevLB->find_text(sPrevChain) == -1)
3016 aPrevPageFrames.clear();
3017 aNextPageFrames.clear();
3018 aThisPageFrames.clear();
3019 aRemainFrames.clear();
3022 aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
3023 for (sal_Int32 nEntry =
m_xNextLB->get_count(); nEntry > 1; nEntry--)
3026 if(!sNextChain.isEmpty())
3028 if (
m_xNextLB->find_text(sNextChain) == -1)
3069 m_xTextFlowLB->remove_id(SvxFrameDirection::Vertical_RL_TB);
3103 if (
m_xNameED->get_value_changed_from_saved())
3116 aProt != *pOldItem )
3117 bRet |=
nullptr !=
rSet->
Put( aProt);
3141 OUString sCurrentPrevChain, sCurrentNextChain;
3143 sCurrentPrevChain =
m_xPrevLB->get_active_text();
3145 sCurrentNextChain =
m_xNextLB->get_active_text();
3148 OUString sNextChain, sPrevChain;
3149 pFlyFormat = rChain.
GetPrev();
3150 if (pFlyFormat !=
nullptr)
3151 sPrevChain = pFlyFormat->
GetName();
3153 pFlyFormat = rChain.
GetNext();
3154 if (pFlyFormat !=
nullptr)
3155 sNextChain = pFlyFormat->
GetName();
3156 if(sPrevChain != sCurrentPrevChain)
3158 if(sNextChain != sCurrentNextChain)
3181 bool bEnable = !m_xNameED->get_text().isEmpty();
3182 m_xAltNameED->set_sensitive(bEnable);
3183 m_xAltNameFT->set_sensitive(bEnable);
3188 bool const bEnable(!m_xDecorativeCB->get_active());
3189 m_xAltNameED->set_sensitive(bEnable);
3190 m_xAltNameFT->set_sensitive(bEnable);
3191 m_xDescriptionED->set_sensitive(bEnable);
3192 m_xDescriptionFT->set_sensitive(bEnable);
3206 OUString sCurrentPrevChain, sCurrentNextChain;
3207 if (m_xPrevLB->get_active())
3208 sCurrentPrevChain = m_xPrevLB->get_active_text();
3209 if (m_xNextLB->get_active())
3210 sCurrentNextChain = m_xNextLB->get_active_text();
3215 bool bNextBox = m_xNextLB.get() == &rBox;
3217 for (sal_Int32 nEntry = rChangeLB.
get_count(); nEntry > 1; nEntry--)
3218 rChangeLB.
remove(nEntry - 1);
3220 std::vector< OUString > aPrevPageFrames;
3221 std::vector< OUString > aThisPageFrames;
3222 std::vector< OUString > aNextPageFrames;
3223 std::vector< OUString > aRemainFrames;
3224 m_pWrtSh->GetConnectableFrameFormats(*pFormat, bNextBox ? sCurrentNextChain : sCurrentPrevChain, !bNextBox,
3225 aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames );
3227 aPrevPageFrames, aThisPageFrames, aNextPageFrames, aRemainFrames);
3228 const OUString sToSelect = bNextBox ? sCurrentPrevChain : sCurrentNextChain;
3229 if (rChangeLB.
find_text(sToSelect) != -1)
static const AllSettings & GetSettings()
bool Mirror(BmpMirrorFlags nMirrorFlags)
const Size & GetSizePixel() const
void SetGraphic(const Graphic &rGrf)
void MirrorHorz(bool bMirror)
void MirrorVert(bool bMirror)
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void SetBitmapEx(const BitmapEx &rGrf)
virtual ~BmpWindow() override
virtual void Paint(vcl::RenderContext &, const tools::Rectangle &rRect) override
const OUString & GetValue() const
static ErrCode LoadGraphic(const OUString &rPath, const OUString &rFilter, Graphic &rGraphic, GraphicFilter *pFilter=nullptr, sal_uInt16 *pDeterminedFormat=nullptr)
static OUString GetImageType(const Graphic &rGraphic)
GraphicType GetType() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
static OUString EraseAllMnemonicChars(const OUString &rStr)
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
static void GetDefaultTargetList(TargetList &)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
const SfxItemSet & GetItemSet() const
SfxOkDialogController * GetDialogController() const
void SetExchangeSupport()
const SfxItemSet * GetDialogExampleSet() const
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void SetSizeProtect(bool bNew)
void SetContentProtect(bool bNew)
bool IsPosProtected() const
bool IsContentProtected() const
bool IsSizeProtected() const
void SetPosProtect(bool bNew)
tools::Long GetHeight() const
tools::Long GetWidth() const
void SetHeight(tools::Long n)
void SetWidth(tools::Long n)
static OUString GetString(StringId eId)
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
bool GetGrfSize(Size &) const
svt::EmbeddedObjectRef & GetOLEObject() const
Get OLE object at pointer.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
void GetConnectableFrameFormats(SwFrameFormat &rFormat, const OUString &rReference, bool bSuccessors, std::vector< OUString > &aPrevPageVec, std::vector< OUString > &aThisPageVec, std::vector< OUString > &aNextPageVec, std::vector< OUString > &aRestVec)
OUString GetUniqueGrfName() const
Created unique name for frame.
void SetFlyName(const OUString &rName)
Set name at selected FlyFrame.
bool IsFrameVertical(const bool bEnvironment, bool &bRightToLeft, bool &bVertL2R) const
Determines whether a frame or its environment is vertically formatted and right-to-left.
OUString GetUniqueFrameName() const
OUString GetUniqueOLEName() const
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
void ValidateMetrics(SvxSwFrameValidation &rVal, const SwFormatAnchor *pToCharContentPos, bool bOnlyPercentRefValue=false)
const SwNodeIndex * GetContentIdx() const
std::unique_ptr< weld::CheckButton > m_xProtectSizeCB
std::unique_ptr< svx::FrameDirectionListBox > m_xTextFlowLB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::ComboBox > m_xNextLB
std::unique_ptr< weld::Entry > m_xNameED
std::unique_ptr< weld::Widget > m_xContentAlignFrame
std::unique_ptr< weld::CheckButton > m_xProtectFrameCB
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xAltNameFT
std::unique_ptr< weld::CheckButton > m_xEditInReadonlyCB
std::unique_ptr< weld::ComboBox > m_xPrevLB
static const WhichRangesContainer s_aAddPgRg
std::unique_ptr< weld::Label > m_xTextFlowFT
std::unique_ptr< weld::ComboBox > m_xVertAlignLB
std::unique_ptr< weld::TextView > m_xDescriptionED
virtual ~SwFrameAddPage() override
std::unique_ptr< weld::CheckButton > m_xProtectContentCB
std::unique_ptr< weld::Widget > m_xPropertiesFrame
std::unique_ptr< weld::Widget > m_xProtectFrame
std::unique_ptr< weld::CheckButton > m_xPrintFrameCB
std::unique_ptr< weld::Label > m_xNameFT
std::unique_ptr< weld::Widget > m_xNameFrame
SwFrameAddPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void SetFormatUsed(bool bFormat)
std::unique_ptr< weld::CheckButton > m_xDecorativeCB
std::unique_ptr< weld::Widget > m_xSequenceFrame
std::unique_ptr< weld::Entry > m_xAltNameED
void SetWrap(css::text::WrapTextMode nW)
void SetVertRel(short nR)
void SetHoriRel(short nR)
void SetRelPos(const Point &rP)
void SetTransparent(bool bT)
void SetAnchor(RndStdIds nA)
This is the Position & Size tab page of the Insert -> Frame -> Frame dialog.
std::unique_ptr< weld::Label > m_xHorizontalFT
std::unique_ptr< weld::CheckButton > m_xMirrorPagesCB
std::unique_ptr< weld::CheckButton > m_xRelHeightCB
RndStdIds GetAnchor() const
std::unique_ptr< weld::CheckButton > m_xFixedRatioCB
std::unique_ptr< weld::CheckButton > m_xFollowTextFlowCB
bool m_bAtHorzPosModified
std::unique_ptr< weld::Label > m_xHeightFT
static sal_Int16 GetAlignment(FrameMap const *pMap, sal_Int32 nMapPos, const weld::ComboBox &rRelationLB)
std::unique_ptr< weld::ComboBox > m_xHoriRelationLB
bool m_bAtVertPosModified
std::unique_ptr< weld::Label > m_xAtHorzPosFT
virtual void ActivatePage(const SfxItemSet &rSet) override
bool m_bIsMathBaselineAlignment
std::unique_ptr< weld::CheckButton > m_xFlySplitCB
virtual void Reset(const SfxItemSet *rSet) override
sal_Int32 FillPosLB(const FrameMap *_pMap, const sal_Int16 _nAlign, const sal_Int16 _nRel, weld::ComboBox &_rLB)
std::unique_ptr< weld::MetricSpinButton > m_xAtVertPosED
std::unique_ptr< weld::ComboBox > m_xRelWidthRelationLB
std::unique_ptr< weld::Label > m_xVertRelationFT
static sal_Int16 GetRelation(const weld::ComboBox &rRelationLB)
std::unique_ptr< weld::Label > m_xWidthFT
std::unique_ptr< weld::RadioButton > m_xAnchorAsCharRB
void EnableVerticalPositioning(bool bEnable)
std::unique_ptr< SwPercentField > m_xWidthED
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::unique_ptr< weld::RadioButton > m_xAnchorAtPageRB
std::unique_ptr< weld::Label > m_xVerticalFT
std::unique_ptr< weld::Label > m_xWidthAutoFT
std::unique_ptr< weld::ComboBox > m_xRelHeightRelationLB
static sal_Int32 GetMapPos(const FrameMap *pMap, const weld::ComboBox &rAlignLB)
virtual ~SwFramePage() override
void setOptimalFrameWidth()
std::unique_ptr< SwPercentField > m_xHeightED
std::unique_ptr< weld::ComboBox > m_xHorizontalDLB
std::unique_ptr< weld::Label > m_xHeightAutoFT
void FillRelLB(const FrameMap *_pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, weld::ComboBox &_rLB, weld::Label &_rFT)
std::unique_ptr< weld::CheckButton > m_xAutoHeightCB
std::unique_ptr< weld::Button > m_xRealSizeBT
static const WhichRangesContainer s_aPageRg
std::unique_ptr< weld::ComboBox > m_xVerticalDLB
std::unique_ptr< weld::CheckButton > m_xRelWidthCB
SwFramePage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
bool m_bAllowVertPositioning
void SetFormatUsed(bool bFormat)
double m_fWidthHeightRatio
std::unique_ptr< weld::MetricSpinButton > m_xAtHorzPosED
std::unique_ptr< weld::Label > m_xHoriRelationFT
std::unique_ptr< weld::RadioButton > m_xAnchorAtParaRB
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xAtVertPosFT
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::RadioButton > m_xAnchorAtFrameRB
std::unique_ptr< weld::CheckButton > m_xAutoWidthCB
SwWrtShell * getFrameDlgParentShell()
void InitPos(RndStdIds eId, sal_Int16 nH, sal_Int16 nHRel, sal_Int16 nV, sal_Int16 nVRel, tools::Long nX, tools::Long nY)
void Init(const SfxItemSet &rSet)
const SwFormatAnchor * mpToCharContentPos
SwFrameExample m_aExampleWN
std::unique_ptr< weld::ComboBox > m_xVertRelationLB
bool IsInGraficMode() const
void setOptimalRelWidth()
std::unique_ptr< weld::RadioButton > m_xAnchorAtCharRB
std::unique_ptr< weld::Entry > m_xNameED
virtual ~SwFrameURLPage() override
std::unique_ptr< weld::CheckButton > m_xServerCB
std::unique_ptr< weld::Button > m_xSearchPB
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::Entry > m_xURLED
std::unique_ptr< weld::CheckButton > m_xClientCB
SwFrameURLPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::ComboBox > m_xFrameCB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual void Reset(const SfxItemSet *rSet) override
Tabpage providing the functionality behind Format -> Image -> Properties and then the Rotation tabpag...
std::unique_ptr< weld::CustomWeld > m_xBmpWin
std::unique_ptr< weld::RadioButton > m_xLeftPagesRB
virtual ~SwGrfExtPage() override
SwGrfExtPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::RadioButton > m_xRightPagesRB
std::unique_ptr< weld::MetricSpinButton > m_xNfAngle
std::unique_ptr< weld::CustomWeld > m_xCtlAngleWin
virtual void Reset(const SfxItemSet *rSet) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::Entry > m_xConnectED
std::unique_ptr< weld::Label > m_xLabelGraphicType
std::unique_ptr< weld::Widget > m_xMirror
std::unique_ptr< weld::RadioButton > m_xAllPagesRB
virtual void ActivatePage(const SfxItemSet &rSet) override
std::unique_ptr< weld::Button > m_xBrowseBT
std::unique_ptr<::sfx2::FileDialogHelper > m_xGrfDlg
std::unique_ptr< svx::DialControl > m_xCtlAngle
std::unique_ptr< weld::CheckButton > m_xMirrorHorzBox
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::CheckButton > m_xMirrorVertBox
void SetGrfToggle(bool bNew)
Marks a node in the document model.
const SwEndNode * EndOfSectionNode() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
const SwView & GetView() const
#define SO3_SM_CLASSID_50
#define SO3_SM_CLASSID_60
#define SO3_SM_CLASSID_30
#define SO3_SM_CLASSID_40
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_separator(const OUString &rId)
void append_text(const OUString &rStr)
virtual void remove(int pos)=0
virtual int get_active() const=0
virtual int get_count() const=0
void set_active_text(const OUString &rStr)
virtual OutputDevice & get_ref_device()=0
virtual OUString get_label() const=0
#define FN_SET_FRM_ALT_NAME
#define FN_PARAM_CHAIN_PREVIOUS
#define FN_PARAM_GRF_CONNECT
#define FN_KEEP_ASPECT_RATIO
#define FN_MATH_BASELINE_ALIGNMENT
#define FN_PARAM_CHAIN_NEXT
#define FN_UNO_DESCRIPTION
void FitToActualSize(SwFormatCol &rCol, sal_uInt16 nWidth)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
@ Fixed
Only protection that cannot be withdrawn e.g.
@ Fixed
Frame cannot be moved in Var-direction.
@ Variable
Frame is variable in Var-direction.
@ Minimum
Value in Var-direction gives minimum (can be exceeded but not be less).
#define MAX_PERCENT_WIDTH
static LB lcl_GetLBRelationsForRelations(const sal_Int16 _nRel)
constexpr auto HORI_PARA_REL
RelationMap const aAsCharRelationMap[]
IMPL_LINK_NOARG(SwFramePage, MirrorHdl, weld::Toggleable &, void)
FrameMap const aHParaHtmlMap[]
constexpr auto VERT_CHAR_REL
FrameMap const aVAsCharHtmlMap[]
FrameMap const aVParaHtmlMap[]
FrameMap const aVFrameMap[]
FrameMap const aHFlyHtmlMap[]
constexpr auto HORI_PAGE_REL
FrameMap const aHPageMap[]
#define HTML_HORI_PARA_REL
FrameMap const aVParaMap[]
FrameMap const aHFrameMap[]
#define HTML_HORI_CHAR_REL
static SvxSwFramePosString::StringId lcl_ChangeResIdToVerticalOrRTL(SvxSwFramePosString::StringId eStringId, bool bVertical, bool bVerticalL2R, bool bRTL)
IMPL_LINK(SwFramePage, RelSizeClickHdl, weld::Toggleable &, rBtn, void)
static LB lcl_GetLBRelationsForStrID(const FrameMap *_pMap, const SvxSwFramePosString::StringId _eStrId, const bool _bUseMirrorStr)
RelationMap const aRelationMap[]
FrameMap const aHParaHtmlAbsMap[]
static void lcl_InsertVectors(weld::ComboBox &rBox, const std::vector< OUString > &rPrev, const std::vector< OUString > &rThis, const std::vector< OUString > &rNext, const std::vector< OUString > &rRemain)
#define MAX_PERCENT_HEIGHT
constexpr auto VERT_PARA_REL
static size_t lcl_GetFrameMapCount(const FrameMap *pMap)
FrameMap const aVCharHtmlAbsMap[]
FrameMap const aVFlyHtmlMap[]
FrameMap const aVAsCharMap[]
FrameMap const aHCharMap[]
FrameMap const aVCharMap[]
FrameMap const aVCharHtmlMap[]
FrameMap const aVPageMap[]
FrameMap const aHParaMap[]
FrameMap const aVPageHtmlMap[]
constexpr auto HORI_FRAME_REL
FrameMap const aHCharHtmlAbsMap[]
FrameMap const aHPageHtmlMap[]
constexpr auto HORI_CHAR_REL
FrameMap const aHCharHtmlMap[]
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SwFormatURL > RES_URL(117)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr TypedWhichId< SwFormatEditInReadonly > RES_EDIT_IN_READONLY(118)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(105)
constexpr TypedWhichId< SvxProtectItem > RES_PROTECT(106)
constexpr TypedWhichId< SwMirrorGrf > RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SfxBoolItem > RES_DECORATIVE(140)
constexpr TypedWhichId< SdrTextVertAdjustItem > RES_TEXT_VERT_ADJUST(137)
constexpr TypedWhichId< SwFormatFlySplit > RES_FLY_SPLIT(129)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
constexpr TypedWhichId< SwFormatFollowTextFlow > RES_FOLLOW_TEXT_FLOW(130)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr TypedWhichId< SvxPrintItem > RES_PRINT(104)
::std::vector< OUString > TargetList
#define LINK(Instance, Class, Member)
#define SAL_N_ELEMENTS(arr)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
static constexpr auto Items
OUString toId(const void *pValue)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SvxSwFramePosString::StringId eStrId
SvxSwFramePosString::StringId eMirrorStrId
SwWrtShell * GetActiveWrtShell()
OUString SwResId(TranslateId aId)
Size GetGraphicSizeTwip(const Graphic &rGraphic, vcl::RenderContext *pOutDev)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)