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