20 #include <config_features.h>
34 #include <com/sun/star/frame/XModel.hpp>
50 #include <section.hxx>
54 #include <strings.hrc>
68 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 )
108 sal_uInt16 nPhyPageNum, nVirtPageNum;
112 aSet.Put(
SwFormatAnchor( RndStdIds::FLY_AT_PAGE, nPhyPageNum ) );
118 OSL_ENSURE( pFormat,
"Fly not inserted" );
138 static sal_uInt16 nLabelTitleNo = 0;
139 static sal_uInt16 nBCTitleNo = 0;
141 #if HAVE_FEATURE_DBCONNECTIVITY
143 std::unique_ptr<SwDBManager, o3tl::default_delete<SwDBManager>> pDBManager(
new SwDBManager(
nullptr));
156 #if HAVE_FEATURE_DBCONNECTIVITY
163 if (
RET_OK != pDlg->Execute() )
168 GetOutputItemSet()->Get(FN_LABEL));
187 pNewView->AttrChangedNotify(
nullptr);
193 aTmp =
SwResId( STR_LAB_TITLE) +
194 OUString::number(++nLabelTitleNo );
199 OUString::number( ++nBCTitleNo );
207 OSL_ENSURE( pSh,
"missing WrtShell" );
211 SwWait aWait( static_cast<SwDocShell&>(*xDocSh),
true );
257 aItem.SetValue(static_cast<sal_Int8>(pPrt->
GetPaperBin()));
266 std::unique_ptr<SwFieldMgr> pFieldMgr(
new SwFieldMgr);
267 pFieldMgr->SetEvalExpFields(
false);
288 aFrameVertOrient.
SetVertOrient( text::VertOrientation::TOP );
291 for ( sal_Int32
i = 0;
i < rItem.
m_nRows; ++
i )
293 for ( sal_Int32 j = 0; j < rItem.
m_nCols; ++j )
302 pFirstFlyFormat = pTmp;
331 aSect.SetLinkFileName(sLinkName);
332 aSect.SetProtectFlag(
true);
344 pFirstFlyFormat = bLabel ?
346 static_cast< sal_uInt16 >(rItem.
m_nCol - 1),
347 static_cast< sal_uInt16 >(rItem.
m_nRow - 1),
true ) :
349 static_cast< sal_uInt16 >(rItem.
m_nCol - 1),
350 static_cast< sal_uInt16 >(rItem.
m_nRow - 1));
357 OSL_ENSURE(pDialogFactory,
"SwAbstractDialogFactory fail!");
359 SwLabDlgUpdateFieldInformation(xModel, rItem);
362 pFieldMgr->SetEvalExpFields(
true);
363 pFieldMgr->EvalExpFields(pSh);
386 assert(pDisp &&
"No dispatcher in frame?");
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
virtual Printer * GetPrt()=0
void ChgHeaderShare(bool bNew)
sal_uInt16 GetPaperBin() const
virtual VclPtr< AbstractSwLabDlg > CreateSwLabDlg(weld::Window *pParent, const SfxItemSet &rSet, SwDBManager *pDBManager, bool bLabel)=0
void(* GlossarySetActGroup)(const OUString &rNewGroup)
SwFrameFormat * WizardGetFly()
Find/delete fly containing the cursor.
SfxDispatcher * GetDispatcher()
const sal_Unicode cTokenSeparator
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
SwSection const * InsertSection(SwSectionData &rNewData, SfxItemSet const *const =nullptr)
const JobSetup & GetJobSetup() const
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
void DoUndo(bool bOn=true)
Undo.
void SetLabelDoc(bool bFlag)
Labels: Synchronize ranges.
static SfxViewFrame * DisplayNewDocument(SfxObjectShell const &i_rDoc, const SfxRequest &i_rCreateDocRequest)
bool InsertField(const SwInsertField_Data &rData)
SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)
void(* SwLabDlgMethod)(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
void SetFollow(const SwPageDesc *pNew)
virtual const OUString & GetBusinessCardStr() const =0
OUString m_sGlossaryBlockName
Used by the UI to modify the document model.
constexpr OUStringLiteral MASTER_LABEL
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
const SwView & GetView() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
static const SwFrameFormat * lcl_InsertLabText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, SwFieldMgr &rFieldMgr, sal_uInt16 nCol, sal_uInt16 nRow, bool bLast)
void SetLandscape(bool bNew)
SfxFrame & GetFrame() const
void SetCurGroup(const OUString &aGrp, bool bApi=false, bool bAlwaysCreateNew=false)
virtual SwLabDlgMethod GetSwLabDlgStaticMethod()=0
void Insert(SwField const &, SwPaM *pAnnotationRange=nullptr)
css::uno::Reference< css::frame::XModel > GetBaseModel() const
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
SfxItemPool & GetPool() const
constexpr OUStringLiteral aData
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
const SfxItemPool & GetAttrPool() const
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter - see also
void SetNumType(const SvxNumberType &rNew)
void Push()
store a copy of the current cursor on the cursor stack
void ChgFooterShare(bool bNew)
void SetTitle(const OUString &rTitle)
const SwPageDesc & GetPageDesc(size_t i) const
void ShowUIElement(const OUString &sElementURL) const
SwDBData const & GetDBData() const
Database information.
static SwAbstractDialogFactory * Create()
virtual void setJobsetup(const JobSetup &rJobSetup)=0
Sets the Jobsetup.
OUString SwResId(const char *pId)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
bool StartOfSection(bool bSelect=false)
static const SwFrameFormat * lcl_InsertBCText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, sal_uInt16 nCol, sal_uInt16 nRow)
SfxViewShell * GetViewShell() const
Frame cannot be moved in Var-direction.
OUString InsertLabEnvText(SwWrtShell &rSh, SwFieldMgr &rFieldMgr, const OUString &rText)
SwDocShell * GetDocShell()
void InsertLab(SfxRequest &, bool bLabel)
void SetReturnValue(const SfxPoolItem &)
weld::Window * GetFrameWeld() const
IDocumentDeviceAccess & getIDocumentDeviceAccess()
OUString m_sGlossaryGroup
SwFrameFormat & GetMaster()
bool IsAnyDatabaseFieldInDoc() const
SwWrtShell * GetWrtShellPtr() const
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
OUString GetUniqueSectionName(const OUString *pChkStr=nullptr) const
bool DoInitNew(SfxMedium *pMedium=nullptr)
void ChgPageDesc(size_t i, const SwPageDesc &)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
SwGlossaryHdl * GetGlosHdl()
void SetNewDoc()
Optimizing UI.
Reference< XModel > xModel
bool EndOfSection(bool bSelect=false)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void SetNumberingType(SvxNumType nSet)
OUString setToken(const OUString &rIn, sal_Int32 nToken, sal_Unicode cTok, const OUString &rNewToken)
void StartAllAction()
For all views of this document.
virtual GlossarySetActGroup SetGlossaryActGroupFunc()=0
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
size_t GetCurPageDesc(const bool bCalcFrame=true) const
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)