22 #include <string_view>
24 #include <config_features.h>
25 #include <config_wasm_strip.h>
32 #include <officecfg/Office/Common.hxx>
53 #include <inputwin.hxx>
60 #include <mediash.hxx>
66 #include <drformsh.hxx>
82 #include <drawdoc.hxx>
89 #include <com/sun/star/frame/FrameSearchFlag.hpp>
90 #include <com/sun/star/frame/XLayoutManager.hpp>
91 #include <com/sun/star/scanner/ScannerContext.hpp>
92 #include <com/sun/star/scanner/XScannerManager2.hpp>
93 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
94 #include <com/sun/star/sdb/XDatabaseContext.hpp>
95 #include <com/sun/star/sdb/DatabaseContext.hpp>
104 #include <com/sun/star/document/XDocumentProperties.hpp>
105 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
109 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
120 #define SWVIEWFLAGS SfxViewShellFlags::HAS_PRINTOPTIONS
149 if ( nSelType & SelectionType::Ole )
159 SetVerbs( Sequence< embed::VerbDescriptor >() );
177 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
182 if ( pAsAnnotationShell )
185 const_cast< SwView*
>( this )->AttrChangedNotify(
nullptr);
210 SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() :
nullptr;
214 AttrChangedNotify(
nullptr);
220 uno::Reference<frame::XLayoutManager> getLayoutManager(
const SfxViewFrame& rViewFrame)
222 uno::Reference<frame::XLayoutManager> xLayoutManager;
229 xLayoutManager.set(xPropSet->getPropertyValue(
"LayoutManager"), uno::UNO_QUERY);
231 catch (
const Exception& e)
233 SAL_WARN(
"sw.ui",
"Failure getting layout manager: " + e.Message);
236 return xLayoutManager;
242 if (
auto xLayoutManager = getLayoutManager(*
GetViewFrame()))
244 if (!xLayoutManager->getElement(sElementURL).is())
246 xLayoutManager->createElement(sElementURL);
247 xLayoutManager->showElement(sElementURL);
260 bool bUpdateTable =
false;
294 if (eId != ToolbarId::None)
297 for ( sal_uInt16
i = 0;
true; ++
i )
300 if ( dynamic_cast< const SwBaseShell *>( pSfxShell ) !=
nullptr
301 || dynamic_cast< const SwDrawTextShell *>( pSfxShell ) !=
nullptr
302 || dynamic_cast< const svx::ExtrusionBar*>( pSfxShell ) !=
nullptr
303 || dynamic_cast< const svx::FontworkBar*>( pSfxShell ) !=
nullptr
304 || dynamic_cast< const SwAnnotationShell *>( pSfxShell ) !=
nullptr
307 rDispatcher.
Pop( *pSfxShell, SfxDispatcherPopFlags::POP_DELETE );
309 else if ( dynamic_cast< const FmFormShell *>( pSfxShell ) !=
nullptr )
311 rDispatcher.
Pop( *pSfxShell );
318 bool bInitFormShell =
false;
321 bInitFormShell =
true;
327 bool bSetExtInpCntxt =
false;
368 #if HAVE_FEATURE_AVMEDIA
398 bSetExtInpCntxt =
true;
412 bSetExtInpCntxt =
true;
439 if( bSetExtInpCntxt &&
GetWrtShell().HasReadonlySel() )
440 bSetExtInpCntxt =
false;
445 ( InputContextFlags::Text |
446 InputContextFlags::ExtText ))
448 InputContextFlags( InputContextFlags::Text |
449 InputContextFlags::ExtText )) );
468 if ( bInitFormShell && pDView )
473 if (
GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
493 static int lcl_CmpIds(
const void *pFirst,
const void *pSecond)
495 return *
static_cast<sal_uInt16
const *
>(pFirst) - *static_cast<sal_uInt16 const *>(pSecond);
501 if ( GetEditWin().IsChainMode() )
502 GetEditWin().SetChainMode(
false );
506 GetDocShell()->IsReadOnly() )
507 CheckReadonlyState();
510 CheckReadonlySelection();
512 if( !m_bAttrChgNotified )
516 GetViewFrame()->GetBindings().IsInUpdate() )
518 m_bAttrChgNotified =
true;
522 GetObjectShell()->GetMedium()->GetItemSet()->
523 GetItemIfSet( SID_HIDDEN,
false );
526 GetViewFrame()->GetBindings().ENTERREGISTRATIONS();
527 m_bAttrChgNotifiedWithRegistrations =
true;
541 m_pPostItMgr->SetShadowState( m_pWrtShell->GetPostItFieldAtCursor() );
553 if ( m_bAttrChgNotifiedWithRegistrations )
555 GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
556 m_bAttrChgNotifiedWithRegistrations =
false;
559 CheckReadonlyState();
560 CheckReadonlySelection();
562 bool bOldUndo = m_pWrtShell->DoesUndo();
563 m_pWrtShell->DoUndo(
false );
565 m_pWrtShell->DoUndo( bOldUndo );
566 m_bAttrChgNotified =
false;
567 GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
584 static sal_uInt16 aROIds[] =
588 SID_REDO, SID_REPEAT, SID_PASTE,
592 SID_CHARMAP, SID_EMOJI_CONTROL, FN_INSERT_SOFT_HYPHEN,
593 FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_NNBSP,
603 SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
604 SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
605 SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
606 SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
607 SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
608 SID_ATTR_CHAR_OVERLINE,
609 SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
610 SID_ULINE_VAL_SINGLE, SID_ULINE_VAL_DOUBLE, SID_ULINE_VAL_DOTTED,
611 SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
614 SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
617 SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
618 SID_ATTR_PARA_ORPHANS,
619 SID_ATTR_PARA_MODEL, SID_PARA_DLG,
623 static bool bFirst =
true;
629 if ( SfxItemState::DISABLED == eStateRO )
631 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aROIds );
637 if ( SfxItemState::DISABLED == eStateProtAll )
639 static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC,
FN_EDIT_REGION };
640 static bool bAllProtFirst =
true;
644 bAllProtFirst =
false;
646 rDis.
SetSlotFilter( SfxSlotFilterState::ENABLED_READONLY, aAllProtIds );
650 else if ( SfxItemState::DISABLED != eStateRO ||
651 SfxItemState::DISABLED != eStateProtAll )
667 !
m_pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
668 nDisableFlags |= SfxDisableFlags::SwOnProtectedCursor;
670 if( (SfxDisableFlags::SwOnProtectedCursor & nDisableFlags ) !=
692 aCntxt.
SetOptions( SfxDisableFlags::SwOnProtectedCursor & nDisableFlags
694 InputContextFlags( InputContextFlags::Text |
695 InputContextFlags::ExtText ))
697 ( InputContextFlags::Text |
698 InputContextFlags::ExtText )) );
717 m_aTimer(
"sw::SwView m_aTimer" ),
718 m_nNewPage(USHRT_MAX),
720 m_pNumRuleNodeFromDoc(nullptr),
723 m_pFormShell(nullptr),
724 m_pHScrollbar(nullptr),
725 m_pVScrollbar(nullptr),
732 m_pLastTableFormat(nullptr),
736 m_nDrawSfxId( USHRT_MAX ),
737 m_nFormSfxId( USHRT_MAX ),
740 m_nLeftBorderDistance( 0 ),
741 m_nRightBorderDistance( 0 ),
742 m_eLastSearchCommand( static_cast<
SvxSearchCmd>(0xFFFF) ),
743 m_bWheelScrollInProgress(
false),
744 m_bCenterCursor(
false),
746 m_bTabColFromDoc(
false),
747 m_bTabRowFromDoc(
false),
748 m_bSetTabColFromDoc(
false),
749 m_bSetTabRowFromDoc(
false),
750 m_bAttrChgNotified(
false),
751 m_bAttrChgNotifiedWithRegistrations(
false),
752 m_bVerbsActive(
false),
753 m_bDrawRotate(
false),
754 m_bDrawSelMode(true),
755 m_bShowAtResize(true),
756 m_bInOuterResizePixel(
false),
757 m_bInInnerResizePixel(
false),
758 m_bPasteState(
false),
759 m_bPasteSpecialState(
false),
760 m_bInMailMerge(
false),
762 m_bOldShellWasPagePreview(
false),
763 m_bIsPreviewDoubleClick(
false),
764 m_bMakeSelectionVisible(
false),
765 m_bForceChangesToolbar(true),
766 m_nLOKPageUpDownOffset(0)
768 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
769 if (bRequestDoubleBuffering)
800 bool bWebDShell =
dynamic_cast<const SwWebDocShell*
>(&rDocSh) !=
nullptr;
810 bool bOldShellWasSrcView =
false;
817 pExistingSh = pOldSh;
819 if (
SwPagePreview* pPagePreview = dynamic_cast<SwPagePreview *>(pExistingSh))
827 else if (dynamic_cast<const SwSrcView *>(pExistingSh) !=
nullptr)
828 bOldShellWasSrcView =
true;
831 SAL_INFO(
"sw.ui",
"before create WrtShell" );
832 if (
SwView *pView = dynamic_cast<SwView*>(pExistingSh))
877 if ( static_cast<SwPagePreview*>(pExistingSh)->ResetFormDesignMode() &&
881 pDrawView->
SetDesignMode( static_cast<SwPagePreview*>(pExistingSh)->FormDesignModeToReset() );
885 SAL_INFO(
"sw.ui",
"after create WrtShell" );
887 SvxRulerSupportFlags::TABS |
888 SvxRulerSupportFlags::PARAGRAPH_MARGINS |
889 SvxRulerSupportFlags::BORDERS |
890 SvxRulerSupportFlags::NEGATIVE_MARGINS|
891 SvxRulerSupportFlags::REDUCED_METRIC,
897 const bool bIsDocModified =
m_pWrtShell->GetDoc()->getIDocumentState().IsModified();
904 if( SfxObjectCreateMode::EMBEDDED != rDocSh.
GetCreateMode() )
948 if (rDocSh.
GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
954 "sw.ui",
"/org.openoffice.Office.Common/Undo/Steps <= 0");
960 const bool bBrowse =
m_pWrtShell->GetViewOptions()->getBrowseMode();
975 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
979 if(
m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() )
981 if (
m_pWrtShell->GetDoc()->GetDocumentFieldsManager().containsUpdatableFields())
986 m_pWrtShell->GetDoc()->getIDocumentFieldsAccess().UpdateFields(
false);
989 m_pWrtShell->GetDoc()->getIDocumentState().SetUpdateExpFieldStat(
false );
1010 if (!
m_pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
1011 ( !pFirst || pFirst == pVFrame ) &&
1020 if( dynamic_cast<const SwGlobalDocShell*>(&rDocSh) !=
nullptr &&
1029 uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
1030 "_beamer", frame::FrameSearchFlag::CHILDREN);
1031 if(xBeamerFrame.is())
1057 m_pWrtShell->InvalidateOutlineContentVisibility();
1076 SW_MOD()->SetView(
nullptr);
1125 static bool bRequestDoubleBuffering = getenv(
"VCL_DOUBLEBUFFERING_ENABLE");
1126 if (bRequestDoubleBuffering)
1136 return dynamic_cast<SwDocShell*
>( pDocShell );
1150 rUserData = OUString::number( rRect.
Left() );
1152 rUserData += OUString::number( rRect.
Top() );
1154 rUserData += OUString::number(
m_pWrtShell->GetViewOptions()->GetZoom() );
1156 rUserData += OUString::number( rVis.
Left() );
1158 rUserData += OUString::number( rVis.
Top() );
1164 rUserData += OUString::number(
1165 static_cast<sal_uInt16>(
m_pWrtShell->GetViewOptions()->GetZoomType()));
1174 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
1176 uno::Reference<document::XDocumentProperties> xDocProps
1177 = xDPS->getDocumentProperties();
1178 OUString Created = xDocProps->getAuthor();
1179 OUString
Changed = xDocProps->getModifiedBy();
1181 return !FullName.isEmpty()
1182 && (Changed == FullName || (Changed.isEmpty() && Created == FullName));
1187 if ( !(rUserData.indexOf(
';')>=0 &&
1203 Point aCursorPos( nX, nY );
1205 sal_uInt16 nZoomFactor =
1214 if ( nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1223 if( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1227 eZoom = SvxZoomType::PERCENT;
1235 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1237 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1243 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1252 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1270 sal_Int32 nIdx{ 0 };
1273 Point aCursorPos2( nXTmp, nYTmp );
1274 bSelectObj =
m_pWrtShell->IsObjSelectable( aCursorPos2 );
1276 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos2 );
1315 sal_Int64 nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.
Left(), nTop = rVis.
Top();
1316 sal_Int64 nRight = nLeft;
1317 sal_Int64 nBottom = LONG_MIN;
1318 sal_Int16 nZoomType =
static_cast< sal_Int16
>(pVOpt->
GetZoomType());
1319 sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->
GetZoom());
1325 bGotVisibleLeft =
false,
1326 bGotVisibleTop =
false, bGotVisibleRight =
false,
1327 bGotVisibleBottom =
false, bGotZoomType =
false,
1328 bGotZoomFactor =
false, bGotIsSelectedFrame =
false,
1329 bGotViewLayoutColumns =
false, bGotViewLayoutBookMode =
false,
1330 bGotHideWhitespace =
false,
1331 bBrowseMode =
false, bGotBrowseMode =
false;
1333 bool bGotKeepRatio =
false;
1335 for (
const beans::PropertyValue& rValue : rSequence)
1337 if ( rValue.Name ==
"ViewLeft" )
1339 rValue.Value >>= nX;
1342 else if ( rValue.Name ==
"ViewTop" )
1344 rValue.Value >>= nY;
1347 else if ( rValue.Name ==
"VisibleLeft" )
1349 rValue.Value >>= nLeft;
1351 bGotVisibleLeft =
true;
1353 else if ( rValue.Name ==
"VisibleTop" )
1355 rValue.Value >>= nTop;
1357 bGotVisibleTop =
true;
1359 else if ( rValue.Name ==
"VisibleRight" )
1361 rValue.Value >>= nRight;
1363 bGotVisibleRight =
true;
1365 else if ( rValue.Name ==
"VisibleBottom" )
1367 rValue.Value >>= nBottom;
1369 bGotVisibleBottom =
true;
1371 else if ( rValue.Name ==
"ZoomType" )
1373 rValue.Value >>= nZoomType;
1374 bGotZoomType =
true;
1376 else if ( rValue.Name ==
"ZoomFactor" )
1378 rValue.Value >>= nZoomFactor;
1379 bGotZoomFactor =
true;
1381 else if ( rValue.Name ==
"ViewLayoutColumns" )
1383 rValue.Value >>= nViewLayoutColumns;
1384 bGotViewLayoutColumns =
true;
1386 else if ( rValue.Name ==
"ViewLayoutBookMode" )
1388 bViewLayoutBookMode = *o3tl::doAccess<bool>(rValue.Value);
1389 bGotViewLayoutBookMode =
true;
1391 else if ( rValue.Name ==
"IsSelectedFrame" )
1393 rValue.Value >>= bSelectedFrame;
1394 bGotIsSelectedFrame =
true;
1396 else if (rValue.Name ==
"ShowOnlineLayout")
1398 rValue.Value >>= bBrowseMode;
1399 bGotBrowseMode =
true;
1401 else if (rValue.Name ==
"KeepRatio")
1403 rValue.Value >>= bKeepRatio;
1404 bGotKeepRatio =
true;
1406 else if (rValue.Name ==
"HideWhitespace")
1408 rValue.Value >>= bHideWhitespace;
1409 bGotHideWhitespace =
true;
1423 if (!bGotVisibleBottom)
1426 Point aCursorPos( nX, nY );
1428 if (nBottom > (
m_pWrtShell->GetDocSize().Height()+nAdd) )
1435 if ( !
m_pWrtShell->GetViewOptions()->getBrowseMode() )
1436 eZoom = static_cast < SvxZoomType > ( nZoomType );
1439 eZoom = SvxZoomType::PERCENT;
1441 if (bGotIsSelectedFrame)
1443 bool bSelectObj = bSelectedFrame &&
m_pWrtShell->IsObjSelectable( aCursorPos );
1446 bool bSavedFlagValue =
m_pWrtShell->IsMacroExecAllowed();
1450 m_pViewImpl->SetRestorePosition(aCursorPos, bSelectObj);
1453 m_pWrtShell->SwCursorShell::SetCursor( aCursorPos, !bSelectObj );
1456 bool bInHeader =
true;
1457 if (
m_pWrtShell->IsInHeaderFooter( &bInHeader ) )
1484 m_pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
1488 bool bUsrPrefModified =
false;
1489 if (bGotKeepRatio && bKeepRatio != pVOpt->
IsKeepRatio())
1493 bUsrPrefModified =
true;
1498 bUsrPrefModified =
true;
1500 if (bUsrPrefModified)
1502 SW_MOD()->ApplyUsrPref(aUsrPref,
this);
1506 const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
1509 const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
1516 const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1517 1 < nViewLayoutColumns &&
1519 eZoom != SvxZoomType::PERCENT;
1521 if ( !bZoomNeedsViewLayout )
1524 if ( bSetViewLayoutSettings )
1525 SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode,
true );
1527 if ( bZoomNeedsViewLayout )
1530 if ( bSetViewSettings )
1531 SetZoom( eZoom, nZoomFactor,
true );
1537 if ( bGotVisibleLeft && bGotVisibleTop )
1544 aTopLeft.setX( (
m_aDocSz.
Width() + lBorder - nEditWidth ) / 2 );
1549 if( aTopLeft.X() > nXMax )
1550 aTopLeft.setX( nXMax < 0 ? 0 : nXMax );
1554 else if (bGotVisibleLeft && bGotVisibleTop && bGotVisibleRight && bGotVisibleBottom )
1570 std::vector<beans::PropertyValue> aVector;
1591 const sal_Int16 nZoomType =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetZoomType());
1594 const sal_Int16 nViewLayoutColumns =
static_cast< sal_Int16
>(
m_pWrtShell->GetViewOptions()->GetViewLayoutColumns());
1607 "HideWhitespace",
m_pWrtShell->GetViewOptions()->IsHideWhitespaceMode()));
1646 return bText ?
GetWrtShell().SwCursorShell::HasSelection()
1676 bool bCallBase =
true;
1677 if(
auto pChangedHint = dynamic_cast<const FmDesignModeChangedHint*>(&rHint))
1679 bool bDesignMode = pChangedHint->GetDesignMode();
1685 AttrChangedNotify(
nullptr);
1696 case SfxHintId::Dying:
1704 case SfxHintId::ModeChanged:
1714 case SfxHintId::TitleChanged:
1740 SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
1742 SfxCallMode::ASYNCHRON, { &aItem });
1746 case SfxHintId::SwDrawViewsCreated:
1754 SfxCallMode::SYNCHRON, { &aItem });
1758 case SfxHintId::RedlineChanged:
1760 static sal_uInt16
const aSlotRedLine[] = {
1780 #if defined(_WIN32) || defined UNX
1784 uno::Reference< XScannerManager2 > xScanMgr =
SW_MOD()->GetScannerManager();
1787 const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
1788 const ScanError eError = xScanMgr->getError( aContext );
1790 if( ScanError_ScanErrorNone == eError )
1792 const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
1801 m_pWrtShell->InsertGraphic( OUString(), OUString(), aGrf );
1830 pVFrame->
SetChildWindow( SwInputChild::GetChildWindowId(),
false );
1902 return aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.
HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
1950 uno::Reference<lang::XMultiServiceFactory>
xFactory(
GetDocShell()->GetModel(), uno::UNO_QUERY);
1951 uno::Reference<beans::XPropertySet> xSettings(
1952 xFactory->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY);
1953 OUString sDataSourceName =
"";
1954 xSettings->getPropertyValue(
"CurrentDatabaseDataSource") >>= sDataSourceName;
1956 return sDataSourceName;
1962 Reference< XDatabaseContext> xDatabaseContext = DatabaseContext::create(xContext);
1964 return xDatabaseContext->hasByName(sDataSourceName);
1971 o_rData = *
SW_MOD()->GetPrtOptions(bWeb);
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void SetOptions(InputContextFlags nOptions)
OString stripEnd(const OString &rIn, char c)
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
SfxObjectShellLock CreateTmpSelectionDoc()
static bool IsPasteOwnFormat(const TransferableDataHelper &)
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
#define FN_INSERT_PICTURE_CONTENT_CONTROL
#define FN_REDLINE_ACCEPT_ALL
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 * >())
std::unique_ptr< SwFormatClipboard > m_pFormatClipboard
SwXTextView * GetUNOObject_Impl()
OString getLOKPayload(int nType, int nViewId, bool *ignore) const
#define FN_REDLINE_REJECT_ALL
virtual void ApplyViewOptions(const SwViewOption &rOpt)
bool IsPasteSpecialAllowed()
void SetActive(bool bOn=true)
std::unique_ptr< SwViewGlueDocShell > m_xGlueDocShell
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false)
SfxChildWindow * GetChildWindow(sal_uInt16)
FieldUnit GetVScrollMetric() const
void SetReadonly(bool bSet)
virtual void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &) override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
SAL_DLLPRIVATE void CheckReadonlyState()
void SetDesignMode(bool bOn=true)
constexpr WinBits WB_EXTRAFIELD
void InitPrintOptionsFromApplication(SwPrintData &o_rData, bool const bWeb)
constexpr auto toTwips(N number, Length from)
SfxViewFrame * GetFrame() const
#define FN_SET_SUPER_SCRIPT
void SetZoom(sal_uInt16 n)
#define FN_DELETE_BACK_SENT
virtual ~SwView() override
std::unique_ptr< SwPostItMgr > m_pPostItMgr
void AddTransferable(SwTransferable &rTransferable)
std::unique_ptr< SwWrtShell > m_pWrtShell
constexpr auto WB_STDRULER
void SetViewLayout(sal_uInt16 nColumns, bool bBookMode, bool bViewOnly=false)
constexpr SwTwips DOCUMENTBORDER
bool IsPasteSpreadsheet(bool bHasOwnTableCopied)
void Pop(SfxShell &rShell, SfxDispatcherPopFlags nMode=SfxDispatcherPopFlags::NONE)
void Left(const tools::Long nLeft)
VclPtr< SvxRuler > m_pHRuler
void SetDisableFlags(SfxDisableFlags nFlags)
void ImpSetVerb(SelectionType nSelType)
SfxDispatcher * GetDispatcher()
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getViewSettings() override
static bool IsPaste(const SwWrtShell &, const TransferableDataHelper &)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
void DisposeUndoManager()
SAL_DLLPRIVATE void CheckReadonlySelection()
Reference< XFrame > xFrame
bool m_bOldShellWasPagePreview
css::uno::Reference< css::frame::XModel3 > GetModel() const
void SetViewLayoutColumns(sal_uInt16 nNew)
void SetSlotFilter(SfxSlotFilterState nEnable=SfxSlotFilterState::DISABLED, o3tl::span< sal_uInt16 const > pSIDs=o3tl::span< sal_uInt16 const >())
static bool lcl_IsOwnDocument(SwView &rView)
#define FN_DELETE_WHOLE_LINE
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
virtual void WriteUserData(OUString &, bool bBrowse=false) override
void RemoveChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
static std::unique_ptr< SearchAttrItemList > s_xSearchList
void LaunchOLEObj(sal_Int32 nVerb=css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY)
virtual SfxBindings & GetBindings() override
static std::unique_ptr< SearchAttrItemList > s_xReplaceList
Dialog to specify the properties of date form field.
#define FN_INSERT_COLUMN_BREAK
Of course Writer needs its own rectangles.
const SwFrameFormat * m_pLastTableFormat
void Invalidate(sal_uInt16 nId)
bool IsShowHiddenPara() const
#define FN_INSERT_LINEBREAK
virtual SfxObjectShell * GetObjectShell() override
void AddTransferable(SwTransferable &rTransferable)
bool HasFormat(SotClipboardFormatId nFormat) const
#define FN_PASTE_NESTED_TABLE
SwView_Impl * GetViewImpl()
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
FieldUnit GetHScrollMetric() const
SwWrtShell & GetWrtShell() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void SetKeepRatio(bool b)
SvxZoomType GetZoomType() const
constexpr auto convertTwipToMm100(N n)
bool m_bAttrChgNotifiedWithRegistrations
#define FN_DELETE_BACK_WORD
void SetDrawFuncPtr(std::unique_ptr< SwDrawBase > pFuncPtr)
Used by the UI to modify the document model.
#define FN_INSERT_CONTENT_CONTROL
constexpr tools::Long Width() const
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
vcl::Window & GetWindow() const
SelectionType m_nSelectionType
static BitmapEx GetBitmap(const css::uno::Reference< css::awt::XBitmap > &rxBitmap)
SfxShell * GetShell(sal_uInt16 nIdx) const
virtual void SelectShell()
bool m_bVScrollbarEnabled
#define FN_INSERT_BOOKMARK
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
bool getBrowseMode() const
void PrtOLENotify(bool bAll)
SfxFrame & GetFrame() const
void setBrowseMode(bool bSet)
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
#define FN_INSERT_CHECKBOX_CONTENT_CONTROL
bool IsViewVScrollBar() const
virtual void ShowCursor(bool bOn=true) override
static bool s_bJustOpened
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
FmFormShell * m_pFormShell
SfxObjectCreateMode GetCreateMode() const
static SotExchangeDest GetSotDestination(const SwWrtShell &rSh)
void DocSzChgd(const Size &rNewSize)
virtual void Deactivate()
bool IsViewHRuler(bool bDirect=false) const
VclPtr< SwEditWin > m_pEditWin
SotExchangeDest m_nLastPasteDestination
#define FN_SHRINK_FONT_SIZE
void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &rValues)
SfxItemPool & GetPool() const
virtual OUString GetSelectionText(bool bCompleteWords=false) override
SfxDispatcher & GetDispatcher()
IMPL_LINK_NOARG(SwView, FormControlActivated, LinkParamNone *, void)
constexpr OUStringLiteral aData
#define SAL_N_ELEMENTS(arr)
virtual void ReadUserData(const OUString &, bool bBrowse=false) override
void SetHideWhitespaceMode(bool bMode)
#define FN_TABLE_PASTE_ROW_BEFORE
void FlushPendingLOKInvalidateTiles()
SwDoc * GetDoc()
returns Doc. But be careful!
SwView(SfxViewFrame *pFrame, SfxViewShell *)
#define FN_REDLINE_ACCEPT_DIRECT
virtual tools::Rectangle GetVisArea(sal_uInt16 nAspect) const override
virtual void ClearFieldActivation()=0
void SetView(SwView *pVw)
Set View for actions via Shell.
virtual FmFormShell * GetFormShell() override
#define FN_SET_SUB_SCRIPT
std::unique_ptr< SwGlossaryHdl > m_pGlosHdl
void SetZoomType(SvxZoomType eZoom_)
bool IsCursorInProtectedArea() const
bool HasSelection() const
bool m_bIsPreviewDoubleClick
bool SelWrd(const Point *=nullptr)
void SetInputContext(const InputContext &rInputContext)
void SetWindow(vcl::Window *pViewPort)
VclPtr< vcl::Window > m_pScrollFill
bool IsViewLayoutBookMode() const
void SetOnlineSpell(bool b)
void GetOptions(SvtLinguOptions &rOptions) const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
css::uno::Reference< css::datatransfer::XTransferable > GetXTransferable() const
virtual void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &) override
SwViewGlueDocShell(SwView &rView, SwDocShell &rDocSh)
SfxBindings & GetBindings()
Size GetOutputSize() const
#define FN_REDLINE_PREV_CHANGE
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
bool IsViewVRuler(bool bDirect=false) const
#define FN_INSERT_BREAK_DLG
SfxShell subclass that is used while interacting with the editeng-based text of a shape...
void ShowUIElement(const OUString &sElementURL) const
FlyProtectFlags
values can be combined via logical or
static bool IsPasteSpecial(const SwWrtShell &rWrtShell, const TransferableDataHelper &)
void ShowVScrollbar(bool bShow)
SfxDisableFlags GetDisableFlags() const
virtual void SetReadonlyOption(bool bSet) override
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
void SetName(const OUString &rName)
virtual bool PrepareClose(bool bUI=true) override
Point PixelToLogic(const Point &rDevicePt) const
SfxItemState QueryState(sal_uInt16 nSID, const SfxPoolItem *&rpState)
void RequestDoubleBuffering(bool bRequest)
SwDrawBase * GetDrawFuncPtr() const
void SetTimeout(sal_uInt64 nTimeoutMs)
virtual ErrCode DoVerb(sal_Int32 nVerb) override
VclPtr< SvxRuler > m_pVRuler
InputContextFlags GetOptions() const
SfxViewShell * GetViewShell() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const Size & GetMargin() const
SwDocShell * GetDocShell()
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
#define SFX_OBJECTBAR_OBJECT
void ShowHScrollbar(bool bShow)
bool IsHideWhitespaceMode() const
OUString GetDataSourceName() const
static int lcl_CmpIds(const void *pFirst, const void *pSecond)
WinBits const WB_SIZEABLE
#define FN_DELETE_BACK_LINE
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
void SetVerbs(const css::uno::Sequence< css::embed::VerbDescriptor > &aVerbs)
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
void SetViewLayoutBookMode(bool bNew)
SwWrtShell * GetWrtShellPtr() const
VclPtr< SwScrollbar > m_pVScrollbar
SfxDispatcher * GetDispatcher()
virtual bool IsTextEdit() const final override
#define SAL_WARN_IF(condition, area, stream)
virtual void flushPendingLOKInvalidateTiles() override
std::unique_ptr< SwView_Impl > m_pViewImpl
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
#define FN_DELETE_BACK_PARA
const SwViewOption * GetViewOptions() const
#define FN_REDLINE_NEXT_CHANGE
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
virtual SAL_DLLPRIVATE void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SAL_INFO(area, stream)
bool m_bPasteSpecialState
::OutputDevice const * GetOutDev() const
void UpdatePointer(const Point &, sal_uInt16 nButtons=0)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
static VclPtr< reference_type > Create(Arg &&...arg)
void SetChildWindow(sal_uInt16 nId, bool bVisible, bool bSetFocus=true)
#define FN_TABLE_PASTE_COL_BEFORE
void Top(const tools::Long nTop)
OUString GetSelectionTextParam(bool bCompleteWords, bool bEraseTrail)
VclPtr< SwScrollbar > m_pHScrollbar
void Push(SfxShell &rShell)
sal_uInt16 GetZoom() const
bool IsInModalMode() const
void Execute(SfxRequest &)
Reference< XComponentContext > getProcessComponentContext()
void SetInvokeHandler(const Link< Timer *, void > &rLink)
SfxObjectShellLock BuildTmpSelectionDoc()
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
SwGlossaryHdl * GetGlosHdl()
#define FN_GROW_FONT_SIZE
const tools::Rectangle & GetVisArea() const
bool IsEnableSetModified() const
#define FN_SHIFT_BACKSPACE
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
void InvalidateAll(bool bWithMsg)
virtual void SetCurrentViewShell(SwViewShell *pNew)=0
!!!The old layout must be deleted!!!
#define SAL_WARN(area, stream)
Reference< XSingleServiceFactory > xFactory
const SwView * GetView() const
Point OutputToScreenPixel(const Point &rPos) const
bool IsShowHiddenChar(bool bHard=false) const
#define FN_INSERT_DATE_CONTENT_CONTROL
bool IsShowHiddenField() const
void EnableSetModified(bool bEnable=true)
virtual SdrView * GetDrawView() const override
virtual tools::Rectangle getLOKVisibleArea() const override
SelectionType GetSelectionType() const
SAL_DLLPRIVATE void CreateScrollbar(bool bHori)
static SvxSearchItem * s_pSrchItem
#define FN_INSERT_DROPDOWN_CONTENT_CONTROL
bool IsViewHScrollBar() const
#define FN_REDLINE_REJECT_DIRECT
bool m_bHScrollbarEnabled
virtual OString getLOKPayload(int nType, int nViewId, bool *ignore) const override
void ReadUserDataSequenceValue(const css::beans::PropertyValue *pValue)
ToolbarId GetObjectBarId(sal_uInt16 nPos) const
sal_uInt16 GetViewLayoutColumns() const
virtual bool HasSelection(bool bText=true) const override
void AddChildEventListener(const Link< VclWindowEvent &, void > &rEventListener)
virtual bool PrepareClose(bool bUI=true)
bool m_bInitOnceCompleted
void SetNewWindowAllowed(bool bSet)
#define FN_FORMAT_DROPCAPS
static bool IsDataSourceAvailable(const OUString sDataSourceName)
bool m_bDetectedRangeSegmentation false