20#include <config_features.h>
21#include <config_fuzzers.h>
87#include <ThemeColorChanger.hxx>
92#include <GraphicSizeCheck.hxx>
95#include <com/sun/star/gallery/GalleryItemType.hpp>
96#include <com/sun/star/beans/PropertyValues.hpp>
103#include <osl/diagnose.h>
112#include <UndoManager.hxx>
133#define ShellClass_SwBaseShell
135#include <swslots.hxx>
137#include <AccessibilityCheck.hxx>
163 GetStaticInterface()->RegisterChildWindow(SvxIMapDlgChildWindow::GetChildWindowId());
164 GetStaticInterface()->RegisterChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
165 GetStaticInterface()->RegisterChildWindow(DevelopmentToolChildWindow::GetChildWindowId());
172 void* pEditObj = GraphicType::NONE != nGrfType && GraphicType::Default != nGrfType
181 aGrf, rURL.
GetMap(), &aList, pEditObj );
188 bool bRet = GraphicType::NONE != nGrfType && GraphicType::Default != nGrfType;
198 pDlg->
Update(aGraf, !aGrfName.isEmpty(),
285 OSL_FAIL(
"wrong Dispatcher");
301 bool bIgnore =
false;
355 RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA;
359 bool bIgnoreComments =
false;
362 bIgnoreComments = pIgnoreComments->
GetValue();
367 pView->AttrChangedNotify(
nullptr);
377 case SID_CLIPBOARD_FORMAT_ITEMS:
381 if( pArgs && SfxItemState::SET == pArgs->
GetItemState(
nId,
false, &pFormat ) )
401 pView->AttrChangedNotify(
nullptr);
410 case SID_PASTE_UNFORMATTED:
425 uno::Reference< frame::XDispatchRecorder > xRecorder =
428 SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS);
429 aReq.
AppendItem(
SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS,
static_cast<sal_uInt32
>(SotClipboardFormatId::STRING) ) );
436 pView->AttrChangedNotify(
nullptr);
446 case SID_PASTE_SPECIAL:
448 std::shared_ptr<TransferableDataHelper> aDataHelper =
451 if( aDataHelper->GetXTransferable().is()
463 pDlg->PreGetFormat(*aDataHelper);
466 pDlg->StartExecuteAsync([aDataHelper, pDlg, &rSh,
this](sal_Int32 nResult){
475 if( nFormatId != SotClipboardFormatId::NONE )
481 uno::Reference< frame::XDispatchRecorder > xRecorder =
484 SfxRequest aReq(rViewFrame, SID_CLIPBOARD_FORMAT_ITEMS);
485 aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) );
492 pView->AttrChangedNotify(
nullptr);
508 OSL_FAIL(
"wrong Dispatcher");
546 || !
GetView().IsPasteSpecialAllowed()
556 if( !
GetView().IsPasteAllowed() )
562 case SID_PASTE_SPECIAL:
563 if( !
GetView().IsPasteSpecialAllowed()
570 case SID_PASTE_UNFORMATTED:
571 if( !
GetView().IsPasteSpecialAllowed() )
577 case SID_CLIPBOARD_FORMAT_ITEMS:
605 if( pArgs && SfxItemState::SET == pArgs->
GetItemState(
nId,
false, &pItem ))
610 bool bRepair =
false;
612 if (pArgs && (pRepairItem = pArgs->
GetItemIfSet(SID_REPAIRPACKAGE,
false)))
619 bool bWasRepair = rUndoRedo.DoesRepair();
620 rUndoRedo.DoRepair(bRepair);
623 rUndoRedo.DoRepair(bWasRepair);
629 if (rUndoRedo.GetLastUndoInfo(
nullptr, &nUndoId, &rWrtShell.
GetView()))
634 sal_uInt16 nUndoOffset = 0;
641 sal_uInt16 nOffset = 0;
647 nUndoOffset += nOffset;
654 rShell.UnlockPaint();
660 rUndoRedo.ClearRedo();
665 if (rUndoRedo.GetFirstRedoInfo(
nullptr, &nUndoId, &rWrtShell.
GetView()))
671 rShell.UnlockPaint();
679 OSL_FAIL(
"wrong Dispatcher");
750 case SID_GETUNDOSTRINGS:
761 case SID_GETREDOSTRINGS:
783 if (!pTypeName || pTypeName->
GetValue() !=
"SetRef")
794 const OUString& rNamePrefix = pNamePrefix->
GetValue();
801 uno::Sequence<beans::PropertyValues> aFields;
808 std::vector<const SwFormatRefMark*> aRefMarks;
815 std::sort(aRefMarks.begin(), aRefMarks.end(),
817 const SwTextRefMark* pTextRefMark1 = pMark1->GetTextRefMark();
818 const SwTextRefMark* pTextRefMark2 = pMark2->GetTextRefMark();
819 SwPosition aPos1(pTextRefMark1->GetTextNode(), pTextRefMark1->GetStart());
820 SwPosition aPos2(pTextRefMark2->GetTextNode(), pTextRefMark2->GetStart());
821 return aPos1 < aPos2;
824 sal_uInt16 nFieldIndex = 0;
825 for (
auto& pIntermediateRefMark : aRefMarks)
828 if (!pRefMark->GetRefName().startsWith(rNamePrefix))
833 if (nFieldIndex >= aFields.getLength())
838 auto aName =
aMap[
"Name"].get<OUString>();
839 pRefMark->GetRefName() =
aName;
841 OUString aContent =
aMap[
"Content"].get<OUString>();
842 auto pTextRefMark =
const_cast<SwTextRefMark*
>(pRefMark->GetTextRefMark());
843 if (!pTextRefMark->End())
852 pTextRefMark->SetDontExpand(
false);
861 *pCursorPos = aPasteEnd;
865 sal_Int32 nOldStart = pTextRefMark->GetStart();
866 sal_Int32 nNewStart = *pTextRefMark->End();
868 pTextRefMark->SetEnd(aPasteEnd.GetPoint()->GetContentIndex());
871 pTextRefMark->SetStart(nNewStart);
873 SwPaM aEndMarker(*aPasteEnd.GetPoint());
874 aEndMarker.SetMark();
875 aEndMarker.GetMark()->AdjustContent(1);
894 if (!pTypeName || pTypeName->
GetValue() !=
"SetRef")
905 const OUString& rNamePrefix = pNamePrefix->
GetValue();
912 uno::Sequence<beans::PropertyValue> aField;
917 std::vector<SwTextAttr*> aAttrs
924 auto& rRefmark =
const_cast<SwFormatRefMark&
>(aAttrs[0]->GetRefMark());
925 if (!rRefmark.GetRefName().startsWith(rNamePrefix))
936 [&rWrtSh, &aRewriter]
943 auto aName =
aMap[
"Name"].get<OUString>();
944 rRefmark.GetRefName() =
aName;
946 OUString aContent =
aMap[
"Content"].get<OUString>();
947 auto pTextRefMark =
const_cast<SwTextRefMark*
>(rRefmark.GetTextRefMark());
948 if (!pTextRefMark->End())
957 pTextRefMark->SetDontExpand(
false);
968 *pCursorPos = aPasteEnd;
972 sal_Int32 nOldStart = pTextRefMark->GetStart();
973 sal_Int32 nNewStart = *pTextRefMark->End();
975 pTextRefMark->SetEnd(aPasteEnd.GetPoint()->GetContentIndex());
978 pTextRefMark->SetStart(nNewStart);
980 SwPaM aEndMarker(*aPasteEnd.GetPoint());
981 aEndMarker.SetMark();
982 aEndMarker.GetMark()->AdjustContent(1);
1000 sal_uInt16 nSlot = rReq.
GetSlot();
1006 auto pDoc = comphelper::getFromUnoTunnel<SwXTextDocument>(
xModel);
1007 pDoc->NotifyRefreshListeners();
1013 if (UpdateFieldContents(rReq, rSh))
1022 rSh.SwViewShell::UpdateFields(
true);
1035 UpdateFieldContent(rReq, rSh);
1110 case FN_START_DOC_DIRECT:
1111 case FN_END_DOC_DIRECT:
1119 nSlot == FN_START_DOC_DIRECT ?
1133 GetView().AttrChangedNotify(
nullptr);
1137 case SID_GALLERY_FORMATS:
1139 const SvxGalleryItem* pGalleryItem = SfxItemSet::GetItem<SvxGalleryItem>(pArgs, SID_GALLERY_FORMATS,
false);
1140 if ( !pGalleryItem )
1147 nGalleryItemType == css::gallery::GalleryItemType::GRAPHIC )
1151 OUString aGrfName, aFltName;
1155 rSh.
ReRead( aGrfName, aFltName, &aGrf );
1162 nGalleryItemType == css::gallery::GalleryItemType::MEDIA )
1166 SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
1167 { &aMediaURLItem });
1187 nCount = pArgs->
Get(SID_ATTR_COLUMNS).GetValue();
1207 bool bToTable =
false;
1213 std::unique_ptr<SwTableAutoFormatTable> pAutoFormatTable;
1214 bool bDeleteFormat =
true;
1215 if(pArgs && SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_1,
true, &pItem))
1220 if(!sDelim.isEmpty())
1223 if(SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_2,
true, &pItem))
1228 pAutoFormatTable->Load();
1230 for( sal_uInt16
i = 0,
nCount = pAutoFormatTable->size();
i <
nCount;
i++ )
1233 if( pFormat->
GetName() == sAutoFormat )
1235 pTAFormat = pFormat;
1236 bDeleteFormat =
false;
1242 if(SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_3,
true, &pItem) &&
1246 if(SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_4,
true, &pItem))
1250 if(SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_5,
true, &pItem) &&
1254 if(SfxItemState::SET == pArgs->
GetItemState( FN_PARAM_6,
true, &pItem) &&
1262 if(
RET_OK == pDlg->Execute() )
1264 pDlg->GetValues(
cDelim, aInsTableOpts, pTAFormat );
1273 bool bInserted =
false;
1307 case SID_STYLE_WATERCAN:
1308 case SID_STYLE_UPDATE_BY_EXAMPLE:
1309 case SID_STYLE_NEW_BY_EXAMPLE:
1310 case SID_STYLE_APPLY:
1319 if ( SID_STYLE_WATERCAN == nSlot )
1334 case SID_CLASSIFICATION_APPLY:
1339 case SID_CLASSIFICATION_DIALOG:
1344 case SID_PARAGRAPH_SIGN_CLASSIFY_DLG:
1359 sal_uInt16
nId = SvxIMapDlgChildWindow::GetChildWindowId();
1404 case SID_CONTOUR_DLG:
1406 sal_uInt16
nId = SvxContourDlgChildWindow::GetChildWindowId();
1420 case SID_CONTOUR_EXEC:
1436 if ( aSur.
GetSurround() == css::text::WrapTextMode_NONE )
1437 aSur.
SetSurround( css::text::WrapTextMode_PARALLEL );
1464 ? RndStdIds::FLY_AT_PAGE
1466 ? RndStdIds::FLY_AT_PARA
1468 ? RndStdIds::FLY_AT_FLY
1470 ? RndStdIds::FLY_AS_CHAR
1471 : RndStdIds::FLY_AT_CHAR;
1483 const uno::Reference < embed::XEmbeddedObject > xObj( rSh.
GetOleRef() );
1484 const bool bDoMathBaselineAlignment = xObj.is() &&
SotExchange::IsMath( xObj->getClassID() )
1486 if (bDoMathBaselineAlignment)
1500 css::text::WrapTextMode eSurround = rSurround.
GetSurround();
1504 case RndStdIds::FLY_AT_FLY:
1505 case RndStdIds::FLY_AT_PAGE:
1507 if(eSurround != css::text::WrapTextMode_THROUGH)
1517 case RndStdIds::FLY_AT_PARA:
1519 if (eSurround != css::text::WrapTextMode_LEFT && eSurround != css::text::WrapTextMode_RIGHT)
1522 if( eVOrient != text::VertOrientation::TOP)
1525 if (eHOrient !=
text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT)
1529 case RndStdIds::FLY_AT_CHAR:
1531 if(eSurround != css::text::WrapTextMode_THROUGH)
1534 if( eVOrient != text::VertOrientation::TOP)
1537 if (eHOrient !=
text::HoriOrientation::NONE && eHOrient != text::HoriOrientation::LEFT && eHOrient != text::HoriOrientation::RIGHT)
1580 if (pArgs && pArgs->
GetItemState(nSlot,
true, &pItem) == SfxItemState::SET)
1584 bool bDesignMode = pBoolItem->GetValue();
1587 OSL_ENSURE(
GetView().GetFormShell() !=
nullptr,
"form shell?" );
1606 if(!bMore || !pArgs)
1616 case SID_ATTR_BRUSH:
1617 case SID_ATTR_BORDER_SHADOW:
1647 OSL_FAIL(
"not implemented");
1651 case SID_ATTR_BORDER_OUTER:
1674 OSL_FAIL(
"wrong Dispatcher");
1684 if (
CNT_GRF != rSh.SwEditShell::GetCntType())
1687 if (GraphicType::NONE == nGrfType || m_aGrfUpdateSlots.empty())
1692 for(
const auto nSlot : m_aGrfUpdateSlots )
1694 bool bSetState =
false;
1695 bool bState =
false;
1701 sal_uInt16
nId = SvxIMapDlgChildWindow::GetChildWindowId();
1707 if( pDlg && ( SID_IMAP_EXEC == nSlot ||
1708 ( SID_IMAP == nSlot && !bProtect)) &&
1712 if( !bProtect && SID_IMAP == nSlot )
1715 bState =
nullptr != pDlg;
1720 case SID_CONTOUR_DLG:
1723 sal_uInt16
nId = SvxContourDlgChildWindow::GetChildWindowId();
1733 bState =
nullptr != pDlg;
1749 case SID_GRFFILTER_INVERT:
1750 case SID_GRFFILTER_SMOOTH:
1751 case SID_GRFFILTER_SHARPEN:
1752 case SID_GRFFILTER_REMOVENOISE:
1753 case SID_GRFFILTER_SOBEL:
1754 case SID_GRFFILTER_MOSAIC:
1755 case SID_GRFFILTER_EMBOSS:
1756 case SID_GRFFILTER_POSTER:
1757 case SID_GRFFILTER_POPART:
1758 case SID_GRFFILTER_SEPIA:
1759 case SID_GRFFILTER_SOLARIZE:
1760 bSetState = bState = GraphicType::Bitmap == nGrfType;
1767 if( m_pGetStateSet )
1768 m_pGetStateSet->Put( aBool );
1773 m_aGrfUpdateSlots.clear();
1787 case SID_GALLERY_FORMATS:
1793 case SID_GALLERY_ENABLE_ADDCOPY:
1879 const sal_uInt16
nId = SvxIMapDlgChildWindow::GetChildWindowId();
1882 const bool bIsGraphicSelection =
1900 ( bIsGraphicSelection &&
1908 if ( bHas && bFrameSel )
1918 bool bDisable =
false;
1921 sal_uInt16
nId = SvxIMapDlgChildWindow::GetChildWindowId();
1950 case SID_CONTOUR_DLG:
1959 sal_uInt16
nId = SvxContourDlgChildWindow::GetChildWindowId();
1964 bool bDisable =
false;
1981 else if( bHas && bOk )
2000 case SID_CONTOUR_EXEC:
2002 bool bDisable =
false;
2006 sal_uInt16
nId = SvxContourDlgChildWindow::GetChildWindowId();
2007 if( !bDisable &&
GetView().GetViewFrame().HasChildWindow(
nId ))
2017 case SID_ANCHOR_MENU:
2037 (eSet == RndStdIds::FLY_AT_PAGE))
2039 (eSet == RndStdIds::FLY_AT_PARA))
2041 (eSet == RndStdIds::FLY_AT_FLY))
2043 (eSet == RndStdIds::FLY_AT_CHAR))
2045 (eSet == RndStdIds::FLY_AS_CHAR));
2049 else if(nWhich != SID_ANCHOR_MENU)
2095 bool bOpaque = rOpaque.GetValue();
2096 css::text::WrapTextMode nSurround = rWrap.
GetSurround();
2100 (nAnchorType == RndStdIds::UNKNOWN) || (nAnchorType == RndStdIds::FLY_AS_CHAR);
2101 const bool bHtmlMode =
2108 ( (nAnchorType != RndStdIds::FLY_AT_PARA)
2109 && (nAnchorType != RndStdIds::FLY_AT_CHAR)
2110 && (nAnchorType != RndStdIds::FLY_AT_PAGE));
2111 bSet = nSurround == css::text::WrapTextMode_NONE;
2114 bDisable |= bHtmlMode;
2115 bSet = nSurround == css::text::WrapTextMode_PARALLEL;
2118 bDisable |= bHtmlMode;
2119 bSet = nSurround == css::text::WrapTextMode_DYNAMIC;
2122 bDisable |= (bHtmlMode ||
2123 ( (nAnchorType != RndStdIds::FLY_AT_PARA)
2124 && (nAnchorType != RndStdIds::FLY_AT_CHAR)
2125 && (nAnchorType != RndStdIds::FLY_AT_PAGE)));
2127 bSet = nSurround == css::text::WrapTextMode_THROUGH && rSh.
GetLayerId();
2129 bSet = nSurround == css::text::WrapTextMode_THROUGH && bOpaque;
2133 bDisable |= bHtmlMode;
2135 bSet = nSurround == css::text::WrapTextMode_THROUGH && !rSh.
GetLayerId();
2137 bSet = nSurround == css::text::WrapTextMode_THROUGH && !bOpaque;
2140 bDisable |= bHtmlMode;
2142 bDisable |= (nSurround == css::text::WrapTextMode_NONE || nSurround == css::text::WrapTextMode_THROUGH);
2164 bDisable |= (bHtmlMode ||
2165 (nAnchorType != RndStdIds::FLY_AT_PARA));
2169 bSet = nSurround == css::text::WrapTextMode_LEFT;
2172 bSet = nSurround == css::text::WrapTextMode_RIGHT;
2204 case SID_GRAPHIC_SIZE_CHECK:
2211 case SID_THEME_DIALOG:
2213 bool bDisable =
true;
2214 auto* pDocument = rSh.
GetDoc();
2218 SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
2257 if ( bParentCntProt ||
2288 css::text::WrapTextMode nOldSurround(aWrap.
GetSurround());
2289 css::text::WrapTextMode nSurround = css::text::WrapTextMode_PARALLEL;
2294 nSurround = css::text::WrapTextMode_NONE;
2299 nSurround = css::text::WrapTextMode_DYNAMIC;
2307 if ( nOldSurround != css::text::WrapTextMode_NONE )
2309 nSurround = nOldSurround;
2316 ( nOldSurround != css::text::WrapTextMode_NONE &&
2317 nOldSurround != css::text::WrapTextMode_THROUGH ) )
2319 nSurround = nOldSurround;
2328 nSurround = css::text::WrapTextMode_THROUGH;
2332 nSurround = css::text::WrapTextMode_LEFT;
2336 nSurround = css::text::WrapTextMode_RIGHT;
2347 if (bObj && nOldSurround != nSurround &&
2348 (nOldSurround == css::text::WrapTextMode_NONE || nOldSurround == css::text::WrapTextMode_THROUGH))
2364 bOpaque = !aOpaque.GetValue();
2398 static sal_uInt16 aInval[] =
2400 SID_ATTR_POSITION, SID_ATTR_SIZE, 0
2409 m_pGetStateSet(nullptr)
2431 const sal_uInt16 nSlot = rReq.
GetSlot();
2436 std::unique_ptr<SvxScriptSetItem> pSSetItem;
2438 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
2439 SvtScriptType nScripts = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
2447 case SID_ATTR_CHAR_FONT:
2460 case SID_ATTR_CHAR_POSTURE:
2461 case SID_ATTR_CHAR_WEIGHT:
2464 pSSetItem->PutItemForScriptType( nScripts, pArgs->
Get( nWhich ));
2465 pArgs = &pSSetItem->GetItemSet();
2468 case SID_ATTR_CHAR_FONTHEIGHT:
2473 pSSetItem->PutItemForScriptType( nScripts, pArgs->
Get( nWhich ));
2474 pArgs = &pSSetItem->GetItemSet();
2482 sal_uInt32 nHeight =
static_cast< const SvxFontHeightItem&
>(pArgs->
Get( nWhich )).GetHeight();
2491 sal_Int32 nWesternSize =
2494 sal_Int32 nCJKSize =
2497 sal_Int32 nCTLSize =
2503 case SvtScriptType::LATIN:
2504 nCJKSize = nHeight * nCJKSize / nWesternSize;
2505 nCTLSize = nHeight * nCTLSize / nWesternSize;
2506 nWesternSize =
static_cast<sal_Int32
>(nHeight);
2508 case SvtScriptType::ASIAN:
2509 nCTLSize = nHeight* nCTLSize / nCJKSize;
2510 nWesternSize = nHeight * nWesternSize / nCJKSize;
2511 nCJKSize =
static_cast<sal_Int32
>(nHeight);
2513 case SvtScriptType::COMPLEX:
2514 nCJKSize = nHeight * nCJKSize / nCTLSize;
2515 nWesternSize = nHeight * nWesternSize / nCTLSize;
2516 nCTLSize =
static_cast<sal_Int32
>(nHeight);
2523 pArgs = &aHeightSet;
2551 if (nSlot == SID_ATTR_CHAR_KERNING)
2553 else if (nSlot == SID_ATTR_CHAR_COLOR)
2571 std::optional<SfxItemSet> pFntCoreSet;
2587 svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END-1> );
2607 aSetItem.GetItemSet().Put( *pFntCoreSet,
false );
2623 aFont.
SetFamily(pFontItem->GetFamily());
2624 aFont.
SetPitch(pFontItem->GetPitch());
2632 InputContextFlags::ExtText ) );
2654 std::unique_ptr<SvxBrushItem> aBrushItem(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
2656 if( nWhich == SID_TABLE_CELL_BACKGROUND_COLOR )
2665 aCoreSet.
SetParent(&
GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2683 case SID_BACKGROUND_COLOR:
2684 case SID_TABLE_CELL_BACKGROUND_COLOR:
2686 SvxColorItem aColorItem(aBrushItem->GetColor(), nWhich);
2690 case SID_ATTR_BRUSH:
2711 sal_uInt16 nSlot(rReq.
GetSlot());
2713 if (!pArgs && nSlot != SID_BACKGROUND_COLOR && nSlot != SID_TABLE_CELL_BACKGROUND_COLOR)
2718 std::unique_ptr<SvxBrushItem> aBrushItem(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
2720 if ( nSlot == SID_TABLE_CELL_BACKGROUND_COLOR )
2729 aCoreSet.
SetParent(&
GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2745 case SID_BACKGROUND_COLOR:
2746 case SID_TABLE_CELL_BACKGROUND_COLOR:
2748 bool bIsTransparent =
false;
2752 sal_uInt16 nSlotId = (nSlot == SID_BACKGROUND_COLOR) ? SID_BACKGROUND_COLOR : SID_TABLE_CELL_BACKGROUND_COLOR;
2757 aBrushItem->SetColor(rNewColor);
2762 bIsTransparent =
true;
2773 case SID_ATTR_BRUSH:
2776 assert(pArgs &&
"only SID_BACKGROUND_COLOR can have !pArgs, checked at entry");
2783 OSL_FAIL(
"unknown message in ExecuteAttr!" );
2788 if ( nSlot == SID_TABLE_CELL_BACKGROUND_COLOR )
2797 aCoreSet.
SetParent(&
GetView().GetDocShell()->GetDoc()->GetDfltFrameFormat()->GetAttrSet());
2836 bool bPrepare =
true;
2841 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aCoreSet(
GetPool() );
2843 aCoreSet.Put( aBoxInfo );
2871 sal_uInt16 nSlot = rReq.
GetSlot();
2885 pDlg->StartExecuteAsync(aContext);
2904 sPageId =
"columns";
2924 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER> aSet( rSh.
GetAttrPool() );
2934 if ( pDlg->Execute() ==
RET_OK )
2937 pOutSet = pDlg->GetOutputItemSet();
2948 if ( pDlg->Execute() ==
RET_OK )
2950 aMgr.
SetAttrSet( *pDlg->GetOutputItemSet() );
2952 pOutSet = pDlg->GetOutputItemSet();
2963 if ( pDlg->Execute() ==
RET_OK )
2966 pOutSet = pDlg->GetOutputItemSet();
2971 rReq.
Done(*pOutSet);
2989 std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(
RES_BACKGROUND));
2992 aSet.Put( std::move(aBrush) );
2993 if ( pDlg->Execute() ==
RET_OK )
2997 pOutSet = pDlg->GetOutputItemSet();
3006 if ( pDlg->Execute() ==
RET_OK )
3009 pOutSet = pDlg->GetOutputItemSet();
3018 if ( pDlg->Execute() ==
RET_OK )
3021 pOutSet = pDlg->GetOutputItemSet();
3026 rReq.
Done(*pOutSet);
3032 case SID_GRAPHIC_SIZE_CHECK:
3040 case SID_THEME_DIALOG:
3042 auto* pDocument = rSh.
GetDoc();
3046 SdrPage* pPage = pDocument->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
3051 auto pDialog = std::make_shared<svx::ThemeDialog>(pMDI, pTheme.get(), pChanger);
3058 default:OSL_FAIL(
"wrong Dispatcher (basesh.cxx)");
3090 const OUString& aTableName,
3094 const OUString& aAutoName,
3095 const std::unique_ptr<SwTableAutoFormat>& pTAFormat)
3103 rSh.
InsertTable( aInsTableOpts, nRows, nCols, pTAFormat.get() );
3106 if( !aTableName.isEmpty() && !rSh.
GetTableStyle( aTableName ) )
3109 if( pTAFormat !=
nullptr && !aAutoName.isEmpty()
3136 bool bCallEndUndo =
false;
3145 bCallEndUndo =
true;
3147 bool bInserted = rSh.
TextToTable( aInsTableOpts,
'\t' );
3155 sal_uInt16 nColsIn = 0;
3156 sal_uInt16 nRowsIn = 0;
3158 OUString aTableNameIn;
3159 OUString aAutoNameIn;
3160 std::unique_ptr<SwTableAutoFormat> pTAFormatIn;
3162 if( pArgs && pArgs->
Count() >= 2 )
3171 aTableNameIn =
pName->GetValue();
3173 nColsIn = pCols->GetValue();
3175 nRowsIn = pRows->GetValue();
3178 aAutoNameIn = pAuto->GetValue();
3179 if ( !aAutoNameIn.isEmpty() )
3183 for (
size_t n=0;
n<aTableTable.
size();
n++ )
3185 if ( aTableTable[
n].
GetName() == aAutoNameIn )
3203 if( !nColsIn || !nRowsIn )
3206 std::shared_ptr<AbstractInsTableDlg> pAbstractDialog(pFact->
CreateInsTableDlg(rTempView));
3207 std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController());
3210 [pAbstractDialog, &rSh, &rTempView, aTableNameIn, nRowsIn, nColsIn, aInsTableOptsIn, aAutoNameIn] (sal_Int32 nResult) {
3213 sal_uInt16 nCols = nColsIn;
3214 sal_uInt16 nRows = nRowsIn;
3216 OUString aTableName = aTableNameIn;
3217 OUString aAutoName = aAutoNameIn;
3218 std::unique_ptr<SwTableAutoFormat> pTAFormat;
3220 pAbstractDialog->GetValues( aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat );
3222 if( nCols && nRows )
3224 InsertTableImpl( rSh, rTempView, aTableName, nRows, nCols, aInsTableOpts, aAutoName, pTAFormat );
3235 if ( !aAutoNameIn.isEmpty() )
3242 InsertTableImpl( rSh, rTempView, aTableNameIn, nRowsIn, nColsIn, aInsTableOptsIn, aAutoNameIn, pTAFormatIn );
3244 bCallEndUndo =
true;
3259 case SID_GALLERY_BG_BRUSH:
3263 std::vector<OUString> &rLst = aLst.
GetList();
3268 rLst.push_back(
SwResId( STR_SWBG_PAGE ) );
3276 rLst.push_back(
SwResId( STR_SWBG_PARAGRAPH ) );
3282 rLst.push_back(
SwResId( STR_SWBG_TABLE ) );
3287 rLst.push_back(
SwResId( STR_SWBG_TABLE_ROW ) );
3291 rLst.push_back(
SwResId( STR_SWBG_TABLE_CELL) );
3298 rLst.push_back(
SwResId( STR_SWBG_FRAME ) );
3303 rLst.push_back(
SwResId( STR_SWBG_GRAPHIC ) );
3308 rLst.push_back(
SwResId( STR_SWBG_OLE ) );
3314 rLst.push_back(
SwResId( STR_SWBG_HEADER ) );
3319 rLst.push_back(
SwResId( STR_SWBG_FOOTER ) );
3337 sal_uInt16 nSlot = rReq.
GetSlot();
3340 case SID_GALLERY_BG_BRUSH:
3351 if ( !pPos || !pBrush )
3370 aCoreSet.
Put( aBrush );
3402 sal_uInt16 nSlot = rReq.
GetSlot();
3405#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
3415 OSL_FAIL(
"wrong dispatcher");
3421 auto vCursors = std::make_shared<std::vector<std::unique_ptr<SwPaM>>>();
3422 vCursors->emplace_back(std::make_unique<SwPaM>(rOrig,
nullptr));
3425 if (&rCursor != &rOrig)
3426 vCursors->emplace_back(std::make_unique<SwPaM>(rCursor, vCursors->front().get()));
@ MATH_BASELINE_ALIGNMENT
static bool lcl_UpdateContourDlg(SwWrtShell &rSh, SelectionType nSel)
static sal_uInt8 nTableCellPos
static sal_uInt8 nFramePos
static sal_uInt8 nTablePos
static sal_uInt8 nParagraphPos
static sal_uInt8 nGraphicPos
static sal_uInt8 nTableRowPos
static sal_uInt8 nPagePos
static sal_uInt8 nFooterPos
static void InsertTableImpl(SwWrtShell &rSh, SwView &rTempView, const OUString &aTableName, sal_uInt16 nRows, sal_uInt16 nCols, SwInsertTableOptions aInsTableOpts, const OUString &aAutoName, const std::unique_ptr< SwTableAutoFormat > &pTAFormat)
static void lcl_UpdateIMapDlg(SwWrtShell &rSh)
static void EndUndo(SwWrtShell &rSh)
static sal_uInt8 nHeaderPos
IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl, SwCursorShell &, void)
sal_uInt16 GetValue() const
const OUString & GetValue() const
GraphicType GetType() const
Text operation/manipulation interface.
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
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 void restoreAnnotationMarks(bool bDelete=true)=0
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual sal_Int32 getImagePreferredDPI()=0
void disposeAndReset(reference_type *pBody)
std::unique_ptr< model::Theme > const & GetTheme() const
SdrPageProperties & getSdrPageProperties()
void SetState(const SfxItemSet &rSet)
void Invalidate(sal_uInt16 nId)
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
void InvalidateAll(bool bWithMsg)
void Broadcast(const SfxHint &rHint)
std::shared_ptr< SfxDialogController > & GetController()
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
static void GetDefaultTargetList(TargetList &)
sal_Int16 GetValue() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
void SetParent(const SfxItemSet *pNew)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void InvalidateItem(sal_uInt16 nWhich)
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void SetReturnValue(const SfxPoolItem &)
weld::Window * GetFrameWeld() const
static bool HasMacroRecorder(const SfxViewFrame &rFrame)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
const OUString & GetName() const
virtual SfxObjectShell * GetObjectShell()
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
void SetPool(SfxItemPool *pNewPool)
void SetName(const OUString &rName)
std::vector< OUString > & GetList()
virtual ViewShellId GetViewShellId() const
const css::uno::Any & GetValue() const
void ToggleChildWindow(sal_uInt16)
SfxBindings & GetBindings()
bool HasChildWindow(sal_uInt16)
SfxDispatcher * GetDispatcher()
SfxChildWindow * GetChildWindow(sal_uInt16)
weld::Window * GetFrameWeld() const
ViewShellId GetViewShellId() const override
SfxViewFrame & GetViewFrame() const
static sal_uInt16 IsMath(const SvGlobalName &rName)
static SvxAbstractDialogFactory * Create()
const Color & GetValue() const
void Update(const Graphic &rGraphic, bool bGraphicLinked, const tools::PolyPolygon *pPolyPoly, void *pEditingObj)
bool IsGraphicChanged() const
const void * GetEditingObject() const
const Graphic & GetGraphic() const
tools::PolyPolygon GetPolyPolygon()
const OUString & GetURL() const
const css::uno::Reference< css::graphic::XGraphic > & GetGraphic() const
static void UpdateIMapDlg(const Graphic &rGraphic, const ImageMap *pImageMap, const TargetList *pTargetList, void *pEditingObj)
const void * GetEditingObject() const
const ImageMap & GetImageMap() const
const SfxPoolItem * GetItemOfScript(SvtScriptType nScript) const
virtual VclPtr< VclAbstractDialog > CreateTitlePageDlg(weld::Window *pParent)=0
virtual VclPtr< SfxAbstractDialog > CreateSwBackgroundDialog(weld::Window *pParent, const SfxItemSet &rSet)=0
static SwAbstractDialogFactory * Create()
virtual VclPtr< AbstractSwConvertTableDlg > CreateSwConvertTableDlg(SwView &rView, bool bToTable)=0
virtual VclPtr< SfxAbstractDialog > CreateSwBorderDlg(weld::Window *pParent, SfxItemSet &rSet, SwBorderModes nType)=0
virtual std::shared_ptr< AbstractInsTableDlg > CreateInsTableDlg(SwView &rView)=0
virtual VclPtr< VclAbstractDialog > CreateSwChangeDBDlg(SwView &rVw)=0
static std::shared_ptr< std::vector< std::unique_ptr< SwPaM > > > CopyPaMRing(SwPaM &rOrig)
void StateUndo(SfxItemSet &)
void GetBckColState(SfxItemSet &rSet)
void GetState(SfxItemSet &)
void GetTextFontCtrlState(SfxItemSet &rSet)
void SetWrapMode(sal_uInt16 nSlot)
void GetGalleryState(SfxItemSet &)
void ExecDelete(SfxRequest &)
SfxItemSet * m_pGetStateSet
void ExecuteGallery(SfxRequest &)
bool AddGrfUpdateSlot(sal_uInt16 nSlot)
SwBaseShell(SwView &rShell)
void ExecUndo(SfxRequest &)
void ExecTextCtrl(SfxRequest &rReq)
void ExecField(SfxRequest const &rReq)
void ExecClpbrd(SfxRequest &)
void StateClpbrd(SfxItemSet &)
void Execute(SfxRequest &)
void InsertTable(SfxRequest &_rRequest)
void StateStyle(SfxItemSet &)
static void SetFrameMode(FlyMode eMode, SwWrtShell *pShell)
SwWrtShell * GetShellPtr()
static void StateDisableItems(SfxItemSet &)
void ExecBckCol(SfxRequest &rReq)
void GetTextCtrlState(SfxItemSet &rSet)
void GetBorderState(SfxItemSet &rSet)
static FlyMode s_eFrameMode
virtual ~SwBaseShell() override
void ExecDlg(SfxRequest &)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
bool IsTableComplexForChart()
bool EndAllTableBoxEdit()
void ClearTableBoxContent()
const SwTableNode * IsCursorInTable() const
bool IsInVerticalText(const Point *pPt=nullptr) const
bool SttEndDoc(bool bStt)
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
void GotoFlyAnchor()
jump from the frame to the anchor
bool CursorInsideInputField() const
SwField * GetCurField(const bool bIncludeInputFieldAtStart=false) const
bool IsSelFullPara() const
void EndAction(const bool bIdleEnd=false)
const Link< SwCursorShell &, void > & GetGrfArrivedLnk() const
void SetGrfArrivedLnk(const Link< SwCursorShell &, void > &rLnk)
bool HasReadonlySel(bool isReplace=false) const
bool IsCursorPtAtEnd() const
bool MoveFieldType(const SwFieldType *pFieldType, const bool bNext, const SwFieldIds nResType=SwFieldIds::Unknown, const bool bAddSetExpressionFieldsToInputFields=true)
void EndCursorMove(const bool bIdleEnd=false)
void SaveTableBoxContent(const SwPosition *pPos=nullptr)
void StateStyleSheet(SfxItemSet &, SwWrtShell *pSh=nullptr)
void Execute(SfxRequest &)
Dispatcher.
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
void ExecStyleSheet(SfxRequest &)
void FormatPage(weld::Window *pDialogParent, const OUString &rPage, const OString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
sal_uInt16 GetRefMarks(std::vector< OUString > *=nullptr) const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentSettingAccess const & getIDocumentSettingAccess() const
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
SwDocShell * GetDocShell()
::sw::UndoManager & GetUndoManager()
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
void StartAllAction()
For all views of this document.
bool IsTextToTableAvailable() const
bool IsNoNum(bool bChkStart=true) const
const SwTable & InsertTable(const SwInsertTableOptions &rInsTableOpts, sal_uInt16 nRows, sal_uInt16 nCols, const SwTableAutoFormat *pTAFormat=nullptr)
Inserts an nRows x nCols table to the document at the current position.
bool TextToTable(const SwInsertTableOptions &rInsTableOpts, sal_Unicode cCh, const SwTableAutoFormat *pTAFormat=nullptr)
GraphicType GetGraphicType() const
void GetGrfNms(OUString *pGrfName, OUString *pFltName, const SwFlyFrameFormat *=nullptr) const
Returns the name and the filter name of a graphic if the pointer is on a graphic.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
void UpdateDocStat()
Document - Statistics.
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()
bool GetFirstRedoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const
bool GetLastUndoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const
Graphic GetIMapGraphic() const
Remove default parameter, because method always called this default value.
const SwSection * GetCurrSection() const
bool IsLinkedGrfSwapOut() const
SvtScriptType GetScriptType() const
returns the script type of the selection
bool IsAnySectionInDoc() const
bool IsInsRegionAvailable() const
void DelNumRules()
Delete, split enumeration list.
void SetGraphicPolygon(const tools::PolyPolygon *pPoly)
sfx2::LinkManager & GetLinkManager()
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
const Graphic * GetGraphic(bool bWait=true) const
void * GetIMapInventor() const
Unique identification of object (for ImageMapDlg).
const tools::PolyPolygon * GetGraphicPolygon() const
SwUndoId GetRepeatInfo(OUString *const o_pStr) const
bool TableToText(sal_Unicode cCh)
void ReRead(const OUString &rGrfName, const OUString &rFltName, const Graphic *pGraphic=nullptr)
Re-read if graphic is not ok. Current graphic is replaced by the new one.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
void FlushInBuffer()
Character buffer is inserted into the document.
void SetUseInputLanguage(bool bNew)
#i42732# display status of font size/name depending on either the input language or the selection pos...
bool IsUseInputLanguage() const
void SelectionToHell()
Below document.
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...
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
void SetObjAttr(const SfxItemSet &rSet)
Point GetAnchorObjDiff() const
Methods for status line.
FlyProtectFlags IsSelObjProtected(FlyProtectFlags eType) const
Which Protection is set at selected object?
void SetBoxBackground(const SvxBrushItem &rNew)
void ChgPageDesc(size_t i, const SwPageDesc &)
RndStdIds GetAnchorId() const
Anchor type of selected object, RndStdIds::UNKNOWN if ambiguous or in case of frame selection.
void SelectionToHeaven()
Above document.
bool IsFrameSelected() const
bool GotoObj(bool bNext, GotoObjFlags eType=GotoObjFlags::DrawAny)
void SetRowBackground(const SvxBrushItem &rNew)
css::uno::Reference< css::embed::XEmbeddedObject > GetOleRef() const
get reference to OLE object (if there is one) for selected FlyFrame
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
bool GetBoxBackground(std::unique_ptr< SvxBrushItem > &rToFill) const
FALSE ambiguous.
void ChgAnchor(RndStdIds eAnchorId, bool bSameOnly=false, bool bPosCorr=true)
frmatr.hxx.
void SetTabBorders(const SfxItemSet &rSet)
size_t GetCurPageDesc(const bool bCalcFrame=true) const
static SfxItemSetFixed< RES_VERT_ORIENT, RES_ANCHOR > makeItemSetFromFormatAnchor(SfxItemPool &rPool, const SwFormatAnchor &rAnchor)
bool GetObjAttr(SfxItemSet &rSet) const
Attention: Ambiguities if multiple selections.
sal_uInt16 GetPhyPageNum() const
Phy: real page count.
SdrLayerID GetLayerId() const
1 Heaven, 0 Hell, SDRLAYER_NOTFOUND Ambiguous.
void SetTabBackground(const SvxBrushItem &rNew)
void GetTabBorders(SfxItemSet &rSet) const
bool GetFlyFrameAttr(SfxItemSet &rSet) const
size_t IsObjSelected() const
const SwPageDesc & GetPageDesc(size_t i) const
const SwFrameFormat * IsFlyInFly()
Is selected frame within another frame?
bool GetTableCopied() const
SwFieldType * GetFieldType(SwFieldIds nResId, size_t nField=0) const
Instances of SwFields and those derived from it occur 0 to n times.
Base class of all fields.
void SetAttrSet(const SfxItemSet &rSet)
const SfxItemSet & GetAttrSet() const
const SwInsertTableOptions & GetInsTableFlags(bool bHTML) const
Class for automated call of Start- and EndCursorMove().
Marks a node in the document model.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool IsContentNode() const
SwContentNode * GetContentNode()
PaM is Point and Mark: a selection of the document model.
SwNode & GetPointNode() const
const SwPosition * GetPoint() const
const OUString & GetName() const
SwFrameFormat & GetMaster()
void AddRule(SwUndoArg eWhat, const OUString &rWith)
SectionType GetType() const
sal_Int32 GetFontHeight(sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang)
const SwTable & GetTable() const
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
Represents the style of a paragraph.
SwTextNode is a paragraph in the document model.
void GetAttrOutlineContentVisible(bool &bOutlineContentVisibleAttr)
GetAttrOutlineContentVisible.
SwpHints & GetSwpHints()
getters for SwpHints
std::vector< SwTextAttr * > GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const
get the innermost text attributes covering position nIndex.
static void FillClipFormatItem(const SwWrtShell &rSh, const TransferableDataHelper &rData, SvxClipboardFormatItem &rToFill)
static void PrePasteSpecial(const SwWrtShell &rSh, TransferableDataHelper &, const VclPtr< SfxAbstractPasteDialog > &pDlg)
PrePasteSpecial Prepares the given dialog without actually running it.
static bool Paste(SwWrtShell &, TransferableDataHelper &, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA, bool bIgnoreComments=false, PasteTableType ePasteTable=PasteTableType::PASTE_DEFAULT)
static bool PasteUnformatted(SwWrtShell &rSh, TransferableDataHelper &)
static bool IsPaste(const SwWrtShell &, const TransferableDataHelper &)
static bool PasteFormat(SwWrtShell &rSh, TransferableDataHelper &rData, SotClipboardFormatId nFormat)
void SetShowChangesInMargin(bool b)
bool IsShowOutlineContentVisibilityButton() const
void SetFormView(bool bSet)
void SetShowChangesInMargin2(bool b)
bool IsViewLocked() const
const SwViewOption * GetViewOptions() const
void Reformat()
Invalidates complete Layout (ApplyViewOption).
static ShellResource * GetShellRes()
SwRootFrame * GetLayout() const
void UpdateAllCharts()
update all charts for which any table exists
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
const SfxItemPool & GetAttrPool() const
void UpdateOleObjectPreviews()
Update the previews of all OLE objects.
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
SwWrtShell & GetWrtShell() const
virtual FmFormShell * GetFormShell() override
SwWrtShell * GetWrtShellPtr() const
ShellMode GetShellMode() const
SwDocShell * GetDocShell()
void InvalidateRulerPos()
Used by the UI to modify the document model.
void ClickToField(const SwField &rField, bool bExecHyperlinks)
bool IsSelFrameMode() const
void AutoUpdatePara(SwTextFormatColl *pColl, const SfxItemSet &rStyleSet, SwPaM *pPaM=nullptr)
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
OUString GetRepeatString() const
void GetDoStrings(DoType eDoType, SfxStringListItem &rStrLstItem) const
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
bool Left(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
SelectionType GetSelectionType() const
void UpdateInputFields(SwInputFieldList *pLst=nullptr)
void InsertGraphic(const OUString &rPath, const OUString &rFilter, const Graphic &, SwFlyFrameAttrMgr *=nullptr, RndStdIds nAnchorType=RndStdIds::FLY_AT_PARA)
SwFrameFormat * GetTableStyle(std::u16string_view rFormatName)
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
void Do(DoType eDoType, sal_uInt16 nCnt=1, sal_uInt16 nOffset=0)
bool DelRight(bool isReplaceHeuristic=false)
bool HasSelection() const
OUString GetDoString(DoType eDoType) const
bool IsInClickToEdit() const
const SwView & GetView() const
void SortIfNeedBe() const
Trigger the sorting if necessary.
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const
void setUserAllowsLinkUpdate(bool bNew)
void UpdateAllLinks(bool bAskUpdate, bool bUpdateGrfLinks, weld::Window *pParentWin)
const SvBaseLinks & GetLinks() const
virtual short run() override
The UI part presenting the graphic size check results, which is used by GenericCheckDialog.
ring_container GetRingContainer()
Stores the undo/redo information, implementing the IDocumentUndoRedo interface.
bool IsViewUndoActionIndependent(const SwView *pView, sal_uInt16 &rOffset) const
Checks if the topmost undo action owned by pView is independent from the topmost action undo action.
void SetOrientation(Degree10 nLineOrientation)
void SetVertical(bool bVertical)
void SetStyleName(const OUString &rStyleName)
void SetPitch(FontPitch ePitch)
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
void SetFamilyName(const OUString &rFamilyName)
void SetInputContext(const InputContext &rInputContext)
LanguageType GetInputLanguage() const
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
#define FN_TOOL_ANCHOR_PAGE
#define FN_TABLE_PASTE_COL_BEFORE
#define FN_TOOL_ANCHOR_FRAME
#define FN_SET_TRACKED_INSERTIONS_IN_MARGIN
#define FN_FORMAT_BACKGROUND_DLG
#define FN_SET_TRACKED_CHANGES_IN_TEXT
#define FN_PAGE_STYLE_SET_LR_MARGIN
#define FN_SET_TRACKED_DELETIONS_IN_MARGIN
#define FN_CONVERT_TEXT_TO_TABLE
#define FN_FRAME_WRAP_IDEAL
#define FN_UPDATE_ALL_LINKS
#define FN_TOOL_ANCHOR_CHAR
#define FN_PAGE_STYLE_SET_NUMBER_FORMAT
#define FN_SHIFT_BACKSPACE
#define FN_TOOL_ANCHOR_AT_CHAR
#define FN_TOOL_ANCHOR_PARAGRAPH
#define FN_PAGE_STYLE_SET_COLS
#define FN_FORMAT_BORDER_DLG
#define FN_FRAME_WRAPTHRU_TRANSP
#define FN_XFORMS_DESIGN_MODE
#define FN_CHANGE_DBFIELD
#define FN_CONVERT_TABLE_TO_TEXT
#define FN_FORMAT_PAGE_SETTING_DLG
#define FN_EDIT_CURRENT_REGION
#define FN_PAGE_STYLE_SET_PAPER_BIN
#define FN_GOTO_NEXT_MARK
#define FN_FORMAT_TITLEPAGE_DLG
#define FN_PASTE_NESTED_TABLE
#define FN_FRAME_WRAP_RIGHT
#define FN_FORMAT_PAGE_COLUMN_DLG
#define FN_WRAP_ANCHOR_ONLY
#define FN_PAGE_STYLE_SET_UL_MARGIN
#define FN_FRAME_TO_ANCHOR
#define FN_FRAME_WRAPTHRU_TOGGLE
#define FN_FORMAT_PAGE_DLG
#define FN_CONVERT_TEXT_TABLE
#define FN_FRAME_WRAP_CONTOUR
#define FN_PAGE_STYLE_SET_PAPER_SIZE
#define FN_GOTO_PREV_MARK
#define FN_FRAME_WRAPTHRU
#define FN_TABLE_PASTE_ROW_BEFORE
#define FN_FRAME_WRAP_LEFT
#define FN_UPDATE_INPUTFIELDS
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SFX_IMPL_SUPERCLASS_INTERFACE(DrawDocShell, SfxObjectShell)
FrameTypeFlags
values can be combined via logical or
@ Parent
Check only parents.
#define FONT_GROUP_DEFAULT
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SwFormatURL > RES_URL(117)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(109)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(113)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(108)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(105)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(110)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(107)
SVX_DLLPUBLIC SvxIMapDlg * GetIMapDlg()
::std::vector< OUString > TargetList
#define LANGUAGE_DONTKNOW
#define LINK(Instance, Class, Member)
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
SW_DLLPUBLIC void PasteHTMLToPaM(SwWrtShell &rWrtSh, SwPaM *pCursor, const OString &rData, bool bSetSelection)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
HashMap_OWString_Interface aMap
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnTableStart
SwMoveFnCollection const & fnMoveBackward
sal_uInt16 mnRowsToRepeat
SwInsertTableFlags mnInsMode
Marks a position in the document model.
sal_Int32 GetContentIndex() const
std::function< void(sal_Int32)> maEndDialogFn
Reference< XModel > xModel
OUString SwResId(TranslateId aId)
constexpr SwTwips DEF_GUTTER_WIDTH
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
SVXCORE_DLLPUBLIC std::unique_ptr< SvxBrushItem > getSvxBrushItemFromSourceSet(const SfxItemSet &rSourceSet, sal_uInt16 nBackgroundID, bool bSearchInParents=true, bool bXMLImportHack=false)
SVXCORE_DLLPUBLIC void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem &rBrush, SfxItemSet &rToSet)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)