20 #include <config_features.h>
22 #include <officecfg/Office/Common.hxx>
43 #include <osl/diagnose.h>
60 #include <docfunc.hxx>
79 #include <strings.hrc>
85 #define ShellClass_SwDocShell
87 #include <swslots.hxx>
88 #include <com/sun/star/document/UpdateDocMode.hpp>
90 #include <com/sun/star/script/XLibraryContainer.hpp>
91 #include <com/sun/star/document/XDocumentProperties.hpp>
92 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
93 #include <com/sun/star/sdb/DatabaseContext.hpp>
94 #include <com/sun/star/sdb/XDocumentDataSource.hpp>
95 #include <com/sun/star/uri/UriReferenceFactory.hpp>
96 #include <com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.hpp>
97 #include <com/sun/star/frame/XStorable.hpp>
98 #include <ooo/vba/XSinkCaller.hpp>
122 uno::Reference<text::XTextRange> const& xInsertPosition)
129 Reader *
const pRead = StartConvertFrom(rMedium, pReader,
nullptr, &aPam);
132 ErrCode const nError = pReader->Read(*pRead);
141 bool bAPICall =
false;
148 std::shared_ptr<const SfxFilter> pFlt = rMedium.
GetFilter();
154 VclMessageType::Info, VclButtonsType::Ok,
160 OUString aFileName( rMedium.
GetName() );
170 rpRdr.reset(
new SwReader( rMedium, aFileName, *pPaM ));
171 else if (pCursorShell)
180 const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.
GetItemSet(), SID_UPDATEDOCMODE,
false);
183 if (!pFlt->GetDefaultTemplate().isEmpty())
184 pRead->SetTemplateName( pFlt->GetDefaultTemplate() );
193 (pItem = pSet->
GetItemIfSet( SID_FILE_FILTEROPTIONS )) )
196 pRead->GetReaderOpt().SetASCIIOpts( aOpt );
211 m_xDoc->setDocAccTitle(OUString());
214 if (
auto pSysWin = pFrame1->GetWindow().GetSystemWindow())
216 pSysWin->SetAccessibleName(OUString());
219 SwWait aWait( *
this,
true );
222 SW_MOD()->SetEmbeddedLoadSave(
228 m_xDoc->RemoveAllFormatLanguageDependencies();
230 ErrCode nErr = pRdr->Read( *pRead );
233 if (
m_xDoc.get() != &pRdr->GetDoc())
249 SW_MOD()->SetEmbeddedLoadSave(
false );
254 if (bOk && !
m_xDoc->IsInLoadAsynchron())
270 SwWait aWait( *
this,
true );
287 case SfxObjectCreateMode::INTERNAL:
291 case SfxObjectCreateMode::ORGANIZER:
295 xWrt->SetOrganizerMode(
true );
297 nErr = aWrt.
Write( xWrt );
298 xWrt->SetOrganizerMode(
false );
302 case SfxObjectCreateMode::EMBEDDED:
304 SW_MOD()->SetEmbeddedLoadSave(
true );
307 case SfxObjectCreateMode::STANDARD:
310 if (
m_xDoc->ContainsMSVBasic())
314 m_xDoc->SetContainsMSVBasic(
false );
324 bool bLockedView(
false);
332 nErr = aWrt.
Write( xWrt );
339 SW_MOD()->SetEmbeddedLoadSave(
false );
358 if (!rShell.IsViewLocked())
361 rShell.LockView(
true);
369 pShell->LockView(
false);
374 return std::make_unique<LockAllViewsGuard_Impl>(
GetEditShell());
380 SwWait aWait( *
this,
true );
403 pOldFilter->GetUserData() ==
"CWW6" ||
404 pOldFilter->GetUserData() ==
"WW6" ) )
408 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
410 uno::Reference<document::XDocumentProperties> xDocProps
411 = xDPS->getDocumentProperties();
412 xDocProps->setTemplateName(OUString());
413 xDocProps->setTemplateURL(OUString());
414 xDocProps->setTemplateDate(::util::DateTime());
423 bool bSaveDS = bHasEmbedded && bURLChanged;
429 bSaveDS = !pNoEmbDS->GetValue();
443 const auto aURLIter = std::find_if(rArgs.begin(), rArgs.end(),
444 [](
const auto&
v) {
return v.Name ==
"URL"; });
445 if (aURLIter != rArgs.end())
446 aURLIter->Value >>= aURL;
452 auto xUri = css::uri::UriReferenceFactory::create(xContext)->parse(aURL);
454 xUri = css::uri::VndSunStarPkgUrlReferenceFactory::create(xContext)
455 ->createVndSunStarPkgUrlReference(xUri);
457 aURL = xUri->getUriReference() +
"/"
461 bool bCopyTo =
GetCreateMode() == SfxObjectCreateMode::EMBEDDED;
466 bCopyTo = pSaveToItem->GetValue();
469 auto xDatabaseContext = sdb::DatabaseContext::create(xContext);
470 uno::Reference<sdb::XDocumentDataSource> xDataSource(xDatabaseContext->getByName(aURL),
474 uno::Reference<frame::XStorable> xStorable(xDataSource->getDatabaseDocument(),
506 if (
m_xDoc->ContainsMSVBasic())
510 m_xDoc->SetContainsMSVBasic(
false );
526 const bool bIsModified =
m_xDoc->getIDocumentState().IsModified();
527 m_xDoc->GetIDocumentUndoRedo().LockUndoNoModifiedPosition();
532 SW_MOD()->SetEmbeddedLoadSave(
538 bool bLockedView(
false);
546 nErr = aWrt.
Write( xWrt );
553 m_xDoc->getIDocumentState().SetModified();
554 m_xDoc->GetIDocumentUndoRedo().UnLockUndoNoModifiedPosition();
556 m_xDoc->SetOle2Link( aOldOLELnk );
558 SW_MOD()->SetEmbeddedLoadSave(
false );
563 m_xDoc->cleanupUnoCursorTable();
576 return dynamic_cast<SwSrcView*
>( pViewShell );
581 std::shared_ptr<const SfxFilter> pFlt = rMedium.
GetFilter();
590 VclMessageType::Info, VclButtonsType::Ok,
610 if (
m_xDoc->ContainsMSVBasic())
612 bool bSave = pFlt->GetUserData() ==
"CWW8"
618 OSL_ENSURE( !xStg->
GetError(),
"No storage available for storing VBA macros!" );
623 m_xDoc->SetContainsMSVBasic(
true );
632 if( pFlt->GetUserData() ==
"HTML" )
634 #if HAVE_FEATURE_SCRIPTING
640 uno::Reference< XNameAccess > xLib;
642 for(
const OUString& rName : aNames)
644 Any aLib = xLibCont->getByName(rName);
649 if(aModNames.hasElements())
662 m_xDoc->getIDocumentStatistics().UpdateDocStat(
false,
true );
674 if( xWriter->IsStgWriter() &&
681 if( dynamic_cast< const SwWebDocShell *>(
this ) != nullptr )
683 else if( dynamic_cast< const SwGlobalDocShell *>(
this ) != nullptr )
689 if( SotClipboardFormatId::STARWRITERWEB_8 == nSaveClipId ||
690 SotClipboardFormatId::STARWRITERWEB_60 == nSaveClipId ||
691 SotClipboardFormatId::STARWRITERWEB_50 == nSaveClipId ||
692 SotClipboardFormatId::STARWRITERWEB_40 == nSaveClipId )
694 else if( SotClipboardFormatId::STARWRITERGLOB_8 == nSaveClipId ||
695 SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE == nSaveClipId ||
696 SotClipboardFormatId::STARWRITERGLOB_60 == nSaveClipId ||
697 SotClipboardFormatId::STARWRITERGLOB_50 == nSaveClipId ||
698 SotClipboardFormatId::STARWRITERGLOB_40 == nSaveClipId )
705 if( nMyType != nSaveType )
721 uno::Reference < beans::XPropertySet > xSet( rMedium.
GetStorage(), uno::UNO_QUERY );
725 catch (
const uno::Exception&)
731 bool bRet =
SaveAs( rMedium );
733 if( nMyType != nSaveType )
749 if(
nullptr != pSet )
752 sItemOpt = pItem->GetValue();
754 if(!sItemOpt.isEmpty())
757 xWriter->SetAsciiOptions( aOpt );
761 SW_MOD()->SetEmbeddedLoadSave(
766 const OUString aFileName( rMedium.
GetName() );
771 SwWait aWait( *
this,
true );
778 nErrno = aWrt.
Write( xWriter, &aFileName );
800 nErrno = aWrt.
Write( xWriter, &aFileName );
804 SW_MOD()->SetEmbeddedLoadSave(
false );
805 SetError(nErrno ? nErrno : nVBWarning);
821 m_xDoc->getIDocumentState().SetModified();
823 m_xDoc->getIDocumentState().ResetModified();
833 for( sal_Int32
n = aNames.getLength();
n;
n-- )
837 OSL_FAIL(
"Copying of objects didn't work!" );
854 if ( bResetModified )
861 std::unique_ptr<JobSetup> pOrig;
864 const JobSetup* pCurrentJobSetup =
m_xDoc->getIDocumentDeviceAccess().getJobsetup();
865 if( pCurrentJobSetup )
866 pOrig.reset(
new JobSetup( *pCurrentJobSetup ));
867 m_xDoc->getIDocumentDeviceAccess().setJobsetup( rSetup );
877 const bool bWeb =
dynamic_cast< const SwWebDocShell *
>( this ) !=
nullptr;
884 m_xDoc->getIDocumentDeviceAccess().setJobsetup( *pOrig );
886 if ( bResetModified )
898 if ( aRect.
Right() > aSz.Width() )
899 nMoveX = aSz.Width() - aRect.
Right();
900 if ( aRect.
Bottom() > aSz.Height() )
901 nMoveY = aSz.Height() - aRect.
Bottom();
902 aRect.
Move( nMoveX, nMoveY );
903 nMoveX = aRect.
Left() < 0 ? -aRect.
Left() : 0;
904 nMoveY = aRect.
Top() < 0 ? -aRect.
Top() : 0;
905 aRect.
Move( nMoveX, nMoveY );
922 const SwRect aPageRect = pNd->FindPageFrameRect();
929 if (aRect.GetHeight() > 2*aRect.GetWidth())
930 aRect.
SetSize(
Size(aRect.GetWidth(), 2*aRect.GetWidth()));
931 else if (aRect.GetWidth() > 2*aRect.GetHeight())
932 aRect.SetSize(
Size(2*aRect.GetHeight(), aRect.GetHeight()));
941 return m_xDoc->getIDocumentDeviceAccess().getPrinter(
false );
946 return m_xDoc->getIDocumentDeviceAccess().getReferenceDevice(
false );
963 if ( nStates & HiddenInformation::RECORDEDCHANGES )
966 nState |= HiddenInformation::RECORDEDCHANGES;
968 if ( nStates & HiddenInformation::NOTES )
970 OSL_ENSURE(
GetWrtShell(),
"No SwWrtShell, no information" );
972 nState |= HiddenInformation::NOTES;
987 case SID_PRINTPREVIEW:
996 if (
auto pSwView = dynamic_cast<SwView*>( pTmpFrame->
GetViewShell() ) )
997 if (pSwView->GetWrtShell().GetViewOptions()->getBrowseMode())
1017 case SID_AUTO_CORRECT_DLG:
1021 case SID_SOURCEVIEW:
1025 bool bSourceView =
dynamic_cast<SwSrcView*
>( pCurrView ) !=
nullptr;
1048 case SID_BROWSER_MODE:
1059 if (dynamic_cast<const SwGlobalDocShell*>(
this) !=
nullptr
1065 if (dynamic_cast<const SwWebDocShell*>(
this) !=
nullptr
1071 if( dynamic_cast< const SwWebDocShell *>(
this ) !=
nullptr )
1075 case SID_ATTR_YEAR2000:
1079 static_cast< sal_uInt16 >(
1084 case SID_ATTR_CHAR_FONTLIST:
1089 case SID_MAIL_PREPAREEXPORT:
1094 const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.
GetLinks();
1096 if( !rLnks.empty() )
1101 bRet =
m_xDoc->HasInvisibleContent();
1106 case SID_NOTEBOOKBAR:
1110 u"modules/swriter/ui/");
1123 default: OSL_ENSURE(
false,
"You cannot get here!");
1174 if (!rRedlineAuthor.isEmpty())
1194 const bool bHasDocToStayModified(
m_xDoc->getIDocumentState().IsModified() &&
m_xDoc->getIDocumentLinksAdministration().LinksUpdated() );
1201 if(
auto pSrcView = dynamic_cast<SwSrcView*>( pShell) )
1202 pSrcView->Load(
this);
1206 if ( bHasDocToStayModified && !
m_xDoc->getIDocumentState().IsModified() )
1208 m_xDoc->getIDocumentState().SetModified();
1216 m_xDoc->getIDocumentLinksAdministration().GetLinkManager().CancelTransfers();
1233 for(
SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
1269 for(
SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
1292 uno::Reference< frame::XController >
1295 css::uno::Reference< css::frame::XController > aRet;
1304 "OnPageCountChange",
1306 "OnMailMergeFinished",
1308 "OnFieldMergeFinished",
1316 sal_Int32 nLen = aRet.getLength();
1317 aRet.realloc(nLen + 6);
1318 OUString* pNames = aRet.getArray();
1333 return OUString::createFromAscii(s_EventNames[nIndex]);
1380 if (pRedlineProtectItem
1381 && pRedlineProtectItem->
GetValue() == aPasswd.hasElements())
1384 if (!rNewPassword.isEmpty())
1389 Sequence< sal_Int8 > aNewPasswd;
1408 if (pRedlineProtectItem
1409 && pRedlineProtectItem->GetValue() == aPasswdHash.hasElements())
1411 rPasswordHash = aPasswdHash;
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
SfxViewFrame * GetViewFrame() const
SFX_IMPL_SUPERCLASS_INTERFACE(DrawDocShell, SfxObjectShell)
#define FN_ABSTRACT_NEWDOC
const tools::SvRef< SotStorage > & getSotStorageRef() const
bool IsSkipImages() const
virtual void SetVisArea(const tools::Rectangle &rVisArea)
#define FN_REDLINE_ACCEPT_ALL
virtual void OnDocumentPrinterChanged(Printer *pNewPrinter) override
SwNode & GetNode(bool bPoint=true) const
virtual void SetModified(bool=true) override
#define FN_REDLINE_REJECT_ALL
#define FN_NEW_GLOBAL_DOC
static const char * s_EventNames[]
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
std::vector< SwViewShell * > m_aViewWasUnLocked
constexpr OUStringLiteral FILTER_TEXT_DLG
text filter with encoding dialog
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
virtual const css::uno::Sequence< sal_Int8 > & GetRedlinePassword() const =0
const SwOLEObj & GetOLEObj() const
virtual void SetChangeRecording(bool bActivate, bool bLockAllViews=false) override
void SetState(const SfxItemSet &rSet)
#define ERR_SWG_WRITE_ERROR
ErrCode SaveOrDelMSVBAStorage(SfxObjectShell &rDoc, SotStorage &rStor, bool bSaveInto, const OUString &rStorageName)
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
virtual SAL_DLLPRIVATE bool ConvertTo(SfxMedium &rMedium) override
constexpr SwTwips DOCUMENTBORDER
void GetXMLWriter([[maybe_unused]] std::u16string_view, const OUString &rBaseURL, WriterRef &xRet)
sal_Int32 GetVersion() const
std::unique_ptr< comphelper::EmbeddedObjectContainer > m_pOLEChildList
const OUString & GetName() const
LockAllViewsGuard_Impl(SwViewShell *pViewShell)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
css::uno::Reference< css::frame::XModel3 > GetModel() const
css::uno::Reference< ooo::vba::XSinkCaller > mxAutomationDocumentEventsCaller
const JobSetup & GetJobSetup() const
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
sal_uInt16 GetValue() const
static SVL_DLLPUBLIC void GetHashPassword(css::uno::Sequence< sal_Int8 > &rPassHash, const char *pPass, sal_uInt32 nLen)
static void PrtOle2(SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData &rOptions, vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
#define FN_ABSTRACT_STARIMPRESS
virtual bool SaveCompleted(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual bool SaveAs(SfxMedium &rMedium)
virtual css::uno::Sequence< OUString > GetEventNames() override
virtual std::unique_ptr< LockAllViewsGuard > LockAllViews() override
const OUString & GetRedlineAuthor() const
static void StoreEmbeddedDataSource(const css::uno::Reference< css::frame::XStorable > &xStorable, const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString &rStreamRelPath, const OUString &rOwnURL, bool bCopyTo=false)
void SetViewShell_Impl(SfxViewShell *pView)
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
virtual const ::sfx2::IXmlIdRegistry * GetXmlIdRegistry() const override
SwEditShell * GetEditShell()
Of course Writer needs its own rectangles.
void SetRedlineFlagsAndCheckInsMode(RedlineFlags eMode)
void LoadingFinished()
linked graphics are now loaded on demand.
std::unique_ptr< sfx2::StyleManager > m_pStyleManager
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates) override
#i20883# Digital Signatures and Encryption
virtual OutputDevice * GetDocumentRefDev() override
void SetVisArea(const tools::Rectangle &, bool bUpdateScrollbar=true)
SwWrtShell & GetWrtShell() const
virtual void UpdateLinks() override
#i42634# Overwrites SfxObjectShell::UpdateLinks This new function is necessary to trigger update of l...
RedlineFlags GetRedlineFlags() const
For Redlining.
void FinishedLoading(SfxLoadedFlags nWhich=SfxLoadedFlags::ALL)
OUString SwResId(TranslateId aId)
void ReadUserData(std::u16string_view)
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
void CallAutomationDocumentEventSinks(const OUString &Method, css::uno::Sequence< css::uno::Any > &Arguments)
const SwView & GetView() const
virtual void CancelTransfers()
Reader * GetReader(const OUString &rFltName)
Return reader based on the name.
SW_DLLPUBLIC void UpdateDataOnActiveSidebarWin()
virtual SAL_DLLPRIVATE bool SaveAs(SfxMedium &rMedium) override
void GetWriter(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
constexpr OUStringLiteral FILTER_WW8
WinWord 97 filter.
static SfxViewShell * Current()
SvStream * GetOutStream()
#define FILTER_XMLVW
XML filter.
SfxObjectCreateMode GetCreateMode() const
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
virtual sfx2::StyleManager * GetStyleManager() override
const OUString & GetCurrentPersistName() const
SfxItemPool & GetPool() const
virtual void SetProtectionPassword(const OUString &rPassword) override
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
#define SAL_N_ELEMENTS(arr)
virtual void CancelTransfers() override
Cancel transfer (called from SFX).
virtual void UpdateLinks()=0
#i42634# Moved common code of SwReader::Read() and SwDocShell::UpdateLinks() to new SwDoc::UpdateLink...
SwDoc * GetDoc()
returns Doc. But be careful!
PaM is Point and Mark: a selection of the document model.
ErrCode GetSaveWarningOfMSVBAStorage(SfxObjectShell &rDocS)
void SetView(SwView *pVw)
Set View for actions via Shell.
virtual SAL_DLLPRIVATE void Draw(OutputDevice *, const JobSetup &, sal_uInt16 nAspect) override
OLE-stuff.
static SvtFilterOptions & Get()
const SvBaseLinks & GetLinks() const
virtual css::uno::Sequence< OUString > GetEventNames()
bool EndAllTableBoxEdit()
void InitDrawModelAndDocShell(SwDocShell *pSwDocShell, SwDrawModel *pSwDrawDocument)
virtual SfxObjectShell * GetObjectShell() override
void Push()
store a copy of the current cursor on the cursor stack
SAL_DLLPRIVATE void RemoveLink()
virtual Printer * GetDocumentPrinter() override
SfxBindings & GetBindings()
const OUString & GetValue() const
sal_Int32 const s_nEvents(SAL_N_ELEMENTS(s_EventNames))
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
static SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
OUString GetBaseURL(bool bForSaving=false)
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
SfxItemSet * GetItemSet() const
virtual comphelper::EmbeddedObjectContainer & getEmbeddedObjectContainer() const override
Marks a node in the document model.
void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument > const &xDocument)
virtual void setJobsetup(const JobSetup &rJobSetup)=0
Sets the Jobsetup.
rtl::Reference< SwDoc > m_xDoc
Document.
ring_container GetRingContainer()
Reader * StartConvertFrom(SfxMedium &rMedium, SwReaderPtr &rpRdr, SwCursorShell const *pCursorSh=nullptr, SwPaM *pPaM=nullptr)
For inserting document.
std::unique_ptr< FontList > m_pFontList
Current Fontlist.
const tools::Rectangle & GetVisArea() const
virtual HiddenInformation GetHiddenInformationState(HiddenInformation nStates)
const css::uno::Sequence< css::beans::PropertyValue > & GetArgs() const
static OUString GetFormatMimeType(SotClipboardFormatId nFormat)
SAL_DLLPRIVATE void CalcLayoutForOLEObjects()
const std::shared_ptr< const SfxFilter > & GetFilter() const
virtual void setPrinter(SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged)=0
Set the printer at the document.
SfxViewShell * GetViewShell() const
void SetValue(bool const bTheValue)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange,::sw::TextRangeMode const eMode)
static SwSrcView * lcl_GetSourceView(SwDocShell const *pSh)
bool IsOLEObjectDeleted() const
SW_DLLPUBLIC bool HasActiveSidebarWin() const
rtl::Reference< SfxStyleSheetBasePool > m_xBasePool
Passing through for formats.
bool isExportLocked() const
static bool StateMethod(SfxBindings &rBindings, std::u16string_view rUIFile, bool bReloadNotebookbar=false)
const Size & GetDocSz() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool AllDrawObjsOnPage(SwDoc &p_rDoc)
method to check, if given Writer document contains only drawing objects, which are completely on its ...
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
SfxInPlaceClient * GetIPClient() const
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
void SaveContentTo(SfxMedium &rMed)
OUString const & GetPrinterName() const
SFX_IMPL_OBJECTFACTORY(DrawDocShell, SvGlobalName(SO3_SIMPRESS_CLASSID),"simpress") void DrawDocShell
void DisableItem(sal_uInt16 nWhich)
tools::Rectangle SVRect() const
void setUserAllowsLinkUpdate(bool bNew)
css::uno::Reference< css::embed::XStorage > GetStorage(bool bCreateTempFile=true)
static bool IsHeadlessModeEnabled()
SwView * m_pView
For "historical reasons" nothing can be done without the WrtShell.
~LockAllViewsGuard_Impl()
void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const &xCaller)
css::uno::Reference< css::frame::XController > GetController()
#define FN_OUTLINE_TO_CLIPBOARD
bool IsInPlaceActive() const
virtual bool HasChangeRecordProtection() const override
IDocumentSettingAccess const & getIDocumentSettingAccess() const
tools::Long AdjustWidth(tools::Long n)
void ValidateAllParagraphSignatures(bool updateDontRemove)
Validate all paragraph signatures.
#define WARN_SWG_HTML_NO_MACROS
bool IsLoadWordBasicStorage() const
SwPostItMgr * GetPostItMgr()
const INetURLObject & GetURLObject() const
void setSotStorageRef(const tools::SvRef< SotStorage > &pStgRef)
virtual bool IsChangeRecording() const override
passwword protection for Writer (derived from SfxObjectShell) see also: FN_REDLINE_ON, FN_REDLINE_ON
Reference< XComponentContext > getProcessComponentContext()
css::uno::Reference< css::embed::XStorage > GetOutputStorage()
virtual void SetVisArea(const tools::Rectangle &rRect) override
OLE-stuff.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual SAL_DLLPRIVATE bool ConvertFrom(SfxMedium &rMedium) override
static OUString GetEventName(sal_Int32 nId)
SwFEShell * GetFEShell()
For Core - it knows the DocShell but not the WrtShell!
virtual void CalcLayout() override
To enable set up of StartActions and EndActions.
bool IsEnableSetModified() const
bool IsOLESizeInvalid() const
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SwFootnoteIdxs & GetFootnoteIdxs()
virtual bool GetProtectionHash(css::uno::Sequence< sal_Int8 > &rPasswordHash) override
void SetupStorage(const css::uno::Reference< css::embed::XStorage > &xStorage, sal_Int32 nVersion, bool bTemplate) const
sal_Int16 m_nUpdateDocMode
contains the css::document::UpdateDocMode
const SwView * GetView() const
SAL_DLLPRIVATE void AddLink()
Methods for access to doc.
void EnableSetModified(bool bEnable=true)
virtual SAL_DLLPRIVATE bool SaveCompleted(const css::uno::Reference< css::embed::XStorage > &xStorage) override
constexpr OUStringLiteral FILTER_XML
XML filter.
virtual void SetRedlinePassword(const css::uno::Sequence< sal_Int8 > &rNewPassword)=0
SAL_DLLPRIVATE void RemoveOLEObjects()
#define FILTER_XMLV
XML filter.
void StartAllAction()
For all views of this document.
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
IMPL_LINK(SwDocShell, Ole2ModifiedHdl, bool, bNewStatus, void)
void ClassifyDocPerHighestParagraphClass()
Ensure that the classification of the doc is never lower than the paragraph with the highest classifi...
bool MoveEmbeddedObject(const OUString &rName, EmbeddedObjectContainer &)
void SetError(ErrCode rErr)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
virtual bool Save() override
global IO.
bool IsViewLocked() const
#define FN_OUTLINE_TO_IMPRESS
css::uno::Reference< css::script::XLibraryContainer > GetBasicContainer()
css::uno::Reference< css::frame::XController > GetController() const
css::uno::Reference< ooo::vba::word::XDocument > mxAutomationDocumentObject
void GetState(SfxItemSet &)
bool m_bDetectedRangeSegmentation false
const OUString & getEmbeddedName() const
bool IsInGlobalDocSection() const
SfxMedium * GetMedium() const
static OUString encode(std::u16string_view rText, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)