LibreOffice Module sw (master)  1
uitool.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 <hintids.hxx>
21 
22 #include <osl/diagnose.h>
23 #include <tools/datetime.hxx>
24 #include <vcl/weld.hxx>
26 #include <svl/stritem.hxx>
27 #include <svl/grabbagitem.hxx>
28 #include <unotools/syslocale.hxx>
30 #include <editeng/pmdlitem.hxx>
31 #include <editeng/tstpitem.hxx>
32 #include <editeng/boxitem.hxx>
33 #include <editeng/sizeitem.hxx>
34 #include <editeng/brushitem.hxx>
35 #include <svx/pageitem.hxx>
36 #include <editeng/lrspitem.hxx>
37 #include <svl/style.hxx>
39 #include <com/sun/star/frame/XDispatch.hpp>
40 #include <com/sun/star/frame/XDispatchProvider.hpp>
41 #include <com/sun/star/frame/XFrame.hpp>
42 #include <com/sun/star/util/URLTransformer.hpp>
43 #include <com/sun/star/util/XURLTransformer.hpp>
45 #include <sfx2/viewfrm.hxx>
46 #include <fmtornt.hxx>
47 #include <tabcol.hxx>
48 #include <fmtfsize.hxx>
49 #include <fmthdft.hxx>
50 #include <fmtpdsc.hxx>
51 #include <uiitems.hxx>
52 #include <docsh.hxx>
53 #include <wrtsh.hxx>
54 #include <swmodule.hxx>
55 #include <view.hxx>
56 #include <uitool.hxx>
57 #include <frmatr.hxx>
58 #include <paratr.hxx>
59 #include <fmtcol.hxx>
60 #include <usrpref.hxx>
61 
62 #include <cmdid.h>
63 #include <doc.hxx>
64 #include <docary.hxx>
65 #include <charfmt.hxx>
66 #include <SwStyleNameMapper.hxx>
67 #include <strings.hrc>
68 // 50 cm 28350
69 
70 #define MAXHEIGHT 28350
71 #define MAXWIDTH 28350
72 
73 using namespace ::com::sun::star;
74 
75 // General list of string pointer
76 
77 // Set boxinfo attribute
78 
79 void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh)
80 {
81  std::shared_ptr<SvxBoxInfoItem> aBoxInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
82  const SfxPoolItem *pBoxInfo;
83 
84  if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo))
85  {
86  aBoxInfo.reset(static_cast<SvxBoxInfoItem*>(pBoxInfo->Clone()));
87  }
88 
89  // Table variant: If more than one table cells are selected
90  rSh.GetCursor(); //So that GetCursorCnt() returns the right thing
91  aBoxInfo->SetTable (rSh.IsTableMode() && rSh.GetCursorCnt() > 1);
92  // Always show the distance field
93  aBoxInfo->SetDist (true);
94  // Set minimal size in tables and paragraphs
95  aBoxInfo->SetMinDist (rSh.IsTableMode() || rSh.GetSelectionType() & (SelectionType::Text | SelectionType::Table));
96  // Set always the default distance
97  aBoxInfo->SetDefDist (MIN_BORDER_DIST);
98  // Single lines can have only in tables DontCare-Status
99  aBoxInfo->SetValid(SvxBoxInfoItemValidFlags::DISABLE, !rSh.IsTableMode());
100 
101  rSet.Put(*aBoxInfo);
102 }
103 
104 void ConvertAttrCharToGen(SfxItemSet& rSet, bool bIsPara)
105 {
106  // Background / highlight
107  {
108  // Always use the visible background
109  const SfxPoolItem *pTmpBrush;
110  if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_HIGHLIGHT, true, &pTmpBrush ) )
111  {
112  SvxBrushItem aTmpBrush( pTmpBrush->StaticWhichCast(RES_CHRATR_HIGHLIGHT) );
113  if( aTmpBrush.GetColor() != COL_TRANSPARENT )
114  {
115  aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
116  rSet.Put( aTmpBrush );
117  }
118  }
119  }
120 
121  if ( bIsPara )
122  return;
123 
124  // Tell dialogs to use character-specific slots/whichIds
125  // tdf#126684: We use RES_PARATR_GRABBAG, because RES_CHRATR_GRABBAG may be overwritten later in
126  // SwDocStyleSheet::GetItemSet when applying attributes from char format
127  assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
129  aGrabBag.GetGrabBag()["DialogUseCharAttr"] <<= true;
130  // Store initial ranges to allow restoring later
131  const sal_uInt16* pRanges = rSet.GetRanges();
132  const sal_uInt16* pEnd = pRanges;
133  while (*pEnd)
134  ++pEnd;
135  const uno::Sequence<sal_uInt16> aOrigRanges(pRanges, pEnd - pRanges + 1);
136  aGrabBag.GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
138  rSet.Put(aGrabBag);
139 }
140 
141 void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, bool bIsPara)
142 {
143  // Background / highlighting
144  const SfxPoolItem *pTmpItem;
145  if( SfxItemState::SET == rSet.GetItemState( RES_CHRATR_BACKGROUND, false, &pTmpItem ) )
146  {
147  // Highlight is an MS specific thing, so remove it at the first time when LO modifies
148  // this part of the imported document.
150 
151  // Remove shading marker
152  if (SfxItemState::SET == rOrigSet.GetItemState(RES_CHRATR_GRABBAG, false, &pTmpItem))
153  {
155  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
156  auto aIterator = rMap.find("CharShadingMarker");
157  if( aIterator != rMap.end() )
158  {
159  aIterator->second <<= false;
160  }
161  rSet.Put( aGrabBag );
162  }
163  }
164 
165  if ( bIsPara )
166  return;
167 
168  rSet.ClearItem( RES_BACKGROUND );
169 
170  if (SfxItemState::SET == rOrigSet.GetItemState(RES_PARATR_GRABBAG, false, &pTmpItem))
171  {
173  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
174  auto aIterator = rMap.find("OrigItemSetRanges");
175  if (aIterator != rMap.end())
176  {
177  if (uno::Sequence<sal_uInt16> aOrigRanges; (aIterator->second >>= aOrigRanges)
178  && aOrigRanges.getLength() % 2 == 1
179  && *(std::cend(aOrigRanges) - 1) == 0)
180  rSet.SetRanges(aOrigRanges.getConstArray());
181  }
182  }
183  assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
184 }
185 
186 void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell)
187 {
189 
190  SfxItemSet aCoreSet(rShell.GetView().GetPool(), svl::Items<
191  RES_CHRATR_GRABBAG, RES_CHRATR_GRABBAG>{});
192 
193  rShell.GetCurAttr(aCoreSet);
194 
195  // Set char background
196  rShell.SetAttrItem(SvxBrushItem(rBackgroundColor, RES_CHRATR_BACKGROUND));
197 
198  // Highlight is an MS specific thing, so remove it at the first time when LO modifies
199  // this part of the imported document.
201 
202  // Remove shading marker
203  const SfxPoolItem *pTmpItem;
204  if (SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_GRABBAG, false, &pTmpItem))
205  {
206  SfxGrabBagItem aGrabBag(pTmpItem->StaticWhichCast(RES_CHRATR_GRABBAG));
207  std::map<OUString, css::uno::Any>& rMap = aGrabBag.GetGrabBag();
208  auto aIterator = rMap.find("CharShadingMarker");
209  if (aIterator != rMap.end())
210  {
211  aIterator->second <<= false;
212  }
213  rShell.SetAttrItem(aGrabBag);
214  }
215 
216  rShell.EndUndo(SwUndoId::INSATTR);
217 }
218 
219 // Fill header footer
220 
221 static void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet)
222 {
223  SwAttrSet aSet(pFormat->GetAttrSet());
224  aSet.Put(rSet);
225 
226  const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
227  const SfxBoolItem& rDynamic = rSet.Get(SID_ATTR_PAGE_DYNAMIC);
228 
229  // Convert size
231  rSize.GetSize().Width(),
232  rSize.GetSize().Height());
233  aSet.Put(aFrameSize);
234  pFormat->SetFormatAttr(aSet);
235 }
236 
239 {
240  SvxPageUsage nRet = SvxPageUsage::NONE;
241  if (nUse & UseOnPage::Left)
242  nRet = SvxPageUsage::Left;
243  if (nUse & UseOnPage::Right)
244  nRet = SvxPageUsage::Right;
245  if ((nUse & UseOnPage::All) == UseOnPage::All)
246  nRet = SvxPageUsage::All;
247  if ((nUse & UseOnPage::Mirror) == UseOnPage::Mirror)
248  nRet = SvxPageUsage::Mirror;
249  return nRet;
250 }
251 
254 {
255  UseOnPage nRet = UseOnPage::NONE;
256  if (nUse == SvxPageUsage::Left)
257  nRet = UseOnPage::Left;
258  else if (nUse == SvxPageUsage::Right)
259  nRet = UseOnPage::Right;
260  else if (nUse == SvxPageUsage::All)
261  nRet = UseOnPage::All;
262  else if (nUse == SvxPageUsage::Mirror)
263  nRet = UseOnPage::Mirror;
264  return nRet;
265 }
266 
267 // PageDesc <-> convert into sets and back
268 
269 void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
270 {
271  SwFrameFormat& rMaster = rPageDesc.GetMaster();
272  bool bFirstShare = false;
273 
274  // Transfer all general frame attributes
275  rMaster.SetFormatAttr(rSet);
276 
277  // PageData
278  if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET)
279  {
280  const SvxPageItem& rPageItem = rSet.Get(SID_ATTR_PAGE);
281 
282  const SvxPageUsage nUse = rPageItem.GetPageUsage();
283  if(nUse != SvxPageUsage::NONE)
284  rPageDesc.SetUseOn( lcl_convertUseFromSvx(nUse) );
285  rPageDesc.SetLandscape(rPageItem.IsLandscape());
286  SvxNumberType aNumType;
287  aNumType.SetNumberingType( rPageItem.GetNumType() );
288  rPageDesc.SetNumType(aNumType);
289  }
290  // Size
291  if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET)
292  {
293  const SvxSizeItem& rSizeItem = rSet.Get(SID_ATTR_PAGE_SIZE);
295  aSize.SetSize(rSizeItem.GetSize());
296  rMaster.SetFormatAttr(aSize);
297  }
298  // Evaluate header attributes
299  const SfxPoolItem* pItem;
300  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_HEADERSET,
301  false, &pItem ) )
302  {
303  const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
304  const SfxBoolItem& rHeaderOn = rHeaderSet.Get(SID_ATTR_PAGE_ON);
305 
306  if(rHeaderOn.GetValue())
307  {
308  // Take over values
309  if(!rMaster.GetHeader().IsActive())
310  rMaster.SetFormatAttr(SwFormatHeader(true));
311 
312  // Pick out everything and adapt the header format
313  SwFormatHeader aHeaderFormat(rMaster.GetHeader());
314  SwFrameFormat *pHeaderFormat = aHeaderFormat.GetHeaderFormat();
315  OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
316 
317  ::FillHdFt(pHeaderFormat, rHeaderSet);
318 
319  rPageDesc.ChgHeaderShare(rHeaderSet.Get(SID_ATTR_PAGE_SHARED).GetValue());
320  rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
321  rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
322  bFirstShare = true;
323  }
324  else
325  {
326  // Disable header
327  if(rMaster.GetHeader().IsActive())
328  {
329  rMaster.SetFormatAttr(SwFormatHeader(false));
330  rPageDesc.ChgHeaderShare(false);
331  }
332  }
333  }
334 
335  // Evaluate footer attributes
336  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_FOOTERSET,
337  false, &pItem ) )
338  {
339  const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
340  const SfxBoolItem& rFooterOn = rFooterSet.Get(SID_ATTR_PAGE_ON);
341 
342  if(rFooterOn.GetValue())
343  {
344  // Take over values
345  if(!rMaster.GetFooter().IsActive())
346  rMaster.SetFormatAttr(SwFormatFooter(true));
347 
348  // Pick out everything and adapt the footer format
349  SwFormatFooter aFooterFormat(rMaster.GetFooter());
350  SwFrameFormat *pFooterFormat = aFooterFormat.GetFooterFormat();
351  OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
352 
353  ::FillHdFt(pFooterFormat, rFooterSet);
354 
355  rPageDesc.ChgFooterShare(rFooterSet.Get(SID_ATTR_PAGE_SHARED).GetValue());
356  if (!bFirstShare)
357  {
358  rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
359  rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
360  }
361  }
362  else
363  {
364  // Disable footer
365  if(rMaster.GetFooter().IsActive())
366  {
367  rMaster.SetFormatAttr(SwFormatFooter(false));
368  rPageDesc.ChgFooterShare(false);
369  }
370  }
371  }
372 
373  // Footnotes
374 
375  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_FTN_INFO,
376  false, &pItem ) )
377  rPageDesc.SetFootnoteInfo( static_cast<const SwPageFootnoteInfoItem*>(pItem)->GetPageFootnoteInfo() );
378 
379  // Columns
380 
381  // Register compliant
382 
383  if(SfxItemState::SET != rSet.GetItemState(
384  SID_SWREGISTER_MODE, false, &pItem))
385  return;
386 
387  bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
388  if(!bSet)
389  rPageDesc.SetRegisterFormatColl(nullptr);
390  else if(SfxItemState::SET == rSet.GetItemState(
391  SID_SWREGISTER_COLLECTION, false, &pItem))
392  {
393  const OUString& rColl = static_cast<const SfxStringItem*>(pItem)->GetValue();
394  SwDoc& rDoc = *rMaster.GetDoc();
395  SwTextFormatColl* pColl = rDoc.FindTextFormatCollByName( rColl );
396  if( !pColl )
397  {
398  const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(
400  if( USHRT_MAX != nId )
401  pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( nId );
402  else
403  pColl = rDoc.MakeTextFormatColl( rColl,
404  rDoc.GetDfltTextFormatColl() );
405  }
406  if( pColl )
407  pColl->SetFormatAttr( SwRegisterItem ( true ));
408  rPageDesc.SetRegisterFormatColl( pColl );
409  }
410 }
411 
412 void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
413 {
414  const SwFrameFormat& rMaster = rPageDesc.GetMaster();
415 
416  // Page data
417  SvxPageItem aPageItem(SID_ATTR_PAGE);
418  aPageItem.SetDescName(rPageDesc.GetName());
419  aPageItem.SetPageUsage(lcl_convertUseToSvx(rPageDesc.GetUseOn()));
420  aPageItem.SetLandscape(rPageDesc.GetLandscape());
421  aPageItem.SetNumType(rPageDesc.GetNumType().GetNumberingType());
422  rSet.Put(aPageItem);
423 
424  // Size
425  SvxSizeItem aSizeItem(SID_ATTR_PAGE_SIZE, rMaster.GetFrameSize().GetSize());
426  rSet.Put(aSizeItem);
427 
428  // Maximum size
429  SvxSizeItem aMaxSizeItem(SID_ATTR_PAGE_MAXSIZE, Size(MAXWIDTH, MAXHEIGHT));
430  rSet.Put(aMaxSizeItem);
431 
432  // Margins, border and the other stuff.
433  rSet.Put(rMaster.GetAttrSet());
434 
435  std::shared_ptr<SvxBoxInfoItem> aBoxInfo(std::make_shared<SvxBoxInfoItem>(SID_ATTR_BORDER_INNER));
436  const SfxPoolItem *pBoxInfo;
437 
438  if ( SfxItemState::SET == rSet.GetItemState( SID_ATTR_BORDER_INNER, true, &pBoxInfo) )
439  {
440  aBoxInfo.reset(static_cast<SvxBoxInfoItem*>(pBoxInfo->Clone()));
441  }
442 
443  aBoxInfo->SetTable( false );
444  // Show always the distance field
445  aBoxInfo->SetDist( true);
446  // Set minimal size in tables and paragraphs
447  aBoxInfo->SetMinDist( false );
448  // Set always the default distance
449  aBoxInfo->SetDefDist( MIN_BORDER_DIST );
450  // Single lines can have only in tables DontCare-Status
451  aBoxInfo->SetValid( SvxBoxInfoItemValidFlags::DISABLE );
452  rSet.Put( *aBoxInfo );
453 
454  SfxStringItem aFollow(SID_ATTR_PAGE_EXT1, OUString());
455  if(rPageDesc.GetFollow())
456  aFollow.SetValue(rPageDesc.GetFollow()->GetName());
457  rSet.Put(aFollow);
458 
459  // Header
460  if(rMaster.GetHeader().IsActive())
461  {
462  const SwFormatHeader &rHeaderFormat = rMaster.GetHeader();
463  const SwFrameFormat *pHeaderFormat = rHeaderFormat.GetHeaderFormat();
464  OSL_ENSURE(pHeaderFormat != nullptr, "no header format");
465 
466  // HeaderInfo, margins, background, border
467  SfxItemSet aHeaderSet(*rSet.GetPool(),
469 
470  // FillAttribute support
472 
473  SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
474  SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
475  SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
476  SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
477 
478  // set correct parent to get the XFILL_NONE FillStyle as needed
479  aHeaderSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
480 
481  // Dynamic or fixed height
482  SfxBoolItem aOn(SID_ATTR_PAGE_ON, true);
483  aHeaderSet.Put(aOn);
484 
485  const SwFormatFrameSize &rFrameSize = pHeaderFormat->GetFrameSize();
486  const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
487  SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
488  aHeaderSet.Put(aDynamic);
489 
490  // Left equal right
491  SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsHeaderShared());
492  aHeaderSet.Put(aShared);
493  SfxBoolItem aFirstShared(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsFirstShared());
494  aHeaderSet.Put(aFirstShared);
495 
496  // Size
497  SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
498  aHeaderSet.Put(aSize);
499 
500  // Shifting frame attributes
501  aHeaderSet.Put(pHeaderFormat->GetAttrSet());
502  aHeaderSet.Put( *aBoxInfo );
503 
504  // Create SetItem
505  SvxSetItem aSetItem(SID_ATTR_PAGE_HEADERSET, aHeaderSet);
506  rSet.Put(aSetItem);
507  }
508 
509  // Footer
510  if(rMaster.GetFooter().IsActive())
511  {
512  const SwFormatFooter &rFooterFormat = rMaster.GetFooter();
513  const SwFrameFormat *pFooterFormat = rFooterFormat.GetFooterFormat();
514  OSL_ENSURE(pFooterFormat != nullptr, "no footer format");
515 
516  // FooterInfo, margins, background, border
517  SfxItemSet aFooterSet(*rSet.GetPool(),
519 
520  // FillAttribute support
522 
523  SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER, // [10023
524  SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE, // [10051
525  SID_ATTR_PAGE_ON,SID_ATTR_PAGE_SHARED, // [10060
526  SID_ATTR_PAGE_SHARED_FIRST,SID_ATTR_PAGE_SHARED_FIRST>{});
527 
528  // set correct parent to get the XFILL_NONE FillStyle as needed
529  aFooterSet.SetParent(&rMaster.GetDoc()->GetDfltFrameFormat()->GetAttrSet());
530 
531  // Dynamic or fixed height
532  SfxBoolItem aOn(SID_ATTR_PAGE_ON, true);
533  aFooterSet.Put(aOn);
534 
535  const SwFormatFrameSize &rFrameSize = pFooterFormat->GetFrameSize();
536  const SwFrameSize eSizeType = rFrameSize.GetHeightSizeType();
537  SfxBoolItem aDynamic(SID_ATTR_PAGE_DYNAMIC, eSizeType != SwFrameSize::Fixed);
538  aFooterSet.Put(aDynamic);
539 
540  // Left equal right
541  SfxBoolItem aShared(SID_ATTR_PAGE_SHARED, rPageDesc.IsFooterShared());
542  aFooterSet.Put(aShared);
543  SfxBoolItem aFirstShared(SID_ATTR_PAGE_SHARED_FIRST, rPageDesc.IsFirstShared());
544  aFooterSet.Put(aFirstShared);
545 
546  // Size
547  SvxSizeItem aSize(SID_ATTR_PAGE_SIZE, rFrameSize.GetSize());
548  aFooterSet.Put(aSize);
549 
550  // Shifting Frame attributes
551  aFooterSet.Put(pFooterFormat->GetAttrSet());
552  aFooterSet.Put( *aBoxInfo );
553 
554  // Create SetItem
555  SvxSetItem aSetItem(SID_ATTR_PAGE_FOOTERSET, aFooterSet);
556  rSet.Put(aSetItem);
557  }
558 
559  // Integrate footnotes
560  SwPageFootnoteInfo& rInfo = const_cast<SwPageFootnoteInfo&>(rPageDesc.GetFootnoteInfo());
561  SwPageFootnoteInfoItem aFootnoteItem(rInfo);
562  rSet.Put(aFootnoteItem);
563 
564  // Register compliant
565  const SwTextFormatColl* pCol = rPageDesc.GetRegisterFormatColl();
566  SwRegisterItem aReg(pCol != nullptr);
567  aReg.SetWhich(SID_SWREGISTER_MODE);
568  rSet.Put(aReg);
569  if(pCol)
570  rSet.Put(SfxStringItem(SID_SWREGISTER_COLLECTION, pCol->GetName()));
571 
572 }
573 
574 // Set DefaultTabs
575 
576 void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs)
577 {
578  if( rTabs.Count() )
579  return;
580  {
581  SvxTabStop aSwTabStop( nDefDist, SvxTabAdjust::Default );
582  rTabs.Insert( aSwTabStop );
583  }
584 }
585 
586 // Distance between two tabs
587 
589 {
590  return rTabs.Count() ? rTabs[0].GetTabPos() : 1134; // 1134 = 2 cm
591 }
592 
593 // Inquire if in the set is a Sfx-PageDesc combination present and return it.
594 void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet )
595 {
596  const SfxPoolItem* pItem;
597  SwFormatPageDesc aPgDesc;
598 
599  bool bChanged = false;
600  // Page number
601  switch (rSet.GetItemState(SID_ATTR_PARA_PAGENUM, false, &pItem))
602  {
603  case SfxItemState::SET:
604  {
605  aPgDesc.SetNumOffset(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
606  bChanged = true;
607  break;
608  }
609  case SfxItemState::DISABLED:
610  {
611  bChanged = true; // default initialised aPgDesc clears the number
612  break;
613  }
614  case SfxItemState::UNKNOWN:
615  case SfxItemState::DEFAULT:
616  break;
617  default:
618  assert(false); // unexpected
619  break;
620  }
621  if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PARA_MODEL, false, &pItem ))
622  {
623  const OUString& rDescName = static_cast<const SvxPageModelItem*>(pItem)->GetValue();
624  if( !rDescName.isEmpty() ) // No name -> disable PageDesc!
625  {
626  // Delete only, if PageDesc will be enabled!
627  rSet.ClearItem( RES_BREAK );
628  SwPageDesc* pDesc = const_cast<SwWrtShell&>(rShell).FindPageDescByName(
629  rDescName, true );
630  if( pDesc )
631  aPgDesc.RegisterToPageDesc( *pDesc );
632  }
633  rSet.ClearItem( SID_ATTR_PARA_MODEL );
634  bChanged = true;
635  }
636  else
637  {
639  rShell.GetCurAttr( aCoreSet );
640  if(SfxItemState::SET == aCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
641  {
642  auto pPageDesc = pItem->StaticWhichCast(RES_PAGEDESC).GetPageDesc();
643  if( pPageDesc )
644  {
645  aPgDesc.RegisterToPageDesc( *const_cast<SwPageDesc*>(pPageDesc) );
646  }
647  }
648  }
649 
650  if(bChanged)
651  rSet.Put( aPgDesc );
652 }
653 
654 // Inquire if in the set is a Sfx-PageDesc combination present and return it.
656 {
657  const SfxPoolItem* pItem = nullptr;
658  OUString aName;
659  ::std::optional<sal_uInt16> oNumOffset;
660  bool bPut = true;
661  switch( rCoreSet.GetItemState( RES_PAGEDESC, true, &pItem ) )
662  {
663  case SfxItemState::SET:
664  {
665  auto rPageDescItem = pItem->StaticWhichCast(RES_PAGEDESC);
666  if( rPageDescItem.GetPageDesc() )
667  {
668  aName = rPageDescItem.GetPageDesc()->GetName();
669  oNumOffset = rPageDescItem.GetNumOffset();
670  }
671  rCoreSet.ClearItem( RES_PAGEDESC );
672  // Page number
673  }
674  break;
675 
676  case SfxItemState::DEFAULT:
677  break;
678 
679  default:
680  bPut = false;
681  }
682 
683  if (oNumOffset)
684  {
685  SfxUInt16Item aPageNum( SID_ATTR_PARA_PAGENUM, *oNumOffset );
686  rCoreSet.Put( aPageNum );
687  }
688 
689  if(bPut)
690  rCoreSet.Put( SvxPageModelItem( aName, true, SID_ATTR_PARA_MODEL ) );
691 }
692 
693 // Determine metric
694 
696 {
697  return SW_MOD()->GetUsrPref(bWeb)->GetMetric();
698 }
699 
700 // Determine metric
701 
702 void SetDfltMetric( FieldUnit eMetric, bool bWeb )
703 {
704  SW_MOD()->ApplyUserMetric(eMetric, bWeb);
705 }
706 
707 void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::ComboBox& rToFill, int nOffset)
708 {
709  CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
710  const int nCount = rToFill.get_count();
711  while (nOffset < nCount)
712  {
713  if (0 < rCaseColl.compareString(rToFill.get_text(nOffset), rEntry))
714  break;
715  ++nOffset;
716  }
717  rToFill.insert(nOffset, rEntry, &rId, nullptr, nullptr);
718 }
719 
720 void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)
721 {
722  const int nOffset = rToFill.get_count() > 0 ? 1 : 0;
723  rToFill.freeze();
724  SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
725  SwDoc* pDoc = pDocSh->GetDoc();
726  const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Char);
727  const OUString sStandard(SwResId(STR_POOLCHR_STANDARD));
728  while(pBase)
729  {
730  if(bWithDefault || pBase->GetName() != sStandard)
731  {
733  OUString sId(OUString::number(nPoolId));
734  if (bSorted)
735  InsertStringSorted(sId, pBase->GetName(), rToFill, nOffset);
736  else
737  rToFill.append(sId, pBase->GetName());
738  }
739  pBase = pPool->Next();
740  }
741  // non-pool styles
742  const SwCharFormats* pFormats = pDoc->GetCharFormats();
743  for(size_t i = 0; i < pFormats->size(); ++i)
744  {
745  const SwCharFormat* pFormat = (*pFormats)[i];
746  if(pFormat->IsDefault())
747  continue;
748  const OUString& rName = pFormat->GetName();
749  if (rToFill.find_text(rName) == -1)
750  {
751  OUString sId(OUString::number(USHRT_MAX));
752  if (bSorted)
753  InsertStringSorted(sId, rName, rToFill, nOffset);
754  else
755  rToFill.append(sId, rName);
756  }
757  }
758  rToFill.thaw();
759 };
760 
761 SwTwips GetTableWidth( SwFrameFormat const * pFormat, SwTabCols const & rCols, sal_uInt16 *pPercent,
762  SwWrtShell* pSh )
763 {
764  // To get the width is slightly more complicated.
765  SwTwips nWidth = 0;
766  const sal_Int16 eOri = pFormat->GetHoriOrient().GetHoriOrient();
767  switch(eOri)
768  {
769  case text::HoriOrientation::FULL: nWidth = rCols.GetRight(); break;
770  case text::HoriOrientation::LEFT_AND_WIDTH:
771  case text::HoriOrientation::LEFT:
772  case text::HoriOrientation::RIGHT:
773  case text::HoriOrientation::CENTER:
774  nWidth = pFormat->GetFrameSize().GetWidth();
775  break;
776  default:
777  {
778  if(pSh)
779  {
780  if ( nullptr == pSh->GetFlyFrameFormat() )
781  {
782  nWidth = pSh->GetAnyCurRect(CurRectType::PagePrt).Width();
783  }
784  else
785  {
787  }
788  }
789  else
790  {
791  OSL_FAIL("where to get the actual width from?");
792  }
793  const SvxLRSpaceItem& rLRSpace = pFormat->GetLRSpace();
794  nWidth -= (rLRSpace.GetRight() + rLRSpace.GetLeft());
795  }
796  }
797  if (pPercent)
798  *pPercent = pFormat->GetFrameSize().GetWidthPercent();
799  return nWidth;
800 }
801 
802 OUString GetAppLangDateTimeString( const DateTime& rDT )
803 {
804  const SvtSysLocale aSysLocale;
805  const LocaleDataWrapper& rAppLclData = aSysLocale.GetLocaleData();
806  OUString sRet = rAppLclData.getDate( rDT ) + " " + rAppLclData.getTime( rDT );
807  return sRet;
808 }
809 
810 // Add a new function which can get and set the current "SID_ATTR_APPLYCHARUNIT" value
811 
812 bool HasCharUnit( bool bWeb)
813 {
814  return SW_MOD()->GetUsrPref(bWeb)->IsApplyCharUnit();
815 }
816 
817 void SetApplyCharUnit(bool bApplyChar, bool bWeb)
818 {
819  SW_MOD()->ApplyUserCharUnit(bApplyChar, bWeb);
820 }
821 
822 bool ExecuteMenuCommand( PopupMenu const & rMenu, SfxViewFrame const & rViewFrame, sal_uInt16 nId )
823 {
824  bool bRet = false;
825  const sal_uInt16 nItemCount = rMenu.GetItemCount();
826  OUString sCommand;
827  for( sal_uInt16 nItem = 0; nItem < nItemCount; ++nItem)
828  {
829  PopupMenu* pPopup = rMenu.GetPopupMenu( rMenu.GetItemId( nItem ) );
830  if(pPopup)
831  {
832  sCommand = pPopup->GetItemCommand(nId);
833  if(!sCommand.isEmpty())
834  break;
835  }
836  }
837  if(!sCommand.isEmpty())
838  {
839  uno::Reference< frame::XFrame > xFrame = rViewFrame.GetFrame().GetFrameInterface();
840  uno::Reference < frame::XDispatchProvider > xProv( xFrame, uno::UNO_QUERY );
841  util::URL aURL;
842  aURL.Complete = sCommand;
843  uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create(::comphelper::getProcessComponentContext() ) );
844  xTrans->parseStrict( aURL );
845  uno::Reference< frame::XDispatch > xDisp = xProv->queryDispatch( aURL, OUString(), 0 );
846  if( xDisp.is() )
847  {
848  uno::Sequence< beans::PropertyValue > aSeq;
849  xDisp->dispatch( aURL, aSeq );
850  bRet = true;
851  }
852  }
853  return bRet;
854 }
855 
856 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsLandscape() const
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
Definition: docfmt.cxx:877
bool GetValue() const
SvxNumType GetNumberingType() const
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
tools::Long GetWidth() const
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
URL aURL
PopupMenu * GetPopupMenu(sal_uInt16 nItemId) const
FieldUnit
bool Insert(const SvxTabStop &rTab)
void SetUseOn(UseOnPage eNew)
Same as WriteUseOn(), but the >= HeaderShare part of the bitfield is not modified.
Definition: pagedesc.hxx:319
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
sal_uInt16 Count() const
#define MAXHEIGHT
Definition: uitool.cxx:70
static void FillHdFt(SwFrameFormat *pFormat, const SfxItemSet &rSet)
Definition: uitool.cxx:221
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
virtual void insert(int pos, const OUString &rStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface)=0
void SetPageUsage(SvxPageUsage eU)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
Definition: crsrsh.cxx:194
bool IsDefault() const
Definition: format.hxx:113
const SwFormatHeader & GetHeader(bool=true) const
Definition: fmthdft.hxx:97
void ChgHeaderShare(bool bNew)
Definition: pagedesc.hxx:305
std::string GetValue
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
bool IsTableMode() const
Definition: crsrsh.hxx:643
sal_uInt16 char char * pDesc
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
Definition: fews.cxx:89
virtual OUString get_text(int pos) const =0
tools::Long GetRight() const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Reference< XFrame > xFrame
void SfxToSwPageDescAttr(const SwWrtShell &rShell, SfxItemSet &rSet)
Definition: uitool.cxx:594
void SetLandscape(bool bL)
Definition: doc.hxx:187
virtual int find_text(const OUString &rStr) const =0
sal_Int16 nId
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
void append(const OUString &rId, const OUString &rStr)
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:339
constexpr TypedWhichId< SfxGrabBagItem > RES_CHRATR_GRABBAG(43)
#define MIN_BORDER_DIST
Definition: swtypes.hxx:74
void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:79
UseOnPage GetUseOn() const
Definition: pagedesc.hxx:331
Value in Var-direction gives minimum (can be exceeded but not be less).
virtual int get_count() const =0
const OUString & GetName() const
Definition: pagedesc.hxx:186
bool IsActive() const
Definition: fmthdft.hxx:89
virtual void thaw()=0
UseOnPage
Definition: pagedesc.hxx:120
Used by the UI to modify the document model.
Definition: wrtsh.hxx:91
const SwPageFootnoteInfo & GetFootnoteInfo() const
Definition: pagedesc.hxx:195
const LocaleDataWrapper & GetLocaleData() const
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
const SwView & GetView() const
Definition: wrtsh.hxx:429
bool ExecuteMenuCommand(PopupMenu const &rMenu, SfxViewFrame const &rViewFrame, sal_uInt16 nId)
Definition: uitool.cxx:822
SvxNumType GetNumType() const
const OUString & GetName() const
void SetValue(const OUString &rTheValue)
void SetFootnoteInfo(const SwPageFootnoteInfo &rNew)
Definition: pagedesc.hxx:197
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool HasCharUnit(bool bWeb)
Definition: uitool.cxx:812
void ConvertAttrGenToChar(SfxItemSet &rSet, const SfxItemSet &rOrigSet, bool bIsPara)
Convert general attributes to the corresponding character attributes.
Definition: uitool.cxx:141
void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted, bool bWithDefault)
Definition: uitool.cxx:720
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
Definition: doc.cxx:426
const SwTextFormatColl * GetDfltTextFormatColl() const
Definition: doc.hxx:778
void SetLandscape(bool bNew)
Definition: pagedesc.hxx:190
const OUString & GetName() const
Definition: format.hxx:115
Footer, for pageformats Client of FrameFormat describing the footer.
Definition: fmthdft.hxx:64
SfxFrame & GetFrame() const
int nCount
#define FN_PARAM_FTN_INFO
Definition: cmdid.h:770
For internal use only.
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
OUString GetItemCommand(sal_uInt16 nItemId) const
void Width(tools::Long nNew)
Definition: swrect.hxx:187
void SetNumType(SvxNumType eNum)
constexpr TypedWhichId< SfxGrabBagItem > RES_PARATR_GRABBAG(81)
SfxItemPool & GetPool() const
SwDoc * GetDoc()
returns Doc. But be careful!
Definition: docsh.hxx:203
bool IsHeaderShared() const
Definition: pagedesc.hxx:297
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
Style of a layout element.
Definition: frmfmt.hxx:58
Rect of current PrtArea of page.
void SetRanges(const sal_uInt16 *pRanges)
#define SW_MOD()
Definition: swmodule.hxx:255
SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition: uitool.cxx:588
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
T & StaticWhichCast(TypedWhichId< T > nId)
void SetNumType(const SvxNumberType &rNew)
Definition: pagedesc.hxx:193
const SwFrameFormat * GetFooterFormat() const
Definition: fmthdft.hxx:85
const SwFormatHoriOrient & GetHoriOrient(bool=true) const
Definition: fmtornt.hxx:108
FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:695
bool GetLandscape() const
Definition: pagedesc.hxx:189
#define MAXWIDTH
Definition: uitool.cxx:71
void SwToSfxPageDescAttr(SfxItemSet &rCoreSet)
Definition: uitool.cxx:655
void InsertStringSorted(const OUString &rId, const OUString &rEntry, weld::ComboBox &rToFill, int nOffset)
Definition: uitool.cxx:707
void SetApplyCharUnit(bool bApplyChar, bool bWeb)
Definition: uitool.cxx:817
void ChgFirstShare(bool bNew)
Definition: pagedesc.cxx:381
virtual void freeze()=0
void ChgFooterShare(bool bNew)
Definition: pagedesc.hxx:312
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
Definition: edatmisc.cxx:112
sal_uInt16 GetItemId(sal_uInt16 nPos) const
tools::Long GetLeft() const
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
tools::Long Width() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1139
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
Returns the item set associated with a character/inet/auto style.
Definition: atrstck.cxx:132
size_t size() const
Definition: docary.hxx:84
const SwFormatFooter & GetFooter(bool=true) const
Definition: fmthdft.hxx:99
const SwTextFormatColl * GetRegisterFormatColl() const
retrieve the style for the grid alignment
Definition: pagedesc.cxx:204
sal_Int16 GetHoriOrient() const
Definition: fmtornt.hxx:87
const std::map< OUString, css::uno::Any > & GetGrabBag() const
void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:576
static SvxPageUsage lcl_convertUseToSvx(UseOnPage nUse)
Convert from UseOnPage to SvxPageUsage.
Definition: uitool.cxx:238
sal_uInt16 GetCursorCnt(bool bAll=true) const
Get the number of elements in the ring of cursors.
Definition: crsrsh.cxx:2736
SwFrameSize
Definition: fmtfsize.hxx:35
bool IsFooterShared() const
Definition: pagedesc.hxx:301
OUString SwResId(const char *pId)
Definition: swmodule.cxx:166
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:123
SwTwips GetTableWidth(SwFrameFormat const *pFormat, SwTabCols const &rCols, sal_uInt16 *pPercent, SwWrtShell *pSh)
Definition: uitool.cxx:761
sal_uInt8 GetWidthPercent() const
Definition: fmtfsize.hxx:91
SfxItemPool * GetPool() const
Frame cannot be moved in Var-direction.
tools::Long SwTwips
Definition: swtypes.hxx:49
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SvxPageUsage
const SwPageDesc * GetFollow() const
Definition: pagedesc.hxx:245
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:747
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:449
OUString getDate(const Date &rDate) const
constexpr sal_uInt16 RES_FRMATR_END(131)
SvxPageUsage GetPageUsage() const
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
Definition: doc.hxx:801
SwFrameFormat & GetMaster()
Definition: pagedesc.hxx:216
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
void ConvertAttrCharToGen(SfxItemSet &rSet, bool bIsPara)
Convert character specific attributes to general ones used by tab pages.
Definition: uitool.cxx:104
Footnote information.
Definition: pagedesc.hxx:48
const SwCharFormats * GetCharFormats() const
Definition: doc.hxx:740
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SfxStyleSheetBase * Next()
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
void ApplyCharBackground(const Color &rBackgroundColor, SwWrtShell &rShell)
Apply character background on the shell.
Definition: uitool.cxx:186
OUString aName
void SetWhich(sal_uInt16 nId)
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
sal_uInt16 GetItemCount() const
static UseOnPage lcl_convertUseFromSvx(SvxPageUsage nUse)
Convert from SvxPageUsage to UseOnPage.
Definition: uitool.cxx:253
tools::Long Height() const
void SetSize(const Size &rSize)
Reference< XComponentContext > getProcessComponentContext()
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition: uitool.cxx:412
Sequence< sal_Int8 > aSeq
Header, for PageFormats Client of FrameFormat describing the header.
Definition: fmthdft.hxx:33
bool GetCurAttr(SfxItemSet &, const bool bMergeIndentValuesOfNumRule=false) const
Definition: edattr.cxx:177
const SwFormatFrameSize & GetFrameSize(bool=true) const
Definition: fmtfsize.hxx:104
OUString sId
const sal_uInt16 * GetRanges() const
const SwFrameFormat * GetFlyFrameFormat() const
Get FlyFrameFormat; for UI macro linkage at Flys.
Definition: fefly1.cxx:1247
void SetDfltMetric(FieldUnit eMetric, bool bWeb)
Definition: uitool.cxx:702
void SetNumOffset(const ::std::optional< sal_uInt16 > &oNum)
Definition: fmtpdsc.hxx:65
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
bool IsFirstShared() const
Definition: pagedesc.cxx:376
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
void SetNumberingType(SvxNumType nSet)
bool IsActive() const
Definition: fmthdft.hxx:58
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1394
void RegisterToPageDesc(SwPageDesc &)
Definition: atrfrm.cxx:706
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
tools::Long GetRight() const
Definition: tabcol.hxx:79
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:752
constexpr sal_uInt16 RES_FRMATR_BEGIN(RES_PARATR_LIST_END)
Rect of PrtArea of FlyFrame.
OUString GetAppLangDateTimeString(const DateTime &rDT)
Definition: uitool.cxx:802
const Size & GetSize() const
const SwFrameFormat * GetHeaderFormat() const
Definition: fmthdft.hxx:54
SwFrameSize GetHeightSizeType() const
Definition: fmtfsize.hxx:80
void SetDescName(const OUString &rStr)
void SetRegisterFormatColl(const SwTextFormatColl *rFormat)
set the style for the grid alignment
Definition: pagedesc.cxx:192
const SvxLRSpaceItem & GetLRSpace(bool=true) const
Definition: frmatr.hxx:74
void ItemSetToPageDesc(const SfxItemSet &rSet, SwPageDesc &rPageDesc)
Definition: uitool.cxx:269
const SvxNumberType & GetNumType() const
Definition: pagedesc.hxx:192