LibreOffice Module sw (master)  1
applab.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <config_features.h>
21 
22 #include <hintids.hxx>
23 
24 #include <comphelper/string.hxx>
25 #include <o3tl/deleter.hxx>
26 #include <sfx2/dispatch.hxx>
27 #include <sfx2/printer.hxx>
28 #include <sfx2/request.hxx>
29 #include <sfx2/linkmgr.hxx>
30 #include <sfx2/viewfrm.hxx>
31 #include <editeng/pbinitem.hxx>
32 #include <editeng/ulspitem.hxx>
33 #include <editeng/lrspitem.hxx>
34 #include <com/sun/star/frame/XModel.hpp>
35 #include <osl/diagnose.h>
36 #include <fmthdft.hxx>
37 #include <fmtanchr.hxx>
38 #include <fmtfsize.hxx>
39 #include <fmtornt.hxx>
40 #include <swwait.hxx>
41 #include <gloshdl.hxx>
42 #include <swmodule.hxx>
43 #include <view.hxx>
44 #include <docsh.hxx>
45 #include <fldbas.hxx>
46 #include <wrtsh.hxx>
47 #include <cmdid.h>
48 #include <dbmgr.hxx>
49 #include <fldmgr.hxx>
50 #include <labimg.hxx>
51 #include <section.hxx>
52 #include <pagedesc.hxx>
53 #include <poolfmt.hxx>
54 
55 #include <strings.hrc>
56 #include <swabstdlg.hxx>
57 
59 
60 #include "appenv.hxx"
61 #include <memory>
62 
63 using namespace ::com::sun::star;
64 
65 constexpr OUStringLiteral MASTER_LABEL = u"MasterLabel";
66 
67 static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
68  SwFrameFormat &rFormat,
69  sal_uInt16 nCol, sal_uInt16 nRow )
70 {
71  SfxItemSet aSet(
72  rSh.GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_ANCHOR>);
73  sal_uInt16 nPhyPageNum, nVirtPageNum;
74  rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
75 
76  //anchor frame to page
77  aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, nPhyPageNum ) );
78  aSet.Put( SwFormatHoriOrient( rItem.m_lLeft + static_cast<SwTwips>(nCol) * rItem.m_lHDist,
79  text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
80  aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist,
81  text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
82  const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly
83  OSL_ENSURE( pFormat, "Fly not inserted" );
84 
85  rSh.UnSelectFrame(); //Frame was selected automatically
86 
88 
89  if(!rItem.m_bSynchron || !(nCol|nRow))
90  {
92  ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
93  if ( fnSetActGroup )
94  (*fnSetActGroup)( rItem.m_sGlossaryGroup );
95  SwGlossaryHdl* pGlosHdl = rSh.GetView().GetGlosHdl();
96  pGlosHdl->SetCurGroup(rItem.m_sGlossaryGroup, true);
97  pGlosHdl->InsertGlossary( rItem.m_sGlossaryBlockName );
98  }
99 
100  return pFormat;
101 }
102 
103 static const SwFrameFormat *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
104  SwFrameFormat &rFormat, SwFieldMgr& rFieldMgr,
105  sal_uInt16 nCol, sal_uInt16 nRow, bool bLast )
106 {
107  SfxItemSet aSet(
108  rSh.GetAttrPool(), svl::Items<RES_VERT_ORIENT, RES_ANCHOR>);
109  sal_uInt16 nPhyPageNum, nVirtPageNum;
110  rSh.GetPageNum( nPhyPageNum, nVirtPageNum );
111 
112  //anchor frame to page
113  aSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, nPhyPageNum ) );
114  aSet.Put( SwFormatHoriOrient( rItem.m_lLeft + static_cast<SwTwips>(nCol) * rItem.m_lHDist,
115  text::HoriOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
116  aSet.Put( SwFormatVertOrient( rItem.m_lUpper + static_cast<SwTwips>(nRow) * rItem.m_lVDist,
117  text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ) );
118  const SwFrameFormat *pFormat = rSh.NewFlyFrame(aSet, true, &rFormat ); // Insert Fly
119  OSL_ENSURE( pFormat, "Fly not inserted" );
120 
121  rSh.UnSelectFrame(); //Frame was selected automatically
122 
124 
125  // If applicable "next dataset"
126  OUString sDBName;
127  if( (!rItem.m_bSynchron || !(nCol|nRow)) && !(sDBName = InsertLabEnvText( rSh, rFieldMgr, rItem.m_aWriting )).isEmpty() && !bLast )
128  {
129  sDBName = comphelper::string::setToken(sDBName, 3, DB_DELIM, "True");
130  SwInsertField_Data aData(SwFieldTypesEnum::DatabaseNextSet, 0, sDBName, OUString(), 0, &rSh);
131  rFieldMgr.InsertField( aData );
132  }
133 
134  return pFormat;
135 }
136 
137 void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
138 {
139  static sal_uInt16 nLabelTitleNo = 0;
140  static sal_uInt16 nBCTitleNo = 0;
141 
142 #if HAVE_FEATURE_DBCONNECTIVITY
143  // Create DB-Manager
144  std::unique_ptr<SwDBManager, o3tl::default_delete<SwDBManager>> pDBManager(new SwDBManager(nullptr));
145 #endif
146 
147  // Read SwLabItem from Config
148  SwLabCfgItem aLabCfg(bLabel);
149 
150  // Move up Dialog
151  SfxItemSet aSet( GetPool(), svl::Items<FN_LABEL, FN_LABEL> );
152  aSet.Put( aLabCfg.GetItem() );
153 
155 
156  ScopedVclPtr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(rReq.GetFrameWeld(), aSet,
157 #if HAVE_FEATURE_DBCONNECTIVITY
158  pDBManager.get(),
159 #else
160  NULL,
161 #endif
162  bLabel));
163 
164  if ( RET_OK != pDlg->Execute() )
165  return;
166 
167  // Read dialog, store item in config
168  const SwLabItem& rItem = static_cast<const SwLabItem&>( pDlg->
169  GetOutputItemSet()->Get(FN_LABEL));
170  aLabCfg.GetItem() = rItem;
171  aLabCfg.Commit();
172 
173  // Create new document
174  SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD));
175  xDocSh->DoInitNew();
176 
177  // Printer
178  Printer *pPrt = pDlg->GetPrt();
179  if (pPrt)
180  {
181  SwDocShell *pDocSh = static_cast<SwDocShell*>(&*xDocSh);
183  }
184 
185  SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );
186 
187  SwView *pNewView = static_cast<SwView*>( pViewFrame->GetViewShell());
188  pNewView->AttrChangedNotify(nullptr);// So that SelectShell is being called.
189 
190  // Set document title
191  OUString aTmp;
192  if(bLabel)
193  {
194  aTmp = SwResId( STR_LAB_TITLE) +
195  OUString::number(++nLabelTitleNo );
196  }
197  else
198  {
199  aTmp = pDlg->GetBusinessCardStr() +
200  OUString::number( ++nBCTitleNo );
201  }
202  xDocSh->SetTitle( aTmp );
203 
204  pViewFrame->GetFrame().Appear();
205 
206  // Determine Shell
207  SwWrtShell *pSh = pNewView->GetWrtShellPtr();
208  OSL_ENSURE( pSh, "missing WrtShell" );
209 
210  { // block for locks the dispatcher!!
211 
212  SwWait aWait( static_cast<SwDocShell&>(*xDocSh), true );
213 
214  CurrShell aCurr(pSh);
215  pSh->SetLabelDoc(rItem.m_bSynchron);
216  pSh->DoUndo( false );
217  pSh->StartAllAction();
218 
219  pSh->SetNewDoc(); // Avoid performance problems
220 
221  SwPageDesc aDesc = pSh->GetPageDesc( 0 );
222  SwFrameFormat& rFormat = aDesc.GetMaster();
223 
224  // Borders
225  SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
226  SvxULSpaceItem aULMargin( RES_UL_SPACE );
227  aLRMargin.SetLeft (o3tl::narrowing<sal_uInt16>(rItem.m_lLeft) );
228  aULMargin.SetUpper(o3tl::narrowing<sal_uInt16>(rItem.m_lUpper));
229  aLRMargin.SetRight( 0 );
230  aULMargin.SetLower( 0 );
231  rFormat.SetFormatAttr(aLRMargin);
232  rFormat.SetFormatAttr(aULMargin);
233 
234  // Header and footer
235  rFormat.SetFormatAttr(SwFormatHeader(false));
236  aDesc.ChgHeaderShare(false);
237  rFormat.SetFormatAttr(SwFormatFooter(false));
238  aDesc.ChgFooterShare(false);
239 
240  aDesc.SetUseOn(UseOnPage::All); // Site numbering
241 
242  // Set page size
243  tools::Long lPgWidth, lPgHeight;
244  lPgWidth = std::max<sal_Int32>(rItem.m_lPWidth, MINLAY);
245  lPgHeight = std::max<sal_Int32>(rItem.m_lPHeight, MINLAY);
246  rFormat.SetFormatAttr( SwFormatFrameSize( SwFrameSize::Fixed, lPgWidth, lPgHeight ));
247  // Numbering type
248  SvxNumberType aType;
250  aDesc.SetNumType( aType );
251 
252  // Followup template
253  const SwPageDesc &rFollow = pSh->GetPageDesc( pSh->GetCurPageDesc() );
254  aDesc.SetFollow( &rFollow );
255 
256  pPrt = pSh->getIDocumentDeviceAccess().getPrinter( true );
258  aItem.SetValue(static_cast<sal_Int8>(pPrt->GetPaperBin()));
259  rFormat.SetFormatAttr(aItem);
260 
261  // Determine orientation of the resulting page
262  aDesc.SetLandscape(rItem.m_lPWidth > rItem.m_lPHeight);
263 
264  pSh->ChgPageDesc( 0, aDesc );
265 
266  // Insert frame
267  std::optional<SwFieldMgr> pFieldMgr;
268  pFieldMgr.emplace();
269  pFieldMgr->SetEvalExpFields(false);
270 
271  // Prepare border template
273  sal_Int32 iResultWidth = rItem.m_lLeft + (rItem.m_nCols - 1) * rItem.m_lHDist + rItem.m_lWidth - rItem.m_lPWidth;
274  sal_Int32 iResultHeight = rItem.m_lUpper + (rItem.m_nRows - 1) * rItem.m_lVDist + rItem.m_lHeight - rItem.m_lPHeight;
275  sal_Int32 iWidth = (iResultWidth > 0 ? rItem.m_lWidth - (iResultWidth / rItem.m_nCols) - 1 : rItem.m_lWidth);
276  sal_Int32 iHeight = (iResultHeight > 0 ? rItem.m_lHeight - (iResultHeight / rItem.m_nRows) - 1 : rItem.m_lHeight);
277  SwFormatFrameSize aFrameSize( SwFrameSize::Fixed, iWidth, iHeight );
278  pFormat->SetFormatAttr( aFrameSize );
279 
280  //frame represents label itself, no border space
281  SvxULSpaceItem aFrameNoULSpace( 0, 0, RES_UL_SPACE );
282  SvxLRSpaceItem aFrameNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE );
283  pFormat->SetFormatAttr( aFrameNoULSpace );
284  pFormat->SetFormatAttr( aFrameNoLRSpace );
285 
286  const SwFrameFormat *pFirstFlyFormat = nullptr;
287  if ( rItem.m_bPage )
288  {
289  SwFormatVertOrient aFrameVertOrient( pFormat->GetVertOrient() );
290  aFrameVertOrient.SetVertOrient( text::VertOrientation::TOP );
291  pFormat->SetFormatAttr(aFrameVertOrient);
292 
293  for ( sal_Int32 i = 0; i < rItem.m_nRows; ++i )
294  {
295  for ( sal_Int32 j = 0; j < rItem.m_nCols; ++j )
296  {
297  pSh->Push();
298  const SwFrameFormat *pTmp = ( bLabel ?
299  lcl_InsertLabText( *pSh, rItem, *pFormat, *pFieldMgr, j, i,
300  i == rItem.m_nRows - 1 && j == rItem.m_nCols - 1 ) :
301  lcl_InsertBCText( *pSh, rItem, *pFormat, j, i ) );
302  if (!(i|j))
303  {
304  pFirstFlyFormat = pTmp;
305 
306  if (rItem.m_bSynchron)
307  {
308  // if there is no content in the fly then
309  // don't leave the fly!!!
310  pSh->Push();
311  pSh->StartOfSection();
312  bool bInFly = nullptr != pSh->WizardGetFly();
314 
315  if( bInFly )
316  pSh->EndOfSection(true); // select all content
317  // in the fly
318  else
319  pSh->SetMark(); // set only the mark
320 
322  pSh->InsertSection(aSect);
323  }
324  }
325  else if (rItem.m_bSynchron)
326  {
328  pSh->GetUniqueSectionName());
329  OUString sLinkName =
330  OUStringChar(sfx2::cTokenSeparator) +
331  OUStringChar(sfx2::cTokenSeparator) +
332  MASTER_LABEL;
333  aSect.SetLinkFileName(sLinkName);
334  aSect.SetProtectFlag(true);
335  pSh->Insert("."); // Dummytext to allocate the Section
336  pSh->StartOfSection();
337  pSh->EndOfSection(true); // Select everything in the frame
338  pSh->InsertSection(aSect);
339  }
341  }
342  }
343  }
344  else
345  {
346  pFirstFlyFormat = bLabel ?
347  lcl_InsertLabText( *pSh, rItem, *pFormat, *pFieldMgr,
348  static_cast< sal_uInt16 >(rItem.m_nCol - 1),
349  static_cast< sal_uInt16 >(rItem.m_nRow - 1), true ) :
350  lcl_InsertBCText(*pSh, rItem, *pFormat,
351  static_cast< sal_uInt16 >(rItem.m_nCol - 1),
352  static_cast< sal_uInt16 >(rItem.m_nRow - 1));
353  }
354 
355  //fill the user fields
356  if(!bLabel)
357  {
358  uno::Reference< frame::XModel > xModel = pSh->GetView().GetDocShell()->GetBaseModel();
359  OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
360  SwLabDlgMethod SwLabDlgUpdateFieldInformation = pDialogFactory->GetSwLabDlgStaticMethod ();
361  SwLabDlgUpdateFieldInformation(xModel, rItem);
362  }
363 
364  pFieldMgr->SetEvalExpFields(true);
365  pFieldMgr->EvalExpFields(pSh);
366 
367  pFieldMgr.reset();
368 
369  if (pFirstFlyFormat)
370  pSh->GotoFly(pFirstFlyFormat->GetName(), FLYCNTTYPE_ALL, false);
371 
372  if (pSh->IsAnyDatabaseFieldInDoc())
373  pSh->GetView().ShowUIElement("private:resource/toolbar/mailmerge");
374 
375  pSh->EndAllAction();
376  pSh->DoUndo();
377  }
378 
379  if( rItem.m_aWriting.indexOf( '<' ) >= 0 )
380  {
381  // Open database browser on recently used database
382  ShowDBObj( *pNewView, pSh->GetDBData() );
383  }
384 
385  if( rItem.m_bSynchron )
386  {
387  SfxDispatcher* pDisp = pViewFrame->GetDispatcher();
388  assert(pDisp && "No dispatcher in frame?");
389  pDisp->Execute(FN_SYNC_LABELS, SfxCallMode::ASYNCHRON);
390  }
391  rReq.SetReturnValue(SfxVoidItem(bLabel ? FN_LABEL : FN_BUSINESS_CARD));
392 
393 }
394 
395 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static void ShowDBObj(SwView const &rView, const SwDBData &rData)
Definition: swmodul1.cxx:365
void Appear()
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
Definition: pagedesc.hxx:341
sal_Int32 m_lHeight
Definition: labimg.hxx:53
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:123
sal_Int32 m_lVDist
Definition: labimg.hxx:51
virtual Printer * GetPrt()=0
void ChgHeaderShare(bool bNew)
Definition: pagedesc.hxx:327
sal_uInt16 GetPaperBin() const
virtual VclPtr< AbstractSwLabDlg > CreateSwLabDlg(weld::Window *pParent, const SfxItemSet &rSet, SwDBManager *pDBManager, bool bLabel)=0
void(* GlossarySetActGroup)(const OUString &rNewGroup)
Definition: swabstdlg.hxx:86
const SwFormatVertOrient & GetVertOrient(bool=true) const
Definition: fmtornt.hxx:106
SwFrameFormat * WizardGetFly()
Find/delete fly containing the cursor.
Definition: fefly1.cxx:1432
sal_Int32 m_lLeft
Definition: labimg.hxx:54
SfxDispatcher * GetDispatcher()
SVX_NUM_NUMBER_NONE
long Long
#define MINLAY
Definition: swtypes.hxx:63
const sal_Unicode cTokenSeparator
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
bool Pop(SwCursorShell::PopMode=SwCursorShell::PopMode::DeleteStack)
Definition: wrtsh1.cxx:1752
SwSection const * InsertSection(SwSectionData &rNewData, SfxItemSet const *const =nullptr)
Definition: edsect.cxx:35
const JobSetup & GetJobSetup() const
void GetPageNum(sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, bool bAtCursorPos=true, const bool bCalcFrame=true)
Definition: crsrsh.cxx:1209
void DoUndo(bool bOn=true)
Undo.
Definition: edws.cxx:200
void SetLabelDoc(bool bFlag)
Labels: Synchronize ranges.
Definition: edfld.cxx:366
static SfxViewFrame * DisplayNewDocument(SfxObjectShell const &i_rDoc, const SfxRequest &i_rCreateDocRequest)
bool InsertField(const SwInsertField_Data &rData)
Definition: fldmgr.cxx:893
SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)
Definition: editsh.hxx:351
void EndAllAction()
Definition: edws.cxx:97
void(* SwLabDlgMethod)(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
Definition: swabstdlg.hxx:83
sal_Int32 m_lUpper
Definition: labimg.hxx:55
void SetFollow(const SwPageDesc *pNew)
Definition: pagedesc.hxx:314
virtual const OUString & GetBusinessCardStr() const =0
OUString m_sGlossaryBlockName
Definition: labimg.hxx:102
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
sal_Int32 m_lPWidth
Definition: labimg.hxx:61
constexpr OUStringLiteral MASTER_LABEL
Definition: applab.cxx:65
return NULL
bool GotoFly(const OUString &rName, FlyCntType eType=FLYCNTTYPE_ALL, bool bSelFrame=true)
Definition: move.cxx:599
#define FN_SYNC_LABELS
Definition: cmdid.h:463
SwLabItem & GetItem()
Definition: labimg.hxx:118
const SwView & GetView() const
Definition: wrtsh.hxx:431
static const SwFrameFormat * lcl_InsertLabText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, SwFieldMgr &rFieldMgr, sal_uInt16 nCol, sal_uInt16 nRow, bool bLast)
Definition: applab.cxx:103
void SetLandscape(bool bNew)
Definition: pagedesc.hxx:200
const OUString & GetName() const
Definition: format.hxx:115
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
SfxFrame & GetFrame() const
void SetCurGroup(const OUString &aGrp, bool bApi=false, bool bAlwaysCreateNew=false)
Definition: gloshdl.cxx:93
virtual SwLabDlgMethod GetSwLabDlgStaticMethod()=0
void Insert(SwField const &, SwPaM *pAnnotationRange=nullptr)
Definition: wrtsh2.cxx:62
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
SfxItemPool & GetPool() const
constexpr OUStringLiteral aData
Definition: ww8scan.hxx:48
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Definition: viewsh.cxx:2670
const SfxItemPool & GetAttrPool() const
Definition: viewsh.hxx:612
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter - see also
Definition: edfcol.cxx:2190
Style of a layout element.
Definition: frmfmt.hxx:59
int i
void SetNumType(const SvxNumberType &rNew)
Definition: pagedesc.hxx:203
void SetVertOrient(sal_Int16 eNew)
Definition: fmtornt.hxx:56
void Push()
store a copy of the current cursor on the cursor stack
Definition: crsrsh.cxx:2240
sal_Int32 m_lHDist
Definition: labimg.hxx:50
void ChgFooterShare(bool bNew)
Definition: pagedesc.hxx:334
FlyAnchors.
Definition: fmtanchr.hxx:34
void SetTitle(const OUString &rTitle)
const SwPageDesc & GetPageDesc(size_t i) const
Definition: fedesc.cxx:126
sal_Int32 m_nRows
Definition: labimg.hxx:57
void ShowUIElement(const OUString &sElementURL) const
Definition: view.cxx:237
float u
SwDBData const & GetDBData() const
Database information.
Definition: edfld.cxx:289
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
sal_Int32 m_nCols
Definition: labimg.hxx:56
void SetMark()
Definition: crsrsh.hxx:875
static SwAbstractDialogFactory * Create()
Definition: swabstdlg.cxx:36
virtual void setJobsetup(const JobSetup &rJobSetup)=0
Sets the Jobsetup.
bool m_bPage
Definition: labimg.hxx:64
sal_Int32 m_nCol
Definition: labimg.hxx:58
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
bool StartOfSection(bool bSelect=false)
Definition: move.cxx:308
#define DB_DELIM
Definition: swtypes.hxx:131
static const SwFrameFormat * lcl_InsertBCText(SwWrtShell &rSh, const SwLabItem &rItem, SwFrameFormat &rFormat, sal_uInt16 nCol, sal_uInt16 nRow)
Definition: applab.cxx:67
SfxViewShell * GetViewShell() const
Frame cannot be moved in Var-direction.
OUString InsertLabEnvText(SwWrtShell &rSh, SwFieldMgr &rFieldMgr, const OUString &rText)
Definition: appenv.cxx:64
sal_Int32 m_lPHeight
Definition: labimg.hxx:60
SwDocShell * GetDocShell()
Definition: view.cxx:1122
void InsertLab(SfxRequest &, bool bLabel)
Definition: applab.cxx:137
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:450
void SetReturnValue(const SfxPoolItem &)
weld::Window * GetFrameWeld() const
IDocumentDeviceAccess & getIDocumentDeviceAccess()
Definition: docshini.cxx:690
OUString m_sGlossaryGroup
Definition: labimg.hxx:101
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:238
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool IsAnyDatabaseFieldInDoc() const
Definition: edfld.cxx:381
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:414
const SwFrameFormat * NewFlyFrame(const SfxItemSet &rSet, bool bAnchValid=false, SwFrameFormat *pParent=nullptr)
Definition: fefly1.cxx:648
void SetLeft(const tools::Long nL, const sal_uInt16 nProp=100)
OUString GetUniqueSectionName(const OUString *pChkStr=nullptr) const
Definition: edsect.cxx:166
sal_Int32 m_nRow
Definition: labimg.hxx:59
bool DoInitNew(SfxMedium *pMedium=nullptr)
RET_OK
bool m_bSynchron
Definition: labimg.hxx:65
void ChgPageDesc(size_t i, const SwPageDesc &)
Definition: fedesc.cxx:111
void UnSelectFrame()
Definition: select.cxx:323
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
SwGlossaryHdl * GetGlosHdl()
Definition: view.cxx:1636
void SetNewDoc()
Optimizing UI.
Definition: edws.cxx:278
Reference< XModel > xModel
bool EndOfSection(bool bSelect=false)
Definition: move.cxx:314
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)
sal_Int32 m_lWidth
Definition: labimg.hxx:52
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
virtual GlossarySetActGroup SetGlossaryActGroupFunc()=0
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
size_t GetCurPageDesc(const bool bCalcFrame=true) const
Definition: fedesc.cxx:167
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
OUString m_aWriting
Definition: labimg.hxx:47
Definition: view.hxx:144