LibreOffice Module sw (master) 1
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
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 .
18 */
22#include <vcl/weld.hxx>
23#include <swtypes.hxx>
24#include <swdllapi.h>
26class SfxItemSet;
27class SwPageDesc;
28class SvxTabStopItem;
29class SwWrtShell;
30namespace com::sun::star::awt { class XPopupMenu; }
31namespace weld { class ComboBox; }
32class SwDocShell;
33class SwFrameFormat;
34class SwTabCols;
35class DateTime;
36class SfxViewFrame;
37class SwEditShell;
39// fill BoxInfo attribute
40SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh);
48SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet& rSet, bool bPara = false);
58SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet, bool bPara = false);
69void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell);
71// SfxItemSets <-> PageDesc
72void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc );
73void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet);
75// fill tabs with default tabs
76SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
78// erase DefaultTabs from TabStopArray
79//void EraseDefTabs(SvxTabStopItem& rTabs);
81// determine space between 1st and 2nd element
84// determine whether a Sfx-PageDesc combination exists in the set
85// and set this in the set and delete the transport items
86// (PageBreak & PageModel) from the set
88void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
91void SetDfltMetric(FieldUnit eMetric, bool bWeb);
93bool HasCharUnit( bool bWeb );
94void SetApplyCharUnit(bool bApplyChar, bool bWeb);
96// fill ListBox with all char style templates, except the standard ones
97SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
99//inserts a string sorted into a ListBox,
100SW_DLLPUBLIC void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::ComboBox& rToFill, int nOffset);
102// Get table width and alignment
103SwTwips GetTableWidth( SwFrameFormat const * pFormat, SwTabCols const & rCols, sal_uInt16 *pPercent,
104 SwWrtShell* pSh );
106OUString GetAppLangDateTimeString( const DateTime& );
108// search for a command string within the menu structure and execute it
109// at the dispatcher if there is one, if executed return true
110bool ExecuteMenuCommand(const css::uno::Reference<css::awt::XPopupMenu>& rMenu, const SfxViewFrame& rViewFrame, sal_uInt16 nId);
114/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Style of a layout element.
Definition: frmfmt.hxx:72
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
Definition: swdllapi.h:28
tools::Long SwTwips
Definition: swtypes.hxx:51
void SwToSfxPageDescAttr(SfxItemSet &rSet)
Definition: uitool.cxx:716
OUString GetAppLangDateTimeString(const DateTime &)
Definition: uitool.cxx:862
void PageDescToItemSet(const SwPageDesc &rPageDesc, SfxItemSet &rSet)
Definition: uitool.cxx:457
bool ExecuteMenuCommand(const css::uno::Reference< css::awt::XPopupMenu > &rMenu, const SfxViewFrame &rViewFrame, sal_uInt16 nId)
Definition: uitool.cxx:882
void ItemSetToPageDesc(const SfxItemSet &rSet, SwPageDesc &rPageDesc)
Definition: uitool.cxx:277
void SetDfltMetric(FieldUnit eMetric, bool bWeb)
Definition: uitool.cxx:762
SW_DLLPUBLIC SwTwips GetTabDist(const SvxTabStopItem &rTabs)
Definition: uitool.cxx:649
SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet &rSet, const SfxItemSet &rOrigSet, bool bPara=false)
Convert general attributes to the corresponding character attributes.
Definition: uitool.cxx:144
SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet &rSet, bool bPara=false)
Convert character specific attributes to general ones used by tab pages.
Definition: uitool.cxx:105
void SetApplyCharUnit(bool bApplyChar, bool bWeb)
Definition: uitool.cxx:877
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:780
bool HasCharUnit(bool bWeb)
Definition: uitool.cxx:872
SW_DLLPUBLIC void InsertStringSorted(const OUString &rId, const OUString &rEntry, weld::ComboBox &rToFill, int nOffset)
Definition: uitool.cxx:767
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:755
SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet &rSet, const SwWrtShell &rSh)
Definition: uitool.cxx:81
SwTwips GetTableWidth(SwFrameFormat const *pFormat, SwTabCols const &rCols, sal_uInt16 *pPercent, SwWrtShell *pSh)
Definition: uitool.cxx:821
void SfxToSwPageDescAttr(const SwWrtShell &rShell, SfxItemSet &rSet)
Definition: uitool.cxx:655
void ApplyCharBackground(const Color &rBackgroundColor, SwWrtShell &rShell)
Apply character background on the shell.
Definition: uitool.cxx:196
SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem &rTabs)
Definition: uitool.cxx:637