1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <tools/wintypes.hxx>
23 #include <vcl/field.hxx>
24 #include <swtypes.hxx>
27 class MetricFormatter
;
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
,
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
);
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */