LibreOffice Module sw (master)  1
tblafmt.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 <comphelper/fileformat.h>
21 #include <tools/stream.hxx>
22 #include <sfx2/docfile.hxx>
23 #include <svl/numformat.hxx>
24 #include <svl/zforlist.hxx>
25 #include <svl/zformat.hxx>
26 #include <unotools/configmgr.hxx>
27 #include <unotools/pathoptions.hxx>
28 #include <swtable.hxx>
29 #include <swtblfmt.hxx>
30 #include <com/sun/star/text/VertOrientation.hpp>
31 #include <swtypes.hxx>
32 #include <doc.hxx>
33 #include <poolfmt.hxx>
34 #include <tblafmt.hxx>
35 #include <cellatr.hxx>
36 #include <SwStyleNameMapper.hxx>
37 #include <hintids.hxx>
38 #include <fmtornt.hxx>
39 #include <editsh.hxx>
40 #include <fmtlsplt.hxx>
41 #include <fmtrowsplt.hxx>
42 #include <sal/log.hxx>
43 #include <osl/diagnose.h>
44 #include <osl/thread.h>
45 
46 #include <editeng/adjustitem.hxx>
47 #include <editeng/boxitem.hxx>
48 #include <editeng/brushitem.hxx>
49 #include <editeng/colritem.hxx>
50 #include <editeng/contouritem.hxx>
52 #include <editeng/fontitem.hxx>
53 #include <editeng/fhgtitem.hxx>
54 #include <editeng/justifyitem.hxx>
55 #include <editeng/legacyitem.hxx>
56 #include <editeng/lineitem.hxx>
57 #include <editeng/postitem.hxx>
58 #include <editeng/shdditem.hxx>
59 #include <editeng/udlnitem.hxx>
60 #include <editeng/wghtitem.hxx>
61 #include <svx/algitem.hxx>
62 #include <svx/rotmodit.hxx>
63 #include <legacyitem.hxx>
64 
65 #include <memory>
66 #include <vector>
67 
68 /*
69  * XXX: BIG RED NOTICE! Changes MUST be binary file format compatible and MUST
70  * be synchronized with Calc's ScAutoFormat sc/source/core/tool/autoform.cxx
71  */
72 
73 using ::editeng::SvxBorderLine;
74 
75 // until SO5PF
76 const sal_uInt16 AUTOFORMAT_ID_X = 9501;
77 const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
78 const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
79 
80 // from SO5
82 const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
83 const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
84 
85 const sal_uInt16 AUTOFORMAT_DATA_ID_552 = 9902;
86 
87 // --- from 680/dr25 on: store strings as UTF-8
88 const sal_uInt16 AUTOFORMAT_ID_680DR25 = 10021;
89 
90 // --- Bug fix to fdo#31005: Table Autoformats does not save/apply all properties (Writer and Calc)
91 const sal_uInt16 AUTOFORMAT_ID_31005 = 10041;
92 const sal_uInt16 AUTOFORMAT_DATA_ID_31005 = 10042;
93 
94 // current version
98 
100 
101 constexpr OUStringLiteral AUTOTABLE_FORMAT_NAME = u"autotbl.fmt";
102 
103 namespace
104 {
106  sal_uInt64 BeginSwBlock(SvStream& rStream)
107  {
108  // We need to write down the offset of the end of the writer-specific data, so that
109  // calc can skip it. We'll only have that value after writing the data, so we
110  // write a placeholder value first, write the data, then jump back and write the
111  // real offset.
112 
113  // Note that we explicitly use sal_uInt64 instead of sal_Size (which can be 32
114  // or 64 depending on platform) to ensure 64-bit portability on this front. I don't
115  // actually know if autotbl.fmt as a whole is portable, since that requires all serialization
116  // logic to be written with portability in mind.
117  sal_uInt64 whereToWriteEndOfSwBlock = rStream.Tell();
118 
119  rStream.WriteUInt64( 0 ); // endOfSwBlock
120 
121  return whereToWriteEndOfSwBlock;
122  }
123 
126  void EndSwBlock(SvStream& rStream, sal_uInt64 whereToWriteEndOfSwBlock)
127  {
128  sal_uInt64 endOfSwBlock = rStream.Tell();
129  rStream.Seek(whereToWriteEndOfSwBlock);
130  rStream.WriteUInt64( endOfSwBlock );
131  rStream.Seek(endOfSwBlock);
132  }
133 
140  class WriterSpecificAutoFormatBlock
141  {
142  public:
143  explicit WriterSpecificAutoFormatBlock(SvStream& rStream)
144  : mrStream(rStream)
145  , mnWhereToWriteEndOfBlock(BeginSwBlock(rStream))
146  {
147  }
148 
149  ~WriterSpecificAutoFormatBlock() { EndSwBlock(mrStream, mnWhereToWriteEndOfBlock); }
150 
151  private:
152  WriterSpecificAutoFormatBlock(WriterSpecificAutoFormatBlock const&) = delete;
153  WriterSpecificAutoFormatBlock& operator=(WriterSpecificAutoFormatBlock const&) = delete;
154 
155  SvStream& mrStream;
156  sal_uInt64 mnWhereToWriteEndOfBlock;
157  };
158 
160  sal_Int64 WriterSpecificBlockExists(SvStream &stream)
161  {
162  sal_uInt64 endOfSwBlock = 0;
163  stream.ReadUInt64( endOfSwBlock );
164 
165  // end-of-block pointing to itself indicates a zero-size block.
166  return endOfSwBlock - stream.Tell();
167  }
168 }
169 
170 // Struct with version numbers of the Items
171 
173 {
174 public:
177 
178  SwAfVersions();
179  void Load( SvStream& rStream, sal_uInt16 nVer );
180  static void Write(SvStream& rStream, sal_uInt16 fileVersion);
181 };
182 
184 : m_nTextOrientationVersion(0),
185  m_nVerticalAlignmentVersion(0)
186 {
187 }
188 
189 void SwAfVersions::Load( SvStream& rStream, sal_uInt16 nVer )
190 {
191  LoadBlockA(rStream, nVer);
192  if (nVer >= AUTOFORMAT_ID_31005 && WriterSpecificBlockExists(rStream))
193  {
196  }
197  LoadBlockB(rStream, nVer);
198 }
199 
200 void SwAfVersions::Write(SvStream& rStream, sal_uInt16 fileVersion)
201 {
202  AutoFormatVersions::WriteBlockA(rStream, fileVersion);
203 
204  if (fileVersion >= SOFFICE_FILEFORMAT_50)
205  {
206  WriterSpecificAutoFormatBlock block(rStream);
207 
209  rStream.WriteUInt16(legacy::SwFormatVert::GetVersion(fileVersion));
210  }
211 
212  AutoFormatVersions::WriteBlockB(rStream, fileVersion);
213 }
214 
215 
216 
218 : m_aTextOrientation(std::make_unique<SvxFrameDirectionItem>(SvxFrameDirection::Environment, RES_FRAMEDIR)),
219  m_aVerticalAlignment(std::make_unique<SwFormatVertOrient>(0, css::text::VertOrientation::NONE, css::text::RelOrientation::FRAME)),
220  m_eSysLanguage(::GetAppLanguage()),
221  m_eNumFormatLanguage(::GetAppLanguage())
222 {
223  // need to set default instances for base class AutoFormatBase here
224  // due to resource defines (e.g. RES_CHRATR_FONT) which are not available
225  // in svx and different in the different usages of derivations
226  m_aFont = std::make_unique<SvxFontItem>(*GetDfltAttr( RES_CHRATR_FONT ) );
227  m_aHeight = std::make_unique<SvxFontHeightItem>(240, 100, RES_CHRATR_FONTSIZE );
228  m_aWeight = std::make_unique<SvxWeightItem>(WEIGHT_NORMAL, RES_CHRATR_WEIGHT );
229  m_aPosture = std::make_unique<SvxPostureItem>(ITALIC_NONE, RES_CHRATR_POSTURE );
230  m_aCJKFont = std::make_unique<SvxFontItem>(*GetDfltAttr( RES_CHRATR_CJK_FONT ) );
231  m_aCJKHeight = std::make_unique<SvxFontHeightItem>(240, 100, RES_CHRATR_CJK_FONTSIZE );
232  m_aCJKWeight = std::make_unique<SvxWeightItem>(WEIGHT_NORMAL, RES_CHRATR_CJK_WEIGHT );
233  m_aCJKPosture = std::make_unique<SvxPostureItem>(ITALIC_NONE, RES_CHRATR_CJK_POSTURE );
234  m_aCTLFont = std::make_unique<SvxFontItem>(*GetDfltAttr( RES_CHRATR_CTL_FONT ) );
235  m_aCTLHeight = std::make_unique<SvxFontHeightItem>(240, 100, RES_CHRATR_CTL_FONTSIZE );
236  m_aCTLWeight = std::make_unique<SvxWeightItem>(WEIGHT_NORMAL, RES_CHRATR_CTL_WEIGHT );
237  m_aCTLPosture = std::make_unique<SvxPostureItem>(ITALIC_NONE, RES_CHRATR_CTL_POSTURE );
238  m_aUnderline = std::make_unique<SvxUnderlineItem>(LINESTYLE_NONE, RES_CHRATR_UNDERLINE );
239  m_aOverline = std::make_unique<SvxOverlineItem>(LINESTYLE_NONE, RES_CHRATR_OVERLINE );
240  m_aCrossedOut = std::make_unique<SvxCrossedOutItem>(STRIKEOUT_NONE, RES_CHRATR_CROSSEDOUT );
241  m_aContour = std::make_unique<SvxContourItem>(false, RES_CHRATR_CONTOUR );
242  m_aShadowed = std::make_unique<SvxShadowedItem>(false, RES_CHRATR_SHADOWED );
243  m_aColor = std::make_unique<SvxColorItem>(RES_CHRATR_COLOR );
244  m_aBox = std::make_unique<SvxBoxItem>(RES_BOX );
245  m_aTLBR = std::make_unique<SvxLineItem>(0 );
246  m_aBLTR = std::make_unique<SvxLineItem>(0 );
247  m_aBackground = std::make_unique<SvxBrushItem>(RES_BACKGROUND );
248  m_aAdjust = std::make_unique<SvxAdjustItem>(SvxAdjust::Left, RES_PARATR_ADJUST );
249  m_aHorJustify = std::make_unique<SvxHorJustifyItem>(SvxCellHorJustify::Standard, 0);
250  m_aVerJustify = std::make_unique<SvxVerJustifyItem>(SvxCellVerJustify::Standard, 0);
251  m_aStacked = std::make_unique<SfxBoolItem>(0 );
252  m_aMargin = std::make_unique<SvxMarginItem>(0 );
253  m_aLinebreak = std::make_unique<SfxBoolItem>(0 );
254  m_aRotateAngle = std::make_unique<SfxInt32Item>(0 );
255  m_aRotateMode = std::make_unique<SvxRotateModeItem>(SVX_ROTATE_MODE_STANDARD, 0 );
256 
257 // FIXME - add attribute IDs for the diagonal line items
258 // aTLBR( RES_... ),
259 // aBLTR( RES_... ),
260  m_aBox->SetAllDistances(55);
261 }
262 
264 : AutoFormatBase(rNew),
265  m_aTextOrientation(rNew.m_aTextOrientation->Clone()),
266  m_aVerticalAlignment(rNew.m_aVerticalAlignment->Clone()),
267  m_sNumFormatString( rNew.m_sNumFormatString ),
268  m_eSysLanguage( rNew.m_eSysLanguage ),
269  m_eNumFormatLanguage( rNew.m_eNumFormatLanguage )
270 {
271 }
272 
274 {
275 }
276 
278 {
279  // check self-assignment
280  if(this == &rRef)
281  {
282  return *this;
283  }
284 
285  // call baseclass implementation
287 
288  // copy local members - this will use ::Clone() on all involved Items
294 
295  // m_wXObject used to not be copied before 1e2682235cded9a7cd90e55f0bfc60a1285e9a46
296  // "WIP: Further preparations for deeper Item changes" by this operator, so do not do it now, too
297  // rRef.SetXObject(GetXObject());
298 
299  return *this;
300 }
301 
303 {
304  return GetBackground().GetColor() == rRight.GetBackground().GetColor();
305 }
306 
307 bool SwBoxAutoFormat::Load( SvStream& rStream, const SwAfVersions& rVersions, sal_uInt16 nVer )
308 {
309  LoadBlockA( rStream, rVersions, nVer );
310 
311  if (nVer >= AUTOFORMAT_DATA_ID_31005)
312  {
313  sal_Int64 const nSize(WriterSpecificBlockExists(rStream));
314  if (0 < nSize && nSize < std::numeric_limits<sal_uInt16>::max())
315  {
317  // HORRIBLE HACK to read both 32-bit and 64-bit "long": abuse nSize
318  legacy::SwFormatVert::Create(*m_aVerticalAlignment, rStream, /*rVersions.m_nVerticalAlignmentVersion*/ nSize);
319  }
320  }
321 
322  LoadBlockB( rStream, rVersions, nVer );
323 
324  if( 0 == rVersions.nNumFormatVersion )
325  {
326  sal_uInt16 eSys, eLge;
327  // --- from 680/dr25 on: store strings as UTF-8
328  rtl_TextEncoding eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
329  m_sNumFormatString = rStream.ReadUniOrByteString( eCharSet );
330  rStream.ReadUInt16( eSys ).ReadUInt16( eLge );
333  if ( m_eSysLanguage == LANGUAGE_SYSTEM ) // from old versions (Calc)
335  }
336 
337  return ERRCODE_NONE == rStream.GetError();
338 }
339 
340 bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
341 {
342  SaveBlockA( rStream, fileVersion );
343 
344  if (fileVersion >= SOFFICE_FILEFORMAT_50)
345  {
346  WriterSpecificAutoFormatBlock block(rStream);
347 
350  }
351 
352  SaveBlockB( rStream, fileVersion );
353 
354  // --- from 680/dr25 on: store strings as UTF-8
356  RTL_TEXTENCODING_UTF8);
357  rStream.WriteUInt16( static_cast<sal_uInt16>(m_eSysLanguage) ).WriteUInt16( static_cast<sal_uInt16>(m_eNumFormatLanguage) );
358 
359  return ERRCODE_NONE == rStream.GetError();
360 }
361 
362 SwTableAutoFormat::SwTableAutoFormat( const OUString& rName )
363  : m_aName( rName )
364  , m_nStrResId( USHRT_MAX )
365  , m_aKeepWithNextPara(std::make_shared<SvxFormatKeepItem>(false, RES_KEEP))
366  , m_aRepeatHeading( 0 )
367  , m_bLayoutSplit( true )
368  , m_bRowSplit( true )
369  , m_bCollapsingBorders(true)
370  , m_aShadow(std::make_shared<SvxShadowItem>(RES_SHADOW))
371  , m_bHidden( false )
372  , m_bUserDefined( true )
373 {
374  m_bInclFont = true;
375  m_bInclJustify = true;
376  m_bInclFrame = true;
377  m_bInclBackground = true;
378  m_bInclValueFormat = true;
379  m_bInclWidthHeight = true;
380 }
381 
383  : m_aShadow(std::make_shared<SvxShadowItem>(RES_SHADOW))
384 {
385  for(SwBoxAutoFormat* & rp : m_aBoxAutoFormat)
386  rp = nullptr;
387  *this = rNew;
388 }
389 
391 {
392  if (&rNew == this)
393  return *this;
394 
395  for( sal_uInt8 n = 0; n < 16; ++n )
396  {
397  if( m_aBoxAutoFormat[ n ] )
398  delete m_aBoxAutoFormat[ n ];
399 
400  SwBoxAutoFormat* pFormat = rNew.m_aBoxAutoFormat[ n ];
401  if( pFormat ) // if is set -> copy
402  m_aBoxAutoFormat[ n ] = new SwBoxAutoFormat( *pFormat );
403  else // else default
404  m_aBoxAutoFormat[ n ] = nullptr;
405  }
406 
407  m_aName = rNew.m_aName;
408  m_nStrResId = rNew.m_nStrResId;
409  m_bInclFont = rNew.m_bInclFont;
411  m_bInclFrame = rNew.m_bInclFrame;
415 
416  m_aKeepWithNextPara.reset(rNew.m_aKeepWithNextPara->Clone());
419  m_bRowSplit = rNew.m_bRowSplit;
421  m_aShadow.reset(rNew.m_aShadow->Clone());
422  m_bHidden = rNew.m_bHidden;
424 
425  return *this;
426 }
427 
429 {
430  SwBoxAutoFormat** ppFormat = m_aBoxAutoFormat;
431  for( sal_uInt8 n = 0; n < 16; ++n, ++ppFormat )
432  if( *ppFormat )
433  delete *ppFormat;
434 }
435 
437 {
438  OSL_ENSURE( nPos < 16, "wrong area" );
439 
440  SwBoxAutoFormat* pFormat = m_aBoxAutoFormat[ nPos ];
441  if( pFormat ) // if is set -> copy
442  *m_aBoxAutoFormat[ nPos ] = rNew;
443  else // else set anew
444  m_aBoxAutoFormat[ nPos ] = new SwBoxAutoFormat( rNew );
445 }
446 
448 {
449  OSL_ENSURE( nPos < 16, "wrong area" );
450 
451  SwBoxAutoFormat* pFormat = m_aBoxAutoFormat[ nPos ];
452  if( pFormat ) // if is set -> copy
453  return *pFormat;
454  else // else return the default
455  {
456  // If it doesn't exist yet:
459  return *s_pDefaultBoxAutoFormat;
460  }
461 }
462 
464 {
465  SAL_WARN_IF(!(nPos < 16), "sw.core", "GetBoxFormat wrong area");
466 
467  SwBoxAutoFormat** pFormat = &m_aBoxAutoFormat[ nPos ];
468  if( !*pFormat )
469  {
470  // If default doesn't exist yet:
473  *pFormat = new SwBoxAutoFormat(*s_pDefaultBoxAutoFormat);
474  }
475  return **pFormat;
476 }
477 
479 {
482 
483  return *s_pDefaultBoxAutoFormat;
484 }
485 
487  const SfxItemSet& rSet,
489  SvNumberFormatter const * pNFormatr)
490 {
491  OSL_ENSURE( nPos < 16, "wrong area" );
492 
493  SwBoxAutoFormat* pFormat = m_aBoxAutoFormat[ nPos ];
494  if( !pFormat ) // if is set -> copy
495  {
496  pFormat = new SwBoxAutoFormat;
497  m_aBoxAutoFormat[ nPos ] = pFormat;
498  }
499 
501  {
502  pFormat->SetFont( rSet.Get( RES_CHRATR_FONT ) );
503  pFormat->SetHeight( rSet.Get( RES_CHRATR_FONTSIZE ) );
504  pFormat->SetWeight( rSet.Get( RES_CHRATR_WEIGHT ) );
505  pFormat->SetPosture( rSet.Get( RES_CHRATR_POSTURE ) );
506  pFormat->SetCJKFont( rSet.Get( RES_CHRATR_CJK_FONT ) );
507  pFormat->SetCJKHeight( rSet.Get( RES_CHRATR_CJK_FONTSIZE ) );
508  pFormat->SetCJKWeight( rSet.Get( RES_CHRATR_CJK_WEIGHT ) );
509  pFormat->SetCJKPosture( rSet.Get( RES_CHRATR_CJK_POSTURE ) );
510  pFormat->SetCTLFont( rSet.Get( RES_CHRATR_CTL_FONT ) );
511  pFormat->SetCTLHeight( rSet.Get( RES_CHRATR_CTL_FONTSIZE ) );
512  pFormat->SetCTLWeight( rSet.Get( RES_CHRATR_CTL_WEIGHT ) );
513  pFormat->SetCTLPosture( rSet.Get( RES_CHRATR_CTL_POSTURE ) );
514  pFormat->SetUnderline( rSet.Get( RES_CHRATR_UNDERLINE ) );
515  pFormat->SetOverline( rSet.Get( RES_CHRATR_OVERLINE ) );
516  pFormat->SetCrossedOut( rSet.Get( RES_CHRATR_CROSSEDOUT ) );
517  pFormat->SetContour( rSet.Get( RES_CHRATR_CONTOUR ) );
518  pFormat->SetShadowed( rSet.Get( RES_CHRATR_SHADOWED ) );
519  pFormat->SetColor( rSet.Get( RES_CHRATR_COLOR ) );
520  pFormat->SetAdjust( rSet.Get( RES_PARATR_ADJUST ) );
521  }
522  if( !(SwTableAutoFormatUpdateFlags::Box & eFlags) )
523  return;
524 
525  pFormat->SetBox( rSet.Get( RES_BOX ) );
526 // FIXME - add attribute IDs for the diagonal line items
527 // pFormat->SetTLBR( (SvxLineItem&)rSet.Get( RES_... ) );
528 // pFormat->SetBLTR( (SvxLineItem&)rSet.Get( RES_... ) );
529  pFormat->SetBackground( rSet.Get( RES_BACKGROUND ) );
530  pFormat->SetTextOrientation(rSet.Get(RES_FRAMEDIR));
531  pFormat->SetVerticalAlignment(rSet.Get(RES_VERT_ORIENT));
532 
533  const SwTableBoxNumFormat* pNumFormatItem;
534  const SvNumberformat* pNumFormat = nullptr;
535  if( SfxItemState::SET == rSet.GetItemState( RES_BOXATR_FORMAT, true,
536  reinterpret_cast<const SfxPoolItem**>(&pNumFormatItem) ) && pNFormatr &&
537  nullptr != (pNumFormat = pNFormatr->GetEntry( pNumFormatItem->GetValue() )) )
538  pFormat->SetValueFormat( pNumFormat->GetFormatstring(),
539  pNumFormat->GetLanguage(),
540  ::GetAppLanguage());
541  else
542  {
543  // default
544  pFormat->SetValueFormat( OUString(), LANGUAGE_SYSTEM,
545  ::GetAppLanguage() );
546  }
547 
548  // we cannot handle the rest, that's specific to StarCalc
549 }
550 
551 void SwTableAutoFormat::UpdateToSet(const sal_uInt8 nPos, const bool bSingleRowTable, const bool bSingleColTable, SfxItemSet& rSet,
552  SwTableAutoFormatUpdateFlags eFlags, SvNumberFormatter* pNFormatr) const
553 {
554  const SwBoxAutoFormat& rChg = GetBoxFormat( nPos );
555 
557  {
558  if( IsFont() )
559  {
560  rSet.Put( rChg.GetFont() );
561  rSet.Put( rChg.GetHeight() );
562  rSet.Put( rChg.GetWeight() );
563  rSet.Put( rChg.GetPosture() );
564  // do not insert empty CJK font
565  const SvxFontItem& rCJKFont = rChg.GetCJKFont();
566  if (!rCJKFont.GetStyleName().isEmpty())
567  {
568  rSet.Put( rChg.GetCJKFont() );
569  rSet.Put( rChg.GetCJKHeight() );
570  rSet.Put( rChg.GetCJKWeight() );
571  rSet.Put( rChg.GetCJKPosture() );
572  }
573  else
574  {
575  rSet.Put( rChg.GetHeight().CloneSetWhich(RES_CHRATR_CJK_FONTSIZE) );
576  rSet.Put( rChg.GetWeight().CloneSetWhich(RES_CHRATR_CJK_WEIGHT) );
577  rSet.Put( rChg.GetPosture().CloneSetWhich(RES_CHRATR_CJK_POSTURE) );
578  }
579  // do not insert empty CTL font
580  const SvxFontItem& rCTLFont = rChg.GetCTLFont();
581  if (!rCTLFont.GetStyleName().isEmpty())
582  {
583  rSet.Put( rChg.GetCTLFont() );
584  rSet.Put( rChg.GetCTLHeight() );
585  rSet.Put( rChg.GetCTLWeight() );
586  rSet.Put( rChg.GetCTLPosture() );
587  }
588  else
589  {
590  rSet.Put( rChg.GetHeight().CloneSetWhich(RES_CHRATR_CTL_FONTSIZE) );
591  rSet.Put( rChg.GetWeight().CloneSetWhich(RES_CHRATR_CTL_WEIGHT) );
592  rSet.Put( rChg.GetPosture().CloneSetWhich(RES_CHRATR_CTL_POSTURE) );
593  }
594  rSet.Put( rChg.GetUnderline() );
595  rSet.Put( rChg.GetOverline() );
596  rSet.Put( rChg.GetCrossedOut() );
597  rSet.Put( rChg.GetContour() );
598  rSet.Put( rChg.GetShadowed() );
599  rSet.Put( rChg.GetColor() );
600  }
601  if( IsJustify() )
602  rSet.Put( rChg.GetAdjust() );
603  }
604 
605  if( !(SwTableAutoFormatUpdateFlags::Box & eFlags) )
606  return;
607 
608  if( IsFrame() )
609  {
610  SvxBoxItem aAutoFormatBox = rChg.GetBox();
611 
612  // No format box is adequate to specify the borders of single column/row tables, so combine first/last.
613  if ( bSingleRowTable || bSingleColTable )
614  {
615  sal_uInt8 nSingleRowOrColumnId = 15; //LAST_ROW_END_COLUMN
616  if ( !bSingleRowTable )
617  nSingleRowOrColumnId = nPos + 3; //LAST COLUMN (3, 7, 11, 15)
618  else if ( !bSingleColTable )
619  nSingleRowOrColumnId = nPos + 12; //LAST ROW (12, 13, 14, 15)
620 
621  assert( nSingleRowOrColumnId < 16 );
622  const SvxBoxItem aLastAutoFormatBox( GetBoxFormat(nSingleRowOrColumnId).GetBox() );
623  if ( bSingleRowTable )
624  aAutoFormatBox.SetLine( aLastAutoFormatBox.GetLine(SvxBoxItemLine::BOTTOM), SvxBoxItemLine::BOTTOM );
625  if ( bSingleColTable )
626  aAutoFormatBox.SetLine( aLastAutoFormatBox.GetLine(SvxBoxItemLine::RIGHT), SvxBoxItemLine::RIGHT );
627  }
628 
629  rSet.Put( aAutoFormatBox );
630 // FIXME - uncomment the lines to put the diagonal line items
631 // rSet.Put( rChg.GetTLBR() );
632 // rSet.Put( rChg.GetBLTR() );
633  }
634  if( IsBackground() )
635  rSet.Put( rChg.GetBackground() );
636 
637  rSet.Put(rChg.GetTextOrientation());
638 
639  // Do not put a VertAlign when it has default value.
640  // It prevents the export of default value by automatic cell-styles export.
642  rSet.Put(rChg.GetVerticalAlignment());
643 
644  if( !(IsValueFormat() && pNFormatr) )
645  return;
646 
647  OUString sFormat;
648  LanguageType eLng, eSys;
649  rChg.GetValueFormat( sFormat, eLng, eSys );
650  if( !sFormat.isEmpty() )
651  {
653  bool bNew;
654  sal_Int32 nCheckPos;
655  sal_uInt32 nKey = pNFormatr->GetIndexPuttingAndConverting( sFormat, eLng,
656  eSys, nType, bNew, nCheckPos);
657  rSet.Put( SwTableBoxNumFormat( nKey ));
658  }
659  else
661 
662  // we cannot handle the rest, that's specific to StarCalc
663 }
664 
666 {
667  SwTableFormat* pFormat = table.GetFrameFormat();
668  if (!pFormat)
669  return;
670 
671  SwDoc *pDoc = pFormat->GetDoc();
672  if (!pDoc)
673  return;
674 
675  SfxItemSet rSet(pDoc->GetAttrPool(), aTableSetRange);
676 
679  if ( m_aKeepWithNextPara->GetValue() )
680  rSet.Put(*m_aKeepWithNextPara);
681  rSet.Put(*m_aShadow);
682 
683  pFormat->SetFormatAttr(rSet);
684 
685  SwEditShell *pShell = pDoc->GetEditShell();
686  pDoc->SetRowSplit(*pShell->getShellCursor(false), SwFormatRowSplit(m_bRowSplit));
687 
689 }
690 
692 {
693  SwTableFormat* pFormat = table.GetFrameFormat();
694  if (!pFormat)
695  return;
696 
697  SwDoc *pDoc = pFormat->GetDoc();
698  if (!pDoc)
699  return;
700 
701  SwEditShell *pShell = pDoc->GetEditShell();
702  std::unique_ptr<SwFormatRowSplit> pRowSplit = SwDoc::GetRowSplit(*pShell->getShellCursor(false));
703  m_bRowSplit = pRowSplit && pRowSplit->GetValue();
704  pRowSplit.reset();
705 
706  const SfxItemSet &rSet = pFormat->GetAttrSet();
707 
708  const SwFormatLayoutSplit &layoutSplit = rSet.Get(RES_LAYOUT_SPLIT);
709  m_bLayoutSplit = layoutSplit.GetValue();
711 
712  m_aKeepWithNextPara.reset(rSet.Get(RES_KEEP).Clone());
714  m_aShadow.reset(rSet.Get(RES_SHADOW).Clone());
715 }
716 
718 {
719  return GetBoxFormat(3) == GetBoxFormat(2);
720 }
722 {
723  return GetBoxFormat(0) == GetBoxFormat(1);
724 }
726 {
727  return GetBoxFormat(14) == GetBoxFormat(15);
728 }
730 {
731  return GetBoxFormat(12) == GetBoxFormat(13);
732 }
733 
734 bool SwTableAutoFormat::Load( SvStream& rStream, const SwAfVersions& rVersions )
735 {
736  sal_uInt16 nVal = 0;
737  rStream.ReadUInt16( nVal );
738  bool bRet = ERRCODE_NONE == rStream.GetError();
739 
740  if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
741  (AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
742  {
743  bool b;
744  // --- from 680/dr25 on: store strings as UTF-8
745  rtl_TextEncoding eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet();
746  m_aName = rStream.ReadUniOrByteString( eCharSet );
747  if( AUTOFORMAT_DATA_ID_552 <= nVal )
748  {
749  rStream.ReadUInt16( m_nStrResId );
750  // start from 3d because default is added via constructor
752  {
754  }
755  else
756  m_nStrResId = USHRT_MAX;
757  }
758  rStream.ReadCharAsBool( b ); m_bInclFont = b;
759  rStream.ReadCharAsBool( b ); m_bInclJustify = b;
760  rStream.ReadCharAsBool( b ); m_bInclFrame = b;
761  rStream.ReadCharAsBool( b ); m_bInclBackground = b;
762  rStream.ReadCharAsBool( b ); m_bInclValueFormat = b;
763  rStream.ReadCharAsBool( b ); m_bInclWidthHeight = b;
764 
765  if (nVal >= AUTOFORMAT_DATA_ID_31005 && WriterSpecificBlockExists(rStream))
766  {
767  //this only exists for file format compat
768  SvxFormatBreakItem aBreak(SvxBreak::NONE, RES_BREAK);
771 
773 
775  }
776 
777  bRet = ERRCODE_NONE== rStream.GetError();
778 
779  for( sal_uInt8 i = 0; bRet && i < 16; ++i )
780  {
781  SwBoxAutoFormat* pFormat = new SwBoxAutoFormat;
782  bRet = pFormat->Load( rStream, rVersions, nVal );
783  if( bRet )
784  m_aBoxAutoFormat[ i ] = pFormat;
785  else
786  {
787  delete pFormat;
788  break;
789  }
790  }
791  }
792  m_bUserDefined = false;
793  return bRet;
794 }
795 
796 bool SwTableAutoFormat::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
797 {
798  rStream.WriteUInt16( AUTOFORMAT_DATA_ID );
799  // --- from 680/dr25 on: store strings as UTF-8
801  RTL_TEXTENCODING_UTF8 );
802  rStream.WriteUInt16( m_nStrResId );
803  rStream.WriteBool( m_bInclFont );
804  rStream.WriteBool( m_bInclJustify );
805  rStream.WriteBool( m_bInclFrame );
806  rStream.WriteBool( m_bInclBackground );
807  rStream.WriteBool( m_bInclValueFormat );
808  rStream.WriteBool( m_bInclWidthHeight );
809 
810  {
811  WriterSpecificAutoFormatBlock block(rStream);
812  //this only exists for file format compat
813  SvxFormatBreakItem aBreak(SvxBreak::NONE, RES_BREAK);
818  }
819 
820  bool bRet = ERRCODE_NONE == rStream.GetError();
821 
822  for( int i = 0; bRet && i < 16; ++i )
823  {
824  SwBoxAutoFormat* pFormat = m_aBoxAutoFormat[ i ];
825  if( !pFormat ) // if not set -> write default
826  {
827  // If it doesn't exist yet:
830  pFormat = s_pDefaultBoxAutoFormat;
831  }
832  bRet = pFormat->Save( rStream, fileVersion );
833  }
834  return bRet;
835 }
836 
838 {
839  sal_Int32 nIndex = 0;
840  for (; nIndex < 16; ++nIndex)
841  if (m_aBoxAutoFormat[nIndex] == &rBoxFormat) break;
842 
843  // box format doesn't belong to this table format
844  if (16 <= nIndex)
845  return OUString();
846 
847  const std::vector<sal_Int32> aTableTemplateMap = GetTableTemplateMap();
848  for (size_t i=0; i < aTableTemplateMap.size(); ++i)
849  {
850  if (aTableTemplateMap[i] == nIndex)
851  return "." + OUString::number(i + 1);
852  }
853 
854  // box format doesn't belong to a table template
855  return OUString();
856 }
857 
858 /*
859  * Mapping schema
860  * 0 1 2 3 4 5
861  * +-----------------------------------------------------------------------+
862  * 0 | FRSC | FR | FREC | | | FRENC |
863  * +-----------------------------------------------------------------------+
864  * 1 | FC | ER | EC | | | LC |
865  * +-----------------------------------------------------------------------+
866  * 2 | OR | OC | BODY | | | BCKG |
867  * +-----------------------------------------------------------------------+
868  * 3 | | | | | | |
869  * +-----------------------------------------------------------------------+
870  * 4 | | | | | | |
871  * +-----------------------------------------------------------------------+
872  * 5 | LRSC | LR | LREC | | | LRENC |
873  * +-----------+-----------+-----------+-----------+-----------+-----------+
874  * ODD = 1, 3, 5, ...
875  * EVEN = 2, 4, 6, ...
876  */
877 const std::vector<sal_Int32> & SwTableAutoFormat::GetTableTemplateMap()
878 {
879  static std::vector<sal_Int32> const aTableTemplateMap
880  {
881  1 , // FIRST_ROW // FR
882  13, // LAST_ROW // LR
883  4 , // FIRST_COLUMN // FC
884  7 , // LAST_COLUMN // LC
885  5 , // EVEN_ROWS // ER
886  8 , // ODD_ROWS // OR
887  6 , // EVEN_COLUMNS // EC
888  9 , // ODD_COLUMNS // OC
889  10, // BODY
890  11, // BACKGROUND // BCKG
891  0 , // FIRST_ROW_START_COLUMN // FRSC
892  3 , // FIRST_ROW_END_COLUMN // FRENC
893  12, // LAST_ROW_START_COLUMN // LRSC
894  15, // LAST_ROW_END_COLUMN // LRENC
895  2 , // FIRST_ROW_EVEN_COLUMN // FREC
896  14, // LAST_ROW_EVEN_COLUMN // LREC
897  };
898  return aTableTemplateMap;
899 }
900 
901 sal_uInt8 SwTableAutoFormat::CountPos(sal_uInt32 nCol, sal_uInt32 nCols, sal_uInt32 nRow,
902  sal_uInt32 nRows)
903 {
904  sal_uInt8 nRet = static_cast<sal_uInt8>(
905  !nRow ? 0 : ((nRow + 1 == nRows) ? 12 : (4 * (1 + ((nRow - 1) & 1)))));
906  nRet = nRet
907  + static_cast<sal_uInt8>(!nCol ? 0 : (nCol + 1 == nCols ? 3 : (1 + ((nCol - 1) & 1))));
908  return nRet;
909 }
910 
912 {
913  std::vector<std::unique_ptr<SwTableAutoFormat>> m_AutoFormats;
914 };
915 
917 {
918  return m_pImpl->m_AutoFormats.size();
919 }
920 
922 {
923  return *m_pImpl->m_AutoFormats[i];
924 }
926 {
927  return *m_pImpl->m_AutoFormats[i];
928 }
929 
931 {
932  // don't insert when we already have style of this name
933  if (FindAutoFormat(rTableStyle.GetName()))
934  return;
935 
936  InsertAutoFormat(size(), std::make_unique<SwTableAutoFormat>(rTableStyle));
937 }
938 
939 void SwTableAutoFormatTable::InsertAutoFormat(size_t const i, std::unique_ptr<SwTableAutoFormat> pFormat)
940 {
941  m_pImpl->m_AutoFormats.insert(m_pImpl->m_AutoFormats.begin() + i, std::move(pFormat));
942 }
943 
945 {
946  m_pImpl->m_AutoFormats.erase(m_pImpl->m_AutoFormats.begin() + i);
947 }
948 
949 void SwTableAutoFormatTable::EraseAutoFormat(const OUString& rName)
950 {
951  auto iter = std::find_if(m_pImpl->m_AutoFormats.begin(), m_pImpl->m_AutoFormats.end(),
952  [&rName](const std::unique_ptr<SwTableAutoFormat>& rpFormat) { return rpFormat->GetName() == rName; });
953  if (iter != m_pImpl->m_AutoFormats.end())
954  {
955  m_pImpl->m_AutoFormats.erase(iter);
956  return;
957  }
958  SAL_INFO("sw.core", "SwTableAutoFormatTable::EraseAutoFormat, SwTableAutoFormat with given name not found");
959 }
960 
961 std::unique_ptr<SwTableAutoFormat> SwTableAutoFormatTable::ReleaseAutoFormat(size_t const i)
962 {
963  auto const iter(m_pImpl->m_AutoFormats.begin() + i);
964  std::unique_ptr<SwTableAutoFormat> pRet(std::move(*iter));
965  m_pImpl->m_AutoFormats.erase(iter);
966  return pRet;
967 }
968 
969 std::unique_ptr<SwTableAutoFormat> SwTableAutoFormatTable::ReleaseAutoFormat(const OUString& rName)
970 {
971  std::unique_ptr<SwTableAutoFormat> pRet;
972  auto iter = std::find_if(m_pImpl->m_AutoFormats.begin(), m_pImpl->m_AutoFormats.end(),
973  [&rName](const std::unique_ptr<SwTableAutoFormat>& rpFormat) { return rpFormat->GetName() == rName; });
974  if (iter != m_pImpl->m_AutoFormats.end())
975  {
976  pRet = std::move(*iter);
977  m_pImpl->m_AutoFormats.erase(iter);
978  }
979  return pRet;
980 }
981 
983 {
984  for (const auto &rFormat : m_pImpl->m_AutoFormats)
985  {
986  if (rFormat->GetName() == rName)
987  return rFormat.get();
988  }
989 
990  return nullptr;
991 }
992 
994 {
995 }
996 
998  : m_pImpl(new Impl)
999 {
1000  std::unique_ptr<SwTableAutoFormat> pNew(new SwTableAutoFormat(
1002 
1003  sal_uInt8 i;
1004 
1005  Color aColor( COL_BLACK );
1006  SvxBoxItem aBox( RES_BOX );
1007 
1008  aBox.SetAllDistances(55);
1009  SvxBorderLine aLn( &aColor, DEF_LINE_WIDTH_5 );
1010  aBox.SetLine( &aLn, SvxBoxItemLine::LEFT );
1011  aBox.SetLine( &aLn, SvxBoxItemLine::BOTTOM );
1012 
1013  for( i = 0; i <= 15; ++i )
1014  {
1015  aBox.SetLine( i <= 3 ? &aLn : nullptr, SvxBoxItemLine::TOP );
1016  aBox.SetLine( (3 == ( i & 3 )) ? &aLn : nullptr, SvxBoxItemLine::RIGHT );
1017  pNew->GetBoxFormat( i ).SetBox( aBox );
1018  }
1019 
1020  pNew->SetUserDefined(false);
1021  m_pImpl->m_AutoFormats.push_back(std::move(pNew));
1022 }
1023 
1025 {
1027  return;
1028  OUString sNm(AUTOTABLE_FORMAT_NAME);
1029  SvtPathOptions aOpt;
1030  if( aOpt.SearchFile( sNm ))
1031  {
1032  SfxMedium aStream( sNm, StreamMode::STD_READ );
1033  Load( *aStream.GetInStream() );
1034  }
1035 }
1036 
1038 {
1040  return false;
1041  SvtPathOptions aPathOpt;
1042  const OUString sNm( aPathOpt.GetUserConfigPath() + "/" + AUTOTABLE_FORMAT_NAME );
1043  SfxMedium aStream(sNm, StreamMode::STD_WRITE );
1044  return Save( *aStream.GetOutStream() ) && aStream.Commit();
1045 }
1046 
1048 {
1049  bool bRet = ERRCODE_NONE == rStream.GetError();
1050  if (bRet)
1051  {
1052  // Attention: We need to read a general Header here
1053  sal_uInt16 nVal = 0;
1054  rStream.ReadUInt16( nVal );
1055  bRet = ERRCODE_NONE == rStream.GetError();
1056 
1057  if( bRet )
1058  {
1059  SwAfVersions aVersions;
1060 
1061  // Default version is 5.0, unless we detect an old format ID.
1062  sal_uInt16 nFileVers = SOFFICE_FILEFORMAT_50;
1063  if(nVal < AUTOFORMAT_ID_31005)
1064  nFileVers = SOFFICE_FILEFORMAT_40;
1065 
1066  if( nVal == AUTOFORMAT_ID_358 ||
1067  (AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
1068  {
1069  sal_uInt8 nChrSet, nCnt;
1070  tools::Long nPos = rStream.Tell();
1071  rStream.ReadUChar( nCnt ).ReadUChar( nChrSet );
1072  if( rStream.Tell() != sal_uLong(nPos + nCnt) )
1073  {
1074  OSL_ENSURE( false, "The Header contains more or newer Data" );
1075  rStream.Seek( nPos + nCnt );
1076  }
1077  rStream.SetStreamCharSet( static_cast<rtl_TextEncoding>(nChrSet) );
1078  rStream.SetVersion( nFileVers );
1079  }
1080 
1081  if( nVal == AUTOFORMAT_ID_358 || nVal == AUTOFORMAT_ID_X ||
1082  (AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
1083  {
1084  aVersions.Load( rStream, nVal ); // Item versions
1085 
1086  sal_uInt16 nCount = 0;
1087  rStream.ReadUInt16( nCount );
1088 
1089  bRet = ERRCODE_NONE== rStream.GetError();
1090  if (bRet)
1091  {
1092  const size_t nMinRecordSize = sizeof(sal_uInt16);
1093  const size_t nMaxRecords = rStream.remainingSize() / nMinRecordSize;
1094  if (nCount > nMaxRecords)
1095  {
1096  SAL_WARN("sw.core", "Parsing error: " << nMaxRecords <<
1097  " max possible entries, but " << nCount << " claimed, truncating");
1098  nCount = nMaxRecords;
1099  }
1100  for (sal_uInt16 i = 0; i < nCount; ++i)
1101  {
1102  std::unique_ptr<SwTableAutoFormat> pNew(
1103  new SwTableAutoFormat( OUString() ));
1104  bRet = pNew->Load( rStream, aVersions );
1105  if( bRet )
1106  {
1107  m_pImpl->m_AutoFormats.push_back(std::move(pNew));
1108  }
1109  else
1110  {
1111  break;
1112  }
1113  }
1114  }
1115  }
1116  else
1117  {
1118  bRet = false;
1119  }
1120  }
1121  }
1122  return bRet;
1123 }
1124 
1126 {
1127  bool bRet = ERRCODE_NONE == rStream.GetError();
1128  if (bRet)
1129  {
1131 
1132  // Attention: We need to save a general Header here
1133  rStream.WriteUInt16( AUTOFORMAT_ID )
1134  .WriteUChar( 2 ) // Character count of the Header including this value
1135  .WriteUChar( GetStoreCharSet( ::osl_getThreadTextEncoding() ) );
1136 
1137  bRet = ERRCODE_NONE == rStream.GetError();
1138  if (!bRet)
1139  return false;
1140 
1141  // Write this version number for all attributes
1143 
1144  rStream.WriteUInt16( m_pImpl->m_AutoFormats.size() - 1 );
1145  bRet = ERRCODE_NONE == rStream.GetError();
1146 
1147  for (size_t i = 1; bRet && i < m_pImpl->m_AutoFormats.size(); ++i)
1148  {
1149  SwTableAutoFormat const& rFormat = *m_pImpl->m_AutoFormats[i];
1150  bRet = rFormat.Save(rStream, AUTOFORMAT_FILE_VERSION);
1151  }
1152  }
1153  rStream.Flush();
1154  return bRet;
1155 }
1156 
1158 { }
1159 
1161 {
1162 }
1163 
1165 {
1166  return m_aCellStyles.size();
1167 }
1168 
1170 {
1171  m_aCellStyles.clear();
1172 }
1173 
1175 {
1177 }
1178 
1179 void SwCellStyleTable::AddBoxFormat(const SwBoxAutoFormat& rBoxFormat, const OUString& sName)
1180 {
1181  m_aCellStyles.emplace_back(sName, std::make_unique<SwBoxAutoFormat>(rBoxFormat));
1182 }
1183 
1184 void SwCellStyleTable::RemoveBoxFormat(const OUString& sName)
1185 {
1186  auto iter = std::find_if(m_aCellStyles.begin(), m_aCellStyles.end(),
1187  [&sName](const std::pair<OUString, std::unique_ptr<SwBoxAutoFormat>>& rStyle) { return rStyle.first == sName; });
1188  if (iter != m_aCellStyles.end())
1189  {
1190  m_aCellStyles.erase(iter);
1191  return;
1192  }
1193  SAL_INFO("sw.core", "SwCellStyleTable::RemoveBoxFormat, format with given name doesn't exists");
1194 }
1195 
1196 OUString SwCellStyleTable::GetBoxFormatName(const SwBoxAutoFormat& rBoxFormat) const
1197 {
1198  for (size_t i=0; i < m_aCellStyles.size(); ++i)
1199  {
1200  if (m_aCellStyles[i].second.get() == &rBoxFormat)
1201  return m_aCellStyles[i].first;
1202  }
1203 
1204  // box format not found
1205  return OUString();
1206 }
1207 
1208 SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(std::u16string_view sName) const
1209 {
1210  for (size_t i=0; i < m_aCellStyles.size(); ++i)
1211  {
1212  if (m_aCellStyles[i].first == sName)
1213  return m_aCellStyles[i].second.get();
1214  }
1215 
1216  return nullptr;
1217 }
1218 
1219 void SwCellStyleTable::ChangeBoxFormatName(std::u16string_view sFromName, const OUString& sToName)
1220 {
1221  if (!GetBoxFormat(sToName))
1222  {
1223  SAL_INFO("sw.core", "SwCellStyleTable::ChangeBoxName, box with given name already exists");
1224  return;
1225  }
1226  for (size_t i=0; i < m_aCellStyles.size(); ++i)
1227  {
1228  if (m_aCellStyles[i].first == sFromName)
1229  {
1230  m_aCellStyles[i].first = sToName;
1231  // changed successfully
1232  return;
1233  }
1234  }
1235  SAL_INFO("sw.core", "SwCellStyleTable::ChangeBoxName, box with given name not found");
1236 }
1237 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
bool m_bInclWidthHeight
Definition: tblafmt.hxx:171
void Create(SvxFormatBreakItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
SvStream & WriteBool(bool b)
void SetNumFormatString(const OUString &rNew)
Definition: tblafmt.hxx:90
bool GetValue() const
SvStream & Store(const SvxFormatKeepItem &rItem, SvStream &rStrm, sal_uInt16)
void SetValueFormat(const OUString &rFormat, LanguageType eLng, LanguageType eSys)
Definition: tblafmt.hxx:87
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
std::unique_ptr< SvxBrushItem > m_aBackground
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
bool IsValueFormat() const
Definition: tblafmt.hxx:219
std::unique_ptr< SfxBoolItem > m_aStacked
bool SearchFile(OUString &rIniFile, Paths ePath=Paths::UserConfig)
SvStream & WriteUInt64(sal_uInt64 nuInt64)
sal_Int32 nIndex
sal_uInt16 GetVersion(sal_uInt16)
void SetBackground(const SvxBrushItem &rNew)
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
Definition: swtable.hxx:197
void SetVerticalAlignment(const SwFormatVertOrient &rNew)
Definition: tblafmt.hxx:85
std::unique_ptr< SvxPostureItem > m_aCTLPosture
void SetOverline(const SvxOverlineItem &rNew)
sal_uInt32 GetIndexPuttingAndConverting(OUString &rString, LanguageType eLnge, LanguageType eSysLnge, SvNumFormatType &rType, bool &rNewInserted, sal_Int32 &rCheckPos)
bool m_bInclBackground
Definition: tblafmt.hxx:167
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
void Create(SvxFrameDirectionItem &rItem, SvStream &rStrm, sal_uInt16)
std::unique_ptr< SvxFontHeightItem > m_aHeight
std::shared_ptr< SvxFormatKeepItem > m_aKeepWithNextPara
Definition: tblafmt.hxx:176
SvStream & WriteUInt16(sal_uInt16 nUInt16)
void SetCJKPosture(const SvxPostureItem &rNew)
bool LastRowEndColumnIsRow()
Definition: tblafmt.cxx:725
void SetCJKFont(const SvxFontItem &rNew)
void Create(SvxFormatKeepItem &rItem, SvStream &rStrm, sal_uInt16)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
OUString m_aName
bool LoadBlockB(SvStream &rStream, const AutoFormatVersions &rVersions, sal_uInt16 nVer)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
std::unique_ptr< SfxInt32Item > m_aRotateAngle
void LoadBlockB(SvStream &rStream, sal_uInt16 nVer)
SwBoxAutoFormat * m_aBoxAutoFormat[16]
Definition: tblafmt.hxx:173
void UpdateToSet(const sal_uInt8 nPos, const bool bSingleRowTable, const bool bSingleColTable, SfxItemSet &rSet, SwTableAutoFormatUpdateFlags eFlags, SvNumberFormatter *) const
Definition: tblafmt.cxx:551
SvStream & Store(const SvxShadowItem &rItem, SvStream &rStrm, sal_uInt16)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
std::unique_ptr< SvxFontItem > m_aFont
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(110)
void SetAdjust(const SvxAdjustItem &rNew)
std::unique_ptr< SvxContourItem > m_aContour
void Create(SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16 nVersionAbusedAsSize)
Definition: legacyitem.cxx:32
const SvxFontHeightItem & GetCTLHeight() const
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
Definition: crsrsh.cxx:3039
const SvxShadowedItem & GetShadowed() const
void RemoveBoxFormat(const OUString &sName)
Definition: tblafmt.cxx:1184
sal_uIntPtr sal_uLong
void StoreTableProperties(const SwTable &table)
Definition: tblafmt.cxx:691
long Long
std::vector< std::pair< OUString, std::unique_ptr< SwBoxAutoFormat > > > m_aCellStyles
Definition: tblafmt.hxx:308
void SetRowSplit(const SwCursor &rCursor, const SwFormatRowSplit &rNew)
Definition: ndtbl1.cxx:323
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
const sal_uInt16 AUTOFORMAT_DATA_ID_504
Definition: tblafmt.cxx:83
SvStream & ReadCharAsBool(bool &rBool)
const SvxAdjustItem & GetAdjust() const
void Create(SvxShadowItem &rItem, SvStream &rStrm, sal_uInt16)
sal_Int64 n
Definition: doc.hxx:188
SVX_ROTATE_MODE_STANDARD
const SvxWeightItem & GetCTLWeight() const
const SvxFontItem & GetCTLFont() const
SvStream & Store(const SvxFrameDirectionItem &rItem, SvStream &rStrm, sal_uInt16)
sal_uInt64 Seek(sal_uInt64 nPos)
void SetTextOrientation(const SvxFrameDirectionItem &rNew)
Definition: tblafmt.hxx:84
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
std::unique_ptr< SvxFontHeightItem > m_aCJKHeight
bool SaveBlockB(SvStream &rStream, sal_uInt16 fileVersion) const
static void WriteBlockB(SvStream &rStream, sal_uInt16 fileVersion)
SvxFrameDirection
const sal_uInt16 AUTOFORMAT_ID_X
Definition: tblafmt.cxx:76
void Flush()
sal_uInt16 GetRowsToRepeat() const
Definition: swtable.hxx:196
std::unique_ptr< SwFormatVertOrient > m_aVerticalAlignment
Definition: tblafmt.hxx:52
bool Save(SvStream &rStream, sal_uInt16 fileVersion) const
Definition: tblafmt.cxx:796
void SetContour(const SvxContourItem &rNew)
const SvxBrushItem & GetBackground() const
std::shared_ptr< T > make_shared(Args &&...args)
void SetCTLPosture(const SvxPostureItem &rNew)
const sal_uInt16 AUTOFORMAT_DATA_ID
Definition: tblafmt.cxx:96
SwTableAutoFormat(const OUString &rName)
Definition: tblafmt.cxx:362
void AddAutoFormat(const SwTableAutoFormat &rFormat)
Append table style to the existing styles.
Definition: tblafmt.cxx:930
static void Write(SvStream &rStream, sal_uInt16 fileVersion)
Definition: tblafmt.cxx:200
sal_uInt16 m_aRepeatHeading
Definition: tblafmt.hxx:177
SvStream & ReadUInt64(sal_uInt64 &rUInt64)
const SvxPostureItem & GetCTLPosture() const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
void SetCTLWeight(const SvxWeightItem &rNew)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:204
const OUString & GetFormatstring() const
const SvxWeightItem & GetCJKWeight() const
static void WriteBlockA(SvStream &rStream, sal_uInt16 fileVersion)
constexpr TypedWhichId< SwFormatLayoutSplit > RES_LAYOUT_SPLIT(113)
void ChangeBoxFormatName(std::u16string_view sFromName, const OUString &sToName)
Definition: tblafmt.cxx:1219
const sal_uInt16 AUTOFORMAT_DATA_ID_X
Definition: tblafmt.cxx:78
const OUString & GetNumFormatString() const
Definition: tblafmt.hxx:79
std::unique_ptr< SvxUnderlineItem > m_aUnderline
std::unique_ptr< SvxShadowedItem > m_aShadowed
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
bool IsFont() const
Definition: tblafmt.hxx:215
const SvxFontItem & GetFont() const
SvStream & Store(const SvxFormatBreakItem &rItem, SvStream &rStrm, sal_uInt16 nItemVersion)
bool operator==(const SwBoxAutoFormat &rRight) const
Comparing based of boxes backgrounds.
Definition: tblafmt.cxx:302
std::unique_ptr< SvxOverlineItem > m_aOverline
void SetHeight(const SvxFontHeightItem &rNew)
std::unique_ptr< SvxFrameDirectionItem > m_aTextOrientation
Definition: tblafmt.hxx:51
void Load(SvStream &rStream, sal_uInt16 nVer)
Definition: tblafmt.cxx:189
ErrCode GetError() const
bool m_bCollapsingBorders
Definition: tblafmt.hxx:180
LINESTYLE_NONE
static const std::vector< sal_Int32 > & GetTableTemplateMap()
Returns a vector of indexes in aBoxAutoFormat array. Returned indexes points to cells which are mappe...
Definition: tblafmt.cxx:877
bool IsJustify() const
Definition: tblafmt.hxx:216
void SetUnderline(const SvxUnderlineItem &rNew)
bool LoadBlockA(SvStream &rStream, const AutoFormatVersions &rVersions, sal_uInt16 nVer)
std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream &rStrm, std::u16string_view rStr, rtl_TextEncoding eEnc)
std::unique_ptr< SvxPostureItem > m_aCJKPosture
std::unique_ptr< SvxCrossedOutItem > m_aCrossedOut
std::unique_ptr< SvxHorJustifyItem > m_aHorJustify
void SetCJKWeight(const SvxWeightItem &rNew)
std::unique_ptr< SvxMarginItem > m_aMargin
static bool IsFuzzing()
int nCount
const SvxUnderlineItem & GetUnderline() const
void SetNumFormatLanguage(const LanguageType &rNew)
Definition: tblafmt.hxx:92
sal_uInt16 nNumFormatVersion
const SfxPoolItem * GetDfltAttr(sal_uInt16 nWhich)
Get the default attribute from corresponding default attribute table.
Definition: hints.cxx:153
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
const SvxWeightItem & GetWeight() const
void SetAllDistances(sal_uInt16 nNew)
static sal_uInt8 CountPos(sal_uInt32 nCol, sal_uInt32 nCols, sal_uInt32 nRow, sal_uInt32 nRows)
Calculates the relevant position in the table autoformat for a given cell in a given table...
Definition: tblafmt.cxx:901
bool IsBackground() const
Definition: tblafmt.hxx:218
std::unique_ptr< SfxBoolItem > m_aLinebreak
sal_uInt64 remainingSize()
bool FirstRowEndColumnIsRow()
These methods returns what style (row or column) is applied first on given Cell.
Definition: tblafmt.cxx:717
OUString m_aName
Definition: tblafmt.hxx:160
const LanguageType & GetNumFormatLanguage() const
Definition: tblafmt.hxx:81
rtl_TextEncoding GetStoreCharSet(rtl_TextEncoding eEncoding)
const OUString & GetStyleName() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
void SetShadowed(const SvxShadowedItem &rNew)
const SvxContourItem & GetContour() const
AutoFormatBase & operator=(const AutoFormatBase &)
SwTableAutoFormatUpdateFlags
Definition: tblafmt.hxx:103
exports com.sun.star. text
const Color & GetColor() const
const sal_uInt16 AUTOFORMAT_ID_504
In follow-up versions these IDs' values need to increase.
Definition: tblafmt.cxx:82
void SetCrossedOut(const SvxCrossedOutItem &rNew)
const sal_uInt16 AUTOFORMAT_DATA_ID_552
Definition: tblafmt.cxx:85
std::shared_ptr< SvxShadowItem > m_aShadow
Definition: tblafmt.hxx:181
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SwBoxAutoFormat * GetBoxFormat(std::u16string_view sName) const
If found returns a ptr to a BoxFormat. If not found returns nullptr.
Definition: tblafmt.cxx:1208
#define SOFFICE_FILEFORMAT_50
const OUString & GetUserConfigPath() const
OUString GetTableTemplateCellSubName(const SwBoxAutoFormat &rBoxFormat) const
Returns the cell's name postfix. eg. ".1".
Definition: tblafmt.cxx:837
const SvxFrameDirectionItem & GetTextOrientation() const
Definition: tblafmt.hxx:73
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetWeight(const SvxWeightItem &rNew)
int i
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
const SvxFontHeightItem & GetCJKHeight() const
void SetBox(const SvxBoxItem &rNew)
const SwBoxAutoFormat & GetBoxFormat(sal_uInt8 nPos) const
Definition: tblafmt.cxx:447
void LoadBlockA(SvStream &rStream, sal_uInt16 nVer)
SwEditShell const * GetEditShell() const
Definition: doccorr.cxx:328
size_t size() const
Definition: tblafmt.cxx:1164
#define LANGUAGE_SYSTEM
std::unique_ptr< SvxLineItem > m_aTLBR
std::unique_ptr< SvxBoxItem > m_aBox
std::unique_ptr< SvxVerJustifyItem > m_aVerJustify
const sal_uInt16 AUTOFORMAT_ID
Definition: tblafmt.cxx:95
std::unique_ptr< SvxWeightItem > m_aCTLWeight
sal_uInt16 GetVersion(sal_uInt16)
LanguageType m_eNumFormatLanguage
Definition: tblafmt.hxx:57
void SetCTLHeight(const SvxFontHeightItem &rNew)
void SetCJKHeight(const SvxFontHeightItem &rNew)
size_t size() const
Definition: tblafmt.cxx:916
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
bool Save(SvStream &rStream, sal_uInt16 fileVersion) const
Definition: tblafmt.cxx:340
constexpr TypedWhichId< SfxBoolItem > RES_COLLAPSING_BORDERS(124)
WEIGHT_NORMAL
bool Load(SvStream &rStream, const SwAfVersions &rVersions, sal_uInt16 nVer)
Definition: tblafmt.cxx:307
float u
std::unique_ptr< SvxAdjustItem > m_aAdjust
static const SwBoxAutoFormat & GetDefaultBoxFormat()
Definition: tblafmt.cxx:478
SvNumFormatType
SwBoxAutoFormat & operator=(const SwBoxAutoFormat &rRef)
assignment-op (still used)
Definition: tblafmt.cxx:277
bool SaveBlockA(SvStream &rStream, sal_uInt16 fileVersion) const
bool m_bInclValueFormat
Definition: tblafmt.hxx:168
SvStream & ReadUChar(unsigned char &rChar)
std::unique_ptr< SvxFontItem > m_aCTLFont
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
ITALIC_NONE
const SwDoc * GetDoc() const
The document is set in SwAttrPool now, therefore you always can access it.
Definition: format.hxx:123
void SetVersion(sal_Int32 n)
void SetBoxFormat(const SwBoxAutoFormat &rNew, sal_uInt8 nPos)
Definition: tblafmt.cxx:436
std::unique_ptr< Impl > m_pImpl
Definition: tblafmt.hxx:266
const SvxPostureItem & GetCJKPosture() const
const sal_uInt16 AUTOFORMAT_ID_31005
Definition: tblafmt.cxx:91
std::unique_ptr< SvxPostureItem > m_aPosture
static std::unique_ptr< SwFormatRowSplit > GetRowSplit(const SwCursor &rCursor)
Definition: ndtbl1.cxx:349
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:112
void GetValueFormat(OUString &rFormat, LanguageType &rLng, LanguageType &rSys) const
Definition: tblafmt.hxx:76
OUString m_sNumFormatString
Definition: tblafmt.hxx:55
std::unique_ptr< SwTableAutoFormat > ReleaseAutoFormat(size_t i)
Definition: tblafmt.cxx:961
void SetFont(const SvxFontItem &rNew)
Reference< XOutputStream > stream
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:450
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
const OUString & GetName() const
Definition: tblafmt.hxx:204
bool LastRowStartColumnIsRow()
Definition: tblafmt.cxx:729
const sal_uInt16 AUTOFORMAT_FILE_VERSION
Definition: tblafmt.cxx:97
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SvStream * GetInStream()
const SvxCrossedOutItem & GetCrossedOut() const
const SwFormatVertOrient & GetVerticalAlignment() const
Definition: tblafmt.hxx:74
sal_uInt16 m_nTextOrientationVersion
Definition: tblafmt.cxx:175
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
WhichRangesContainer const aTableSetRange(svl::Items< RES_FILL_ORDER, RES_FRM_SIZE, RES_LR_SPACE, RES_BREAK, RES_HORI_ORIENT, RES_HORI_ORIENT, RES_BACKGROUND, RES_SHADOW, RES_KEEP, RES_KEEP, RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, RES_FRAMEDIR, RES_FRAMEDIR, RES_COLLAPSING_BORDERS, RES_COLLAPSING_BORDERS, RES_FRMATR_GRABBAG, RES_FRMATR_GRABBAG, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1 >)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
sal_uInt16 GetVersion(sal_uInt16)
Definition: legacyitem.cxx:27
#define SOFFICE_FILEFORMAT_40
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
bool Load(SvStream &rStream, const SwAfVersions &)
Definition: tblafmt.cxx:734
#define SAL_WARN_IF(condition, area, stream)
#define ERRCODE_NONE
const SvxOverlineItem & GetOverline() const
unsigned char sal_uInt8
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
std::unique_ptr< SvxRotateModeItem > m_aRotateMode
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
void RestoreTableProperties(SwTable &table) const
Definition: tblafmt.cxx:665
std::unique_ptr< SvxLineItem > m_aBLTR
SwTableAutoFormat const & operator[](size_t i) const
Definition: tblafmt.cxx:921
std::unique_ptr< SvxFontItem > m_aCJKFont
FRAME
sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion)
#define SAL_INFO(area, stream)
SvStream & WriteUChar(unsigned char nChar)
std::vector< std::unique_ptr< SwTableAutoFormat > > m_AutoFormats
Definition: tblafmt.cxx:913
SwTableAutoFormat & operator=(const SwTableAutoFormat &rNew)
Definition: tblafmt.cxx:390
void EraseAutoFormat(size_t i)
Definition: tblafmt.cxx:944
LanguageType GetAppLanguage()
Definition: init.cxx:723
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
const LanguageType & GetSysLanguage() const
Definition: tblafmt.hxx:80
void SetStreamCharSet(rtl_TextEncoding eCharSet)
SwCellStyleDescriptor operator[](size_t i) const
Definition: tblafmt.cxx:1174
rtl_TextEncoding GetStreamCharSet() const
const sal_uInt16 AUTOFORMAT_DATA_ID_31005
Definition: tblafmt.cxx:92
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
void InsertAutoFormat(size_t i, std::unique_ptr< SwTableAutoFormat > pFormat)
Definition: tblafmt.cxx:939
const SvxFontItem & GetCJKFont() const
OUString GetBoxFormatName(const SwBoxAutoFormat &rBoxFormat) const
If found returns its name. If not found returns an empty OUString.
Definition: tblafmt.cxx:1196
sal_uInt64 Tell() const
QPRO_FUNC_TYPE nType
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
const sal_uInt16 AUTOFORMAT_ID_680DR25
Definition: tblafmt.cxx:88
void AddBoxFormat(const SwBoxAutoFormat &rBoxFormat, const OUString &sName)
Add a copy of rBoxFormat.
Definition: tblafmt.cxx:1179
sal_Int16 GetVertOrient() const
Definition: fmtornt.hxx:54
#define DEF_LINE_WIDTH_5
std::unique_ptr< SvxColorItem > m_aColor
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
const sal_uInt16 AUTOFORMAT_ID_358
Definition: tblafmt.cxx:77
std::unique_ptr< SvxWeightItem > m_aCJKWeight
void UpdateFromSet(sal_uInt8 nPos, const SfxItemSet &rSet, SwTableAutoFormatUpdateFlags eFlags, SvNumberFormatter const *)
Definition: tblafmt.cxx:486
sal_uInt32 GetValue() const
LanguageType m_eSysLanguage
Definition: tblafmt.hxx:56
std::unique_ptr< SvxWeightItem > m_aWeight
void SetPosture(const SvxPostureItem &rNew)
#define SAL_WARN(area, stream)
SvStream & Store(const SwFormatVertOrient &rItem, SvStream &rStrm, sal_uInt16)
Definition: legacyitem.cxx:67
static SwBoxAutoFormat * s_pDefaultBoxAutoFormat
Definition: tblafmt.hxx:156
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
STRIKEOUT_NONE
SwTableAutoFormat * FindAutoFormat(std::u16string_view rName) const
Find table style with the provided name, return nullptr when not found.
Definition: tblafmt.cxx:982
const SvxPostureItem & GetPosture() const
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
const SvxColorItem & GetColor() const
constexpr OUStringLiteral first
void SetCTLFont(const SvxFontItem &rNew)
std::unique_ptr< SvxFontHeightItem > m_aCTLHeight
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr OUStringLiteral AUTOTABLE_FORMAT_NAME
Definition: tblafmt.cxx:101
void SetSysLanguage(const LanguageType &rNew)
Definition: tblafmt.hxx:91
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
sal_uInt16 m_nVerticalAlignmentVersion
Definition: tblafmt.cxx:176
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
bool IsFrame() const
Definition: tblafmt.hxx:217
const SvxBoxItem & GetBox() const
const SvxFontHeightItem & GetHeight() const
bool FirstRowStartColumnIsRow()
Definition: tblafmt.cxx:721
LanguageType GetLanguage() const
sal_uInt16 nPos
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1319
sal_uInt16 m_nStrResId
Definition: tblafmt.hxx:161
bool Save() const
Definition: tblafmt.cxx:1037
void SetColor(const SvxColorItem &rNew)
OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)