bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / uitool.hxx
blob6373801954cc41d4eabdd2ee5cabf2909ab6efe7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef _UITOOL_HXX
20 #define _UITOOL_HXX
22 #include <tools/wintypes.hxx>
23 #include <vcl/field.hxx>
24 #include <swtypes.hxx>
25 #include "swdllapi.h"
27 class MetricFormatter;
28 class SfxItemSet;
29 class SwPageDesc;
30 class SvxTabStopItem;
31 class SwWrtShell;
32 class ListBox;
33 class SwDocShell;
34 class SwFrmFmt;
35 class SwTabCols;
36 class DateTime;
37 class SfxViewFrame;
39 // switch a metric
40 SW_DLLPUBLIC void SetMetric(MetricFormatter& rCtrl, FieldUnit eUnit);
42 // fill BoxInfoAttribut
43 SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh);
45 // SfxItemSets <-> PageDesc
46 void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc );
47 void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet);
49 // fill tabs with default tabs
50 SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
52 // erase DefaultTabs from TabStopArray
53 //void EraseDefTabs(SvxTabStopItem& rTabs);
55 // determine space between 1st and 2nd element
56 SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs);
58 // determine whether a Sfx-PageDesc combination exists in the set
59 // and set this in the set and delete the transport items
60 // (PageBreak & PageModel) from the set
61 void SwToSfxPageDescAttr( SfxItemSet& rSet );
62 void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
64 SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
65 void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
67 SW_DLLPUBLIC sal_Bool HasCharUnit( sal_Bool bWeb );
68 void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb);
70 // ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
71 SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
73 //inserts a string sorted into a ListBox,
74 SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const String& rEntry, ListBox& rToFill, sal_uInt16 nOffset);
76 // Get table width and alignement
77 SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
78 SwWrtShell* pSh );
80 String GetAppLangDateTimeString( const DateTime& );
82 // search for a command string withing the menu structure and execute it
83 // at the dispatcher if there is one, if executed return true
84 bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
86 #endif // _UITOOL_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */