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>
28#include <com/sun/star/lang/XInitialization.hpp>
90#include <osl/diagnose.h>
111#include "../../core/crsr/callnk.hxx"
126void collectUIInformation(
const OUString& rAction,
const OUString& aParameters)
129 aDescription.
aAction = rAction;
130 aDescription.
aParameters = {{
"parameters", aParameters}};
131 aDescription.
aID =
"writer_edit";
132 aDescription.
aKeyWord =
"SwEditWinUIObject";
133 aDescription.
aParent =
"MainWindow";
158#define BITFLD_INI_LIST \
168 m_bRetainSelection = false; \
169 m_bIsInClickToEdit = false;
174 if( pACorr && !pACorr->
IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord |
175 ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber | ACFlags::TransliterateRTL |
176 ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect ))
211 sal_Int32
nPos = 0, nStt = 0;
212 for( ;
nPos < rStr.getLength();
nPos++ )
215 if( bTmpDelim != bDelim )
231 bool bStarted =
false;
234 bool bDeleted =
false;
247 OUString aTmpStr =
SwResId(STR_START_QUOTE) +
268 if (pTextContentControl)
270 std::shared_ptr<SwContentControl> pContentControl =
275 pContentControl->SetShowingPlaceHolder(
false);
312 bool bSetGrfSize =
true;
313 bool bOwnMgr =
false;
327 if (nAnchorType != RndStdIds::FLY_AT_PARA)
348 if (
IsRedlineOn() && nAnchorType != RndStdIds::FLY_AS_CHAR )
349 pFrameMgr->
SetAnchor( RndStdIds::FLY_AS_CHAR );
361 sal_Int32 nPreferredDPI =
mxDoc->getIDocumentSettingAccess().getImagePreferredDPI();
364 if (nPreferredDPI > 0)
368 aGrfSize =
Size(nWidth, nHeight);
395 pFrameMgr->
SetSize( aGrfSize );
433 case SID_INSERT_OBJECT:
436 aServerList.
Remove( SwDocShell::Factory().GetClassId() );
441 case SID_INSERT_FLOATINGFRAME:
445 OString aCmd = OString::Concat(
".uno:") + pSlot->
GetUnoName();
448 OUString::fromUtf8( aCmd ), xStor, &aServerList));
452 bDoVerb = pDlg->IsCreateNew();
453 OUString aIconMediaType;
454 uno::Reference< io::XInputStream > xIconMetaFile = pDlg->GetIconIfIconified( &aIconMediaType );
455 xObj.
Assign( pDlg->GetObject(),
456 xIconMetaFile.is() ? embed::Aspects::MSOLE_ICON : embed::Aspects::MSOLE_CONTENT );
457 if ( xIconMetaFile.is() )
484 MapMode aMapMode( MapUnit::MapTwip );
495 pClient->
DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
532 bool bStarMath =
true;
533 bool bActivate =
true;
536 uno::Reference < container::XChild > xChild( xRef.
GetObject(), uno::UNO_QUERY );
538 xChild->setParent(
mxDoc->GetDocShell()->GetModel() );
551 uno::Reference < beans::XPropertySet > xSet( xRef->getComponent(), uno::UNO_QUERY );
556 xSet->setPropertyValue(
"Formula",
uno::Any( aMathData ) );
559 catch (
const uno::Exception&)
587 MapMode aMapMode( MapUnit::MapTwip );
605 *pFlyFrameFormat = pFormat;
609 uno::Reference< embed::XEmbeddedObject > xEmbeddedObj = xRef.
GetObject();
610 if ( xEmbeddedObj.is() )
612 bool bDisableDataTableDialog =
false;
614 uno::Reference< beans::XPropertySet > xProps( xEmbeddedObj->getComponent(), uno::UNO_QUERY );
616 ( xProps->getPropertyValue(
"DisableDataTableDialog") >>= bDisableDataTableDialog ) &&
617 bDisableDataTableDialog )
619 xProps->setPropertyValue(
"DisableDataTableDialog",
621 xProps->setPropertyValue(
"DisableComplexChartTypes",
623 uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
624 if ( xModifiable.is() )
626 xModifiable->setModified(
true );
656 GetView().GetViewFrame()->GetFrame().IsInPlace() )
660 OSL_ENSURE( xRef.
is(),
"OLE not found" );
667 const auto classId = xRef->getClassID();
676 uno::Reference<lang::XInitialization> xOLEInit(xRef.
GetObject(), uno::UNO_QUERY);
679 uno::Sequence<beans::PropertyValue>
aArguments
684 static_cast<SwOleClient*
>(pCli)->SetInDoVerb(
true );
689 static_cast<SwOleClient*
>(pCli)->SetInDoVerb(
false );
697 sal_Int32
nState = xObj->getCurrentState();
698 if (
nState == css::embed::EmbedStates::INPLACE_ACTIVE
699 ||
nState == css::embed::EmbedStates::UI_ACTIVE )
711 catch (
const uno::Exception&)
717 const SwRect *pFlyPrtRect,
718 const SwRect *pFlyFrameRect,
719 const bool bNoTextFramePrtAreaChanged )
723 OSL_ENSURE( xObj.
is(),
"ObjectRef not valid" );
726 if ( nAspect == embed::Aspects::MSOLE_ICON )
730 bool bLinkingChart =
false;
734 nMisc = xObj->getStatus( nAspect );
738 if( embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE & nMisc )
741 SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
753 aSz.Width = aSize.
Width();
754 aSz.Height = aSize.
Height();
758 bool bModified =
false;
759 uno::Reference<util::XModifiable> xModifiable(xObj->getComponent(), uno::UNO_QUERY);
760 if (xModifiable.is())
761 bModified = xModifiable->isModified();
762 xObj->setVisualAreaSize( nAspect, aSz );
763 xModifiable.set(xObj->getComponent(), uno::UNO_QUERY);
764 if (xModifiable.is() && xModifiable->isModified() && !bModified)
765 xModifiable->setModified(bModified);
776 bool bResetEnableSetModified(
false);
777 if (
GetDoc()->GetDocShell()->IsEnableSetModified() )
780 bResetEnableSetModified =
true;
790 if ( bResetEnableSetModified )
798 uno::Reference< chart2::XChartDocument > xChartDocument( xObj->getComponent(), uno::UNO_QUERY );
799 bLinkingChart = ( xChartDocument.is() && !xChartDocument->hasInternalDataProvider() );
802 catch (
const uno::Exception&)
811 if ( (embed::EmbedMisc::EMBED_ACTIVATEIMMEDIATELY & nMisc)
815 || ( bNoTextFramePrtAreaChanged && nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE ) )
829 aSize = xObj->getVisualAreaSize( nAspect );
831 catch (
const embed::NoVisualAreaSizeException&)
833 OSL_FAIL(
"Can't get visual area size!" );
836 catch (
const uno::Exception&)
839 OSL_FAIL(
"Can't get visual area size!" );
843 Size _aVisArea( aSize.Width, aSize.Height );
848 bool bUseObjectSize =
false;
854 const MapMode aTmp( MapUnit::MapTwip );
859 aObjArea = pFlyPrtRect->
SSize();
866 if( !( _aVisArea.
Width() - nX <= aObjArea.
Width() &&
871 if ( nMisc & embed::EmbedMisc::EMBED_NEVERRESIZE )
875 bUseObjectSize =
true;
890 aArea = *pFlyPrtRect;
891 aArea += pFlyFrameRect->
Pos();
899 if ( bUseObjectSize )
903 OSL_ENSURE( pFlyFrameFormat,
"Could not find fly frame." );
904 if ( pFlyFrameFormat )
907 SwRect aRect( pFlyPrtRect ? *pFlyPrtRect
909 aArea += rPoint - aRect.
Pos();
967 collectUIInformation(
"BREAK_PAGE",
"parameter");
986 if (oClear.has_value())
1047 auto pContentControl = std::make_shared<SwContentControl>(
nullptr);
1048 OUString aPlaceholder;
1054 pContentControl->SetShowingPlaceHolder(
true);
1057 pContentControl->SetPlainText(
true);
1061 aPlaceholder =
SwResId(STR_CONTENT_CONTROL_PLACEHOLDER);
1067 pContentControl->SetCheckbox(
true);
1069 pContentControl->SetCheckedState(
u"\u2612");
1071 pContentControl->SetUncheckedState(OUString(
u"\u2610"));
1072 aPlaceholder =
u"\u2610";
1080 pContentControl->SetComboBox(
true);
1084 pContentControl->SetDropDown(
true);
1087 pContentControl->SetShowingPlaceHolder(
true);
1090 aPlaceholder =
SwResId(STR_DROPDOWN_CONTENT_CONTROL_PLACEHOLDER);
1094 pContentControl->SetListItems({ aListItem });
1100 pContentControl->SetShowingPlaceHolder(
true);
1101 pContentControl->SetPicture(
true);
1107 aBitmap.
Erase(aColor);
1113 InsertGraphic(OUString(), OUString(), aBitmap,
nullptr, RndStdIds::FLY_AS_CHAR);
1142 pContentControl->SetShowingPlaceHolder(
true);
1143 pContentControl->SetDate(
true);
1145 sal_uInt32 nStandardFormat = pFormatter->
GetStandardFormat(SvNumFormatType::DATE);
1151 aPlaceholder =
SwResId(STR_DATE_CONTENT_CONTROL_PLACEHOLDER);
1156 if (aPlaceholder.getLength())
1202 if (pTextNode && pTextNode->
IsOutline())
1217 if (rOutlineNodes.
size() >
nPos + 1)
1218 pEndNd = rOutlineNodes[
nPos + 1];
1226 while (++iPos < rOutlineNodes.
size() &&
1227 rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() > nLevel);
1239 if (iPos < rOutlineNodes.
size())
1241 SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
1247 if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
1248 pEndNd = rOutlineNodes[iPos];
1274 aIdx.
Assign(*pEndNd, -1);
1326 bool bHandled =
false;
1363 bool bContinueFoundNumRule(
false );
1364 bool bActivateOutlineRule(
false );
1365 int nActivateOutlineLvl(
MAXLEVEL );
1380 if ( !pDirectCollRule )
1382 pCollRule =
nullptr;
1388 pNumRule = pCollRule;
1395 if ( pNumRule == pCollRule )
1408 "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1414 bActivateOutlineRule =
true;
1419 bContinueFoundNumRule =
true;
1427 bActivateOutlineRule =
true;
1431 else if ( !pNumRule )
1437 if ( pCollRule->
Get( o3tl::narrowing<sal_uInt16>(nActivateOutlineLvl) ).
GetNumberingType()
1442 bActivateOutlineRule =
true;
1447 bContinueFoundNumRule =
true;
1456 "<SwWrtShell::NumOrBulletOn(..)> - paragraph style with outline rule, but no outline level" );
1462 bActivateOutlineRule =
true;
1467 bContinueFoundNumRule =
true;
1470 pNumRule = pCollRule;
1484 !bActivateOutlineRule && !bContinueFoundNumRule )
1491 OUString sContinuedListId;
1495 false, bNum,
false, 0,
1497 bContinueFoundNumRule = pNumRule !=
nullptr;
1505 if ( !bContinueFoundNumRule )
1513 int nLevel = bActivateOutlineRule
1514 ? nActivateOutlineLvl
1523 SwNumFormat aFormat(aNumRule.
Get(o3tl::narrowing<sal_uInt16>(nLevel)));
1540 aNumRule.
Set(o3tl::narrowing<sal_uInt16>(nLevel), aFormat);
1573 const SwTwips nWidthOfTabs = pTextNode
1578 const bool bHtml =
dynamic_cast<SwWebDocShell*
>( pDocSh ) !=
nullptr;
1607 else if ( nWidthOfTabs > 0 )
1620 aNumRule.
Set( nLvl, aFormat );
1629 if ( ( nTextNodeIndent + nWidthOfTabs ) != 0 )
1635 SwTwips nIndentChange = nTextNodeIndent + nWidthOfTabs;
1693 SwNumFormat aFormat(aNumRule.
Get(o3tl::narrowing<sal_uInt16>(nLevel)));
1696 aNumRule.
Set(nLevel, aFormat);
1796 if ( pTextNd && pTextNd->
IsInList() )
1912 SID_ATTR_TABSTOP_DEFAULTS,SID_ATTR_TABSTOP_OFFSET,
1913 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
1914 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
1915 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM> aCoreSet(
GetAttrPool() );
1917 bool bReset =
false;
1919 for (
auto pParaItem = aParaIter.
GetCurItem(); pParaItem; pParaItem = aParaIter.
NextItem())
1923 sal_uInt16 nWhich = pParaItem->Which();
1938 mxDoc->ChgFormat(*pColl, rStyleSet );
1958 bool bStarted =
false;
1967 OUString aTmpStr1 =
SwResId(STR_START_QUOTE) +
1970 OUString aTmpStr3 =
SwResId(STR_START_QUOTE) +
1971 OUStringChar(cChar) +
1995 , m_aNavigationMgr(*this)
2004 IFieldmark *pBM =
nullptr;
2014 , m_aNavigationMgr(*this)
2022 IFieldmark *pBM =
nullptr;
2040 ::std::optional<SwCallLink> aLink(std::in_place, *
this);
2041 return Pop(eDelete, aLink);
2070 if(
GetView().GetDrawFuncPtr())
2098 aResult =
SwResId(STR_GRAPHIC);
2111 aResult =
SwResId(STR_DRAWING_OBJECTS);
2139 std::u16string_view rStyleName,
bool bHeader,
bool bOn,
bool bShowWarning)
2149 bool bExecute =
true;
2150 bool bCursorSet =
false;
2152 nFrom < nTo; ++nFrom )
2155 OUString sTmp(aDesc.
GetName());
2156 if( rStyleName.empty() || rStyleName == sTmp )
2164 bShowWarning =
false;
2176 bExecute = nResult ==
RET_YES;
2205 if( !bCursorSet && bOn )
2210 rStyleName.empty() ? SIZE_MAX : nFrom,
2236 sAuthor = pAuthorItem->GetValue();
2239 std::size_t nAuthor =
SW_MOD()->GetRedlineAuthor();
2240 sAuthor =
SW_MOD()->GetRedlineAuthor(nAuthor);
2246 sText = pTextItem->GetValue();
2271 std::optional<SwPosition> oAnchor;
2278 if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == RndStdIds::FLY_AT_CHAR) && pFormat->
GetAnchor().
GetAnchorNode())
2287 GetView().AttrChangedNotify(
nullptr);
2332 const SwNode* pOutlineNode = rOutlineNodes[
nPos];
2386 bool bDocChanged =
false;
2412 if (nOutlineLevel > nLevel)
2437 if (rOutlineNodes.
size() >
nPos + 1)
2438 pEndNd = rOutlineNodes[
nPos + 1];
2446 while (++iPos < rOutlineNodes.
size() &&
2447 rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() > nLevel &&
2448 rOutlineNodes[iPos]->GetTextNode()->GetAttrOutlineLevel() <= nMaxOutlineLevelShown);
2460 if (iPos < rOutlineNodes.
size())
2462 SwNode* pStartOfSectionNode = rOutlineNodes[iPos]->StartOfSectionNode();
2468 if (pStartOfSectionNodeSttNd == pStartOfSectionNode)
2469 pEndNd = rOutlineNodes[iPos];
2484 for (
size_t nOutlinePos =
nPos + 2; nOutlinePos < rOutlineNodes.
size(); nOutlinePos++)
2486 if (!(rOutlineNodes[nOutlinePos]->GetTableBox()))
2488 pEndNd = rOutlineNodes[nOutlinePos];
2499 while (aIdx != *pEndNd)
2512 aIdx.
Assign(*pSttNd, +1);
2515 if (bSetAttrOutlineVisibility)
2520 while (aIdx != *pEndNd)
2526 bool bOutlineContentVisibleAttr =
true;
2528 if (!bOutlineContentVisibleAttr)
2531 if (rOutlineNodes.
Seek_Entry(pTextNd, &iPos))
2542 else if (bSetAttrOutlineVisibility)
2555 bool bOutlineContentVisibleAttr =
true;
2556 rOutlineNds[
nPos]->GetTextNode()->GetAttrOutlineContentVisible(bOutlineContentVisibleAttr);
2557 if (!bIsOutlineContentVisible && bOutlineContentVisibleAttr)
2559 else if (bIsOutlineContentVisible && !bOutlineContentVisibleAttr)
2577 std::vector<SwNode*> aFoldedOutlineNodeArray;
2580 bool bOutlineContentVisibleAttr =
true;
2581 pNd->GetTextNode()->GetAttrOutlineContentVisible(bOutlineContentVisibleAttr);
2582 if (!bOutlineContentVisibleAttr)
2584 aFoldedOutlineNodeArray.push_back(pNd);
2585 pNd->GetTextNode()->SetAttrOutlineContentVisible(
true);
2594 for (
SwNode* pNd: aFoldedOutlineNodeArray)
2595 pNd->GetTextNode()->SetAttrOutlineContentVisible(
false);
2626 !
GetNodes().GetOutLineNds()[
nPos]->GetTextNode()->getLayoutFrame(
nullptr)))
2629 !
GetNodes().GetOutLineNds()[
nPos]->GetTextNode()->getLayoutFrame(
nullptr))
2643 bool bVisibleAttr =
true;
2645 return bVisibleAttr;
2652 SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint());
2656 if (aPointIdx == aMarkIdx)
2660 for (
SwNodeIndex aIdx = aPointIdx; aIdx <= aMarkIdx; aIdx++)
2674 auto xInfo = std::make_shared<weld::MessageDialogController>(
2675 GetView().
GetFrameWeld(),
"modules/swriter/ui/inforeadonlydialog.ui",
"InfoReadonlyDialog");
2679 xInfo->set_primary_text(
SwResId(STR_INFORODLG_FOLDED_PRIMARY));
2680 xInfo->set_secondary_text(
SwResId(STR_INFORODLG_FOLDED_SECONDARY));
2686 std::unique_ptr<weld::Builder>
2688 "modules/swriter/ui/inforeadonlydialog.ui"));
2689 std::unique_ptr<weld::MessageDialog>
2690 xInfo(xBuilder->weld_message_dialog(
"InfoReadonlyDialog"));
2694 xInfo->set_primary_text(
SwResId(STR_INFORODLG_FOLDED_PRIMARY));
2695 xInfo->set_secondary_text(
SwResId(STR_INFORODLG_FOLDED_SECONDARY));
@ MATH_BASELINE_ALIGNMENT
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
bool Erase(const Color &rFillColor)
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
const OUString & GetValue() const
void IncreaseLuminance(sal_uInt8 cLumInc)
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
virtual void RemoveLeadingWhiteSpace(const SwPosition &rPos)=0
Removes any leading white space from the paragraph.
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
const OUString & getBcp47(bool bResolveSystem=true) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
virtual bool IsTextEdit() const final override
virtual SdrViewContext GetContext() const
void Invalidate(sal_uInt16 nId)
bool SetObjArea(const tools::Rectangle &)
void SetObjAreaAndScale(const tools::Rectangle &, const Fraction &, const Fraction &)
const Fraction & GetScaleHeight() const
const tools::Rectangle & GetObjArea() const
ErrCode DoVerb(sal_Int32 nVerb)
const Fraction & GetScaleWidth() const
virtual bool IsProtected() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
SfxItemState GetItemState(bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void EnableSetModified(bool bEnable=true)
const T * GetArg(sal_uInt16 nSlotId) const
const SfxSlot * GetSlot(sal_uInt16 nId) const
const char * GetUnoName() const
SfxBindings & GetBindings()
weld::Window * GetFrameWeld() const
SfxInPlaceClient * FindIPClient(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, vcl::Window *pObjParentWin) const
SfxViewFrame * GetViewFrame() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static sal_uInt16 IsChart(const SvGlobalName &rName)
static sal_uInt16 IsMath(const SvGlobalName &rName)
void Remove(const SvGlobalName &)
static SvxAbstractDialogFactory * Create()
SvxAutoCorrect * GetAutoCorrect()
static SvxAutoCorrCfg & Get()
bool IsAutoCorrFlag(ACFlags nFlag) const
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
Class for automated call of Start- and EndAction().
Represents one list item in a content control dropdown list.
OUString m_aValue
This must not be empty.
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
void DelFrames(SwRootFrame const *pLayout)
Method deletes all views of document for the node.
bool Pop(PopMode, ::std::optional< SwCallLink > &roLink)
OUString GetCursorDescr() const
Returns textual description of the current selection.
void Push()
store a copy of the current cursor on the cursor stack
const SwTableNode * IsCursorInTable() const
bool SetCursorInHdFt(size_t nDescNo, bool bInHeader)
bool HasSelection() const
Does the current cursor create a selection?
void SetFlyMacroLnk(const Link< const SwFlyFrameFormat *, void > &rLnk)
virtual SwCursor & GetCurrentShellCursor() override
Return the current shell cursor.
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
OUString GetSelText() const
get selected text of a node at current cursor
bool IsEndWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
void EndAction(const bool bIdleEnd=false)
bool GotoFootnoteText()
jump from content to footnote
SwContentFrame * GetCurrFrame(const bool bCalcFrame=true) const
Get current frame in which the cursor is positioned.
bool IsInRightToLeftText() const
bool SetInFrontOfLabel(bool bNew)
SwTextContentControl * CursorInsideContentControl() const
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
SwTable::SearchType GetEnhancedTableSelection() const
bool Left(sal_uInt16 nCnt, SwCursorSkipMode nMode, bool bAllowVisual=false)
SwOutlineNodes::size_type GetOutlinePos(sal_uInt8 nLevel=UCHAR_MAX, SwPaM *pPaM=nullptr)
search "outline position" before previous outline node at given level
sw::mark::IFieldmark * GetFieldmarkAfter(bool bLoop)
bool IsCursorPtAtEnd() const
bool SelectHiddenRange()
If the current cursor position is inside a hidden range, the hidden range is selected.
void ClearLineNumAttrs(SwPosition const &rPos)
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
const SwNumRule * SearchNumRule(const SwPosition &rPos, const bool bForward, const bool bNum, const bool bOutline, int nNonEmptyAllowed, OUString &sListId, SwRootFrame const *pLayout, const bool bInvestigateStartNode=false)
Searches for a text node with a numbering rule.
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
SwDocShell * GetDocShell()
sal_uInt16 GetCntType() const
Determine form of content. Return Type at CurrentCursor->SPoint.
void StartAllAction()
For all views of this document.
void SplitNode(bool bAutoFormat=false, bool bCheckTableStart=true)
size_t GetTableFrameFormatCount(bool bUsed=false) const
TABLE.
SwFormat * GetFormatFromPool(sal_uInt16 nId)
return the requested automatic format - base-class !
void ChgDBData(const SwDBData &SwDBData)
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
SwFrameFormat & GetTableFrameFormat(size_t nFormat, bool bUsed=false) const
SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
bool GetGrfSize(Size &) const
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
void SetAttrSet(const SfxItemSet &, SetAttrMode nFlags=SetAttrMode::DEFAULT, SwPaM *pCursor=nullptr, const bool bParagraphSetting=false)
SwCharFormat * FindCharFormatByName(const OUString &rName) const
void Overwrite(const OUString &)
svt::EmbeddedObjectRef & GetOLEObject() const
Get OLE object at pointer.
void Insert2(const OUString &, const bool bForceExpandHints=false)
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTextFormatColl(....
void SetCurNumRule(const SwNumRule &, const bool bCreateNewList, const OUString &sContinuedListId=OUString(), const bool bResetIndentAttrs=false)
Optional parameter <bResetIndentAttrs> (default value false).
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
const SwNumRule * GetOutlineNumRule() const
bool GetPaMAttr(SwPaM *pPaM, SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Apply / remove attributes.
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
const SwNumRule * GetNumRuleAtCurrCursorPos() const
void DelNumRules()
Delete, split enumeration list.
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void AutoCorrect(SvxAutoCorrect &rACorr, bool bInsertMode, sal_Unicode cChar)
Call AutoCorrect.
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
OUString GetUniqueNumRuleName() const
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
void FillByEx(SwCharFormat *)
void ResetAttr(const o3tl::sorted_vector< sal_uInt16 > &attrs=o3tl::sorted_vector< sal_uInt16 >(), SwPaM *pCursor=nullptr)
bool IsUsed(const sw::BroadcastingModify &) const
Query if the paragraph-/character-/frame-/page-style is used.
void FlushInBuffer()
Character buffer is inserted into the document.
bool IsFrameAction() const
SwFrameControlsManager & GetFrameControlsManager()
SwFlyFrame * GetSelectedFlyFrame() const
bool SetFlyFrameAttr(SfxItemSet &rSet)
void AlignFormulaToBaseline(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj)
for starmath formulas anchored 'as char' it aligns it baseline to baseline changing the previous vert...
void ChgPageDesc(size_t i, const SwPageDesc &)
SwFlyFrameFormat * InsertObject(const svt::EmbeddedObjectRef &, SfxItemSet *pFlyAttrSet)
SwPageDesc * FindPageDescByName(const OUString &rName, bool bGetFromPool=false, size_t *pPos=nullptr)
bool IsFrameSelected() const
void SetCheckForOLEInCaption(bool bFlag)
size_t GetPageDescCnt() const
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
void ToggleHeaderFooterEdit()
void Insert(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic, const SfxItemSet *pFlyAttrSet)
size_t GetCurPageDesc(const bool bCalcFrame=true) const
Size GetGraphicDefaultSize() const
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
bool GetFlyFrameAttr(SfxItemSet &rSet) const
Size RequestObjectResize(const SwRect &rRect, const css::uno::Reference< css::embed::XEmbeddedObject > &)
OLE.
void EndTextEdit()
Deletes object if required.
void ChgCurPageDesc(const SwPageDesc &)
PageDescriptor-interface.
size_t IsObjSelected() const
void CalcBoundRect(SwRect &_orRect, const RndStdIds _nAnchorId, const sal_Int16 _eHoriRelOrient=css::text::RelOrientation::FRAME, const sal_Int16 _eVertRelOrient=css::text::RelOrientation::FRAME, const SwFormatAnchor *_pToCharContentPos=nullptr, const bool _bFollowTextFlow=false, bool _bMirror=false, Point *_opRef=nullptr, Size *_opPercent=nullptr, const SwFormatFrameSize *pFormatFrameSize=nullptr) const
i#17567 - adjustments to allow negative vertical positions for fly frames anchored to paragraph or to...
const SwPageDesc & GetPageDesc(size_t i) const
void ResetFlyFrameAttr(const SfxItemSet *pSet)
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
bool InsertField(SwInsertField_Data &rData)
Instances of SwFields and those derived from it occur 0 to n times.
SwFormatField * FindFormatForField(const SwField *) const
SwFieldType * GetTyp() const
void SetAnchor(RndStdIds eId)
tools::Long CalcWidthBorder()
void SetSize(const Size &rLSize)
RndStdIds GetAnchor() const
const Size & GetSize() const
void DelAttr(sal_uInt16 nId)
tools::Long CalcHeightBorder()
const SfxItemSet & GetAttrSet() const
void SetHeightSizeType(SwFrameSize eType)
general base class for all free-flowing frames
virtual const SwFlyFrameFormat * GetFormat() const override
SfxPoolItem subclass that wraps an SwContentControl.
const std::shared_ptr< SwContentControl > & GetContentControl() const
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
bool isFrameAreaDefinitionValid() const
void HideControls(FrameControlType eType)
void SetReadonlyControls(bool bReadonly)
Base class of the Writer layout elements.
Class for automated call of Start- and EndCursorMove().
bool addEntry(const SwPosition &rPos)
Marks a node in the document model.
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset)
const SwNodes & GetNodes() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwSectionNode * GetSectionNode()
SwNodeOffset GetIndex() const
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
bool IsContentNode() const
bool IsSectionNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
SwTableNode * GetTableNode()
const SwEndNode * EndOfSectionNode() const
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwTextNode * MakeTextNode(SwNode &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsOutlineRule() const
void ChangeIndent(const sal_Int32 nDiff)
change indent of all list levels by given difference
const SwNumFormat & Get(sal_uInt16 i) const
void Set(sal_uInt16 i, const SwNumFormat *)
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
static constexpr auto npos
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
void Normalize(bool bPointFirst=true)
Normalizes PaM, i.e.
const SwPosition * GetPoint() const
const OUString & GetName() const
SwFrameFormat & GetMaster()
void RegisterAnswerText(const OUString &aAnswerText)
OutlinerParaObject * IsAnswer()
const OUString & GetAnswerText() const
SW_DLLPUBLIC bool HasActiveSidebarWin() const
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
tools::Rectangle SVRect() const
void Width(tools::Long nNew)
void AddRule(SwUndoArg eWhat, const OUString &rWith)
const SwSection & GetSection() const
SwSectionFormat * GetFormat()
static void Get1PixelInLogic(const SwViewShell &rSh, tools::Long *pX=nullptr, tools::Long *pY=nullptr)
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
const SwTable & GetTable() const
void DelFrames(SwRootFrame const *pLayout=nullptr)
Method deletes all views of document for the node.
SwTable is one table in the document model, containing rows (which contain cells).
const SwFormatContentControl & GetContentControl() const
SwTextAttr subclass that tracks the location of the wrapped SwFormatContentControl.
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
int GetAssignedOutlineStyleLevel() const
SwTextNode is a paragraph in the document model.
bool IsOutline() const
Returns if this text node is an outline.
void GetAttrOutlineContentVisible(bool &bOutlineContentVisibleAttr)
GetAttrOutlineContentVisible.
bool IsCountedInList() const
SwTwips GetAdditionalIndentForStartingNewList() const
SwTwips GetWidthOfLeadingTabs() const
Returns the width of leading tabs/blanks in this paragraph.
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
int GetAttrOutlineLevel() const
Returns outline level of this text node.
void SetAttrOutlineContentVisible(bool bVisible)
SwTextFormatColl * GetTextColl() const
static void ClearSelection(const SwWrtShell &rSh, const SwFrameShell *pCreator=nullptr)
bool IsShowOutlineContentVisibilityButton() const
bool IsTreatSubOutlineLevelsAsContent() const
bool IsViewLocked() const
bool IsHeaderFooterEdit() const
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
const SwViewOption * GetViewOptions() const
void UnlockPaint(bool bVirDev=false)
const SwNodes & GetNodes() const
rtl::Reference< SwDoc > mxDoc
The document; never 0.
SwRootFrame * GetLayout() const
virtual void SetReadonlyOption(bool bSet)
const SwPostItMgr * GetPostItMgr() const
void SetSfxViewShell(SfxViewShell *pNew)
const SfxItemPool & GetAttrPool() const
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
bool IsBezierEditMode() const
int GetMaxOutlineLevelShown() const
void SetMaxOutlineLevelShown(int nLevel)
SwPostItMgr * GetPostItMgr()
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
OUString const & GetCurPageStyle() const
bool IsSelFrameMode() const
SAL_DLLPRIVATE tools::Long SetCursorKillSel(const Point *, bool bProp)
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
virtual void ConnectObj(svt::EmbeddedObjectRef &xIPObj, const SwRect &rPrt, const SwRect &rFrame) override
Connect objects with ActivateWhenVisible at Paint.
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
void InsertPostIt(SwFieldMgr &rFieldMgr, const SfxRequest &rReq)
Inserts a new annotation/comment at the current cursor position / selection.
bool IsOutlineContentVisible(const size_t nPos)
void addCurrentPosition()
void MakeOutlineLevelsVisible(const int nLevel)
SwWrtShell(SwWrtShell &, vcl::Window *pWin, SwView &rShell)
void InsertLineBreak(std::optional< SwLineBreakClear > oClear=std::nullopt)
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
bool GotoFieldmark(::sw::mark::IFieldmark const *const pMark)
bool GetAttrOutlineContentVisible(const size_t nPos)
bool IsModePushed() const
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
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.
void Insert(const OUString &)
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.
SelectionType GetSelectionType() const
void InsertGraphic(const OUString &rPath, const OUString &rFilter, const Graphic &, SwFlyFrameAttrMgr *=nullptr, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA)
bool HasFoldedOutlineContentSelected()
virtual void SetReadonlyOption(bool bSet) override
bool InsertOleObject(const svt::EmbeddedObjectRef &xObj, SwFlyFrameFormat **pFlyFrameFormat=nullptr)
SwFrameFormat * GetTableStyle(std::u16string_view rFormatName)
void SplitNode(bool bAutoFormat=false)
void InsertContentControl(SwContentControlType eType)
SwCharFormat * GetCharStyle(const OUString &rFormatName, GetStyle eCreate=GETSTYLE_NOCREATE)
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
void ChgDBData(const SwDBData &SwDBData)
void NoEdit(bool bHideCursor=true)
void MakeOutlineContentVisible(const size_t nPos, bool bMakeVisible=true, bool bSetAttrOutlineVisibility=true)
void InsertByWord(const OUString &)
void MakeAllFoldedOutlineContentVisible(bool bMakeVisible=true)
SAL_DLLPRIVATE bool PopCursor(bool bUpdate, bool bSelect=false)
void InfoReadOnlyDialog(bool bAsync=false)
void InsertFootnote(const OUString &, bool bEndNote=false, bool bEdit=true)
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow) override
SwNavigationMgr m_aNavigationMgr
void GotoOutline(SwOutlineNodes::size_type nIdx)
void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning)
bool DelRight(bool isReplaceHeuristic=false)
void InsertObject(const svt::EmbeddedObjectRef &, SvGlobalName const *pName, sal_uInt16 nSlotId=0)
void AutoCorrect(SvxAutoCorrect &rACorr, sal_Unicode cChar)
bool HasSelection() const
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::std::optional< sal_uInt16 > &rPgNum=std::nullopt)
void InvalidateOutlineContentVisibility()
virtual ~SwWrtShell() override
SwTextFormatColl * GetParaStyle(const OUString &rCollName, GetStyle eCreate=GETSTYLE_NOCREATE)
tools::Long ResetSelect(const Point *, bool)
void SetPageStyle(const OUString &rCollName)
void LaunchOLEObj(sal_Int32 nVerb=css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY)
void NumOrBulletOn(bool bNum)
Turns on numbering or bullets.
OUString GetSelDescr() const
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const SwView & GetView() const
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
bool getUserAllowsLinkUpdate() const
void setUserAllowsLinkUpdate(bool bNew)
css::uno::Reference< css::embed::XEmbeddedObject > CreateEmbeddedObject(const css::uno::Sequence< sal_Int8 > &, OUString &, OUString const *pBaseURL=nullptr)
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
std::vector< Value >::size_type size_type
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
void SetGraphicStream(const css::uno::Reference< css::io::XInputStream > &xInGrStream, const OUString &rMediaType)
void UpdateReplacement(bool bUpdateOle=false)
sal_Int64 GetViewAspect() const
Size GetSize(MapMode const *pTargetMapMode) const
void Assign(const css::uno::Reference< css::embed::XEmbeddedObject > &xObj, sal_Int64 nAspect)
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
ring_container GetRingContainer()
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
#define FN_VIEW_META_CHARS
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
@ FlyEmbeddedPrt
Rect of PrtArea of FlyFrame.
@ FlyEmbedded
Rect of current FlyFrame.
@ Fixed
Frame cannot be moved in Var-direction.
constexpr SwTwips DFLT_HEIGHT
constexpr SwTwips DFLT_WIDTH
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr sal_uInt16 RES_FRMATR_END(135)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_CONTENT_VISIBLE(185)
CharClass & GetAppCharClass()
Sequence< PropertyValue > aArguments
#define LINK(Instance, Class, Member)
constexpr OUStringLiteral aData
bool isTiledAnnotations()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool IsDefBulletFontUserDefined()
determine if default bullet font is user defined
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
sal_Unicode GetBulletChar(sal_uInt8 nLevel)
retrieve unicode of character used for the default bullet list for the given list level
const vcl::Font & GetDefBulletFont()
retrieve font used for the default bullet list characters
constexpr auto toTwips(N number, Length from)
bool checkForSelectedCustomShapes(SdrView const *pSdrView, bool bOnlyExtruded)
bool checkForSelectedFontWork(SdrView const *pSdrView)
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNode const &rNode)
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
constexpr tools::Long constTwips_5mm
@ RES_POOLCHR_BULLET_LEVEL
Bullets.
@ RES_POOLCHR_NUM_LEVEL
Numbering symbols.
bool IsInvalidItem(const SfxPoolItem *pItem)
std::map< OUString, OUString > aParameters
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
OUString SwResId(TranslateId aId)
constexpr sal_uInt8 MAXLEVEL
static bool lcl_IsAllowed(const SwWrtShell *rSh)
static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis)
static SvxAutoCorrect * lcl_IsAutoCorr()