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>
25#include <svl/numformat.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{
36public:
38
39 void NotifyChange(const SwTableAutoFormat& rNewData);
40
41 void DetectRTL(SwWrtShell const* pWrtShell);
42
43private:
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: */
void DetectRTL(SwWrtShell const *pWrtShell)
void DrawString(vcl::RenderContext &rRenderContext, size_t nCol, size_t nRow)
sal_uInt8 GetFormatIndex(size_t nCol, size_t nRow) const
const OUString maStringMar
const OUString maStringSum
svx::frame::Array maArray
void DrawBackground(vcl::RenderContext &rRenderContext)
void PaintCells(vcl::RenderContext &rRenderContext)
tools::Long mnLabelColumnWidth
const OUString maStringSouth
bool mbFitWidth
Implementation to draw the frame borders.
const OUString maStringMid
void NotifyChange(const SwTableAutoFormat &rNewData)
const OUString maStringFeb
uno::Reference< i18n::XBreakIterator > m_xBreak
virtual void Resize() override
std::unique_ptr< SvNumberFormatter > mxNumFormat
const OUString maStringNorth
SwTableAutoFormat maCurrentData
tools::Long mnDataColumnWidth1
tools::Long mnDataColumnWidth2
const OUString maStringJan
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
void MakeFonts(vcl::RenderContext const &rRenderContext, sal_uInt8 nIndex, vcl::Font &rFont, vcl::Font &rCJKFont, vcl::Font &rCTLFont)
void CalcCellArray(bool bFitWidth)
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
long Long
unsigned char sal_uInt8