20 #include <com/sun/star/beans/XPropertySet.hpp>
21 #include <com/sun/star/container/XChild.hpp>
22 #include <com/sun/star/embed/EmbedMisc.hpp>
23 #include <com/sun/star/embed/EmbedStates.hpp>
24 #include <com/sun/star/embed/EmbedVerbs.hpp>
25 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
26 #include <com/sun/star/chart2/XChartDocument.hpp>
27 #include <com/sun/star/util/XModifiable.hpp>
81 #include <strings.hrc>
110 void collectUIInformation(
const OUString& rAction,
const OUString& aParameters)
113 aDescription.
aAction = rAction;
114 aDescription.
aParameters = {{
"parameters", aParameters}};
115 aDescription.
aID =
"writer_edit";
116 aDescription.
aKeyWord =
"SwEditWinUIObject";
117 aDescription.
aParent =
"MainWindow";
123 #define BITFLD_INI_LIST \
133 m_bRetainSelection = false; \
134 m_bIsInClickToEdit = false;
139 if( pACorr && !pACorr->
IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord |
140 ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber | ACFlags::TransliterateRTL |
141 ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect ))
163 if(IsEndPara() && !IsSttPara())
176 sal_Int32
nPos = 0, nStt = 0;
177 for( ; nPos < rStr.getLength(); nPos++ )
180 if( bTmpDelim != bDelim )
182 Insert( rStr.copy( nStt, nPos - nStt ));
187 Insert( rStr.copy( nStt, nPos - nStt ));
196 bool bStarted =
false;
197 bool bHasSel = HasSelection(),
199 bool bDeleted =
false;
204 SfxItemSet aCharAttrSet(GetAttrPool(), CharItems{});
206 if( bHasSel || ( !m_bIns && SelectHiddenRange() ) )
217 OUString aTmpStr =
SwResId(STR_START_QUOTE) +
224 const SwPosition *pStart = GetCursor()->Start();
227 GetPaMAttr(&aPaM, aCharAttrSet);
232 bDeleted = DelRight();
276 if ( HasSelection() )
284 bool bSetGrfSize =
true;
285 bool bOwnMgr =
false;
299 if (nAnchorType != RndStdIds::FLY_AT_PARA)
306 if ( !aSz.Width() || !aSz.Height() )
325 Size aGrfSize, aBound = GetGraphicDefaultSize();
326 GetGrfSize( aGrfSize );
348 pFrameMgr->
SetSize( aGrfSize );
386 case SID_INSERT_OBJECT:
389 aServerList.
Remove( SwDocShell::Factory().GetClassId() );
394 case SID_INSERT_FLOATINGFRAME:
398 OString aCmd = OStringLiteral(
".uno:") + pSlot->
GetUnoName();
401 OUString::fromUtf8( aCmd ), xStor, &aServerList));
406 OUString aIconMediaType;
407 uno::Reference< io::XInputStream > xIconMetaFile = pDlg->
GetIconIfIconified( &aIconMediaType );
409 xIconMetaFile.is() ? embed::Aspects::MSOLE_ICON : embed::Aspects::MSOLE_CONTENT );
410 if ( xIconMetaFile.is() )
424 if( InsertOleObject( xObj ) && bDoVerb )
429 pClient =
new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
430 SetCheckForOLEInCaption(
true );
437 MapMode aMapMode( MapUnit::MapTwip );
441 RequestObjectResize( aArea, xObj.
GetObject() );
444 CalcAndSetScale( xObj );
448 pClient->
DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
458 InsertOleObject( xRef );
485 bool bStarMath =
true;
486 bool bActivate =
true;
489 uno::Reference < container::XChild > xChild( xRef.
GetObject(), uno::UNO_QUERY );
491 xChild->setParent( mxDoc->GetDocShell()->GetModel() );
504 uno::Reference < beans::XPropertySet > xSet( xRef->getComponent(), uno::UNO_QUERY );
509 xSet->setPropertyValue(
"Formula", uno::makeAny( aMathData ) );
512 catch (
const uno::Exception&)
537 CalcBoundRect( aBound, aFrameMgr.
GetAnchor() );
540 MapMode aMapMode( MapUnit::MapTwip );
555 AlignFormulaToBaseline( xRef.
GetObject() );
558 *pFlyFrameFormat = pFormat;
562 uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = xRef.
GetObject();
563 if ( xEmbeddedObj.is() )
565 bool bDisableDataTableDialog =
false;
567 uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
569 ( xProps->getPropertyValue(
"DisableDataTableDialog") >>= bDisableDataTableDialog ) &&
570 bDisableDataTableDialog )
572 xProps->setPropertyValue(
"DisableDataTableDialog",
573 uno::makeAny(
false ) );
574 xProps->setPropertyValue(
"DisableComplexChartTypes",
575 uno::makeAny(
false ) );
576 uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
577 if ( xModifiable.is() )
579 xModifiable->setModified(
true );
586 GetView().AutoCaption(
OLE_CAP, &aCLSID);
609 if ( GetCntType() !=
CNT_OLE ||
610 GetView().GetViewFrame()->GetFrame().IsInPlace() )
614 OSL_ENSURE( xRef.
is(),
"OLE not found" );
624 pCli =
new SwOleClient( &GetView(), &GetView().GetEditWin(), xRef );
626 static_cast<SwOleClient*
>(pCli)->SetInDoVerb(
true );
628 CalcAndSetScale( xRef );
631 static_cast<SwOleClient*
>(pCli)->SetInDoVerb(
false );
632 CalcAndSetScale( xRef );
639 sal_Int32
nState = xObj->getCurrentState();
640 if ( nState == css::embed::EmbedStates::INPLACE_ACTIVE
641 || nState == css::embed::EmbedStates::UI_ACTIVE )
644 GetView().FindIPClient( xObj.
GetObject(), &(GetView().GetEditWin()) );
653 catch (
const uno::Exception&)
659 const SwRect *pFlyPrtRect,
660 const SwRect *pFlyFrameRect,
661 const bool bNoTextFramePrtAreaChanged )
665 OSL_ENSURE( xObj.
is(),
"ObjectRef not valid" );
668 if ( nAspect == embed::Aspects::MSOLE_ICON )
672 bool bLinkingChart =
false;
676 nMisc = xObj->getStatus( nAspect );
680 if( embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE & nMisc )
683 SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
695 aSz.
Width = aSize.Width();
696 aSz.Height = aSize.Height();
700 bool bModified =
false;
701 uno::Reference<util::XModifiable> xModifiable(xObj->getComponent(), uno::UNO_QUERY);
702 if (xModifiable.is())
703 bModified = xModifiable->isModified();
704 xObj->setVisualAreaSize( nAspect, aSz );
705 xModifiable.set(xObj->getComponent(), uno::UNO_QUERY);
706 if (xModifiable.is() && xModifiable->isModified() && !bModified)
707 xModifiable->setModified(bModified);
718 bool bResetEnableSetModified(
false);
719 if ( GetDoc()->GetDocShell()->IsEnableSetModified() )
721 GetDoc()->GetDocShell()->EnableSetModified(
false );
722 bResetEnableSetModified =
true;
732 if ( bResetEnableSetModified )
734 GetDoc()->GetDocShell()->EnableSetModified();
740 uno::Reference< chart2::XChartDocument > xChartDocument( xObj->getComponent(), uno::UNO_QUERY );
741 bLinkingChart = ( xChartDocument.is() && !xChartDocument->hasInternalDataProvider() );
744 catch (
const uno::Exception&)
753 if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc)
757 || ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
759 pCli =
new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
771 aSize = xObj->getVisualAreaSize( nAspect );
773 catch (
const embed::NoVisualAreaSizeException&)
775 OSL_FAIL(
"Can't get visual area size!" );
778 catch (
const uno::Exception&)
781 OSL_FAIL(
"Can't get visual area size!" );
785 Size _aVisArea( aSize.Width, aSize.Height );
790 bool bUseObjectSize =
false;
796 const MapMode aTmp( MapUnit::MapTwip );
801 aObjArea = pFlyPrtRect->
SSize();
808 if( !( _aVisArea.Width() - nX <= aObjArea.
Width() &&
809 _aVisArea.Width() + nX >= aObjArea.
Width() &&
810 _aVisArea.Height()- nY <= aObjArea.
Height()&&
811 _aVisArea.Height()+ nY >= aObjArea.
Height() ))
813 if ( nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE )
817 bUseObjectSize =
true;
821 aScaleWidth =
Fraction( aObjArea.
Width(), _aVisArea.Width() );
832 aArea = *pFlyPrtRect;
833 aArea += pFlyFrameRect->
Pos();
841 if ( bUseObjectSize )
845 OSL_ENSURE( pFlyFrameFormat,
"Could not find fly frame." );
846 if ( pFlyFrameFormat )
849 SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
851 aArea += rPoint - aRect.
Pos();
855 RequestObjectResize( aArea, xObj.
GetObject() );
871 new SwOleClient( &GetView(), &GetView().GetEditWin(), xObj );
872 CalcAndSetScale( xObj, &rPrt, &rFrame );
885 if ( !IsCursorInTable() )
891 GetDoc()->ClearLineNumAttrs( *GetCursor()->GetPoint() );
895 ? FindPageDescByName( *pPageDesc,
true ) :
nullptr;
900 SetAttrItem( aDesc );
906 collectUIInformation(
"BREAK_PAGE",
"parameter");
923 AutoCorrect( *pACorr, cIns );
941 if ( !IsCursorInTable() )
964 if(!IsCursorPtAtEnd())
973 SetAttrItem(aFootNote);
981 m_aNavigationMgr.addEntry(aPos);
996 m_rView.GetEditWin().FlushInBuffer();
997 bool bHasSel = HasSelection();
1026 const SwNumRule* pCurRule = GetNumRuleAtCurrCursorPos();
1036 bool bContinueFoundNumRule(
false );
1037 bool bActivateOutlineRule(
false );
1038 int nActivateOutlineLvl(
MAXLEVEL );
1049 if ( pCollRule && pCollRule == GetDoc()->GetOutlineNumRule() )
1053 if ( !pDirectCollRule )
1055 pCollRule =
nullptr;
1061 pNumRule = pCollRule;
1065 !dynamic_cast<SwWebDocShell*>(GetDoc()->GetDocShell()) &&
1066 pCollRule == GetDoc()->GetOutlineNumRule() )
1068 if ( pNumRule == pCollRule )
1074 *GetLayout(), GetCursor()->GetPoint()->nNode);
1081 "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1087 bActivateOutlineRule =
true;
1092 bContinueFoundNumRule =
true;
1100 bActivateOutlineRule =
true;
1104 else if ( !pNumRule )
1115 bActivateOutlineRule =
true;
1120 bContinueFoundNumRule =
true;
1129 "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1135 bActivateOutlineRule =
true;
1140 bContinueFoundNumRule =
true;
1143 pNumRule = pCollRule;
1156 else if ( pNumRule == GetDoc()->GetOutlineNumRule() &&
1157 !bActivateOutlineRule && !bContinueFoundNumRule )
1164 OUString sContinuedListId;
1167 pNumRule = GetDoc()->SearchNumRule( *GetCursor()->GetPoint(),
1168 false, bNum,
false, 0,
1169 sContinuedListId, GetLayout() );
1170 bContinueFoundNumRule = pNumRule !=
nullptr;
1178 if ( !bContinueFoundNumRule )
1181 *GetLayout(), GetCursor()->GetPoint()->nNode);
1186 int nLevel = bActivateOutlineRule
1187 ? nActivateOutlineLvl
1196 SwNumFormat aFormat(aNumRule.
Get(static_cast<sal_uInt16>(nLevel)));
1206 aFormat.SetBulletFont( pFnt );
1211 aFormat.SetPrefix(OUString());
1212 aFormat.SetSuffix(OUString());
1214 aNumRule.
Set(static_cast<sal_uInt16>(nLevel), aFormat);
1219 SetCurNumRule( aNumRule,
false, sContinuedListId,
true );
1226 SwNumRule aNumRule( GetUniqueNumRuleName(), ePosAndSpaceMode );
1229 SwDocShell* pDocSh = GetView().GetDocShell();
1246 GetCursor()->GetPoint()->nNode);
1247 const SwTwips nWidthOfTabs = pTextNode
1250 GetDoc()->getIDocumentContentOperations().RemoveLeadingWhiteSpace( *GetCursor()->GetPoint() );
1252 const bool bHtml =
dynamic_cast<SwWebDocShell*
>( pDocSh ) !=
nullptr;
1253 const bool bRightToLeft = IsInRightToLeftText();
1265 aFormat.SetBulletFont( pFnt );
1270 aFormat.SetPrefix(OUString());
1271 aFormat.SetSuffix(OUString());
1280 aFormat.SetAbsLSpace(nLvl * 720);
1282 else if ( nWidthOfTabs > 0 )
1284 aFormat.SetAbsLSpace(nWidthOfTabs + nLvl * 720);
1292 aFormat.SetNumAdjust( SvxAdjust::Right );
1295 aNumRule.
Set( nLvl, aFormat );
1304 if ( ( nTextNodeIndent + nWidthOfTabs ) != 0 )
1310 SwTwips nIndentChange = nTextNodeIndent + nWidthOfTabs;
1318 if (nLevel >= MAXLEVEL)
1319 nLevel = MAXLEVEL - 1;
1324 nIndentChange -= aFormat.
GetIndentAt() + aFormat.GetFirstLineIndent();
1332 SetCurNumRule( aNumRule,
true, OUString(),
true );
1341 NumOrBulletOn(
true);
1346 const SwNumRule * pCurNumRule = GetNumRuleAtCurrCursorPos();
1368 SwNumFormat aFormat(aNumRule.
Get(static_cast<sal_uInt16>(nLevel)));
1371 aNumRule.
Set(nLevel, aFormat);
1374 SetCurNumRule( aNumRule,
false );
1384 SetInFrontOfLabel(
false );
1392 NumOrBulletOn(
false);
1411 (IsObjSelected() || (_rView.
IsDrawMode() && !IsFrameSelected()) ))
1413 if (GetDrawView()->IsTextEdit())
1417 if (GetView().IsFormMode())
1424 else if( GetDrawView()->GetContext() == SdrViewContext::Media )
1431 sal_uInt32 nCheckStatus = 0;
1443 if ( IsFrameSelected() )
1451 if ( IsCursorInTable() )
1454 if ( IsTableMode() )
1465 const SwNumRule* pNumRule = GetNumRuleAtCurrCursorPos();
1471 if ( pTextNd && pTextNd->
IsInList() )
1498 if( !pColl && GETSTYLE_NOCREATE != eCreate )
1501 if(
USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
1502 pColl = GetTextCollFromPool( nId );
1514 SwCharFormat* pFormat = FindCharFormatByName( rFormatName );
1515 if( !pFormat && GETSTYLE_NOCREATE != eCreate )
1518 if(
USHRT_MAX != nId || GETSTYLE_CREATEANY == eCreate )
1519 pFormat =
static_cast<SwCharFormat*
>(GetFormatFromPool( nId ));
1531 for(
size_t i = GetTableFrameFormatCount();
i; )
1535 pFormat->
GetName() == rFormatName && IsUsed( *pFormat ) )
1542 SwPaM* pPaM = GetCursor();
1543 m_aNavigationMgr.addEntry(*pPaM->
GetPoint());
1554 ChgCurPageDesc( *pDesc );
1562 return GetPageDesc(GetCurPageDesc(
false )).GetName();
1582 SwPaM* pCursor = pPaM ? pPaM : GetCursor( );
1589 SID_ATTR_TABSTOP_DEFAULTS,SID_ATTR_TABSTOP_OFFSET,
1590 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
1591 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
1592 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM>{});
1593 GetPaMAttr( pCursor, aCoreSet );
1594 bool bReset =
false;
1596 for (
auto pParaItem = aParaIter.
GetCurItem(); pParaItem; pParaItem = aParaIter.
NextItem())
1600 sal_uInt16 nWhich = pParaItem->Which();
1601 if(SfxItemState::SET == aCoreSet.GetItemState(nWhich) &&
1604 aCoreSet.ClearItem(nWhich);
1612 ResetAttr({}, pCursor);
1615 mxDoc->ChgFormat(*pColl, rStyleSet );
1623 ResetFlyFrameAttr( &rStyleSet );
1635 bool bStarted =
false;
1644 OUString aTmpStr1 =
SwResId(STR_START_QUOTE) +
1647 OUString aTmpStr3 =
SwResId(STR_START_QUOTE) +
1648 OUStringChar(cChar) +
1672 , m_aNavigationMgr(*this)
1691 , m_aNavigationMgr(*this)
1738 if(
GetView().GetDrawFuncPtr())
1766 aResult =
SwResId(STR_GRAPHIC);
1779 aResult =
SwResId(STR_DRAWING_OBJECTS);
1807 std::u16string_view rStyleName,
bool bHeader,
bool bOn,
bool bShowWarning)
1817 bool bExecute =
true;
1818 bool bCursorSet =
false;
1820 nFrom < nTo; ++nFrom )
1823 OUString sTmp(aDesc.
GetName());
1824 if( rStyleName.empty() || rStyleName == sTmp )
1832 bShowWarning =
false;
1844 bExecute = nResult ==
RET_YES;
1870 if( !bCursorSet && bOn )
1875 rStyleName.empty() ? SIZE_MAX : nFrom,
1901 sAuthor = pAuthorItem->GetValue();
1904 std::size_t nAuthor =
SW_MOD()->GetRedlineAuthor();
1905 sAuthor =
SW_MOD()->GetRedlineAuthor(nAuthor);
1911 sText = pTextItem->GetValue();
1936 std::unique_ptr<SwPosition> pAnchor;
1943 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR) && pFormat->
GetAnchor().
GetContentAnchor())
1952 GetView().AttrChangedNotify(
nullptr);
1997 SwNode* pOutlineNode = rOutlineNodes[nPos];
2001 bool bOutlineContentVisibleAttr =
false;
2003 return bOutlineContentVisibleAttr;
2011 if (
GetNodes().GetOutLineNds().Seek_Entry(pNd, &nPos))
2022 SwNode* pSttNd = rOutlineNodes[nPos];
2023 if (pSttNd->IsEndNode())
2027 if (rOutlineNodes.
size() > nPos + 1)
2028 pEndNd = rOutlineNodes[nPos + 1];
2033 if (pSttNd->EndOfSectionIndex() < pEndNd->
GetIndex() )
2040 for (
size_t nOutlinePos = nPos + 2; nOutlinePos < rOutlineNodes.
size(); nOutlinePos++)
2042 if (!(rOutlineNodes[nOutlinePos]->GetTableBox()))
2044 pEndNd = rOutlineNodes[nOutlinePos];
2052 int nLevel = pSttNd->GetTextNode()->GetAttrOutlineLevel();
2054 while (++iPos < rOutlineNodes.
size() &&
2055 rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() > nLevel);
2067 if (iPos < rOutlineNodes.
size())
2069 SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
2075 if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
2076 pEndNd = rOutlineNodes[iPos];
2086 pSttNd->GetTextNode()->SetAttrOutlineContentVisible(
true);
2091 SwContentFrame* pFrame = pSttNd->GetTextNode()->getLayoutFrame(
nullptr);
2095 if (pOutlineFrameControl && pOutlineFrameControl->GetWindow() && !pOutlineFrameControl->HasFocus())
2100 while (aIdx != *pEndNd)
2106 bool bOutlineContentVisibleAttr =
true;
2108 !bOutlineContentVisibleAttr)
2111 if (rOutlineNodes.
Seek_Entry(pTmpTextNd, &iPos))
2125 while (aIdx != *pEndNd)
2134 pSttNd->GetTextNode()->SetAttrOutlineContentVisible(
false);
const Fraction & GetScaleWidth() const
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
SvxNumType GetNumberingType() const
Instances of SwFields and those derived from it occur 0 to n times.
const SwEndNode * EndOfSectionNode() const
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
const SfxSlot * GetSlot(sal_uInt16 nId) const
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
bool Right(sal_uInt16 nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
sal_uLong GetIndex() const
virtual css::uno::Reference< css::io::XInputStream > GetIconIfIconified(OUString *pGraphicMediaType)=0
void SplitNode(bool bAutoFormat=false)
virtual const SwFlyFrameFormat * GetFormat() const override
int GetAssignedOutlineStyleLevel() const
OUString const & GetCurPageStyle() const
void ChgDBData(const SwDBData &SwDBData)
Represents the style of a paragraph.
Rect of current FlyFrame.
static SvxAutoCorrCfg & Get()
Marks a position in the document model.
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
void InsertByWord(const OUString &)
const SwNodes & GetNodes() const
bool IsAutoCorrFlag(ACFlags nFlag) const
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
size_t GetPageDescCnt() const
void InsertObject( const svt::EmbeddedObjectRef &, SvGlobalName const *pName, sal_uInt16 nSlotId=0)
bool SetObjArea(const tools::Rectangle &)
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
void DelFrames(SwRootFrame const *pLayout=nullptr)
Method deletes all views of document for the node.
void setWidth(tools::Long nWidth)
bool IsOutline() const
Returns if this text node is an outline.
OutlinerParaObject * IsAnswer()
bool IsBezierEditMode() const
SwDocShell * GetDocShell()
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
bool isTiledAnnotations()
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
void SetFlyMacroLnk(const Link< const SwFlyFrameFormat *, void > &rLnk)
void Remove(const SvGlobalName &)
static SvxAbstractDialogFactory * Create()
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow) override
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
void HideControls(FrameControlType eType)
css::uno::Sequence< sal_Int8 > GetByteSequence() const
void AutoCorrect(SvxAutoCorrect &rACorr, bool bInsertMode, sal_Unicode cChar)
Call AutoCorrect.
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
OUString GetSelDescr() const
bool Left(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
SwTwips GetWidthOfLeadingTabs() const
Returns the width of leading tabs/blanks in this paragraph.
bool checkForSelectedFontWork(SdrView const *pSdrView, sal_uInt32 &nCheckStatus)
SwFormatField * FindFormatForField(const SwField *) const
void SetPageStyle(const OUString &rCollName)
void Pos(const Point &rNew)
Of course Writer needs its own rectangles.
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
void Invalidate(sal_uInt16 nId)
SwFlyFrame * GetSelectedFlyFrame() const
bool InsertField(const SwInsertField_Data &rData)
bool InsertOleObject(const svt::EmbeddedObjectRef &xObj, SwFlyFrameFormat **pFlyFrameFormat=nullptr)
OUString GetCursorDescr() const
Returns textual description of the current selection.
RndStdIds GetAnchor() const
void DelAttr(sal_uInt16 nId)
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
static sal_uInt16 IsChart(const SvGlobalName &rName)
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
void NoEdit(bool bHideCursor=true)
virtual void SetReadonlyOption(bool bSet)
bool HasSelection() const
Does the current cursor create a selection?
const OUString & GetName() const
Used by the UI to modify the document model.
static UITestLogger & getInstance()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
bool IsHeaderFooterEdit() const
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
void logEvent(const EventDescription &rDescription)
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
const SfxPoolItem * NextItem()
tools::Long ResetSelect(const Point *, bool)
bool IsAssignedToListLevelOfOutlineStyle() const
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
const SwTwips DFLT_HEIGHT
SwTableNode * GetTableNode()
const SwView & GetView() const
SwFrameControlsManager & GetFrameControlsManager()
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
rtl::Reference< SwDoc > mxDoc
The document; never 0.
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_Unicode GetBulletChar(sal_uInt8 nLevel)
retrieve unicode of character used for the default bullet list for the given list level ...
tools::Long CalcHeightBorder()
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
void Width(tools::Long nNew)
const SfxItemSet & GetAttrSet() const
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
SwFrameFormat * GetTableStyle(std::u16string_view rFormatName)
bool checkForSelectedCustomShapes(SdrView const *pSdrView, bool bOnlyExtruded)
static sal_uInt16 IsMath(const SvGlobalName &rName)
virtual void MoveObjectIfActive(svt::EmbeddedObjectRef &xObj, const Point &rOffset) override
The layout has been changed, so the active object has to be moved after that.
void Insert(SwField const &, SwPaM *pAnnotationRange=nullptr)
constexpr OUStringLiteral aData
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SwWrtShell(SwWrtShell &, vcl::Window *pWin, SwView &rShell)
void SetReadonlyControls(bool bReadonly)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
void SetHeightSizeType(SwFrameSize eType)
bool IsContentNode() const
PaM is Point and Mark: a selection of the document model.
void RemoveControlsByType(FrameControlType eType, const SwFrame *pFrame)
Class for automated call of Start- and EndAction().
static void EndUndo(SwWrtShell &rSh)
std::unique_ptr< SwPaM > m_pAnnotationRange
Marks the PostIt field's annotation start/end if it differs from the cursor selection.
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
virtual SwPaM & GetCurrentShellCursor() override
Return the current shell cursor.
bool getUserAllowsLinkUpdate() const
bool HasSelection() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void Insert2(const OUString &, const bool bForceExpandHints=false)
const SwStartNode * StartOfSectionNode() const
bool IsFrameAction() const
const SwPosition * GetPoint() const
bool SetCursorInHdFt(size_t nDescNo, bool bInHeader)
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
void Push()
store a copy of the current cursor on the cursor stack
SwCharFormat * GetCharStyle(const OUString &rFormatName, GetStyle eCreate=GETSTYLE_NOCREATE)
SvxAutoCorrect * GetAutoCorrect()
SfxBindings & GetBindings()
void Assign(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, sal_Int64 nAspect)
SwContentNode * GetContentNode()
const OUString & GetValue() const
const SwPageDesc & GetPageDesc(size_t i) const
void SetTextFormatColl(const css::uno::Any &rAny, SwPaM &rPaM)
const T * GetArg(sal_uInt16 nSlotId) const
void SetSfxViewShell(SfxViewShell *pNew)
void DelFrames(SwRootFrame const *pLayout)
Method deletes all views of document for the node.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
tools::Long Width() const
void AddRule(SwUndoArg eWhat, const OUString &rWith)
void SetGraphicStream(const css::uno::Reference< css::io::XInputStream > &xInGrStream, const OUString &rMediaType)
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
void SetAnchor(RndStdIds eId)
bool GetAttrOutlineContentVisible(bool &bOutlineContentVisibleAttr)
GetAttrOutlineContentVisible.
Marks a node in the document model.
void ToggleHeaderFooterEdit()
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
virtual void SetReadonlyOption(bool bSet) override
OUString SwResId(const char *pId)
void SSize(const Size &rNew)
void Insert(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet)
Frame cannot be moved in Var-direction.
const char * GetUnoName() const
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
SwFieldType * GetTyp() const
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
void ChangeIndent(const sal_Int32 nDiff)
change indent of all list levels by given difference
SW_DLLPUBLIC bool HasActiveSidebarWin() const
virtual void CalcAndSetScale(svt::EmbeddedObjectRef &xObj, const SwRect *pFlyPrtRect=nullptr, const SwRect *pFlyFrameRect=nullptr, const bool bNoTextFramePrtAreaChanged=false) override
Client for OleObject has to be up-to-date regarding scaling.
constexpr TypedWhichId< SvxRsidItem > RES_CHRATR_RSID(39)
void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning)
static void Get1PixelInLogic(const SwViewShell &rSh, tools::Long *pX=nullptr, tools::Long *pY=nullptr)
SwFlyFrameFormat * InsertObject(const svt::EmbeddedObjectRef &, SfxItemSet *pFlyAttrSet)
const SwNumFormat & Get(sal_uInt16 i) const
const sal_uInt16 CRSR_SKIP_CELLS
constexpr sal_uInt16 RES_FRMATR_END(131)
virtual css::uno::Reference< css::embed::XEmbeddedObject > GetObject()=0
void InsertFootnote(const OUString &, bool bEndNote=false, bool bEdit=true)
Class for automated call of Start- and EndCursorMove().
SwFrameFormat & GetMaster()
SwTextNode is a paragraph in the document model.
void NumOrBulletOn(bool bNum)
Turns on numbering or bullets.
void addCurrentPosition()
void Set(sal_uInt16 i, const SwNumFormat *)
virtual ~SwWrtShell() override
::sw::mark::IFieldmark * GetFieldmarkAfter()
virtual bool IsTextEdit() const final override
tools::Rectangle SVRect() const
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
bool IsOutlineContentVisible(const size_t nPos)
ErrCode DoVerb(tools::Long nVerb)
void setUserAllowsLinkUpdate(bool bNew)
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
weld::Window * GetFrameWeld() const
general base class for all free-flowing frames
bool IsDefBulletFontUserDefined()
determine if default bullet font is user defined
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
const SwViewOption * GetViewOptions() const
static void ClearSelection(SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
void ToggleOutlineContentVisibility(SwNode *pNd, const bool bForceNotVisible=false)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
tools::Long CalcWidthBorder()
sal_Int32 GetIndex() const
bool IsCountedInList() const
const tools::Rectangle & GetObjArea() const
tools::Long AdjustWidth(tools::Long n)
bool IsModePushed() const
void ChgPageDesc(size_t i, const SwPageDesc &)
constexpr sal_uInt16 RES_PARATR_END(82)
SwPostItMgr * GetPostItMgr()
tools::Long Height() const
Size GetSize(MapMode const *pTargetMapMode) const
size_t IsObjSelected() const
SwFrameControlPtr GetControl(FrameControlType eType, const SwFrame *pFrame)
void SetSize(const Size &rLSize)
void SetObjAreaAndScale(const tools::Rectangle &, const Fraction &, const Fraction &)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
tools::Long AdjustHeight(tools::Long n)
#define FN_VIEW_META_CHARS
constexpr sal_uInt16 RES_CHRATR_END(46)
SAL_DLLPRIVATE tools::Long SetCursorKillSel(const Point *, bool bProp)
const SwPostItMgr * GetPostItMgr() const
bool IsTreatSubOutlineLevelsAsContent() const
virtual bool IsCreateNew()=0
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void setHeight(tools::Long nHeight)
void AutoCorrect(SvxAutoCorrect &rACorr, sal_Unicode cChar)
void Overwrite(const OUString &)
static SvxAutoCorrect * lcl_IsAutoCorr()
const sal_uInt16 CRSR_SKIP_CHARS
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
SwTwips GetAdditionalIndentForStartingNewList() const
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::std::optional< sal_uInt16 > &rPgNum=std::nullopt)
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
void ChgDBData(const SwDBData &SwDBData)
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
bool Pop(PopMode)
delete cursor
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
const Size & GetSize() const
void SetNumberingType(SvxNumType nSet)
virtual void ConnectObj(svt::EmbeddedObjectRef &xIPObj, const SwRect &rPrt, const SwRect &rFrame) override
Connect objects with ActivateWhenVisible at Paint.
std::map< OUString, OUString > aParameters
std::shared_ptr< SwFrameControl > SwFrameControlPtr
sal_Int64 GetViewAspect() const
bool IsInvalidItem(const SfxPoolItem *pItem)
std::vector< SwNode * >::size_type size_type
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SelectionType GetSelectionType() const
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
void StartAllAction()
For all views of this document.
const Fraction & GetScaleHeight() const
bool GotoFieldmark(::sw::mark::IFieldmark const *const pMark)
void RegisterAnswerText(const OUString &aAnswerText)
CharClass & GetAppCharClass()
void Height(tools::Long nNew)
const OUString & GetAnswerText() const
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
Rect of PrtArea of FlyFrame.
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
bool IsOutlineRule() const
const SfxPoolItem * GetCurItem() const
bool IsSelFrameMode() const
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
void LaunchOLEObj(tools::Long nVerb=0)
Base class of the Writer document model elements.