LibreOffice Module sw (master)  1
autoformatpreview.hxx
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 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_AUTOFORMATPREVIEW_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_AUTOFORMATPREVIEW_HXX
21 
22 #include <com/sun/star/i18n/XBreakIterator.hpp>
23 #include <sal/types.h>
24 #include <svx/framelinkarray.hxx>
25 #include <svl/numformat.hxx>
26 #include <svl/zforlist.hxx>
27 #include <tools/gen.hxx>
28 #include <rtl/ustring.hxx>
29 #include <vcl/customweld.hxx>
30 #include <vcl/font.hxx>
31 
32 #include "wrtsh.hxx"
33 #include <tblafmt.hxx>
34 
36 {
37 public:
39 
40  void NotifyChange(const SwTableAutoFormat& rNewData);
41 
42  void DetectRTL(SwWrtShell const* pWrtShell);
43 
44 private:
47  bool mbFitWidth;
48  bool mbRTL;
54  const OUString maStringJan;
55  const OUString maStringFeb;
56  const OUString maStringMar;
57  const OUString maStringNorth;
58  const OUString maStringMid;
59  const OUString maStringSouth;
60  const OUString maStringSum;
61  std::unique_ptr<SvNumberFormatter> mxNumFormat;
62 
63  uno::Reference<i18n::XBreakIterator> m_xBreak;
64 
65  void Init();
66  virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
67  virtual void Resize() override;
68  void CalcCellArray(bool bFitWidth);
69  void CalcLineMap();
70  void PaintCells(vcl::RenderContext& rRenderContext);
71 
72  sal_uInt8 GetFormatIndex(size_t nCol, size_t nRow) const;
73 
74  void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow);
75  void DrawBackground(vcl::RenderContext& rRenderContext);
76 
77  void MakeFonts(vcl::RenderContext const& rRenderContext, sal_uInt8 nIndex, vcl::Font& rFont,
78  vcl::Font& rCJKFont, vcl::Font& rCTLFont);
79 };
80 
81 #endif
82 
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Long
tools::Long mnDataColumnWidth2
const OUString maStringJan
tools::Long mnLabelColumnWidth
void DrawString(vcl::RenderContext &rRenderContext, size_t nCol, size_t nRow)
void NotifyChange(const SwTableAutoFormat &rNewData)
SwTableAutoFormat maCurrentData
const OUString maStringMar
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
tools::Long mnDataColumnWidth1
void DetectRTL(SwWrtShell const *pWrtShell)
const OUString maStringFeb
const OUString maStringMid
const OUString maStringNorth
sal_uInt8 GetFormatIndex(size_t nCol, size_t nRow) const
void PaintCells(vcl::RenderContext &rRenderContext)
void DrawBackground(vcl::RenderContext &rRenderContext)
void CalcCellArray(bool bFitWidth)
std::unique_ptr< SvNumberFormatter > mxNumFormat
bool mbFitWidth
Implementation to draw the frame borders.
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
unsigned char sal_uInt8
const OUString maStringSum
const OUString maStringSouth
void MakeFonts(vcl::RenderContext const &rRenderContext, sal_uInt8 nIndex, vcl::Font &rFont, vcl::Font &rCJKFont, vcl::Font &rCTLFont)
uno::Reference< i18n::XBreakIterator > m_xBreak
svx::frame::Array maArray
virtual void Resize() override