20#include <config_features.h>
21#include <config_fuzzers.h>
34#include <com/sun/star/frame/XModel.hpp>
35#include <osl/diagnose.h>
69 sal_uInt16 nCol, sal_uInt16 nRow )
72 sal_uInt16 nPhyPageNum, nVirtPageNum;
82 OSL_ENSURE( pFormat,
"Fly not inserted" );
104 sal_uInt16 nCol, sal_uInt16 nRow,
bool bLast )
107 sal_uInt16 nPhyPageNum, nVirtPageNum;
117 OSL_ENSURE( pFormat,
"Fly not inserted" );
137 static sal_uInt16 nLabelTitleNo = 0;
138 static sal_uInt16 nBCTitleNo = 0;
140#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
142 std::unique_ptr<SwDBManager> pDBManager(
new SwDBManager(
nullptr));
155#
if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
162 if (
RET_OK != pDlg->Execute() )
176 Printer *pPrt = pDlg->GetPrt();
188 pNewView->AttrChangedNotify(
nullptr);
194 aTmp =
SwResId( STR_LAB_TITLE) +
195 OUString::number(++nLabelTitleNo );
199 aTmp = pDlg->GetBusinessCardStr() +
200 OUString::number( ++nBCTitleNo );
208 OSL_ENSURE( pSh,
"missing WrtShell" );
268 std::optional<SwFieldMgr> pFieldMgr;
270 pFieldMgr->SetEvalExpFields(
false);
291 aFrameVertOrient.
SetVertOrient( text::VertOrientation::TOP );
294 for ( sal_Int32
i = 0;
i < rItem.
m_nRows; ++
i )
296 for ( sal_Int32 j = 0; j < rItem.
m_nCols; ++j )
305 pFirstFlyFormat = pTmp;
347 pFirstFlyFormat = bLabel ?
349 static_cast< sal_uInt16
>(rItem.
m_nCol - 1),
350 static_cast< sal_uInt16
>(rItem.
m_nRow - 1),
true ) :
352 static_cast< sal_uInt16
>(rItem.
m_nCol - 1),
353 static_cast< sal_uInt16
>(rItem.
m_nRow - 1));
360 OSL_ENSURE(pDialogFactory,
"SwAbstractDialogFactory fail!");
362 SwLabDlgUpdateFieldInformation(
xModel, rItem);
365 pFieldMgr->SetEvalExpFields(
true);
366 pFieldMgr->EvalExpFields(pSh);
380 if (pSh && rItem.
m_aWriting.indexOf(
'<') >= 0)
389 assert(pDisp &&
"No dispatcher in frame?");
OUString InsertLabEnvText(SwWrtShell &rSh, SwFieldMgr &rFieldMgr, const OUString &rText)
static const SwFrameFormat * lcl_InsertLabText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, SwFieldMgr &rFieldMgr, sal_uInt16 nCol, sal_uInt16 nRow, bool bLast)
constexpr OUStringLiteral MASTER_LABEL
static const SwFrameFormat * lcl_InsertBCText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, sal_uInt16 nCol, sal_uInt16 nRow)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual void setJobsetup(const JobSetup &rJobSetup)=0
Sets the Jobsetup.
sal_uInt16 GetPaperBin() const
const JobSetup & GetJobSetup() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetTitle(const OUString &rTitle)
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
void SetReturnValue(const SfxPoolItem &)
weld::Window * GetFrameWeld() const
SfxItemPool & GetPool() const
SfxViewShell * GetViewShell() const
SfxDispatcher * GetDispatcher()
SfxFrame & GetFrame() const
static SfxViewFrame * DisplayNewDocument(SfxObjectShell const &i_rDoc, const SfxRequest &i_rCreateDocRequest)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
void SetNumberingType(SvxNumType nSet)
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
virtual SwLabDlgMethod GetSwLabDlgStaticMethod()=0
virtual VclPtr< AbstractSwLabDlg > CreateSwLabDlg(weld::Window *pParent, const SfxItemSet &rSet, SwDBManager *pDBManager, bool bLabel)=0
virtual GlossarySetActGroup SetGlossaryActGroupFunc()=0
static SwAbstractDialogFactory * Create()
void Push()
store a copy of the current cursor on the cursor stack
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
IDocumentDeviceAccess & getIDocumentDeviceAccess()
void StartAllAction()
For all views of this document.
SwSection const * InsertSection(SwSectionData &rNewData, SfxItemSet const *const =nullptr)
void SetNewDoc()
Optimizing UI.
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTextFormatColl(....
bool IsAnyDatabaseFieldInDoc() const
OUString GetUniqueSectionName(const OUString *pChkStr=nullptr) const
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
SwDBData const & GetDBData() const
Database information.
SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)
void DoUndo(bool bOn=true)
Undo.
void SetLabelDoc(bool bFlag)
Labels: Synchronize ranges.
void ChgPageDesc(size_t i, const SwPageDesc &)
size_t GetCurPageDesc(const bool bCalcFrame=true) const
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
SwFrameFormat * WizardGetFly()
Find/delete fly containing the cursor.
const SwPageDesc & GetPageDesc(size_t i) const
bool InsertField(SwInsertField_Data &rData)
void SetCurGroup(const OUString &aGrp, bool bApi=false, bool bAlwaysCreateNew=false)
OUString m_sGlossaryBlockName
OUString m_sGlossaryGroup
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
void InsertLab(SfxRequest &, bool bLabel)
void ChgFooterShare(bool bNew)
void SetFollow(const SwPageDesc *pNew)
SwFrameFormat & GetMaster()
void ChgHeaderShare(bool bNew)
void SetNumType(const SvxNumberType &rNew)
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
void SetLandscape(bool bNew)
SAL_DLLPRIVATE void SetProtectFlag(bool const bFlag)
void SetLinkFileName(OUString const &rNew)
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
const SfxItemPool & GetAttrPool() const
SwWrtShell * GetWrtShellPtr() const
SwGlossaryHdl * GetGlosHdl()
SwDocShell * GetDocShell()
void ShowUIElement(const OUString &sElementURL) const
Used by the UI to modify the document model.
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
void Insert(const OUString &)
bool EndOfSection(bool bSelect=false)
bool Pop(SwCursorShell::PopMode, ::std::optional< SwCallLink > &roLink)
bool StartOfSection(bool bSelect=false)
const SwView & GetView() const
virtual const SfxItemSet * GetOutputItemSet() const override
@ Fixed
Frame cannot be moved in Var-direction.
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(97)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
constexpr OUStringLiteral aData
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, std::u16string_view rNewToken)
const sal_Unicode cTokenSeparator
@ RES_POOLCOLL_STANDARD
Standard.
@ RES_POOLFRM_LABEL
Labels.
Reference< XModel > xModel
void(* GlossarySetActGroup)(const OUString &rNewGroup)
void(* SwLabDlgMethod)(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
OUString SwResId(TranslateId aId)