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