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