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/zforlist.hxx>
26 #include <tools/gen.hxx>
27 #include <rtl/ustring.hxx>
28 #include <vcl/customweld.hxx>
29 #include <vcl/font.hxx>
30 
31 #include "wrtsh.hxx"
32 #include <tblafmt.hxx>
33 
35 {
36 public:
38 
39  void NotifyChange(const SwTableAutoFormat& rNewData);
40 
41  void DetectRTL(SwWrtShell const* pWrtShell);
42 
43 private:
46  bool mbFitWidth;
47  bool mbRTL;
53  const OUString maStringJan;
54  const OUString maStringFeb;
55  const OUString maStringMar;
56  const OUString maStringNorth;
57  const OUString maStringMid;
58  const OUString maStringSouth;
59  const OUString maStringSum;
60  std::unique_ptr<SvNumberFormatter> mxNumFormat;
61 
62  uno::Reference<i18n::XBreakIterator> m_xBreak;
63 
64  void Init();
65  virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
66  virtual void Resize() override;
67  void CalcCellArray(bool bFitWidth);
68  void CalcLineMap();
69  void PaintCells(vcl::RenderContext& rRenderContext);
70 
71  sal_uInt8 GetFormatIndex(size_t nCol, size_t nRow) const;
72 
73  void DrawString(vcl::RenderContext& rRenderContext, size_t nCol, size_t nRow);
74  void DrawBackground(vcl::RenderContext& rRenderContext);
75 
76  void MakeFonts(vcl::RenderContext const& rRenderContext, sal_uInt8 nIndex, vcl::Font& rFont,
77  vcl::Font& rCJKFont, vcl::Font& rCTLFont);
78 };
79 
80 #endif
81 
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString maStringJan
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:90
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