20#include <com/sun/star/i18n/WordType.hpp>
21#include <com/sun/star/linguistic2/XThesaurus.hpp>
67#include <inputwin.hxx>
82#include <com/sun/star/container/XNameContainer.hpp>
83#include <com/sun/star/beans/XPropertySet.hpp>
84#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
85#include <com/sun/star/uno/Any.hxx>
86#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
87#include <com/sun/star/linguistic2/XDictionary.hpp>
88#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
104#include <bookmark.hxx>
109#include <config_wasm_strip.h>
110#if !ENABLE_WASM_STRIP_EXTRA
111#include <officecfg/Office/Common.hxx>
112#include <officecfg/Office/Linguistic.hxx>
129 bool bSelectionPut,
bool bApplyToParagraph,
SfxRequest *pReq);
141 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
142 SID_HTML_MODE, SID_HTML_MODE,
143 SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
148 bool bSelectionPut =
false;
159 bSelectionPut =
true;
181 pDlg->SetCurPageId(
"hyperlink");
182 else if (nSlot == SID_CHAR_DLG_EFFECT)
183 pDlg->SetCurPageId(
"fonteffects");
184 else if (nSlot == SID_CHAR_DLG_POSITION)
185 pDlg->SetCurPageId(
"position");
186 else if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
187 pDlg->SetCurPageId(
"font");
192 pDlg->SetCurPageId(pItem->
GetValue());
198 std::shared_ptr<SfxRequest> pRequest;
201 pRequest = std::make_shared<SfxRequest>(*pReq);
204 pDlg->StartExecuteAsync([pDlg, &rWrtSh, pCoreSet, bSel, bSelectionPut, bApplyToParagraph, pRequest](sal_Int32 nResult){
208 bApplyToParagraph, pRequest.get());
215 sw_CharDialogResult(pArgs, rWrtSh, pCoreSet, bSel, bSelectionPut, bApplyToParagraph, pReq);
220 bool bSelectionPut,
bool bApplyToParagraph,
SfxRequest* pReq)
226 if (bApplyToParagraph)
235 bool bInsert =
false;
236 sal_Int32 nInsert = 0;
241 OUString sInsert = pSelectionItem->
GetValue();
242 bInsert = !sInsert.isEmpty();
245 nInsert = sInsert.getLength();
282 if (bApplyToParagraph)
301 const bool bUndoNeeded( pSet->
Count() ||
313 if ( !pDropTextItem->GetValue().isEmpty() )
337 sal_uInt16 nNumStart = USHRT_MAX;
361 ::std::optional<sal_uInt16> oPageNumber,
362 const OUString& rTemplateName, std::optional<SwLineBreakClear> oClear)
374 if( !rTemplateName.isEmpty() )
396 const auto& rAuthorityField = *
static_cast<const SwAuthorityField*
>(pField);
397 SwAuthEntry* pAuthEntry = rAuthorityField.GetAuthEntry();
409 OUString aSectionNamePrefix;
411 if (pSectionNamePrefix)
413 aSectionNamePrefix = pSectionNamePrefix->
GetValue();
416 uno::Sequence<beans::PropertyValues> aSections;
420 pSections->
GetValue() >>= aSections;
427 sal_Int32 nSectionIndex = 0;
430 for (
size_t i = 0;
i < rFormats.
size(); ++
i)
433 if (!pFormat->
GetName().startsWith(aSectionNamePrefix))
438 if (nSectionIndex >= aSections.getLength())
444 OUString aSectionName =
aMap[
"RegionName"].get<OUString>();
445 if (aSectionName != pFormat->
GetName())
447 const_cast<SwSectionFormat*
>(pFormat)->SetFormatName(aSectionName,
true);
449 aSectionData.SetSectionName(aSectionName);
455 if (pContentNodeIndex)
460 *pCursorPos = aSectionStart;
465 OUString aSectionText =
aMap[
"Content"].get<OUString>();
476 OUString aSectionNamePrefix;
478 if (pSectionNamePrefix)
480 aSectionNamePrefix = pSectionNamePrefix->
GetValue();
494 std::vector<SwSectionFormat*> aRemovals;
495 for (
size_t i = 0;
i < rFormats.
size(); ++
i)
499 if (!aSectionNamePrefix.isEmpty())
501 if (!pFormat->
GetName().startsWith(aSectionNamePrefix))
510 for (
const auto& pFormat : aRemovals)
513 pDoc->DelSectionFormat(pFormat);
524 OUString aBookmarkNamePrefix;
526 if (pBookmarkNamePrefix)
528 aBookmarkNamePrefix = pBookmarkNamePrefix->
GetValue();
531 uno::Sequence<beans::PropertyValues> aBookmarks;
535 pBookmarks->
GetValue() >>= aBookmarks;
542 sal_Int32 nBookmarkIndex = 0;
543 bool bSortMarks =
false;
548 if (!pMark->GetName().startsWith(aBookmarkNamePrefix))
553 if (aBookmarks.getLength() <= nBookmarkIndex)
559 if (aMap[
"Bookmark"].get<OUString>() != pMark->GetName())
561 rIDMA.
renameMark(pMark, aMap[
"Bookmark"].get<OUString>());
564 OUString aBookmarkText =
aMap[
"BookmarkText"].get<OUString>();
567 SwPaM aMarkers(pMark->GetMarkEnd());
572 SwPaM aPasteEnd(pMark->GetMarkEnd());
577 *pCursorPos = aPasteEnd;
581 SwPaM aPasteStart(pMark->GetMarkEnd());
583 SwPaM aStartMarker(pMark->GetMarkStart(), *aPasteStart.GetPoint());
584 SwPaM aEndMarker(*aPasteEnd.GetPoint(), *aPasteEnd.GetPoint());
585 aEndMarker.GetMark()->AdjustContent(1);
586 pMark->SetMarkPos(*aPasteStart.GetPoint());
587 pMark->SetOtherMarkPos(*aPasteEnd.GetPoint());
611 OUString aBookmarkNamePrefix;
613 if (pBookmarkNamePrefix)
615 aBookmarkNamePrefix = pBookmarkNamePrefix->
GetValue();
618 uno::Sequence<beans::PropertyValue> aBookmark;
622 pBookmarks->
GetValue() >>= aBookmark;
628 if (!pBookmark || !pBookmark->GetName().startsWith(aBookmarkNamePrefix))
638 [&rWrtSh, &aRewriter]
646 if (aMap[
"Bookmark"].get<OUString>() != pBookmark->GetName())
648 rIDMA.
renameMark(pBookmark, aMap[
"Bookmark"].get<OUString>());
652 SwPaM aMarkers(pBookmark->GetMarkEnd());
659 SwPaM aPasteEnd(pBookmark->GetMarkEnd());
662 OUString aBookmarkText =
aMap[
"BookmarkText"].get<OUString>();
666 *pCursorPos = aPasteEnd;
670 SwPaM aPasteStart(pBookmark->GetMarkEnd());
672 SwPaM aStartMarker(pBookmark->GetMarkStart(), *aPasteStart.GetPoint());
673 SwPaM aEndMarker(*aPasteEnd.GetPoint(), *aPasteEnd.GetPoint());
674 aEndMarker.GetMark()->AdjustContent(1);
675 pBookmark->SetMarkPos(*aPasteStart.GetPoint());
676 pBookmark->SetOtherMarkPos(*aPasteEnd.GetPoint());
691 OUString aBookmarkNamePrefix;
693 if (pBookmarkNamePrefix)
695 aBookmarkNamePrefix = pBookmarkNamePrefix->
GetValue();
708 std::vector<sw::mark::IMark*> aRemovals;
709 for (
auto it = pMarkAccess->getBookmarksBegin(); it != pMarkAccess->getBookmarksEnd(); ++it)
714 if (!aBookmarkNamePrefix.isEmpty())
716 if (!pBookmark->GetName().startsWith(aBookmarkNamePrefix))
722 aRemovals.push_back(pBookmark);
725 for (
const auto& pMark : aRemovals)
727 pMarkAccess->deleteMark(pMark);
734 if (!pTypeName || pTypeName->
GetValue() !=
"SetRef")
740 OUString aNamePrefix;
744 aNamePrefix = pNamePrefix->
GetValue();
757 std::vector<const SwFormatRefMark*> aRemovals;
761 if (!aNamePrefix.isEmpty())
763 if (!pRefMark->
GetRefName().startsWith(aNamePrefix))
769 aRemovals.push_back(pRefMark);
772 for (
const auto& pMark : aRemovals)
781 bool bUseDialog =
true;
785 const sal_uInt16 nSlot = rReq.
GetSlot();
790 case SID_UNICODE_NOTATION_TOGGLE:
793 sal_Int32 nSelLength = rWrtSh.
GetSelText().getLength();
795 nMaxUnits = nSelLength;
803 if( !sReplacement.isEmpty() )
824 rWrtSh.
Insert2( sReplacement );
830 case SID_LANGUAGE_STATUS:
833 OUString aNewLangText;
843 if (aNewLangText ==
"*")
861 if (!aNewLangText.isEmpty())
863 static constexpr OUStringLiteral aSelectionLangPrefix(
u"Current_");
864 static constexpr OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
865 static constexpr OUStringLiteral aDocumentLangPrefix(
u"Default_");
873 bool bForSelection =
true;
874 bool bForParagraph =
false;
875 if (-1 != (
nPos = aNewLangText.indexOf( aSelectionLangPrefix )))
878 aNewLangText = aNewLangText.replaceAt(
nPos, aSelectionLangPrefix.getLength(),
u"");
879 bForSelection =
true;
881 else if (-1 != (
nPos = aNewLangText.indexOf(aParagraphLangPrefix)))
884 aNewLangText = aNewLangText.replaceAt(
nPos, aParagraphLangPrefix.getLength(),
u"");
885 bForSelection =
true;
886 bForParagraph =
true;
888 else if (-1 != (
nPos = aNewLangText.indexOf(aDocumentLangPrefix)))
891 aNewLangText = aNewLangText.replaceAt(
nPos, aDocumentLangPrefix.getLength(),
u"");
892 bForSelection =
false;
895 if (bForParagraph || !bForSelection)
911 if (aNewLangText ==
"LANGUAGE_NONE")
913 else if (aNewLangText ==
"RESET_LANGUAGES")
919 if (bForParagraph || !bForSelection)
939 OUString aReplaceText;
943 if (!aReplaceText.isEmpty())
965 aStr = pNameItem->GetValue();
966 bool bFont = pFont && !pFont->
GetValue().isEmpty();
989 if ( pDlg->Execute() ==
RET_OK )
993 if ( !pDlg->GetStr().isEmpty() )
995 if ( !pDlg->GetFontName().isEmpty() )
1014 case FN_FORMAT_RESET:
1021 constexpr std::pair<sal_uInt16, sal_uInt16> aResetableSetRange[] = {
1034 for (
const auto& [nBegin, nEnd] : aResetableSetRange)
1036 for (sal_uInt16
i = nBegin;
i <= nEnd; ++
i)
1043 pFEShell->UpdateTableStyleFormatting(
nullptr,
true);
1052 ::std::optional<sal_uInt16> oPageNumber;
1053 std::optional<SwLineBreakClear> oClear;
1054 OUString aTemplateName;
1060 aTemplateName = pTemplate->
GetValue();
1061 if ( pNumber && pIsNumberFilled && pIsNumberFilled->GetValue() )
1062 oPageNumber = pNumber->GetValue();
1064 InsertBreak(rWrtSh, nKind, oPageNumber, aTemplateName, oClear);
1071 std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController());
1074 [pAbstractDialog, &rWrtSh] (sal_Int32 nResult) {
1077 sal_uInt16 nKind = pAbstractDialog->GetKind();
1078 OUString aTemplateName = pAbstractDialog->GetTemplateName();
1079 ::std::optional<sal_uInt16> oPageNumber = pAbstractDialog->GetPageNumber();
1080 std::optional<SwLineBreakClear> oClear = pAbstractDialog->GetClear();
1082 InsertBreak(rWrtSh, nKind, oPageNumber, aTemplateName, oClear);
1100 OUString aBookmarkText = pBookmarkText->
GetValue();
1103 *pCursorPos->GetPoint(),
false);
1106 SwPaM aBookmarkPam(*pCursorPos->GetPoint());
1111 rWrtSh, pCursorPos, aBookmarkText.toUtf8());
1112 if (pCursorPos->GetPoint()->GetContentIndex() == 0)
1115 SwPaM aPam(*pCursorPos->GetPoint());
1126 *aBookmarkPam.
GetMark() = *pCursorPos->GetPoint();
1127 *pCursorPos = aBookmarkPam;
1134 pCursorPos->DeleteMark();
1143 ::std::optional<OUString> oName;
1153 pDlg->StartExecuteAsync(aContext);
1162 UpdateBookmarks(rReq, rWrtSh);
1168 UpdateBookmark(rReq, rWrtSh);
1171 case FN_DELETE_BOOKMARK:
1184 DeleteBookmarks(rReq, rWrtSh);
1190 DeleteFields(rReq, rWrtSh);
1195 UpdateSections(rReq, rWrtSh);
1202 DeleteSections(rReq, rWrtSh);
1209 std::vector< OUString > vNavMarkNames;
1215 vNavMarkNames.push_back((*ppMark)->GetName());
1217 std::sort(vNavMarkNames.begin(), vNavMarkNames.end());
1299 pTransfer->CalculateAndCopy();
1309 rWrtSh.SwCursorShell::GotoRefMark(
static_cast<SwGetRefField*
>(pField)->GetSetRefName(),
1319 const sal_uInt16
nId = SwInputChild::GetChildWindowId();
1385 case SID_EDIT_HYPERLINK:
1388 case SID_REMOVE_HYPERLINK:
1407 case SID_ATTR_BRUSH_CHAR :
1408 case SID_ATTR_CHAR_SCALEWIDTH :
1409 case SID_ATTR_CHAR_ROTATED :
1414 if ( pArgs && pArgs->
GetItemState( nWhich ) == SfxItemState::SET )
1419 case SID_CHAR_DLG_EFFECT:
1420 case SID_CHAR_DLG_POSITION:
1422 sw_CharDialog(rWrtSh, bUseDialog,
false, nSlot, pArgs, &rReq);
1425 case SID_CHAR_DLG_FOR_PARAGRAPH:
1430 case SID_ATTR_LRSPACE :
1431 case SID_ATTR_ULSPACE :
1432 case SID_ATTR_BRUSH :
1433 case SID_PARA_VERTALIGN :
1434 case SID_ATTR_PARA_NUMRULE :
1435 case SID_ATTR_PARA_REGISTER :
1436 case SID_ATTR_PARA_PAGENUM :
1442 case SID_ATTR_PARA_LRSPACE:
1445 if ( pArgs && pArgs->
GetItemState( nWhich ) == SfxItemState::SET )
1451 SwPaM* pPaM =
nullptr;
1474 SID_ATTR_TABSTOP_DEFAULTS, SID_ATTR_TABSTOP_OFFSET,
1475 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
1476 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
1480 SID_COLOR_TABLE, SID_PATTERN_LIST,
1481 SID_HTML_MODE, SID_HTML_MODE,
1482 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
1483 FN_PARAM_1, FN_PARAM_1,
1507 const sal_uInt16 nDefDist = o3tl::narrowing<sal_uInt16>(
::GetTabDist( rDefTabs ));
1508 SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
1509 aCoreSet.Put( aDefDistItem );
1513 aCoreSet.Put( aTabPos );
1520 aCoreSet.Put( aOff );
1532 aCoreSet.Put(aStart);
1535 aCoreSet.Put(aStartAt);
1551 if ( nSlot == SID_ATTR_PARA_LRSPACE)
1561 aCoreSet.Put(firstLine);
1562 aCoreSet.Put(leftMargin);
1563 aCoreSet.Put(rightMargin);
1572 auto pRequest = std::make_shared<SfxRequest>(rReq);
1576 pDlg->StartExecuteAsync([pDlg, &rWrtSh, pDrawModel, pRequest, nDefDist, vCursors](sal_Int32 nResult){
1581 sal_uInt16 nNewDist;
1583 if (pDefaultsItem && nDefDist != (nNewDist = pDefaultsItem->
GetValue()) )
1588 pSet->
ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
1592 if (SfxItemState::SET == pSet->
GetItemState(FN_PARAM_1,
false, &pItem2))
1601 if (pDropItem->GetCharFormat())
1607 bool bSet = pFS && pFS->GetValue() == drawing::FillStyle_GRADIENT;
1610 if (pTempGradItem && pTempGradItem->
GetName().isEmpty())
1618 bSet = pFS && pFS->GetValue() == drawing::FillStyle_HATCH;
1621 if (pTempHatchItem && pTempHatchItem->
GetName().isEmpty())
1630 pDlg->disposeOnce();
1637 OUString sContinuedListId;
1663 case SID_DEC_INDENT:
1664 case SID_INC_INDENT:
1681 rWrtSh.
NumUpDown( SID_INC_INDENT == nSlot );
1698 case SID_ATTR_CHAR_COLOR2:
1702 auto* pColorItem =
static_cast<const SvxColorItem*
>(pItem);
1709 if (!pApply || pApply->
nColor != SID_ATTR_CHAR_COLOR_EXT)
1718 case SID_ATTR_CHAR_BACK_COLOR:
1719 case SID_ATTR_CHAR_COLOR_BACKGROUND:
1720 case SID_ATTR_CHAR_COLOR_EXT:
1727 auto* pColorItem =
static_cast<const SvxColorItem*
>(pItem);
1728 aColor = pColorItem->GetValue();
1729 aComplexColor = pColorItem->getComplexColor();
1735 if (nSlot != SID_ATTR_CHAR_COLOR_EXT)
1744 if (nSlot != SID_ATTR_CHAR_COLOR_EXT)
1752 if (aColor == rBrushItem.
GetColor())
1764 if(!pApply || pApply->
nColor != nSlot)
1784 case SID_RUBY_DIALOG:
1785 case SID_HYPERLINK_DIALOG:
1794 if(pArgs && pArgs->
Count())
1796 OUString sStyleName;
1800 if( SfxItemState::SET == pArgs->
GetItemState(FN_PARAM_1,
false, &pItem))
1818 if( pArgs && SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem))
1829 case SID_OPEN_HYPERLINK:
1830 case SID_COPY_HYPERLINK_LOCATION:
1838 if (nSlot == SID_OPEN_HYPERLINK)
1842 else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
1844 OUString hyperlinkLocation = rINetFormat.
GetValue();
1854 const auto& rAuthorityField = *
static_cast<const SwAuthorityField*
>(pField);
1855 OUString targetURL =
"";
1857 if (
auto targetType = rAuthorityField.GetTargetType();
1858 targetType == SwAuthorityField::TargetType::UseDisplayURL
1859 || targetType == SwAuthorityField::TargetType::UseTargetURL)
1865 if (targetURL.getLength() > 0)
1867 if (nSlot == SID_OPEN_HYPERLINK)
1871 else if (nSlot == SID_COPY_HYPERLINK_LOCATION)
1883 OUString aLocalURL = GetLocalURL(rWrtSh);
1884 if (!aLocalURL.isEmpty())
1890 case SID_OPEN_XML_FILTERSETTINGS:
1927 rIDSA.
set(aSettingId, !rIDSA.
get(aSettingId));
1934 case SID_FM_CTL_PROPERTIES:
1949 if (pDlg->Execute() ==
RET_OK)
1951 pFieldBM->Invalidate();
1956 else if ( pFieldBM && pFieldBM->GetFieldname() ==
ODF_FORMDATE )
1961 if (pDlg->Execute() ==
RET_OK)
1976 case SID_FM_TRANSLATE:
1978#if !ENABLE_WASM_STRIP_EXTRA
1979 const SfxPoolItem* pTargetLangStringItem =
nullptr;
1980 if (pArgs && SfxItemState::SET == pArgs->
GetItemState(SID_ATTR_TARGETLANG_STR,
false, &pTargetLangStringItem))
1984 if (!oDeeplAPIUrl || oDeeplAPIUrl->isEmpty() || !oDeeplKey || oDeeplKey->isEmpty())
1986 SAL_WARN(
"sw.ui",
"SID_FM_TRANSLATE: API options are not set");
1989 const OString aAPIUrl =
OUStringToOString(rtl::Concat2View(*oDeeplAPIUrl +
"?tag_handling=html"), RTL_TEXTENCODING_UTF8).trim();
1990 const OString aAuthKey =
OUStringToOString(*oDeeplKey, RTL_TEXTENCODING_UTF8).trim();
1999 std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController());
2005 case SID_SPELLCHECK_IGNORE:
2012 case SID_SPELLCHECK_IGNORE_ALL:
2014 OUString sApplyText;
2019 if(sApplyText ==
"Grammar")
2021 linguistic2::ProofreadingResult aGrammarCheckRes;
2022 sal_Int32 nErrorInResult = -1;
2023 uno::Sequence< OUString > aSuggestions;
2024 sal_Int32 nErrorPosInText = -1;
2026 bool bCorrectionRes = rWrtSh.
GetGrammarCorrection( aGrammarCheckRes, nErrorPosInText, nErrorInResult, aSuggestions,
nullptr, aToFill );
2031 aGrammarCheckRes.xProofreader->ignoreRule(
2032 aGrammarCheckRes.aErrors[ nErrorInResult ].aRuleIdentifier,
2033 aGrammarCheckRes.aLocale );
2038 if (xDictionary.is())
2041 xDictionary->setActive(
false);
2042 xDictionary->setActive(
true);
2045 catch(
const uno::Exception& )
2050 else if (sApplyText ==
"Spelling")
2053 uno::Reference<linguistic2::XSpellAlternatives> xSpellAlt(rWrtSh.
GetCorrection(
nullptr, aToFill));
2054 if (!xSpellAlt.is())
2057 OUString sWord(xSpellAlt->getWord());
2059 sWord,
false, OUString() );
2067 case SID_SPELLCHECK_APPLY_SUGGESTION:
2069 OUString sApplyText;
2074 static constexpr OUStringLiteral sSpellingRule(
u"Spelling_");
2075 static constexpr OUStringLiteral sGrammarRule(
u"Grammar_");
2077 bool bGrammar =
false;
2079 uno::Reference< linguistic2::XSpellAlternatives > xSpellAlt;
2080 if(-1 != (
nPos = sApplyText.indexOf( sGrammarRule )))
2082 sApplyText = sApplyText.replaceAt(
nPos, sGrammarRule.getLength(),
u"");
2085 else if (-1 != (
nPos = sApplyText.indexOf( sSpellingRule )))
2087 sApplyText = sApplyText.replaceAt(
nPos, sSpellingRule.getLength(),
u"");
2093 if (!bGrammar && !xSpellAlt.is())
2099 OUString aTmp( sApplyText );
2100 OUString aOrig( bGrammar ? OUString() : xSpellAlt->getWord() );
2104 if (!aTmp.isEmpty() && !aOrig.isEmpty() &&
2105 aOrig.endsWith(
".") &&
2106 !aTmp.endsWith(
"."))
2118 OUString aTmpStr =
SwResId(STR_START_QUOTE) +
2119 aTmp +
SwResId(STR_END_QUOTE);
2131 sal_Int32 nCommentPos(pPaM->GetText().indexOf(OUStringChar(
CH_TXTATR_INWORD)));
2132 if ( nCommentPos > -1 )
2136 pPaM->GetPoint()->AdjustContent(nCommentPos + 1);
2137 rWrtSh.
Replace(OUString(),
false);
2139 pPaM->GetPoint()->AdjustContent(-(nCommentPos + 1));
2140 pPaM->GetMark()->AdjustContent(-1);
2153 OSL_ENSURE(
false,
"wrong dispatcher");
2173 case SID_LANGUAGE_STATUS:
2176 OUString aScriptTypesInUse( OUString::number(
static_cast<int>(rSh.
GetScriptType()) ) );
2179 OUString aKeyboardLang;
2186 OUString aCurrentLang =
"*";
2195 aCurrentLang +=
";-";
2205 uno::Sequence< OUString >
aSeq{ aCurrentLang,
2225 const sal_Int16 nWordType = ::i18n::WordType::DICTIONARY_WORD;
2227 if (bValid && bWord)
2232 const lang::Locale& aLocale( aLanguageTag.
getLocale());
2235 uno::Reference< linguistic2::XThesaurus > xThes(
::GetThesaurus() );
2236 if (aText.isEmpty() ||
2242 OUString aStatusVal = aText +
"#" + aLanguageTag.
getBcp47();
2258 case SID_CHARMAP_CONTROL:
2327 case SID_DEC_INDENT:
2328 case SID_INC_INDENT:
2336 if ( ( nLevel == (
MAXLEVEL - 1 ) && nWhich == SID_INC_INDENT )
2337 || ( nLevel == 0 && nWhich == SID_DEC_INDENT ) )
2367 case SID_ATTR_CHAR_COLOR2:
2372 rSet.
Put( aColorItem.CloneSetWhich(SID_ATTR_CHAR_COLOR2) );
2375 case SID_ATTR_CHAR_BACK_COLOR:
2376 case SID_ATTR_CHAR_COLOR_BACKGROUND:
2393 case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
2397 const sal_uInt32 nColWhich = pApply ? pApply->
nColor : 0;
2398 const bool bUseTemplate = nColWhich == SID_ATTR_CHAR_BACK_COLOR
2399 || nColWhich == SID_ATTR_CHAR_COLOR_BACKGROUND;
2403 case SID_ATTR_CHAR_COLOR_EXT:
2419 case FN_INSERT_BREAK:
2440 bool bState =
false;
2441 bool bAllState =
true;
2442 bool bIsPhysical =
false;
2444 OUString aStyleName;
2445 std::vector<OUString> aList;
2446 static constexpr OUStringLiteral sPhysical(
u"IsPhysical");
2447 static constexpr OUStringLiteral
sDisplay(
u"DisplayName");
2448 const OUString sHeaderOn(nWhich ==
FN_INSERT_PAGEHEADER ? OUString(
"HeaderIsOn") : OUString(
"FooterIsOn"));
2450 uno::Reference< XStyleFamiliesSupplier > xSupplier(
GetView().GetDocShell()->GetBaseModel(), uno::UNO_QUERY);
2453 uno::Reference< XNameContainer > xContainer;
2454 uno::Reference< XNameAccess > xFamilies = xSupplier->getStyleFamilies();
2455 if (xFamilies->getByName(
"PageStyles") >>= xContainer)
2457 const uno::Sequence< OUString > aSeqNames = xContainer->getElementNames();
2458 for (
const auto& rName : aSeqNames)
2461 uno::Reference<XPropertySet> xPropSet(xContainer->getByName(aStyleName), uno::UNO_QUERY);
2462 if (xPropSet.is() && (xPropSet->getPropertyValue(sPhysical) >>= bIsPhysical) && bIsPhysical)
2464 xPropSet->getPropertyValue(
sDisplay) >>= aStyleName;
2465 if ((xPropSet->getPropertyValue(sHeaderOn)>>= bState) && bState)
2466 aList.push_back(aStyleName);
2471 bAllState &= bState;
2474 bIsPhysical =
false;
2479 if (bAllState && aList.size() > 1)
2480 aList.push_back(
"_ALL_");
2496 case SID_RUBY_DIALOG:
2509 case SID_FM_TRANSLATE:
2511#if !ENABLE_WASM_STRIP_EXTRA
2520 if (!oDeeplAPIUrl || oDeeplAPIUrl->isEmpty() || !oDeeplKey || oDeeplKey->isEmpty())
2528 case SID_HYPERLINK_DIALOG:
2530 || ( !
GetView().GetViewFrame().HasChildWindow(nWhich)
2542 case SID_EDIT_HYPERLINK:
2552 case SID_REMOVE_HYPERLINK:
2566 case SID_TRANSLITERATE_HALFWIDTH:
2567 case SID_TRANSLITERATE_FULLWIDTH:
2568 case SID_TRANSLITERATE_HIRAGANA:
2569 case SID_TRANSLITERATE_KATAKANA:
2592 case SID_COPY_HYPERLINK_LOCATION:
2593 case SID_OPEN_HYPERLINK:
2598 bool bAuthorityFieldURL =
false;
2602 const auto& rAuthorityField = *
static_cast<const SwAuthorityField*
>(pField);
2603 if (
auto targetType = rAuthorityField.GetTargetType();
2604 targetType == SwAuthorityField::TargetType::UseDisplayURL
2605 || targetType == SwAuthorityField::TargetType::UseTargetURL)
2608 bAuthorityFieldURL = rAuthorityField.
GetAbsoluteURL().getLength() > 0;
2612 && !bAuthorityFieldURL)
2618 if (GetLocalURL(rSh).isEmpty())
2624 case SID_OPEN_SMARTTAGMENU:
2626 std::vector< OUString > aSmartTagTypes;
2627 uno::Sequence< uno::Reference< container::XStringKeyMap > > aStringKeyMaps;
2628 uno::Reference<text::XTextRange> xRange;
2632 if ( xRange.is() && !aSmartTagTypes.empty() )
2634 uno::Sequence < uno::Sequence< uno::Reference< smarttags::XSmartTagAction > > > aActionComponentsSequence;
2635 uno::Sequence < uno::Sequence< sal_Int32 > > aActionIndicesSequence;
2639 aActionComponentsSequence,
2640 aActionIndicesSequence );
2645 const OUString aRangeText = xRange->getString();
2648 aActionComponentsSequence,
2649 aActionIndicesSequence,
2664 case FN_NUM_NUMBERING_ON:
2668 case FN_NUM_BULLET_ON:
2677 case FN_SVX_SET_OUTLINE:
2679 NBOTypeMgrBase* pOutline = NBOutlineTypeMgrFact::CreateInstance(NBOType::Outline);
2681 if (pOutline && pCurRule)
2683 SvxNumRule aSvxRule = pCurRule->MakeSvxNumRule();
2689 case FN_BUL_NUM_RULE_INDEX:
2690 case FN_NUM_NUM_RULE_INDEX:
2691 case FN_OUTLINE_RULE_INDEX:
2699 nActNumLvl = 1<<nActNumLvl;
2706 NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(NBOType::Bullets);
2712 }
else if (
GetShell().HasNumber() )
2716 NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(NBOType::Numbering);
2724 if ( nWhich == FN_OUTLINE_RULE_INDEX )
2727 NBOTypeMgrBase* pOutline = NBOutlineTypeMgrFact::CreateInstance(NBOType::Outline);
2752 case SID_INSERT_RLM :
2753 case SID_INSERT_LRM :
2761 case SID_FM_CTL_PROPERTIES:
2763 bool bDisable =
false;
2770 if(SfxItemState::DISABLED == aSet.
GetItemState(SID_FM_CTL_PROPERTIES))
2811 if (!
GetShell().CursorInsideContentControl())
@ TABS_RELATIVE_TO_INDENT
SfxApplication * SfxGetpApp()
static void EndUndo(SwWrtShell &rSh)
sal_uInt16 GetValue() const
const OUString & GetValue() const
Text operation/manipulation interface.
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
virtual bool InsertString(const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0
Insert string into existing text node at position rRg.Point().
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
Provides access to the marks of a document.
virtual bool renameMark(::sw::mark::IMark *io_pMark, const OUString &rNewName)=0
Renames an existing Mark, if possible.
virtual const_iterator_t getBookmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
virtual sw::mark::IFieldmark * getInnerFieldmarkFor(const SwPosition &pos) const =0
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
virtual void assureSortedMarkContainers() const =0
virtual std::unique_ptr< ILazyDeleter > deleteMark(const IDocumentMarkAccess::const_iterator_t &ppMark, bool isMoveNodes)=0
Deletes a mark.
virtual const_iterator_t getAllMarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of marks.
static SW_DLLPUBLIC MarkType GetType(const ::sw::mark::IMark &rMark)
Returns the MarkType used to create the mark.
virtual const_iterator_t getBookmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of IBookmarks.
virtual sw::mark::IMark * getOneInnermostBookmarkFor(const SwPosition &rPos) const =0
Get the innermost bookmark that contains rPos.
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
const OUString & getBcp47(bool bResolveSystem=true) const
static css::uno::Reference< css::linguistic2::XDictionary > GetIgnoreAllList()
OUString const & GetName() const
XBitmapListRef GetBitmapList() const
XGradientListRef GetGradientList() const
XPatternListRef GetPatternList() const
XColorListRef GetColorList() const
XHatchListRef GetHatchList() const
static void MigrateItemSet(const SfxItemSet *pSourceSet, SfxItemSet *pDestSet, SdrModel *pNewModel)
static SfxAbstractDialogFactory * Create()
void SetVisibleState(sal_uInt16 nId, bool bShow)
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
void InvalidateAll(bool bWithMsg)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
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
void DisableItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
sal_uInt16 GetModifier() const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
static void HandleOpenXmlFilterSettings(SfxRequest &)
virtual SfxObjectShell * GetObjectShell()
static SfxInterface * GetStaticInterface()
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
void SetStringList(const css::uno::Sequence< OUString > &rList)
const css::uno::Any & GetValue() const
void ToggleChildWindow(sal_uInt16)
SfxBindings & GetBindings()
bool HasChildWindow(sal_uInt16)
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
weld::Window * GetFrameWeld() const
css::uno::Reference< css::frame::XController > GetController() const
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
const OUString & GetApplicationName() const
void GetActionSequences(std::vector< OUString > &rSmartTagTypes, css::uno::Sequence< css::uno::Sequence< css::uno::Reference< css::smarttags::XSmartTagAction > > > &rActionComponentsSequence, css::uno::Sequence< css::uno::Sequence< sal_Int32 > > &rActionIndicesSequence) const
static bool IsCTLFontEnabled()
static OUString GetLanguageString(const LanguageType eType)
bool IsAutoFormatByInput() const
static SvxAutoCorrCfg & Get()
void SetAutoFormatByInput(bool bSet)
const Color & GetColor() const
const model::ComplexColor & getComplexColor() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void SetAutoFirst(const bool bNew)
sal_uInt16 GetPropLeft() const
sal_uInt16 GetPropRight() const
short GetTextFirstLineOffset() const
tools::Long GetRight() const
tools::Long GetTextLeft() const
sal_uInt16 GetPropTextFirstLineOffset() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
virtual VclPtr< VclAbstractDialog > CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IDateFieldmark *pDateField, SwDoc &rDoc)=0
virtual VclPtr< VclAbstractDialog > CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh, OUString const *pSelected)=0
virtual std::shared_ptr< AbstractSwTranslateLangSelectDlg > CreateSwTranslateLangSelectDlg(weld::Window *pParent, SwWrtShell &rSh)=0
virtual VclPtr< AbstractSwModalRedlineAcceptDlg > CreateSwModalRedlineAcceptDlg(weld::Window *pParent)=0
virtual VclPtr< AbstractInsFootNoteDlg > CreateInsFootNoteDlg(weld::Window *pParent, SwWrtShell &rSh, bool bEd=false)=0
virtual VclPtr< VclAbstractDialog > CreateDropDownFormFieldDialog(weld::Widget *pParent, sw::mark::IFieldmark *pDropDownField)=0
virtual VclPtr< SfxAbstractTabDialog > CreateSwParaDlg(weld::Window *pParent, SwView &rVw, const SfxItemSet &rCoreSet, bool bDraw, const OUString &sDefPage={})=0
virtual std::shared_ptr< AbstractSwBreakDlg > CreateSwBreakDlg(weld::Window *pParent, SwWrtShell &rSh)=0
virtual VclPtr< SfxAbstractTabDialog > CreateSwCharDlg(weld::Window *pParent, SwView &pVw, const SfxItemSet &rCoreSet, SwCharDlgMode nDialogMode, const OUString *pFormatStr=nullptr)=0
virtual VclPtr< VclAbstractDialog > CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh)=0
static SwAbstractDialogFactory * Create()
OUString const & GetAuthorField(ToxAuthorityField ePos) const
Represents an inserted bibliography entry, created using Insert -> Table of Contents and Index -> Bib...
OUString GetAbsoluteURL() const
Returns absolute target URL in case there is one (GetTargetType() should be checked).
static std::shared_ptr< std::vector< std::unique_ptr< SwPaM > > > CopyPaMRing(SwPaM &rOrig)
void ExtendedSelectAll(bool bFootnotes=true)
SAL_DLLPRIVATE void UpdateCursor(sal_uInt16 eFlags=SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE, bool bIdleEnd=false)
OUString GetCursorDescr() const
Returns textual description of the current selection.
void Push()
store a copy of the current cursor on the cursor stack
bool IsSelOnePara() const
bool EndAllTableBoxEdit()
const SwTableNode * IsCursorInTable() const
Check if Point of current cursor is placed within a table.
bool IsInWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
bool IsMultiSelection() const
::sw::mark::IMark * SetBookmark(const vcl::KeyCode &, const OUString &rName, IDocumentMarkAccess::MarkType eMark=IDocumentMarkAccess::MarkType::BOOKMARK)
void GetSmartTagTerm(std::vector< OUString > &rSmartTagTypes, css::uno::Sequence< css::uno::Reference< css::container::XStringKeyMap > > &rStringKeyMaps, css::uno::Reference< css::text::XTextRange > &rRange) const
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 ExtendSelection(bool bEnd=true, sal_Int32 nCount=1)
extend current SSelection by n characters
bool CursorInsideInputField() const
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
bool IsEndWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
bool IsSelFullPara() const
void EndAction(const bool bIdleEnd=false)
bool GotoFootnoteText()
jump from content to footnote
SwTextContentControl * CursorInsideContentControl() const
bool HasReadonlySel(bool isReplace=false) const
bool IsStartWord(sal_Int16 nWordType=css::i18n::WordType::ANYWORD_IGNOREWHITESPACES) const
bool IsCursorInFootnote() const
sal_Unicode GetChar(bool bEnd=true, tools::Long nOffset=0)
get the nth character of the current SSelection
SwDoc * GetDoc()
returns Doc. But be careful!
SwSectionFormats & GetSections()
void DeleteFormatRefMark(const SwFormatRefMark *pFormatRefMark)
sal_uInt16 GetRefMarks(std::vector< OUString > *=nullptr) const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentMarkAccess * getIDocumentMarkAccess()
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr, bool const bPreventLinkUpdate=false)
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void UpdateTable()
update fields of a listing
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
void StartAllAction()
For all views of this document.
sal_uInt16 GetScalingOfSelectedText() const
void AutoFormat(const SvxSwAutoFormatFlags *pAFlags)
Set our styles according to the respective rules.
bool GetGrammarCorrection(css::linguistic2::ProofreadingResult &rResult, sal_Int32 &rErrorPosInText, sal_Int32 &rErrorIndexInResult, css::uno::Sequence< OUString > &rSuggestions, const Point *pPt, SwRect &rSelectRect)
bool IsMoveLeftMargin(bool bRight, bool bModulus=true) const
Adjust left margin via object bar (similar to adjustment of numerations).
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
sal_uInt16 GetNodeNumStart(SwPaM *pPaM) const
void SetNumRuleStart(bool bFlag, SwPaM *pCursor)
Set (and query if) a numbering with StartFlag starts at current PointPos.
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)
SwFrameFormat * GetTableFormat()
SvNumberFormatter * GetNumberFormatter()
Query NumberFormatter from document.
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in document.
void Insert2(const OUString &, const bool bForceExpandHints=false)
void SetNodeNumStart(sal_uInt16 nStt)
const SwSection * GetCurrSection() const
bool SelectionHasNumber() const
void SetCurNumRule(const SwNumRule &, const bool bCreateNewList, const OUString &sContinuedListId=OUString(), const bool bResetIndentAttrs=false)
Optional parameter <bResetIndentAttrs> (default value false).
void SetTableBoxFormulaAttrs(const SfxItemSet &rSet)
bool IsNumRuleStart(SwPaM *pPaM=nullptr) const
bool DontExpandFormat()
If Cursor is at the end of a character style in which the DontExpand-flag is not yet set,...
SvtScriptType GetScriptType() const
returns the script type of the selection
bool SelectionHasBullet() const
bool MoveParagraph(SwNodeOffset nOffset=SwNodeOffset(1))
sal_uInt8 GetNumLevel() const
bool GetPaMAttr(SwPaM *pPaM, SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Apply / remove attributes.
css::uno::Reference< css::linguistic2::XSpellAlternatives > GetCorrection(const Point *pPt, SwRect &rSelectRect)
Get a list of potential corrections for misspelled word.
const SwNumRule * GetNumRuleAtCurrentSelection() const
Returns the numbering rule found at the paragraphs of the current selection, if all paragraphs of the...
const SwNumRule * GetNumRuleAtCurrCursorPos() const
static void IgnoreGrammarErrorAt(SwPaM &rErrorPosition)
void ReplaceDropText(const OUString &rStr, SwPaM *pPaM=nullptr)
SwTextFormatColl * GetPaMTextFormatColl(SwPaM *pPaM) const
Get the named paragraph format of the selection(s) described by a SwPaM.
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
void NumUpDown(bool bDown=true)
bool Replace(const OUString &rNewStr, bool bRegExpRplc)
Replace a selected range in a TextNode by given string.
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
OUString GetCurWord() const
request current word
void ResetAttr(const o3tl::sorted_vector< sal_uInt16 > &attrs=o3tl::sorted_vector< sal_uInt16 >(), SwPaM *pCursor=nullptr)
void MoveLeftMargin(bool bRight, bool bModulus=true)
LanguageType GetCurLang() const
const SwNumRule * SearchNumRule(const bool bNum, OUString &sListId)
Searches for a text node with a numbering rule.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
void SetWaterCanTextColor(const Color &rCol)
void SetApplyTemplate(const SwApplyTemplate &)
Apply template.
void SetWaterCanTextBackColor(const Color &rCol)
SwApplyTemplate * GetApplyTemplate() const
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
void UnProtectTables()
Unprotect all tables in selection.
void UpdateCurField(sal_uInt32 nFormat, const OUString &rPar1, const OUString &rPar2, std::unique_ptr< SwField > _pField=nullptr)
SwFieldTypesEnum GetCurTypeId() const
bool InsertField(SwInsertField_Data &rData)
Base class of all fields.
SwFieldTypesEnum GetTypeId() const
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
SwFieldType * GetTyp() const
Content, content of frame (header, footer, fly).
const SwNodeIndex * GetContentIdx() const
Marks a node in the document model.
SvxNumRule MakeSvxNumRule() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
void Normalize(bool bPointFirst=true)
Normalizes PaM, i.e.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * GetPoint() const
Of course Writer needs its own rectangles.
void AddRule(SwUndoArg eWhat, const OUString &rWith)
static SwSmartTagMgr & Get()
Represents the style of a paragraph.
void InsertSymbol(SfxRequest &)
void GetState(SfxItemSet &)
void Execute(SfxRequest &)
void push_back(Value const &rVal)
bool IsSelectionInReadonly() const
bool IsViewLocked() const
const SwViewOption * GetViewOptions() const
void SetReadonlySelectionOption(bool bSet)
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
void InvalidateWindows(const SwRect &rRect)
const SfxItemPool & GetAttrPool() const
static void SetActMark(sal_Int32 nSet)
virtual FmFormShell * GetFormShell() override
void ExecuteInsertDoc(SfxRequest &rRequest, const SfxPoolItem *pItem)
const tools::Rectangle & GetVisArea() const
void ExecNumberingOutline(SfxItemPool &)
OUString GetThesaurusLookUpText(bool bSelection) const
SwDocShell * GetDocShell()
void UpdateWordCount(SfxShell *, sal_uInt16)
void ExecFormatFootnote()
void InsertThesaurusSynonym(const OUString &rSynonmText, const OUString &rLookUpText, bool bValidSelection)
Used by the UI to modify the document model.
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
void InsertLineBreak(std::optional< SwLineBreakClear > oClear=std::nullopt)
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
bool SttPara(bool bSelect=false)
void Insert(const OUString &)
void SetInsMode(bool bOn=true)
SelectionType GetSelectionType() const
void EndPara(bool bSelect=false)
void InsertFootnote(const OUString &, bool bEndNote=false, bool bEdit=true)
virtual void InfoReadOnlyDialog(bool bAsync) const override
Selected area has readonly content.
void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning)
bool DelRight(bool isReplaceHeuristic=false)
void AutoCorrect(SvxAutoCorrect &rACorr, sal_Unicode cChar)
bool HasSelection() const
void InsertPageBreak(const OUString *pPageDesc=nullptr, const ::std::optional< sal_uInt16 > &rPgNum=std::nullopt)
bool EndOfSection(bool bSelect=false)
tools::Long ResetSelect(const Point *, bool)
bool SelWrd(const Point *=nullptr)
void ClickToINetAttr(const SwFormatINetFormat &rItem, LoadUrlFlags nFilter=LoadUrlFlags::NONE)
bool SelectTextAttr(sal_uInt16 nWhich, const SwTextAttr *pAttr=nullptr)
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
const SwView & GetView() const
OUString ReplacementString()
bool AllowMoreInput(sal_Unicode uChar)
OUString StringToReplace()
sal_uInt32 CharsToDelete()
void reset(reference_type *pBody)
const basegfx::BGradient & GetGradientValue() const
const XHatch & GetHatchValue() const
std::pair< const_iterator, bool > insert(Value &&x)
Fieldmark representing a date form field.
void Invalidate() override
LanguageType GetInputLanguage() const
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard()
static void CopyStringTo(const OUString &rContent, const css::uno::Reference< css::datatransfer::clipboard::XClipboard > &rxClipboard, const vcl::ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
#define FN_INSERT_FOOTNOTE
#define FN_DELETE_BOOKMARKS
#define FN_FORMAT_DROPCAPS
#define FN_INSERT_BOOKMARK
#define FN_INSERT_BREAK_DLG
#define FN_NUM_BULLET_MOVEUP
#define FN_GOTO_REFERENCE
#define FN_AUTOFORMAT_APPLY
#define FN_NUM_BULLET_OFF
#define FN_INSERT_FOOTNOTE_DLG
#define FN_OPEN_LOCAL_URL
#define FN_FORMAT_APPLY_HEAD3
#define FN_UPDATE_BOOKMARK
#define FN_FORMAT_LINENUMBER
#define FN_CONTENT_CONTROL_PROPERTIES
#define FN_UPDATE_SECTIONS
#define FN_FORMAT_APPLY_HEAD1
#define FN_DROP_CHAR_STYLE_NAME
#define FN_INSERT_PAGEHEADER
#define FN_READONLY_SELECTION_MODE
#define FN_TABLE_SORT_DIALOG
#define FN_FORMAT_FOOTNOTE_DLG
#define FN_FORMAT_APPLY_TEXTBODY
#define FN_AUTOFORMAT_AUTO
#define FN_UPDATE_BOOKMARKS
#define FN_EXPAND_GLOSSARY
#define FN_PARAM_MOVE_COUNT
#define FN_INSERT_ENDNOTE
#define FN_INSERT_HYPERLINK
#define FN_AUTOFORMAT_REDLINE_APPLY
#define FN_DEC_INDENT_OFFSET
#define FN_PARAM_MOVE_SELECTION
#define FN_INSERT_GLOSSARY
#define FN_INSERT_PAGEBREAK
#define FN_NUMBER_NEWSTART
#define FN_NUMBER_NEWSTART_AT
#define FN_PARAM_SELECTION
#define FN_FORMAT_APPLY_DEFAULT
#define FN_NUMBERING_OUTLINE_DLG
#define FN_WORDCOUNT_DIALOG
#define FN_PROTECT_FIELDS
#define FN_FORMAT_APPLY_HEAD2
#define FN_INSERT_COLUMN_BREAK
#define FN_DELETE_SECTIONS
#define FN_TABLE_UNSET_READ_ONLY
#define FN_INSERT_PAGEFOOTER
#define FN_FORMAT_CURRENT_FOOTNOTE_DLG
#define FN_SELECTION_MODE_BLOCK
#define FN_REDLINE_ACCEPT
#define FN_NUM_BULLET_MOVEDOWN
#define FN_SELECTION_MODE_DEFAULT
#define FN_PROTECT_BOOKMARKS
#define FN_INC_INDENT_OFFSET
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
FrameTypeFlags
values can be combined via logical or
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr sal_uInt16 RES_UNKNOWNATR_END(160)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
const LanguageTag & GetAppLanguageTag()
constexpr sal_uInt16 KEY_MOD1
#define LANGUAGE_DONTKNOW
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
bool IsChangeCaseMapEnabled()
LanguageType GetCurrentLanguage(SfxItemSet const &aSet, SvtScriptType nScriptType)
void SetLanguage_None(SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet)
void ResetLanguages(SwWrtShell &rWrtSh, OutlinerView const *pOLV=nullptr)
void SelectCurrentPara(SwWrtShell &rWrtSh)
void SetLanguage(SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
OUString GetTextForLanguageGuessing(EditEngine const *rEditEngine, const ESelection &rDocSelection)
SW_DLLPUBLIC void PasteHTMLToPaM(SwWrtShell &rWrtSh, SwPaM *pCursor, const OString &rData)
SW_DLLPUBLIC void TranslateDocument(SwWrtShell &rWrtSh, const TranslateAPIConfig &rConfig)
DictionaryError AddEntryToDic(uno::Reference< XDictionary > const &rxDic, const OUString &rWord, bool bIsNeg, const OUString &rRplcTxt, bool bStripDot)
const SwGetSetExpType GSE_FORMULA
Formula.
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
HashMap_OWString_Interface aMap
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
constexpr OUStringLiteral ODF_FORMDATE
constexpr OUStringLiteral ODF_FORMDROPDOWN
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
static LanguageType nLang
Marks a position in the document model.
sal_Int32 GetContentIndex() const
void AdjustContent(sal_Int32 nDelta)
Adjust content index, only valid to call this if the position points to a SwContentNode subclass.
std::function< void(sal_Int32)> maEndDialogFn
Reference< XController > xController
OUString SwResId(TranslateId aId)
uno::Reference< linguistic2::XThesaurus > GetThesaurus()
constexpr sal_uInt8 MAXLEVEL
static void sw_ParagraphDialogResult(SfxItemSet *pSet, SwWrtShell &rWrtSh, SfxRequest &rReq, SwPaM *pPaM)
static void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, bool bApplyToParagraph, sal_uInt16 nSlot, const SfxItemSet *pArgs, SfxRequest *pReq)
static void sw_CharDialogResult(const SfxItemSet *pSet, SwWrtShell &rWrtSh, std::shared_ptr< SfxItemSet > const &pCoreSet, bool bSel, bool bSelectionPut, bool bApplyToParagraph, SfxRequest *pReq)
short SvxDicError(weld::Window *pParent, linguistic::DictionaryError nError)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
void LoadURL(SwViewShell &rVSh, const OUString &rURL, LoadUrlFlags nFilter, const OUString &rTargetFrameName)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)