LibreOffice Module sw (master)  1
expfld.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 <sal/config.h>
21 
22 #include <limits>
23 
24 #include <UndoTable.hxx>
25 #include <hintids.hxx>
26 #include <o3tl/any.hxx>
27 #include <osl/diagnose.h>
29 #include <unotools/charclass.hxx>
30 #include <editeng/langitem.hxx>
31 #include <editeng/fontitem.hxx>
32 #include <com/sun/star/text/SetVariableType.hpp>
33 #include <unofield.hxx>
34 #include <frmfmt.hxx>
35 #include <fmtfld.hxx>
36 #include <txtfld.hxx>
37 #include <fmtanchr.hxx>
38 #include <txtftn.hxx>
39 #include <doc.hxx>
41 #include <layfrm.hxx>
42 #include <pagefrm.hxx>
43 #include <cntfrm.hxx>
44 #include <txtfrm.hxx>
45 #include <rootfrm.hxx>
46 #include <tabfrm.hxx>
47 #include <flyfrm.hxx>
48 #include <ftnfrm.hxx>
49 #include <rowfrm.hxx>
50 #include <expfld.hxx>
51 #include <usrfld.hxx>
52 #include <ndtxt.hxx>
53 #include <calc.hxx>
54 #include <pam.hxx>
55 #include <docfld.hxx>
56 #include <swtable.hxx>
57 #include <breakit.hxx>
58 #include <SwStyleNameMapper.hxx>
59 #include <unofldmid.h>
60 #include <numrule.hxx>
61 
62 using namespace ::com::sun::star;
63 using namespace ::com::sun::star::text;
64 
65 static sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
66 {
67  sal_Int16 nRet = 0;
68  switch(nSubType)
69  {
71  nRet = SetVariableType::VAR; // 0
72  break;
74  nRet = SetVariableType::SEQUENCE; // 1
75  break;
77  nRet = SetVariableType::FORMULA; // 2
78  break;
80  nRet = SetVariableType::STRING; // 3
81  break;
82  }
83  return nRet;
84 }
85 
86 static sal_Int32 lcl_APIToSubType(const uno::Any& rAny)
87 {
88  sal_Int16 nVal = 0;
89  rAny >>= nVal;
90  sal_Int32 nSet = 0;
91  switch(nVal)
92  {
93  case SetVariableType::VAR: nSet = nsSwGetSetExpType::GSE_EXPR; break;
94  case SetVariableType::SEQUENCE: nSet = nsSwGetSetExpType::GSE_SEQ; break;
95  case SetVariableType::FORMULA: nSet = nsSwGetSetExpType::GSE_FORMULA; break;
96  case SetVariableType::STRING: nSet = nsSwGetSetExpType::GSE_STRING; break;
97  default:
98  OSL_FAIL("wrong value");
99  nSet = -1;
100  }
101  return nSet;
102 }
103 
104 OUString ReplacePoint( const OUString& rTmpName, bool bWithCommandType )
105 {
106  // replace first and last (if bWithCommandType: last two) dot
107  // since table names may contain dots
108 
109  sal_Int32 nIndex = rTmpName.lastIndexOf('.');
110  if (nIndex<0)
111  {
112  return rTmpName;
113  }
114 
115  OUString sRes = rTmpName.replaceAt(nIndex, 1, OUString(DB_DELIM));
116 
117  if (bWithCommandType)
118  {
119  nIndex = sRes.lastIndexOf('.', nIndex);
120  if (nIndex<0)
121  {
122  return sRes;
123  }
124  sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
125  }
126 
127  nIndex = sRes.indexOf('.');
128  if (nIndex>=0)
129  {
130  sRes = sRes.replaceAt(nIndex, 1, OUString(DB_DELIM));
131  }
132  return sRes;
133 }
134 
135 static SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos,
136  const SwContentFrame *pCFrame, Point &rPt )
137 {
138  SwTextNode* pTextNode = nullptr;
139  if ( !pCFrame )
140  {
141  const SwNodes& rNodes = rDoc.GetNodes();
142  rPos.nNode = *rNodes.GetEndOfContent().StartOfSectionNode();
143  SwContentNode* pCNd;
144  while( nullptr != (pCNd = rNodes.GoNext( &rPos.nNode ) ) &&
145  nullptr == ( pTextNode = pCNd->GetTextNode() ) )
146  ;
147  OSL_ENSURE( pTextNode, "Where is the 1. TextNode?" );
148  rPos.nContent.Assign( pTextNode, 0 );
149  }
150  else if ( !pCFrame->isFrameAreaDefinitionValid() )
151  {
152  assert(pCFrame->IsTextFrame());
153  rPos = static_cast<SwTextFrame const*>(pCFrame)->MapViewToModelPos(TextFrameIndex(0));
154  }
155  else
156  {
157  pCFrame->GetModelPositionForViewPoint( &rPos, rPt );
158  pTextNode = rPos.nNode.GetNode().GetTextNode();
159  }
160  return pTextNode;
161 }
162 
163 const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos,
164  const SwFrame& rFrame )
165 {
166  const SwLayoutFrame* pLayout = rFrame.GetUpper();
167  const SwTextNode* pTextNode = nullptr;
168 
169  while( pLayout )
170  {
171  if( pLayout->IsFlyFrame() )
172  {
173  // get the FlyFormat
174  const SwFrameFormat* pFlyFormat = static_cast<const SwFlyFrame*>(pLayout)->GetFormat();
175  OSL_ENSURE( pFlyFormat, "Could not find FlyFormat, where is the field?" );
176 
177  const SwFormatAnchor &rAnchor = pFlyFormat->GetAnchor();
178 
179  if( RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId() )
180  {
181  // the fly needs to be attached somewhere, so ask it
182  pLayout = static_cast<const SwLayoutFrame*>(static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame());
183  continue;
184  }
185  else if ((RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()) ||
186  (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) ||
187  (RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()))
188  {
189  OSL_ENSURE( rAnchor.GetContentAnchor(), "no valid position" );
190  rPos = *rAnchor.GetContentAnchor();
191  pTextNode = rPos.nNode.GetNode().GetTextNode();
192  if ( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() )
193  {
194  const_cast<SwTextNode*>(pTextNode)->MakeStartIndex(
195  &rPos.nContent );
196  }
197 
198  // do not break yet, might be as well in Header/Footer/Footnote/Fly
199  pLayout = static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()
200  ? static_cast<const SwFlyFrame*>(pLayout)->GetAnchorFrame()->GetUpper() : nullptr;
201  continue;
202  }
203  else
204  {
205  pLayout->FindPageFrame()->GetContentPosition(
206  pLayout->getFrameArea().Pos(), rPos );
207  pTextNode = rPos.nNode.GetNode().GetTextNode();
208  }
209  }
210  else if( pLayout->IsFootnoteFrame() )
211  {
212  // get the anchor's node
213  const SwTextFootnote* pFootnote = static_cast<const SwFootnoteFrame*>(pLayout)->GetAttr();
214  pTextNode = &pFootnote->GetTextNode();
215  rPos.nNode = *pTextNode;
216  rPos.nContent = pFootnote->GetStart();
217  }
218  else if( pLayout->IsHeaderFrame() || pLayout->IsFooterFrame() )
219  {
220  const SwContentFrame* pContentFrame;
221  const SwPageFrame* pPgFrame = pLayout->FindPageFrame();
222  if( pLayout->IsHeaderFrame() )
223  {
224  const SwTabFrame *pTab;
225  if( nullptr != ( pContentFrame = pPgFrame->FindFirstBodyContent()) &&
226  nullptr != (pTab = pContentFrame->FindTabFrame()) && pTab->IsFollow() &&
227  pTab->GetTable()->GetRowsToRepeat() > 0 &&
228  pTab->IsInHeadline( *pContentFrame ) )
229  {
230  // take the next line
231  const SwLayoutFrame* pRow = pTab->GetFirstNonHeadlineRow();
232  pContentFrame = pRow->ContainsContent();
233  }
234  }
235  else
236  pContentFrame = pPgFrame->FindLastBodyContent();
237 
238  if( pContentFrame )
239  {
240  assert(pContentFrame->IsTextFrame());
241  SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pContentFrame));
242  rPos = pFrame->MapViewToModelPos(TextFrameIndex(pFrame->GetText().getLength()));
243  pTextNode = rPos.nNode.GetNode().GetTextNode();
244  assert(pTextNode);
245  }
246  else
247  {
248  Point aPt( pLayout->getFrameArea().Pos() );
249  aPt.AdjustY( 1 ); // get out of the header
250  pContentFrame = pPgFrame->GetContentPos( aPt, false, true );
251  pTextNode = GetFirstTextNode( rDoc, rPos, pContentFrame, aPt );
252  }
253  }
254  else
255  {
256  pLayout = pLayout->GetUpper();
257  continue;
258  }
259  break; // found, so finish loop
260  }
261  return pTextNode;
262 }
263 
266 {
267 }
268 
269 std::unique_ptr<SwFieldType> SwGetExpFieldType::Copy() const
270 {
271  return std::make_unique<SwGetExpFieldType>(GetDoc());
272 }
273 
275 {
276  if (rHint.GetId() != SfxHintId::SwLegacyModify)
277  return;
278  auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint);
279  // do not expand anything else
280  if(pLegacy->GetWhich() != RES_DOCPOS_UPDATE)
281  return;
282  CallSwClientNotify(rHint);
283 }
284 
285 SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const OUString& rFormel,
286  sal_uInt16 nSub, sal_uLong nFormat)
287  : SwFormulaField( pTyp, nFormat, 0.0 )
288  , m_fValueRLHidden(0.0)
289  ,
290  m_bIsInBodyText( true ),
291  m_nSubType(nSub),
292  m_bLateInitialization( false )
293 {
294  SetFormula( rFormel );
295 }
296 
297 void SwGetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
298 {
299  if (!pLayout || pLayout->IsHideRedlines())
300  {
301  m_sExpandRLHidden = rExpand;
302  }
303  if (!pLayout || !pLayout->IsHideRedlines())
304  {
305  m_sExpand = rExpand;
306  }
307 }
308 
309 OUString SwGetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
310 {
312  return GetFormula();
313 
314  return (pLayout && pLayout->IsHideRedlines()) ? m_sExpandRLHidden : m_sExpand;
315 }
316 
318 {
319  const SwFieldTypesEnum nType =
323 
324  return SwFieldType::GetTypeStr(nType) + " " + GetFormula();
325 }
326 
327 std::unique_ptr<SwField> SwGetExpField::Copy() const
328 {
329  std::unique_ptr<SwGetExpField> pTmp(new SwGetExpField(static_cast<SwGetExpFieldType*>(GetTyp()),
331  pTmp->SetLanguage(GetLanguage());
332  pTmp->m_fValueRLHidden = m_fValueRLHidden;
333  pTmp->SwValueField::SetValue(GetValue());
334  pTmp->m_sExpand = m_sExpand;
335  pTmp->m_sExpandRLHidden = m_sExpandRLHidden;
336  pTmp->m_bIsInBodyText = m_bIsInBodyText;
337  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
339  pTmp->SetLateInitialization();
340 
341  return std::unique_ptr<SwField>(pTmp.release());
342 }
343 
344 void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& rField )
345 {
346  if( m_bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys
347  return;
348 
349  OSL_ENSURE( !rFrame.IsInDocBody(), "Flag incorrect, frame is in DocBody" );
350 
351  // determine document (or is there an easier way?)
352  const SwTextNode* pTextNode = &rField.GetTextNode();
353  SwDoc& rDoc = const_cast<SwDoc&>(pTextNode->GetDoc());
354 
355  // create index for determination of the TextNode
356  SwPosition aPos( SwNodeIndex( rDoc.GetNodes() ) );
357  pTextNode = GetBodyTextNode( rDoc, aPos, rFrame );
358 
359  // If no layout exists, ChangeExpansion is called for header and
360  // footer lines via layout formatting without existing TextNode.
361  if(!pTextNode)
362  return;
363  // #i82544#
365  {
367  if( pSetExpField )
368  {
369  m_bLateInitialization = false;
371  static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
373  }
374  }
375 
376  SwRootFrame const& rLayout(*rFrame.getRootFrame());
377  OUString & rExpand(rLayout.IsHideRedlines() ? m_sExpandRLHidden : m_sExpand);
378  SetGetExpField aEndField( aPos.nNode, &rField, &aPos.nContent );
380  {
381  SwHashTable<HashStr> aHashTable(0);
382  rDoc.getIDocumentFieldsAccess().FieldsToExpand(aHashTable, aEndField, rLayout);
383  rExpand = LookString( aHashTable, GetFormula() );
384  }
385  else
386  {
387  // fill calculator with values
388  SwCalc aCalc( rDoc );
389  rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, aEndField, &rLayout);
390 
391  // calculate value
392  SetValue(aCalc.Calculate(GetFormula()).GetDouble(), &rLayout);
393 
394  // analyse based on format
395  rExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(
396  GetValue(&rLayout), GetFormat(), GetLanguage());
397  }
398 }
399 
400 OUString SwGetExpField::GetPar2() const
401 {
402  return GetFormula();
403 }
404 
405 void SwGetExpField::SetPar2(const OUString& rStr)
406 {
407  SetFormula(rStr);
408 }
409 
410 sal_uInt16 SwGetExpField::GetSubType() const
411 {
412  return m_nSubType;
413 }
414 
415 void SwGetExpField::SetSubType(sal_uInt16 nType)
416 {
417  m_nSubType = nType;
418 }
419 
421 {
423  SwField::SetLanguage(nLng);
424  else
426 }
427 
428 bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
429 {
430  switch( nWhichId )
431  {
432  case FIELD_PROP_DOUBLE:
433  rAny <<= GetValue();
434  break;
435  case FIELD_PROP_FORMAT:
436  rAny <<= static_cast<sal_Int32>(GetFormat());
437  break;
438  case FIELD_PROP_USHORT1:
439  rAny <<= static_cast<sal_Int16>(m_nSubType);
440  break;
441  case FIELD_PROP_PAR1:
442  rAny <<= GetFormula();
443  break;
444  case FIELD_PROP_SUBTYPE:
445  {
446  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
447  rAny <<= nRet;
448  }
449  break;
450  case FIELD_PROP_BOOL2:
451  rAny <<= 0 != (m_nSubType & nsSwExtendedSubType::SUB_CMD);
452  break;
453  case FIELD_PROP_PAR4:
454  rAny <<= m_sExpand;
455  break;
456  default:
457  return SwField::QueryValue(rAny, nWhichId);
458  }
459  return true;
460 }
461 
462 bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
463 {
464  sal_Int32 nTmp = 0;
465  switch( nWhichId )
466  {
467  case FIELD_PROP_DOUBLE:
468  SwValueField::SetValue(*o3tl::doAccess<double>(rAny));
469  m_fValueRLHidden = *o3tl::doAccess<double>(rAny);
470  break;
471  case FIELD_PROP_FORMAT:
472  rAny >>= nTmp;
473  SetFormat(nTmp);
474  break;
475  case FIELD_PROP_USHORT1:
476  rAny >>= nTmp;
477  m_nSubType = o3tl::narrowing<sal_uInt16>(nTmp);
478  break;
479  case FIELD_PROP_PAR1:
480  {
481  OUString sTmp;
482  rAny >>= sTmp;
483  SetFormula(sTmp);
484  break;
485  }
486  case FIELD_PROP_SUBTYPE:
487  nTmp = lcl_APIToSubType(rAny);
488  if( nTmp >=0 )
489  SetSubType( o3tl::narrowing<sal_uInt16>((GetSubType() & 0xff00) | nTmp));
490  break;
491  case FIELD_PROP_BOOL2:
492  if(*o3tl::doAccess<bool>(rAny))
494  else
496  break;
497  case FIELD_PROP_PAR4:
498  {
499  OUString sTmp;
500  rAny >>= sTmp;
501  ChgExpStr(sTmp, nullptr);
502  break;
503  }
504  default:
505  return SwField::PutValue(rAny, nWhichId);
506  }
507  return true;
508 }
509 
510 SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, sal_uInt16 nTyp )
512  m_sName( rName ),
513  m_sDelim( "." ),
514  m_nType(nTyp), m_nLevel( UCHAR_MAX ),
515  m_bDeleted( false )
516 {
518  EnableFormat(false); // do not use Numberformatter
519 }
520 
521 std::unique_ptr<SwFieldType> SwSetExpFieldType::Copy() const
522 {
523  std::unique_ptr<SwSetExpFieldType> pNew(new SwSetExpFieldType(GetDoc(), m_sName, m_nType));
524  pNew->m_bDeleted = m_bDeleted;
525  pNew->m_sDelim = m_sDelim;
526  pNew->m_nLevel = m_nLevel;
527 
528  return pNew;
529 }
530 
532 {
533  return m_sName;
534 }
535 
536 const OUString& SwSetExpField::GetExpStr(SwRootFrame const*const pLayout) const
537 {
538  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
539 }
540 
541 void SwSetExpField::ChgExpStr(const OUString& rExpand, SwRootFrame const*const pLayout)
542 {
543  if (!pLayout || pLayout->IsHideRedlines())
544  {
545  msExpandRLHidden = rExpand;
546  }
547  if (!pLayout || !pLayout->IsHideRedlines())
548  {
549  msExpand = rExpand;
550  }
551 }
552 
554 {
555  // do not expand further
556 }
557 
559 {
560  std::vector<SwFormatField*> vFields;
561  GatherFields(vFields, false);
562  for(auto pFormatField: vFields)
563  pFormatField->GetField()->ChangeFormat(nFormat);
564 }
565 
567 {
568  if( !HasWriterListeners() )
569  return SVX_NUM_ARABIC;
570 
571  std::vector<SwFormatField*> vFields;
572  GatherFields(vFields, false);
573  return vFields.front()->GetField()->GetFormat();
574 }
575 
577 {
579  return;
580 
581  std::vector<sal_uInt16> aArr;
582 
583  // check if number is already used and if a new one needs to be created
584  std::vector<SwFormatField*> vFields;
585  GatherFields(vFields);
586  for(SwFormatField* pF: vFields)
587  if(pF->GetField() != &rField)
588  InsertSort(aArr, static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber());
589 
590  // check first if number already exists
591  sal_uInt16 nNum = rField.GetSeqNumber();
592  if( USHRT_MAX != nNum )
593  {
594  std::vector<sal_uInt16>::size_type n {0};
595 
596  for( n = 0; n < aArr.size(); ++n )
597  if( aArr[ n ] >= nNum )
598  break;
599 
600  if( n == aArr.size() || aArr[ n ] > nNum )
601  return; // no -> use it
602  }
603 
604  // flagged all numbers, so determine the right number
605  std::vector<sal_uInt16>::size_type n = aArr.size();
606  OSL_ENSURE( n <= std::numeric_limits<sal_uInt16>::max(), "Array is too big for using a sal_uInt16 index" );
607 
608  if ( n > 0 && aArr[ n-1 ] != n-1 )
609  {
610  for( n = 0; n < aArr.size(); ++n )
611  if( n != aArr[ n ] )
612  break;
613  }
614 
615  rField.SetSeqNumber( n );
616 }
617 
619  SwRootFrame const*const pLayout)
620 {
621  rList.Clear();
622 
623  IDocumentRedlineAccess const& rIDRA(GetDoc()->getIDocumentRedlineAccess());
624 
625  std::vector<SwFormatField*> vFields;
626  GatherFields(vFields);
627  for(SwFormatField* pF: vFields)
628  {
629  const SwTextNode* pNd;
630  if( nullptr != ( pNd = pF->GetTextField()->GetpTextNode() )
631  && (!pLayout || !pLayout->IsHideRedlines()
632  || !sw::IsFieldDeletedInModel(rIDRA, *pF->GetTextField())))
633  {
634  SeqFieldLstElem aNew(
635  pNd->GetExpandText(pLayout),
636  static_cast<SwSetExpField*>(pF->GetField())->GetSeqNumber() );
637  rList.InsertSort( aNew );
638  }
639  }
640  return rList.Count();
641 }
642 
644  SwRootFrame const*const pLayout)
645 {
646  const SwTextNode* pTextNd = rNd.FindOutlineNodeOfLevel(m_nLevel, pLayout);
647  if( !pTextNd )
648  return;
649 
650  SwNumRule * pRule = pTextNd->GetNumRule();
651 
652  if (!pRule)
653  return;
654 
655  // --> OD 2005-11-02 #i51089 - TUNING#
656  if (SwNodeNum const*const pNum = pTextNd->GetNum(pLayout))
657  {
658  // only get the number, without pre-/post-fixstrings
659  OUString const sNumber(pRule->MakeNumString(*pNum, false));
660 
661  if( !sNumber.isEmpty() )
662  rField.ChgExpStr(sNumber + m_sDelim + rField.GetExpStr(pLayout), pLayout);
663  }
664  else
665  {
666  OSL_ENSURE(pTextNd->GetNum(nullptr), "<SwSetExpFieldType::SetChapter(..)> - text node with numbering rule, but without number. This is a serious defect");
667  }
668 }
669 
670 void SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
671 {
672  switch( nWhichId )
673  {
674  case FIELD_PROP_SUBTYPE:
675  {
676  sal_Int16 nRet = lcl_SubTypeToAPI(GetType());
677  rAny <<= nRet;
678  }
679  break;
680  case FIELD_PROP_PAR2:
681  rAny <<= GetDelimiter();
682  break;
683  case FIELD_PROP_SHORT1:
684  {
685  sal_Int8 nRet = m_nLevel < MAXLEVEL? m_nLevel : -1;
686  rAny <<= nRet;
687  }
688  break;
689  default:
690  assert(false);
691  }
692 }
693 
694 void SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
695 {
696  switch( nWhichId )
697  {
698  case FIELD_PROP_SUBTYPE:
699  {
700  sal_Int32 nSet = lcl_APIToSubType(rAny);
701  if(nSet >=0)
702  SetType(o3tl::narrowing<sal_uInt16>(nSet));
703  }
704  break;
705  case FIELD_PROP_PAR2:
706  {
707  OUString sTmp;
708  rAny >>= sTmp;
709  if( !sTmp.isEmpty() )
710  SetDelimiter( sTmp );
711  else
712  SetDelimiter( " " );
713  }
714  break;
715  case FIELD_PROP_SHORT1:
716  {
717  sal_Int8 nLvl = 0;
718  rAny >>= nLvl;
719  if(nLvl < 0 || nLvl >= MAXLEVEL)
720  SetOutlineLvl(UCHAR_MAX);
721  else
722  SetOutlineLvl(nLvl);
723  }
724  break;
725  default:
726  assert(false);
727  }
728 }
729 
731 {
732  OUStringBuffer aBuf(aNew.sDlgEntry);
733  const sal_Int32 nLen = aBuf.getLength();
734  for (sal_Int32 i = 0; i < nLen; ++i)
735  {
736  if (aBuf[i]<' ')
737  {
738  aBuf[i]=' ';
739  }
740  }
741  aNew.sDlgEntry = aBuf.makeStringAndClear();
742 
743  size_t nPos = 0;
744  bool bRet = SeekEntry( aNew, &nPos );
745  if( !bRet )
746  maData.insert( maData.begin() + nPos, aNew );
747  return bRet;
748 }
749 
750 bool SwSeqFieldList::SeekEntry( const SeqFieldLstElem& rNew, size_t* pP ) const
751 {
752  size_t nO = maData.size();
753  size_t nU = 0;
754  if( nO > 0 )
755  {
756  CollatorWrapper & rCaseColl = ::GetAppCaseCollator(),
757  & rColl = ::GetAppCollator();
758  const CharClass& rCC = GetAppCharClass();
759 
760  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
761  const OUString rTmp2 = rNew.sDlgEntry;
762  sal_Int32 nFndPos2 = 0;
763  const OUString sNum2( rTmp2.getToken( 0, ' ', nFndPos2 ));
764  bool bIsNum2IsNumeric = CharClass::isAsciiNumeric( sNum2 );
765  sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.toInt32() : 0;
766 
767  nO--;
768  while( nU <= nO )
769  {
770  const size_t nM = nU + ( nO - nU ) / 2;
771 
772  //#59900# Sorting should sort number correctly (e.g. "10" after "9" not after "1")
773  const OUString rTmp1 = maData[nM].sDlgEntry;
774  sal_Int32 nFndPos1 = 0;
775  const OUString sNum1( rTmp1.getToken( 0, ' ', nFndPos1 ));
776  sal_Int32 nCmp;
777 
778  if( bIsNum2IsNumeric && rCC.isNumeric( sNum1 ) )
779  {
780  sal_Int32 nNum1 = sNum1.toInt32();
781  nCmp = nNum2 - nNum1;
782  if( 0 == nCmp )
783  {
784  OUString aTmp1 = nFndPos1 != -1 ? rTmp1.copy(nFndPos1) : OUString();
785  OUString aTmp2 = nFndPos2 != -1 ? rTmp2.copy(nFndPos2) : OUString();
786  nCmp = rCaseColl.compareString(aTmp2, aTmp1);
787  }
788  }
789  else
790  nCmp = rColl.compareString( rTmp2, rTmp1 );
791 
792  if( 0 == nCmp )
793  {
794  if( pP ) *pP = nM;
795  return true;
796  }
797  else if( 0 < nCmp )
798  nU = nM + 1;
799  else if( nM == 0 )
800  break;
801  else
802  nO = nM - 1;
803  }
804  }
805  if( pP ) *pP = nU;
806  return false;
807 }
808 
809 SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const OUString& rFormel,
810  sal_uLong nFormat)
811  : SwFormulaField( pTyp, nFormat, 0.0 )
812  , m_fValueRLHidden(0.0)
813  , mnSeqNo( USHRT_MAX )
814  , mnSubType(0)
815  , mpFormatField(nullptr)
816 {
817  SetFormula(rFormel);
818  // ignore SubType
819  mbInput = false;
820  if( IsSequenceField() )
821  {
823  m_fValueRLHidden = 1.0;
824  if( rFormel.isEmpty() )
825  {
826  SetFormula(pTyp->GetName() + "+1");
827  }
828  }
829 }
830 
832 {
833  mpFormatField = &rFormatField;
834 }
835 
836 OUString SwSetExpField::ExpandImpl(SwRootFrame const*const pLayout) const
837 {
839  { // we need the CommandString
840  return GetTyp()->GetName() + " = " + GetFormula();
841  }
843  { // value is visible
844  return (pLayout && pLayout->IsHideRedlines()) ? msExpandRLHidden : msExpand;
845  }
846  return OUString();
847 }
848 
851 {
852  SwFieldTypesEnum const nStrType( (IsSequenceField())
854  : mbInput
857 
858  OUString aStr(
859  SwFieldType::GetTypeStr( nStrType )
860  + " "
861  + GetTyp()->GetName() );
862 
863  // Sequence: without formula
864  if (SwFieldTypesEnum::Sequence != nStrType)
865  {
866  aStr += " = " + GetFormula();
867  }
868  return aStr;
869 }
870 
871 std::unique_ptr<SwField> SwSetExpField::Copy() const
872 {
873  std::unique_ptr<SwSetExpField> pTmp(new SwSetExpField(static_cast<SwSetExpFieldType*>(GetTyp()),
874  GetFormula(), GetFormat()));
875  pTmp->SwValueField::SetValue(GetValue());
876  pTmp->m_fValueRLHidden = m_fValueRLHidden;
877  pTmp->msExpand = msExpand;
878  pTmp->msExpandRLHidden = msExpandRLHidden;
879  pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
880  pTmp->SetLanguage(GetLanguage());
881  pTmp->maPText = maPText;
882  pTmp->mbInput = mbInput;
883  pTmp->mnSeqNo = mnSeqNo;
884  pTmp->SetSubType(GetSubType());
885 
886  return std::unique_ptr<SwField>(pTmp.release());
887 }
888 
889 void SwSetExpField::SetSubType(sal_uInt16 nSub)
890 {
891  static_cast<SwSetExpFieldType*>(GetTyp())->SetType(nSub & 0xff);
892  mnSubType = nSub & 0xff00;
893 
894  OSL_ENSURE( (nSub & 0xff) != 3, "SubType is illegal!" );
895 }
896 
897 sal_uInt16 SwSetExpField::GetSubType() const
898 {
899  return static_cast<SwSetExpFieldType*>(GetTyp())->GetType() | mnSubType;
900 }
901 
902 void SwSetExpField::SetValue( const double& rAny )
903 {
905 
906  if( IsSequenceField() )
907  msExpand = FormatNumber( GetValue(), static_cast<SvxNumType>(GetFormat()), GetLanguage() );
908  else
909  msExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
910  GetFormat(), GetLanguage());
911 }
912 
913 void SwSetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
914 {
915  if (!pLayout || !pLayout->IsHideRedlines())
916  {
917  SetValue(rValue);
918  }
919  if (pLayout && !pLayout->IsHideRedlines())
920  return;
921 
922  m_fValueRLHidden = rValue;
923  if (IsSequenceField())
924  {
925  msExpandRLHidden = FormatNumber(rValue, static_cast<SvxNumType>(GetFormat()), GetLanguage());
926  }
927  else
928  {
930  rValue, GetFormat(), GetLanguage());
931  }
932 }
933 
934 double SwSetExpField::GetValue(SwRootFrame const* pLayout) const
935 {
936  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
937 }
938 
939 void SwGetExpField::SetValue( const double& rAny )
940 {
942  m_sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(),
943  GetLanguage());
944 }
945 
946 void SwGetExpField::SetValue(const double& rValue, SwRootFrame const*const pLayout)
947 {
948  if (!pLayout || !pLayout->IsHideRedlines())
949  {
950  SetValue(rValue);
951  }
952  if (!pLayout || pLayout->IsHideRedlines())
953  {
954  m_fValueRLHidden = rValue;
956  rValue, GetFormat(), GetLanguage());
957  }
958 }
959 
960 double SwGetExpField::GetValue(SwRootFrame const* pLayout) const
961 {
962  return (pLayout && pLayout->IsHideRedlines()) ? m_fValueRLHidden : GetValue();
963 }
964 
972 sal_Int32 SwGetExpField::GetReferenceTextPos( const SwFormatField& rFormat, SwDoc& rDoc, sal_Int32 nHint)
973 {
974 
975  const SwTextField* pTextField = rFormat.GetTextField();
976  const SwTextNode& rTextNode = pTextField->GetTextNode();
977 
978  sal_Int32 nRet = nHint ? nHint : pTextField->GetStart() + 1;
979  OUString sNodeText = rTextNode.GetText();
980 
981  if(nRet<sNodeText.getLength())
982  {
983  sNodeText = sNodeText.copy(nRet);
984 
985  // now check if sNodeText starts with a non-alphanumeric character plus blanks
986  sal_uInt16 nSrcpt = g_pBreakIt->GetRealScriptOfText( sNodeText, 0 );
987 
988  static const WhichRangesContainer nIds(svl::Items<
995  >);
996  SwAttrSet aSet(rDoc.GetAttrPool(), nIds);
997  rTextNode.GetParaAttr(aSet, nRet, nRet+1);
998 
999  if( RTL_TEXTENCODING_SYMBOL != static_cast<const SvxFontItem&>(aSet.Get(
1000  GetWhichOfScript( RES_CHRATR_FONT, nSrcpt )) ).GetCharSet() )
1001  {
1002  LanguageType eLang = static_cast<const SvxLanguageItem&>(aSet.Get(
1004  LanguageTag aLanguageTag( eLang);
1005  CharClass aCC( aLanguageTag);
1006  sal_Unicode c0 = sNodeText[0];
1007  bool bIsAlphaNum = aCC.isAlphaNumeric( sNodeText, 0 );
1008  if( !bIsAlphaNum ||
1009  (c0 == ' ' || c0 == '\t'))
1010  {
1011  // ignoring blanks
1012  nRet++;
1013  const sal_Int32 nLen = sNodeText.getLength();
1014  for (sal_Int32 i = 1;
1015  i<nLen && (sNodeText[i]==' ' || sNodeText[i]=='\t');
1016  ++i
1017  )
1018  ++nRet;
1019  }
1020  }
1021  }
1022  return nRet;
1023 }
1024 
1025 OUString SwSetExpField::GetPar1() const
1026 {
1027  return static_cast<const SwSetExpFieldType*>(GetTyp())->GetName();
1028 }
1029 
1030 OUString SwSetExpField::GetPar2() const
1031 {
1032  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1033 
1034  if (nType & nsSwGetSetExpType::GSE_STRING)
1035  return GetFormula();
1036  return GetExpandedFormula();
1037 }
1038 
1039 void SwSetExpField::SetPar2(const OUString& rStr)
1040 {
1041  sal_uInt16 nType = static_cast<SwSetExpFieldType*>(GetTyp())->GetType();
1042 
1043  if( !(nType & nsSwGetSetExpType::GSE_SEQ) || !rStr.isEmpty() )
1044  {
1045  if (nType & nsSwGetSetExpType::GSE_STRING)
1046  SetFormula(rStr);
1047  else
1048  SetExpandedFormula(rStr);
1049  }
1050 }
1051 
1052 bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1053 {
1054  sal_Int32 nTmp32 = 0;
1055  sal_Int16 nTmp16 = 0;
1056  switch( nWhichId )
1057  {
1058  case FIELD_PROP_BOOL2:
1059  if(*o3tl::doAccess<bool>(rAny))
1061  else
1063  break;
1064  case FIELD_PROP_FORMAT:
1065  rAny >>= nTmp32;
1066  SetFormat(nTmp32);
1067  break;
1068  case FIELD_PROP_USHORT2:
1069  {
1070  rAny >>= nTmp16;
1071  if(nTmp16 <= css::style::NumberingType::NUMBER_NONE )
1072  SetFormat(nTmp16);
1073  else {
1074  //exception(wrong_value)
1075  ;
1076  }
1077  }
1078  break;
1079  case FIELD_PROP_USHORT1:
1080  rAny >>= nTmp16;
1081  mnSeqNo = nTmp16;
1082  break;
1083  case FIELD_PROP_PAR1:
1084  {
1085  OUString sTmp;
1086  rAny >>= sTmp;
1088  }
1089  break;
1090  case FIELD_PROP_PAR2:
1091  {
1092  OUString uTmp;
1093  rAny >>= uTmp;
1094  //I18N - if the formula contains only "TypeName+1"
1095  //and it's one of the initially created sequence fields
1096  //then the localized names has to be replaced by a programmatic name
1097  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, uTmp, false);
1098  SetFormula( sMyFormula );
1099  }
1100  break;
1101  case FIELD_PROP_DOUBLE:
1102  {
1103  double fVal = 0.0;
1104  rAny >>= fVal;
1105  SetValue(fVal);
1106  m_fValueRLHidden = fVal;
1107  }
1108  break;
1109  case FIELD_PROP_SUBTYPE:
1110  nTmp32 = lcl_APIToSubType(rAny);
1111  if(nTmp32 >= 0)
1112  SetSubType(o3tl::narrowing<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
1113  break;
1114  case FIELD_PROP_PAR3:
1115  rAny >>= maPText;
1116  break;
1117  case FIELD_PROP_BOOL3:
1118  if(*o3tl::doAccess<bool>(rAny))
1120  else
1122  break;
1123  case FIELD_PROP_BOOL1:
1124  {
1125  bool newInput(*o3tl::doAccess<bool>(rAny));
1126  if (newInput != GetInputFlag())
1127  {
1128  if (static_cast<SwSetExpFieldType*>(GetTyp())->GetType()
1130  {
1132  }
1133  else
1134  {
1135  SetInputFlag(newInput);
1136  }
1137  }
1138  }
1139  break;
1140  case FIELD_PROP_PAR4:
1141  {
1142  OUString sTmp;
1143  rAny >>= sTmp;
1144  ChgExpStr(sTmp, nullptr);
1145  }
1146  break;
1147  default:
1148  return SwField::PutValue(rAny, nWhichId);
1149  }
1150  return true;
1151 }
1152 
1153 bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1154 {
1155  switch( nWhichId )
1156  {
1157  case FIELD_PROP_BOOL2:
1159  break;
1160  case FIELD_PROP_FORMAT:
1161  rAny <<= static_cast<sal_Int32>(GetFormat());
1162  break;
1163  case FIELD_PROP_USHORT2:
1164  rAny <<= static_cast<sal_Int16>(GetFormat());
1165  break;
1166  case FIELD_PROP_USHORT1:
1167  rAny <<= static_cast<sal_Int16>(mnSeqNo);
1168  break;
1169  case FIELD_PROP_PAR1:
1171  break;
1172  case FIELD_PROP_PAR2:
1173  {
1174  //I18N - if the formula contains only "TypeName+1"
1175  //and it's one of the initially created sequence fields
1176  //then the localized names has to be replaced by a programmatic name
1177  OUString sMyFormula = SwXFieldMaster::LocalizeFormula(*this, GetFormula(), true);
1178  rAny <<= sMyFormula;
1179  }
1180  break;
1181  case FIELD_PROP_DOUBLE:
1182  rAny <<= GetValue();
1183  break;
1184  case FIELD_PROP_SUBTYPE:
1185  {
1186  sal_Int16 nRet = lcl_SubTypeToAPI(GetSubType() & 0xff);
1187  rAny <<= nRet;
1188  }
1189  break;
1190  case FIELD_PROP_PAR3:
1191  rAny <<= maPText;
1192  break;
1193  case FIELD_PROP_BOOL3:
1194  rAny <<= 0 != (mnSubType & nsSwExtendedSubType::SUB_CMD);
1195  break;
1196  case FIELD_PROP_BOOL1:
1197  rAny <<= GetInputFlag();
1198  break;
1199  case FIELD_PROP_PAR4:
1200  rAny <<= GetExpStr(nullptr);
1201  break;
1202  default:
1203  return SwField::QueryValue(rAny, nWhichId);
1204  }
1205  return true;
1206 }
1207 
1210  , mpDoc( pD )
1211 {
1212 }
1213 
1214 std::unique_ptr<SwFieldType> SwInputFieldType::Copy() const
1215 {
1216  return std::make_unique<SwInputFieldType>( mpDoc );
1217 }
1218 
1220  const OUString& rContent,
1221  const OUString& rPrompt,
1222  sal_uInt16 nSub,
1223  sal_uLong nFormat,
1224  bool bIsFormField )
1225  : SwField( pFieldType, nFormat, LANGUAGE_SYSTEM, false )
1226  , maContent(rContent)
1227  , maPText(rPrompt)
1228  , mnSubType(nSub)
1229  , mbIsFormField( bIsFormField )
1230  , mpFormatField( nullptr )
1231 {
1232 }
1233 
1235 {
1236 }
1237 
1239 {
1240  mpFormatField = &rFormatField;
1241 }
1242 
1243 
1244 void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
1245 {
1246  if ( (mnSubType & 0x00ff) == INP_TXT )
1247  {
1248  maContent = rNewFieldContent;
1249  }
1250  else if( (mnSubType & 0x00ff) == INP_USR )
1251  {
1252  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1253  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1254  if( pUserTyp )
1255  {
1256  pUserTyp->SetContent( rNewFieldContent );
1257  if (!pUserTyp->IsModifyLocked())
1258  {
1259  // trigger update of the corresponding User Fields and other
1260  // related Input Fields
1261  bool bUnlock(false);
1262  if (GetFormatField() != nullptr)
1263  {
1264  SwTextInputField *const pTextInputField =
1265  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1266  if (pTextInputField != nullptr)
1267  {
1268  bUnlock = pTextInputField->LockNotifyContentChange();
1269  }
1270  }
1271  pUserTyp->UpdateFields();
1272  if (bUnlock)
1273  {
1274  SwTextInputField *const pTextInputField =
1275  dynamic_cast<SwTextInputField*>(GetFormatField()->GetTextField());
1276  if (pTextInputField != nullptr)
1277  {
1278  pTextInputField->UnlockNotifyContentChange();
1279  }
1280  }
1281  }
1282  }
1283  }
1284 }
1285 
1287 {
1288  OUString aStr(SwField::GetFieldName());
1289  if ((mnSubType & 0x00ff) == INP_USR)
1290  {
1291  aStr += GetTyp()->GetName() + " " + getContent();
1292  }
1293  return aStr;
1294 }
1295 
1296 std::unique_ptr<SwField> SwInputField::Copy() const
1297 {
1298  std::unique_ptr<SwInputField> pField(
1299  new SwInputField(
1300  static_cast<SwInputFieldType*>(GetTyp()),
1301  getContent(),
1302  maPText,
1303  GetSubType(),
1304  GetFormat(),
1305  mbIsFormField ));
1306 
1307  pField->SetHelp( maHelp );
1308  pField->SetToolTip( maToolTip );
1309 
1310  pField->SetAutomaticLanguage(IsAutomaticLanguage());
1311  return std::unique_ptr<SwField>(pField.release());
1312 }
1313 
1314 OUString SwInputField::ExpandImpl(SwRootFrame const*const) const
1315 {
1316  if((mnSubType & 0x00ff) == INP_TXT)
1317  {
1318  return getContent();
1319  }
1320 
1321  if( (mnSubType & 0x00ff) == INP_USR )
1322  {
1323  SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
1324  static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
1325  if( pUserTyp )
1326  return pUserTyp->GetContent();
1327  }
1328 
1329  return OUString();
1330 }
1331 
1333 {
1334  return mbIsFormField
1335  || !maHelp.isEmpty()
1336  || !maToolTip.isEmpty();
1337 }
1338 
1339 bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
1340 {
1341  switch( nWhichId )
1342  {
1343  case FIELD_PROP_PAR1:
1344  rAny <<= getContent();
1345  break;
1346  case FIELD_PROP_PAR2:
1347  rAny <<= maPText;
1348  break;
1349  case FIELD_PROP_PAR3:
1350  rAny <<= maHelp;
1351  break;
1352  case FIELD_PROP_PAR4:
1353  rAny <<= maToolTip;
1354  break;
1355  default:
1356  assert(false);
1357  }
1358  return true;
1359 }
1360 
1361 bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
1362 {
1363  switch( nWhichId )
1364  {
1365  case FIELD_PROP_PAR1:
1366  rAny >>= maContent;
1367  break;
1368  case FIELD_PROP_PAR2:
1369  rAny >>= maPText;
1370  break;
1371  case FIELD_PROP_PAR3:
1372  rAny >>= maHelp;
1373  break;
1374  case FIELD_PROP_PAR4:
1375  rAny >>= maToolTip;
1376  break;
1377  default:
1378  assert(false);
1379  }
1380  return true;
1381 }
1382 
1384 void SwInputField::SetPar1(const OUString& rStr)
1385 {
1386  maContent = rStr;
1387 }
1388 
1389 OUString SwInputField::GetPar1() const
1390 {
1391  return getContent();
1392 }
1393 
1394 void SwInputField::SetPar2(const OUString& rStr)
1395 {
1396  maPText = rStr;
1397 }
1398 
1399 OUString SwInputField::GetPar2() const
1400 {
1401  return maPText;
1402 }
1403 
1404 void SwInputField::SetHelp(const OUString & rStr)
1405 {
1406  maHelp = rStr;
1407 }
1408 
1409 const OUString& SwInputField::GetHelp() const
1410 {
1411  return maHelp;
1412 }
1413 
1414 void SwInputField::SetToolTip(const OUString & rStr)
1415 {
1416  maToolTip = rStr;
1417 }
1418 
1419 const OUString& SwInputField::GetToolTip() const
1420 {
1421  return maToolTip;
1422 }
1423 
1424 sal_uInt16 SwInputField::GetSubType() const
1425 {
1426  return mnSubType;
1427 }
1428 
1429 void SwInputField::SetSubType(sal_uInt16 nSub)
1430 {
1431  mnSubType = nSub;
1432 }
1433 
1434 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString msExpandRLHidden
hidden redlines
Definition: expfld.hxx:203
virtual void SetSubType(sal_uInt16 nType) override
Definition: expfld.cxx:889
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:240
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Overlay, because get-field cannot be changed and therefore does not need to be updated.
Definition: expfld.cxx:274
Base class of the Writer layout elements.
Definition: frame.hxx:315
Represents the visualization of a paragraph.
Definition: txtfrm.hxx:158
void SetDelimiter(const OUString &s)
Definition: expfld.hxx:178
Definition: calc.hxx:192
sal_Int32 nIndex
bool IsFollow() const
Definition: flowfrm.hxx:166
The shared part of a user field.
Definition: usrfld.hxx:34
void GetContentPosition(const Point &rPt, SwPosition &rPos) const
Same as SwLayoutFrame::GetContentPos().
Definition: trvlfrm.cxx:1382
bool mbInput
Definition: expfld.hxx:205
Marks a position in the document model.
Definition: pam.hxx:35
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
sal_Int32 compareString(const OUString &s1, const OUString &s2) const
bool IsInDocBody() const
Definition: frame.hxx:944
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
Definition: ndtxt.cxx:3918
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:462
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:1314
LanguageType GetLanguage() const
Language at field position.
Definition: fldbas.hxx:402
bool isNumeric(const OUString &rStr) const
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
Definition: number.cxx:628
const OUString & GetText() const
Definition: ndtxt.hxx:218
static constexpr auto Items
void SetType(sal_uInt16 nTyp)
Definition: expfld.hxx:187
void EnableFormat(bool bFormat=true)
Definition: fldbas.hxx:429
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:397
const SwExtendedSubType SUB_INVISIBLE
Invisible.
Definition: fldbas.hxx:212
signed char sal_Int8
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
pool item to which the SwSetExpField belongs
Definition: expfld.cxx:836
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:541
const SwTable * GetTable() const
Definition: tabfrm.hxx:158
SwNodeIndex nNode
Definition: pam.hxx:37
sal_uInt16 mnSubType
Definition: expfld.hxx:287
virtual void FieldsToCalc(SwCalc &rCalc, sal_uLong nLastNd, sal_Int32 nLastCnt)=0
const SwTextNode * GetBodyTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwFrame &rFrame)
Forward declaration: get "BodyTextNode" for exp.fld in Fly's headers/footers/footnotes.
Definition: expfld.cxx:163
void SetOutlineLvl(sal_uInt8 n)
Definition: expfld.hxx:180
sal_uIntPtr sal_uLong
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1361
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:939
const OUString & GetExpStr(SwRootFrame const *pLayout) const
Definition: expfld.cxx:536
static OUString LocalizeFormula(const SwSetExpField &rField, const OUString &rFormula, bool bQuery)
Definition: unofield.cxx:1018
Base class of all fields.
Definition: fldbas.hxx:289
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:46
#define FIELD_PROP_USHORT1
Definition: unofldmid.h:31
OUString LookString(SwHashTable< HashStr > const &rTable, std::u16string_view rName)
Look up the Name, if it is present, return its String, otherwise return an empty String.
Definition: docfld.cxx:362
sal_Int64 n
Definition: doc.hxx:188
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:93
aBuf
OUString sDlgEntry
Definition: expfld.hxx:49
SwNode & GetNode() const
Definition: ndindex.hxx:119
bool InsertSort(SeqFieldLstElem aNew)
Definition: expfld.cxx:730
sal_uInt16 GetRowsToRepeat() const
Definition: swtable.hxx:196
void Pos(const Point &rNew)
Definition: swrect.hxx:171
SwContentFrame * FindFirstBodyContent()
Definition: pagefrm.hxx:350
virtual void FieldsToExpand(SwHashTable< HashStr > &rTable, const SetGetExpField &rToThisField, SwRootFrame const &rLayout)=0
SwGetExpFieldType(SwDoc *pDoc)
Definition: expfld.cxx:264
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:897
void SetSeqRefNo(SwSetExpField &rField)
Definition: expfld.cxx:576
static const OUString & GetTypeStr(SwFieldTypesEnum nTypeId)
Definition: fldbas.cxx:122
bool HasWriterListeners() const
Definition: calbck.hxx:203
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
virtual OUString GetPar1() const override
Content.
Definition: expfld.cxx:1389
bool IsFootnoteFrame() const
Definition: frame.hxx:1203
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1039
#define FIELD_PROP_SUBTYPE
Definition: unofldmid.h:27
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:405
SfxHintId GetId() const
bool isFrameAreaDefinitionValid() const
Definition: frame.hxx:172
sal_uInt16 GetRealScriptOfText(const OUString &rText, sal_Int32 nPos) const
Definition: breakit.cxx:83
const OUString & GetHelp() const
Definition: expfld.cxx:1409
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:84
OUString GetExpandedFormula() const
Definition: fldbas.cxx:786
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:670
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Definition: fldbas.cxx:208
#define FIELD_PROP_FORMAT
Definition: unofldmid.h:26
void UpdateFields() const
Definition: fldbas.cxx:149
OUString maPText
Definition: expfld.hxx:204
void SetChapter(SwSetExpField &rField, const SwNode &rNd, SwRootFrame const *pLayout)
Definition: expfld.cxx:643
virtual bool GetModelPositionForViewPoint(SwPosition *, Point &, SwCursorMoveState *=nullptr, bool bTestBackground=false) const
Definition: unusedf.cxx:47
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:357
sal_uInt16 sal_Unicode
bool IsFlyFrame() const
Definition: frame.hxx:1211
static void TransmuteLeadToInputField(SwSetExpField &rField)
Convert between SwSetExpField with InputFlag false and InputFlag true.
Definition: unofield.cxx:1263
size_t Count()
Definition: expfld.hxx:64
OUString m_sName
OUString ReplacePoint(const OUString &rTmpName, bool bWithCommandType)
Definition: expfld.cxx:104
def Input(s)
void applyFieldContent(const OUString &rNewFieldContent)
Definition: expfld.cxx:1244
constexpr TypedWhichId< SwDocPosUpdate > RES_DOCPOS_UPDATE(169)
OUString m_sExpandRLHidden
hidden redlines
Definition: expfld.hxx:86
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: expfld.cxx:309
SwIndex nContent
Definition: pam.hxx:38
const SwRect & getFrameArea() const
Definition: frame.hxx:180
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:327
const SwTextField * GetTextField() const
Definition: fmtfld.hxx:128
bool SeekEntry(const SeqFieldLstElem &rNew, size_t *pPos) const
Definition: expfld.cxx:750
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:1214
void ChgExpStr(const OUString &rExpand, SwRootFrame const *pLayout)
Definition: expfld.cxx:297
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:359
SwBreakIt * g_pBreakIt
Definition: breakit.cxx:33
SVX_NUM_ARABIC
virtual OUString GetPar1() const override
Query name only.
Definition: expfld.cxx:1025
bool IsTextFrame() const
Definition: frame.hxx:1235
sal_Int32 GetStart() const
Definition: txatbase.hxx:86
static sal_Int32 lcl_APIToSubType(const uno::Any &rAny)
Definition: expfld.cxx:86
void SetToolTip(const OUString &rStr)
Definition: expfld.cxx:1414
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: fldbas.cxx:684
virtual void SetValue(const double &rVal) override
Definition: expfld.cxx:902
OUString FormatNumber(sal_uInt32 nNum, SvxNumType nFormat, LanguageType nLang)
expand numbering
Definition: fldbas.cxx:497
OUString m_sDelim
Definition: expfld.hxx:147
void SetHelp(const OUString &rStr)
Definition: expfld.cxx:1404
void SetExpandedFormula(const OUString &rStr)
Definition: fldbas.cxx:767
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:1286
#define FIELD_PROP_DOUBLE
Definition: unofldmid.h:34
const SwGetSetExpType GSE_EXPR
Expression.
Definition: fldbas.hxx:203
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:346
virtual OUString GetFieldName() const override
get name or content
Definition: expfld.cxx:317
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:1052
sal_uInt16 GetSeqNumber() const
Definition: expfld.hxx:243
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
Definition: ndarr.hxx:160
sal_Int32 m_nLevel
void SetFormula(const OUString &rStr)
Definition: fldbas.cxx:752
double GetDouble() const
Definition: calc.cxx:1452
static sal_Int32 GetReferenceTextPos(const SwFormatField &rFormat, SwDoc &rDoc, sal_Int32 nHint=0)
Find the index of the reference text following the current field.
Definition: expfld.cxx:972
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:331
Style of a layout element.
Definition: frmfmt.hxx:59
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:1296
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1153
const SwFormatAnchor & GetAnchor(bool=true) const
Definition: fmtanchr.hxx:81
int i
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:410
bool m_bIsInBodyText
Definition: expfld.hxx:87
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:132
OUString m_sName
Definition: expfld.hxx:146
const SwExtendedSubType SUB_CMD
Show command.
Definition: fldbas.hxx:211
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
RndStdIds GetAnchorId() const
Definition: fmtanchr.hxx:65
bool IsSequenceField() const
Definition: expfld.hxx:267
#define LANGUAGE_SYSTEM
const SwPosition * GetContentAnchor() const
Definition: fmtanchr.hxx:67
SwPageFrame * FindPageFrame()
Definition: frame.hxx:681
bool GetParaAttr(SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true, const bool bMergeIndentValuesOfNumRule=false, SwRootFrame const *pLayout=nullptr) const
Query the attributes of textnode over the range.
Definition: thints.cxx:2054
#define FIELD_PROP_BOOL2
Definition: unofldmid.h:29
#define FIELD_PROP_USHORT2
Definition: unofldmid.h:32
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:93
FlyAnchors.
Definition: fmtanchr.hxx:34
const SvxPageUsage aArr[]
SwFieldIds
Definition: fldbas.hxx:44
const OUString & getContent() const
Definition: expfld.hxx:296
SwLayoutFrame * GetUpper()
Definition: frame.hxx:679
SwDoc * mpDoc
Definition: expfld.hxx:272
virtual void SetSubType(sal_uInt16 nType) override
Definition: expfld.cxx:415
void SetSeqFormat(sal_uLong nFormat)
Definition: expfld.cxx:558
SwFormatField * mpFormatField
Definition: expfld.hxx:208
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: expfld.cxx:1384
sal_uInt16 GetWhichOfScript(sal_uInt16 nWhich, sal_uInt16 nScript)
Definition: hints.cxx:190
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
Definition: ndtxt.cxx:2777
void SetFormat(sal_uInt32 const nSet)
Definition: fldbas.hxx:303
virtual OUString GetFormula() const override
Definition: fldbas.cxx:747
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: expfld.cxx:694
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Definition: expfld.cxx:553
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:521
Marks a node in the document model.
Definition: ndindex.hxx:31
sal_uInt16 mnSeqNo
Definition: expfld.hxx:206
virtual OUString GetPar2() const override
Change formula.
Definition: expfld.cxx:400
SwDoc * GetDoc() const
Definition: fldbas.hxx:419
std::vector< SeqFieldLstElem > maData
Definition: expfld.hxx:59
bool IsAutomaticLanguage() const
Definition: fldbas.hxx:379
SwSetExpFieldType(SwDoc *pDoc, const OUString &rName, sal_uInt16 nType=nsSwGetSetExpType::GSE_EXPR)
Definition: expfld.cxx:510
SwFormatField * mpFormatField
Definition: expfld.hxx:290
A page of the document layout.
Definition: pagefrm.hxx:57
SwGetExpField(SwGetExpFieldType *, const OUString &rFormel, sal_uInt16 nSubType, sal_uLong nFormat)
Definition: expfld.cxx:285
#define DB_DELIM
Definition: swtypes.hxx:131
#define FIELD_PROP_PAR3
Definition: unofldmid.h:25
SwFieldType * GetTyp() const
Definition: fldbas.hxx:392
virtual OUString GetName() const override
Only in derived classes.
Definition: expfld.cxx:531
bool GetInputFlag() const
Definition: expfld.hxx:264
void SetSeqNumber(sal_uInt16 n)
Logical number, sequence fields.
Definition: expfld.hxx:242
static SwTextNode * GetFirstTextNode(const SwDoc &rDoc, SwPosition &rPos, const SwContentFrame *pCFrame, Point &rPt)
Definition: expfld.cxx:135
#define FIELD_PROP_BOOL1
Definition: unofldmid.h:28
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:408
sal_uLong GetSeqFormat() const
Definition: expfld.cxx:566
SwSbxValue Calculate(const OUString &rStr)
Definition: calc.cxx:356
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:831
bool isAlphaNumeric(const OUString &rStr, sal_Int32 nPos) const
bool IsModifyLocked() const
Definition: calbck.hxx:211
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:204
bool m_bLateInitialization
Definition: expfld.hxx:90
SwContentFrame * FindLastBodyContent()
Searches the last ContentFrame in BodyText below the page.
Definition: findfrm.cxx:52
SwRowFrame * GetFirstNonHeadlineRow() const
Definition: tabfrm.cxx:5737
const SwTextNode * FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const *pLayout=nullptr) const
Definition: node.cxx:773
OUString GetExpandText(SwRootFrame const *pLayout, const sal_Int32 nIdx=0, const sal_Int32 nLen=-1, const bool bWithNum=false, const bool bAddSpaceAfterListLabelStr=false, const bool bWithSpacesForLevel=false, const ExpandMode eAdditionalMode=ExpandMode::ExpandFootnote) const
add 4th optional parameter indicating, when that a spa...
Definition: ndtxt.cxx:3336
OUString maToolTip
Definition: expfld.hxx:286
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:423
general base class for all free-flowing frames
Definition: flyfrm.hxx:78
#define FIELD_PROP_BOOL3
Definition: unofldmid.h:35
#define FIELD_PROP_PAR1
Definition: unofldmid.h:23
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: expfld.cxx:269
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:137
bool isFormField() const
Definition: expfld.cxx:1332
sal_uInt16 m_nSubType
Definition: expfld.hxx:88
SwSetExpField(SwSetExpFieldType *, const OUString &rFormel, sal_uLong nFormat=0)
Definition: expfld.cxx:809
#define FIELD_PROP_PAR2
Definition: unofldmid.h:24
SwInputFieldType(SwDoc *pDoc)
Definition: expfld.cxx:1208
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
OUString maPText
Definition: expfld.hxx:284
virtual ~SwInputField() override
Definition: expfld.cxx:1234
SwFormatField * GetFormatField()
Definition: expfld.hxx:310
SwNodes & GetNodes()
Definition: doc.hxx:409
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
sal_uInt16 mnSubType
Definition: expfld.hxx:207
void SetInputFlag(bool bInp)
Definition: expfld.hxx:261
bool LockNotifyContentChange()
Definition: atrfld.cxx:647
virtual std::unique_ptr< SwField > Copy() const override
Definition: expfld.cxx:871
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
QPRO_FUNC_TYPE nType
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:300
const SwGetSetExpType GSE_FORMULA
Formula.
Definition: fldbas.hxx:205
OUString GetContent(sal_uInt32 nFormat=0)
Definition: usrfld.cxx:278
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
Definition: rootfrm.hxx:422
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
Definition: untbl.cxx:3059
static bool isAsciiNumeric(const OUString &rStr)
virtual void SetSubType(sal_uInt16 nSub) override
Definition: expfld.cxx:1429
virtual void CallSwClientNotify(const SfxHint &rHint) const override
Definition: calbck.cxx:326
virtual OUString GetFieldName() const override
Definition: expfld.cxx:850
const OUString & GetToolTip() const
Definition: expfld.cxx:1419
void UnlockNotifyContentChange()
Definition: atrfld.cxx:657
bool mbIsFormField
Definition: expfld.hxx:288
#define FIELD_PROP_PAR4
Definition: unofldmid.h:36
const SwGetSetExpType GSE_STRING
String.
Definition: fldbas.hxx:202
virtual void SetValue(const double &rVal)
Definition: fldbas.cxx:731
OUString msExpand
Definition: expfld.hxx:202
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
virtual OUString GetPar2() const override
Query formula.
Definition: expfld.cxx:1030
sal_uInt16 m_nType
Definition: expfld.hxx:148
sal_uInt8 m_nLevel
Definition: expfld.hxx:149
OUString maHelp
Definition: expfld.hxx:285
static sal_Int16 lcl_SubTypeToAPI(sal_uInt16 nSubType)
Definition: expfld.cxx:65
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
Definition: expfld.hxx:177
sal_uInt16 GetType() const
Definition: expfld.hxx:193
void ChangeExpansion(const SwFrame &, const SwTextField &)
For fields in header/footer/footnotes/flys: Only called by formatting!!
Definition: expfld.cxx:344
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: expfld.cxx:420
SwTextNode & GetTextNode() const
Definition: txtfld.hxx:53
const SwContentFrame * ContainsContent() const
Checks if the frame contains one or more ContentFrame's anywhere in his subsidiary structure; if so t...
Definition: findfrm.cxx:67
OUString ExpandValue(const double &rVal, sal_uInt32 nFormat, LanguageType nLng) const
Definition: fldbas.hxx:460
double m_fValueRLHidden
SwValueField; hidden redlines.
Definition: expfld.hxx:201
OUString m_sExpand
Definition: expfld.hxx:85
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
CharClass & GetAppCharClass()
Definition: init.cxx:703
const SwContentFrame * GetContentPos(Point &rPoint, const bool bDontLeave, const bool bBodyOnly=false, SwCursorMoveState *pCMS=nullptr, const bool bDefaultExpand=true) const
Finds the closest Content for the SPoint Is used for Pages, Flys and Cells if GetModelPositionForView...
Definition: trvlfrm.cxx:1186
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:1339
CollatorWrapper & GetAppCaseCollator()
Definition: init.cxx:747
SwInputField(SwInputFieldType *pFieldType, const OUString &rContent, const OUString &rPrompt, sal_uInt16 nSubType, sal_uLong nFormat=0, bool bIsFormField=true)
Direct input via dialog; delete old value.
Definition: expfld.cxx:1219
virtual double GetValue() const
Definition: fldbas.cxx:726
virtual void SetPar2(const OUString &rStr) override
Definition: expfld.cxx:1394
const SwTextNode & GetTextNode() const
Definition: txtftn.hxx:70
OUString maContent
Definition: expfld.hxx:283
aStr
SwContentNode * GoNext(SwNodeIndex *) const
Definition: nodes.cxx:1293
void SetFormatField(SwFormatField &rFormatField)
Definition: expfld.cxx:1238
virtual OUString GetPar2() const override
aPromptText
Definition: expfld.cxx:1399
bool IsFooterFrame() const
Definition: frame.hxx:1195
SwRootFrame * getRootFrame()
Definition: frame.hxx:680
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
T should be a subclass of SwHash.
Definition: calc.hxx:151
void Clear()
Definition: expfld.hxx:67
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: expfld.cxx:428
sal_uInt16 nPos
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1319
virtual sal_uInt16 GetSubType() const override
Definition: expfld.cxx:1424
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:856
CollatorWrapper & GetAppCollator()
Definition: init.cxx:735
bool IsHeaderFrame() const
Definition: frame.hxx:1191
bool IsInHeadline(const SwFrame &rFrame) const
Definition: tabfrm.cxx:5718
void SetContent(const OUString &rStr, sal_uInt32 nFormat=0)
Definition: usrfld.cxx:294
size_t GetSeqFieldList(SwSeqFieldList &rList, SwRootFrame const *pLayout)
Definition: expfld.cxx:618
SwTabFrame * FindTabFrame()
Definition: frame.hxx:1100
#define FIELD_PROP_SHORT1
Definition: unofldmid.h:37
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
Base class of the Writer document model elements.
Definition: node.hxx:80