LibreOffice Module sc (master) 1
autofmt.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 <scitems.hxx>
21#include <editeng/boxitem.hxx>
22#include <editeng/brushitem.hxx>
24#include <editeng/colritem.hxx>
26#include <editeng/fontitem.hxx>
28#include <editeng/lineitem.hxx>
29#include <editeng/postitem.hxx>
30#include <editeng/shdditem.hxx>
31#include <editeng/udlnitem.hxx>
32#include <editeng/wghtitem.hxx>
34#include <osl/diagnose.h>
35#include <svl/numformat.hxx>
37#include <svx/framelink.hxx>
38#include <vcl/settings.hxx>
39#include <vcl/svapp.hxx>
40#include <vcl/virdev.hxx>
44
45#include <strings.hrc>
46#include <zforauto.hxx>
47#include <global.hxx>
48#include <autoform.hxx>
49#include <autofmt.hxx>
50#include <scresid.hxx>
51#include <document.hxx>
52#include <viewdata.hxx>
53#include <svtools/colorcfg.hxx>
54#include <scmod.hxx>
55
56#define FRAME_OFFSET 4
57
58// ScAutoFmtPreview
59
61 : pCurData(nullptr)
62 , bFitWidth(false)
63 , mbRTL(false)
64 , aStrJan(ScResId(STR_JAN))
65 , aStrFeb(ScResId(STR_FEB))
66 , aStrMar(ScResId(STR_MAR))
67 , aStrNorth(ScResId(STR_NORTH))
68 , aStrMid(ScResId(STR_MID))
69 , aStrSouth(ScResId(STR_SOUTH))
70 , aStrSum(ScResId(STR_SUM))
72{
73 Init();
74}
75
77{
79 CustomWidgetController::SetDrawingArea(pDrawingArea);
80}
81
83{
84 Size aSize(GetOutputSizePixel());
85 aPrvSize = Size(aSize.Width() - 6, aSize.Height() - 30);
86 mnLabelColWidth = (aPrvSize.Width() - 4) / 4 - 12;
89 mnRowHeight = (aPrvSize.Height() - 4) / 5;
91}
92
94{
95}
96
98 vcl::Font& rFont,
99 const SvxFontItem& rFontItem,
100 const SvxWeightItem& rWeightItem,
101 const SvxPostureItem& rPostureItem )
102{
103 rFont.SetFamily ( rFontItem.GetFamily() );
104 rFont.SetFamilyName ( rFontItem.GetFamilyName() );
105 rFont.SetStyleName ( rFontItem.GetStyleName() );
106 rFont.SetCharSet ( rFontItem.GetCharSet() );
107 rFont.SetPitch ( rFontItem.GetPitch() );
108 rFont.SetWeight ( rWeightItem.GetValue() );
109 rFont.SetItalic ( rPostureItem.GetValue() );
110}
111
112void ScAutoFmtPreview::MakeFonts(vcl::RenderContext const& rRenderContext, sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont)
113{
114 if ( !pCurData )
115 return;
116
117 rFont = rCJKFont = rCTLFont = rRenderContext.GetFont();
118 Size aFontSize(rFont.GetFontSize().Width(), 10 * rRenderContext.GetDPIScaleFactor());
119
120 const SvxFontItem* pFontItem = pCurData->GetItem( nIndex, ATTR_FONT );
121 const SvxWeightItem* pWeightItem = pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT );
122 const SvxPostureItem* pPostureItem = pCurData->GetItem( nIndex, ATTR_FONT_POSTURE );
123 const SvxFontItem* pCJKFontItem = pCurData->GetItem( nIndex, ATTR_CJK_FONT );
124 const SvxWeightItem* pCJKWeightItem = pCurData->GetItem( nIndex, ATTR_CJK_FONT_WEIGHT );
125 const SvxPostureItem* pCJKPostureItem = pCurData->GetItem( nIndex, ATTR_CJK_FONT_POSTURE );
126 const SvxFontItem* pCTLFontItem = pCurData->GetItem( nIndex, ATTR_CTL_FONT );
127 const SvxWeightItem* pCTLWeightItem = pCurData->GetItem( nIndex, ATTR_CTL_FONT_WEIGHT );
128 const SvxPostureItem* pCTLPostureItem = pCurData->GetItem( nIndex, ATTR_CTL_FONT_POSTURE );
129 const SvxUnderlineItem* pUnderlineItem = pCurData->GetItem( nIndex, ATTR_FONT_UNDERLINE );
130 const SvxOverlineItem* pOverlineItem = pCurData->GetItem( nIndex, ATTR_FONT_OVERLINE );
131 const SvxCrossedOutItem* pCrossedOutItem = pCurData->GetItem( nIndex, ATTR_FONT_CROSSEDOUT );
132 const SvxContourItem* pContourItem = pCurData->GetItem( nIndex, ATTR_FONT_CONTOUR );
133 const SvxShadowedItem* pShadowedItem = pCurData->GetItem( nIndex, ATTR_FONT_SHADOWED );
134 const SvxColorItem* pColorItem = pCurData->GetItem( nIndex, ATTR_FONT_COLOR );
135
136 lcl_SetFontProperties( rFont, *pFontItem, *pWeightItem, *pPostureItem );
137 lcl_SetFontProperties( rCJKFont, *pCJKFontItem, *pCJKWeightItem, *pCJKPostureItem );
138 lcl_SetFontProperties( rCTLFont, *pCTLFontItem, *pCTLWeightItem, *pCTLPostureItem );
139
140 Color aColor( pColorItem->GetValue() );
141 if( aColor == COL_TRANSPARENT )
143
144#define SETONALLFONTS( MethodName, Value ) \
145rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value );
146
147 SETONALLFONTS( SetUnderline, pUnderlineItem->GetValue() )
148 SETONALLFONTS( SetOverline, pOverlineItem->GetValue() )
149 SETONALLFONTS( SetStrikeout, pCrossedOutItem->GetValue() )
150 SETONALLFONTS( SetOutline, pContourItem->GetValue() )
151 SETONALLFONTS( SetShadow, pShadowedItem->GetValue() )
152 SETONALLFONTS( SetColor, aColor )
153 SETONALLFONTS( SetFontSize, aFontSize )
154 SETONALLFONTS( SetTransparent, true )
155
156#undef SETONALLFONTS
157}
158
159sal_uInt16 ScAutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
160{
161 static const sal_uInt16 pnFmtMap[] =
162 {
163 0, 1, 2, 1, 3,
164 4, 5, 6, 5, 7,
165 8, 9, 10, 9, 11,
166 4, 5, 6, 5, 7,
167 12, 13, 14, 13, 15
168 };
169 return pnFmtMap[ maArray.GetCellIndex( nCol, nRow, mbRTL ) ];
170}
171
172const SvxBoxItem& ScAutoFmtPreview::GetBoxItem( size_t nCol, size_t nRow ) const
173{
174 OSL_ENSURE( pCurData, "ScAutoFmtPreview::GetBoxItem - no format data found" );
175 return * pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BORDER );
176}
177
178const SvxLineItem& ScAutoFmtPreview::GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const
179{
180 OSL_ENSURE( pCurData, "ScAutoFmtPreview::GetDiagItem - no format data found" );
181 return * pCurData->GetItem( GetFormatIndex( nCol, nRow ), bTLBR ? ATTR_BORDER_TLBR : ATTR_BORDER_BLTR );
182}
183
184void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow)
185{
186 if (!pCurData)
187 {
188 return;
189 }
190
191 // Emit the cell text
192
193 OUString cellString;
194 bool bNumFormat = pCurData->GetIncludeValueFormat();
195 sal_uInt32 nNum;
196 double nVal;
197 const Color* pDummy = nullptr;
198 sal_uInt16 nIndex = static_cast<sal_uInt16>(maArray.GetCellIndex(nCol, nRow, mbRTL));
199
200 switch (nIndex)
201 {
202 case 1: cellString = aStrJan; break;
203 case 2: cellString = aStrFeb; break;
204 case 3: cellString = aStrMar; break;
205 case 5: cellString = aStrNorth; break;
206 case 10: cellString = aStrMid; break;
207 case 15: cellString = aStrSouth; break;
208 case 4:
209 case 20: cellString = aStrSum; break;
210
211 case 6:
212 case 8:
213 case 16:
214 case 18: nVal = nIndex;
215 nNum = 5;
216 goto mknum;
217 case 17:
218 case 7: nVal = nIndex;
219 nNum = 6;
220 goto mknum;
221 case 11:
222 case 12:
223 case 13: nVal = nIndex;
224 nNum = 12 == nIndex ? 10 : 9;
225 goto mknum;
226
227 case 9: nVal = 21; nNum = 7; goto mknum;
228 case 14: nVal = 36; nNum = 11; goto mknum;
229 case 19: nVal = 51; nNum = 7; goto mknum;
230 case 21: nVal = 33; nNum = 13; goto mknum;
231 case 22: nVal = 36; nNum = 14; goto mknum;
232 case 23: nVal = 39; nNum = 13; goto mknum;
233 case 24: nVal = 108; nNum = 15;
234 mknum:
235 if (bNumFormat)
236 {
237 ScNumFormatAbbrev& rNumFormat = const_cast<ScNumFormatAbbrev&>(pCurData->GetNumFormat(sal_uInt16(nNum)));
238 nNum = rNumFormat.GetFormatIndex(*pNumFmt);
239 }
240 else
241 nNum = 0;
242 pNumFmt->GetOutputString(nVal, nNum, cellString, &pDummy);
243 break;
244 }
245
246 if (cellString.isEmpty())
247 return;
248
249 Size aStrSize;
250 sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow );
251 const basegfx::B2DRange cellRange(maArray.GetCellRange( nCol, nRow ));
252 Point aPos(basegfx::fround(cellRange.getMinX()), basegfx::fround(cellRange.getMinY()));
253 sal_uInt16 nRightX = 0;
254 bool bJustify = pCurData->GetIncludeJustify();
255 SvxCellHorJustify eJustification;
256
257 SvtScriptedTextHelper aScriptedText(rRenderContext);
258
259 // Justification:
260
261 eJustification = mbRTL ? SvxCellHorJustify::Right : bJustify ?
262 pCurData->GetItem(nFmtIndex, ATTR_HOR_JUSTIFY)->GetValue() :
263 SvxCellHorJustify::Standard;
264
266 {
267 vcl::Font aFont, aCJKFont, aCTLFont;
268 Size theMaxStrSize;
269
270 MakeFonts(rRenderContext, nFmtIndex, aFont, aCJKFont, aCTLFont);
271
272 theMaxStrSize = Size(basegfx::fround(cellRange.getWidth()), basegfx::fround(cellRange.getHeight()));
273 theMaxStrSize.AdjustWidth( -(FRAME_OFFSET) );
274 theMaxStrSize.AdjustHeight( -(FRAME_OFFSET) );
275
276 aScriptedText.SetFonts( &aFont, &aCJKFont, &aCTLFont );
277 aScriptedText.SetText(cellString, xBreakIter);
278 aStrSize = aScriptedText.GetTextSize();
279
280 if (theMaxStrSize.Height() < aStrSize.Height())
281 {
282 // if the string does not fit in the row using this font,
283 // the default font is used
284 aScriptedText.SetDefaultFont();
285 aStrSize = aScriptedText.GetTextSize();
286 }
287 while((theMaxStrSize.Width() <= aStrSize.Width()) && (cellString.getLength() > 1))
288 {
289 if( eJustification == SvxCellHorJustify::Right )
290 cellString = cellString.copy(1);
291 else
292 cellString = cellString.copy(0, cellString.getLength() - 1 );
293
294 aScriptedText.SetText( cellString, xBreakIter );
295 aStrSize = aScriptedText.GetTextSize();
296 }
297 }
298 else
299 {
300 aScriptedText.SetDefaultFont();
301 aScriptedText.SetText( cellString, xBreakIter );
302 aStrSize = aScriptedText.GetTextSize();
303 }
304
305 nRightX = sal_uInt16(basegfx::fround(cellRange.getWidth()) - aStrSize.Width() - FRAME_OFFSET);
306
307 // vertical (always center):
308
309 aPos.AdjustY((mnRowHeight - static_cast<sal_uInt16>(aStrSize.Height())) / 2 );
310
311 // horizontal
312
313 if (eJustification != SvxCellHorJustify::Standard)
314 {
315 sal_uInt16 nHorPos = sal_uInt16((basegfx::fround(cellRange.getWidth())-aStrSize.Width()) / 2);
316 //sal_uInt16 nHorPos = sal_uInt16((basegfx::fround(cellRange.getWidth())-aStrSize.Width()) / 2);
317
318 switch (eJustification)
319 {
320 case SvxCellHorJustify::Left:
321 aPos.AdjustX(FRAME_OFFSET );
322 break;
323 case SvxCellHorJustify::Right:
324 aPos.AdjustX(nRightX );
325 break;
326 case SvxCellHorJustify::Block:
327 case SvxCellHorJustify::Repeat:
328 case SvxCellHorJustify::Center:
329 aPos.AdjustX(nHorPos );
330 break;
331 // coverity[dead_error_line] - following conditions exist to avoid compiler warning
332 case SvxCellHorJustify::Standard:
333 default:
334 // Standard is not handled here
335 break;
336 }
337 }
338 else
339 {
340
341 // Standard justification
342
343 if (nCol == 0 || nRow == 0)
344 {
345 // Text label to the left or sum left adjusted
346 aPos.AdjustX(FRAME_OFFSET );
347 }
348 else
349 {
350 // Numbers/Dates right adjusted
351 aPos.AdjustX(nRightX );
352 }
353 }
354 aScriptedText.DrawText(aPos);
355}
356
357#undef FRAME_OFFSET
358
360{
361 if (!pCurData)
362 return;
363
364 for(size_t nRow = 0; nRow < 5; ++nRow)
365 {
366 for(size_t nCol = 0; nCol < 5; ++nCol)
367 {
368 const SvxBrushItem* pItem =
370
372 rRenderContext.SetLineColor();
373 rRenderContext.SetFillColor( pItem->GetColor() );
374
375 const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow ));
376 rRenderContext.DrawRect(
378 basegfx::fround(aCellRange.getMinX()), basegfx::fround(aCellRange.getMinY()),
379 basegfx::fround(aCellRange.getMaxX()), basegfx::fround(aCellRange.getMaxY())));
380
381 rRenderContext.Pop();
382 }
383 }
384}
385
387{
388 if (!pCurData)
389 return;
390
391 // 1) background
393 DrawBackground(rRenderContext);
394
395 // 2) values
396 for(size_t nRow = 0; nRow < 5; ++nRow)
397 for(size_t nCol = 0; nCol < 5; ++nCol)
398 DrawString(rRenderContext, nCol, nRow);
399
400 // 3) border
402 return;
403
404 const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D;
405 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(
407 rRenderContext,
408 aNewViewInformation2D));
409
410 pProcessor2D->process(maArray.CreateB2DPrimitiveArray());
411 pProcessor2D.reset();
412}
413
415{
416 maArray.Initialize( 5, 5 );
417 mnLabelColWidth = 0;
418 mnDataColWidth1 = 0;
419 mnDataColWidth2 = 0;
420 mnRowHeight = 0;
421 CalcCellArray( false );
422 CalcLineMap();
423}
424
426{
427 SCTAB nCurrentTab = rViewData.GetTabNo();
428 ScDocument& rDoc = rViewData.GetDocument();
429 mbRTL = rDoc.IsLayoutRTL(nCurrentTab);
431}
432
433void ScAutoFmtPreview::CalcCellArray( bool bFitWidthP )
434{
435 maArray.SetXOffset( 2 );
439
440 maArray.SetYOffset( 2 );
442
445}
446
447static void lclSetStyleFromBorder( svx::frame::Style& rStyle, const ::editeng::SvxBorderLine* pBorder )
448{
449 rStyle.Set(pBorder, o3tl::convert(1.0, o3tl::Length::twip, o3tl::Length::pt), 5);
450}
451
453{
454 if ( !pCurData )
455 return;
456
457 for( size_t nRow = 0; nRow < 5; ++nRow )
458 {
459 for( size_t nCol = 0; nCol < 5; ++nCol )
460 {
461 svx::frame::Style aStyle;
462
463 const SvxBoxItem& rItem = GetBoxItem( nCol, nRow );
464 lclSetStyleFromBorder( aStyle, rItem.GetLeft() );
465 maArray.SetCellStyleLeft( nCol, nRow, aStyle );
466 lclSetStyleFromBorder( aStyle, rItem.GetRight() );
467 maArray.SetCellStyleRight( nCol, nRow, aStyle );
468 lclSetStyleFromBorder( aStyle, rItem.GetTop() );
469 maArray.SetCellStyleTop( nCol, nRow, aStyle );
470 lclSetStyleFromBorder( aStyle, rItem.GetBottom() );
471 maArray.SetCellStyleBottom( nCol, nRow, aStyle );
472
473 lclSetStyleFromBorder( aStyle, GetDiagItem( nCol, nRow, true ).GetLine() );
474 maArray.SetCellStyleTLBR( nCol, nRow, aStyle );
475 lclSetStyleFromBorder( aStyle, GetDiagItem( nCol, nRow, false ).GetLine() );
476 maArray.SetCellStyleBLTR( nCol, nRow, aStyle );
477 }
478 }
479}
480
482{
483 if (pNewData)
484 {
485 pCurData = pNewData;
486 bFitWidth = pNewData->GetIncludeWidthHeight();
487 }
488
490 CalcLineMap();
491
492 Invalidate();
493}
494
496{
497 rRenderContext.Push(vcl::PushFlags::ALL);
498 DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
499
500 Size aWndSize(GetOutputSizePixel());
501 vcl::Font aFont(aVD->GetFont());
502 const Color& aBackCol = SC_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor;
503 tools::Rectangle aRect(Point(), aWndSize);
504
505 aFont.SetTransparent( true );
506 aVD->SetFont(aFont);
507 aVD->SetLineColor();
508 aVD->SetFillColor(aBackCol);
509 aVD->SetOutputSize(aWndSize);
510 aVD->DrawRect(aRect);
511
512 PaintCells(*aVD);
513
514 rRenderContext.SetLineColor();
515 rRenderContext.SetFillColor(aBackCol);
516 rRenderContext.DrawRect(aRect);
517
518 Point aPos((aWndSize.Width() - aPrvSize.Width()) / 2, (aWndSize.Height() - aPrvSize.Height()) / 2);
520 aPos.setX( -aPos.X() );
521 rRenderContext.DrawOutDev(aPos, aWndSize, Point(), aWndSize, *aVD);
522 aVD->SetDrawMode(nOldDrawMode);
523 rRenderContext.Pop();
524}
525
526void ScAutoFmtPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
527{
528 DoPaint(rRenderContext);
529}
530
531/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DrawModeFlags
#define SETONALLFONTS(MethodName, Value)
#define FRAME_OFFSET
Definition: autofmt.cxx:56
static void lcl_SetFontProperties(vcl::Font &rFont, const SvxFontItem &rFontItem, const SvxWeightItem &rWeightItem, const SvxPostureItem &rPostureItem)
Definition: autofmt.cxx:97
static void lclSetStyleFromBorder(svx::frame::Style &rStyle, const ::editeng::SvxBorderLine *pBorder)
Definition: autofmt.cxx:447
const StyleSettings & GetStyleSettings() const
static bool GetLayoutRTL()
static const AllSettings & GetSettings()
const vcl::Font & GetFont() const
float GetDPIScaleFactor() const
void DrawRect(const tools::Rectangle &rRect)
void SetLineColor()
void SetFillColor()
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void setX(tools::Long nX)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
SAL_DLLPRIVATE void CalcCellArray(bool bFitWidth)
Definition: autofmt.cxx:433
const OUString aStrMid
Definition: autofmt.hxx:65
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: autofmt.cxx:76
SAL_DLLPRIVATE const SvxBoxItem & GetBoxItem(size_t nCol, size_t nRow) const
Definition: autofmt.cxx:172
ScAutoFormatData * pCurData
Definition: autofmt.hxx:50
SAL_DLLPRIVATE void PaintCells(vcl::RenderContext &rRenderContext)
Definition: autofmt.cxx:386
const OUString aStrSouth
Definition: autofmt.hxx:66
const OUString aStrJan
Definition: autofmt.hxx:61
ScopedVclPtrInstance< VirtualDevice > aVD
Definition: autofmt.hxx:51
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: autofmt.cxx:526
SAL_DLLPRIVATE sal_uInt16 GetFormatIndex(size_t nCol, size_t nRow) const
Definition: autofmt.cxx:159
tools::Long mnLabelColWidth
Definition: autofmt.hxx:57
SAL_DLLPRIVATE void MakeFonts(vcl::RenderContext const &rRenderContext, sal_uInt16 nIndex, vcl::Font &rFont, vcl::Font &rCJKFont, vcl::Font &rCTLFont)
Definition: autofmt.cxx:112
virtual ~ScAutoFmtPreview() override
Definition: autofmt.cxx:93
SAL_DLLPRIVATE void DrawBackground(vcl::RenderContext &rRenderContext)
Definition: autofmt.cxx:359
const OUString aStrMar
Definition: autofmt.hxx:63
virtual void Resize() override
Definition: autofmt.cxx:82
SAL_DLLPRIVATE void Init()
Definition: autofmt.cxx:414
tools::Long mnDataColWidth1
Definition: autofmt.hxx:58
bool mbRTL
Implementation to draw the frame borders.
Definition: autofmt.hxx:55
void NotifyChange(ScAutoFormatData *pNewData)
Definition: autofmt.cxx:481
const OUString aStrSum
Definition: autofmt.hxx:67
tools::Long mnDataColWidth2
Definition: autofmt.hxx:59
std::unique_ptr< SvNumberFormatter > pNumFmt
Definition: autofmt.hxx:68
svx::frame::Array maArray
Definition: autofmt.hxx:54
SAL_DLLPRIVATE void DoPaint(vcl::RenderContext &rRenderContext)
Definition: autofmt.cxx:495
void DetectRTL(const ScViewData &rViewData)
Definition: autofmt.cxx:425
css::uno::Reference< css::i18n::XBreakIterator > xBreakIter
Definition: autofmt.hxx:52
SAL_DLLPRIVATE void CalcLineMap()
Definition: autofmt.cxx:452
SAL_DLLPRIVATE void DrawString(vcl::RenderContext &rRenderContext, size_t nCol, size_t nRow)
Definition: autofmt.cxx:184
const OUString aStrNorth
Definition: autofmt.hxx:64
const OUString aStrFeb
Definition: autofmt.hxx:62
tools::Long mnRowHeight
Definition: autofmt.hxx:60
SAL_DLLPRIVATE const SvxLineItem & GetDiagItem(size_t nCol, size_t nRow, bool bTLBR) const
Definition: autofmt.cxx:178
const ScNumFormatAbbrev & GetNumFormat(sal_uInt16 nIndex) const
Definition: autoform.cxx:376
bool GetIncludeWidthHeight() const
Definition: autoform.hxx:148
bool GetIncludeBackground() const
Definition: autoform.hxx:147
bool GetIncludeValueFormat() const
Definition: autoform.hxx:143
const SfxPoolItem * GetItem(sal_uInt16 nIndex, sal_uInt16 nWhich) const
Definition: autoform.cxx:294
bool GetIncludeFrame() const
Definition: autoform.hxx:146
bool GetIncludeJustify() const
Definition: autoform.hxx:145
bool GetIncludeFont() const
Definition: autoform.hxx:144
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
Definition: documen6.cxx:40
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
Definition: document.cxx:974
sal_uInt32 GetFormatIndex(SvNumberFormatter &rFormatter)
Definition: zforauto.cxx:79
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
void disposeAndReset(reference_type *pBody)
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowTextColor() const
const Size & GetTextSize() const
void SetText(const OUString &_rText, const css::uno::Reference< css::i18n::XBreakIterator > &_xBreakIter)
void DrawText(const Point &_rPos)
void SetFonts(vcl::Font const *_pLatinFont, vcl::Font const *_pAsianFont, vcl::Font const *_pCmplxFont)
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
const Color & GetColor() const
const Color & GetValue() const
FontFamily GetFamily() const
FontPitch GetPitch() const
const OUString & GetStyleName() const
rtl_TextEncoding GetCharSet() const
const OUString & GetFamilyName() const
TYPE getMaxX() const
TYPE getWidth() const
TYPE getMinX() const
TYPE getMinY() const
TYPE getMaxY() const
TYPE getHeight() const
void SetCellStyleBottom(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void SetCellStyleTLBR(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void SetCellStyleLeft(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void SetCellStyleRight(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void SetColWidth(sal_Int32 nCol, sal_Int32 nWidth)
void SetXOffset(sal_Int32 nXOffset)
sal_Int32 GetWidth() const
basegfx::B2DRange GetCellRange(sal_Int32 nCol, sal_Int32 nRow) const
void Initialize(sal_Int32 nWidth, sal_Int32 nHeight)
void SetYOffset(sal_Int32 nYOffset)
drawinglayer::primitive2d::Primitive2DContainer CreateB2DPrimitiveArray() const
sal_Int32 GetHeight() const
void SetAllColWidths(sal_Int32 nWidth)
void SetCellStyleBLTR(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void SetAllRowHeights(sal_Int32 nHeight)
sal_Int32 GetCellIndex(sal_Int32 nCol, sal_Int32 nRow, bool bRTL) const
void SetCellStyleTop(sal_Int32 nCol, sal_Int32 nRow, const Style &rStyle)
void Set(double nP, double nD, double nS)
void SetStyleName(const OUString &rStyleName)
void SetPitch(FontPitch ePitch)
void SetTransparent(bool bTransparent)
void SetItalic(FontItalic)
void SetWeight(FontWeight)
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
const Size & GetFontSize() const
void SetFamilyName(const OUString &rFamilyName)
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
sal_Int32 nIndex
B2IRange fround(const B2DRange &rRange)
Reference< XComponentContext > getProcessComponentContext()
std::unique_ptr< BaseProcessor2D > createPixelProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
#define SC_MOD()
Definition: scmod.hxx:247
SvxCellHorJustify
sal_Int16 SCTAB
Definition: types.hxx:22