LibreOffice Module sw (master) 1
Classes | Macros | Functions | Variables
unostyle.cxx File Reference
#include <sal/config.h>
#include <o3tl/safeint.hxx>
#include <o3tl/string_view.hxx>
#include <comphelper/propertysequence.hxx>
#include <hintids.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <svl/hint.hxx>
#include <svtools/ctrltool.hxx>
#include <svl/style.hxx>
#include <svl/itemiter.hxx>
#include <svl/listener.hxx>
#include <svl/numformat.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svx/pageitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/sizeitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lrspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/flstitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/paperinf.hxx>
#include <editeng/wghtitem.hxx>
#include <autostyle_helper.hxx>
#include <pagedesc.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
#include <docary.hxx>
#include <charfmt.hxx>
#include <cmdid.h>
#include <unomid.h>
#include <unomap.hxx>
#include <unostyle.hxx>
#include <unosett.hxx>
#include <docsh.hxx>
#include <paratr.hxx>
#include <unoprnms.hxx>
#include <shellio.hxx>
#include <docstyle.hxx>
#include <unotextbodyhf.hxx>
#include <fmthdft.hxx>
#include <fmtpdsc.hxx>
#include <strings.hrc>
#include <poolfmt.hxx>
#include <unoevent.hxx>
#include <fmtruby.hxx>
#include <SwStyleNameMapper.hxx>
#include <sfx2/printer.hxx>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/style/ParagraphStyleCategory.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <istyleaccess.hxx>
#include <fmtfsize.hxx>
#include <numrule.hxx>
#include <tblafmt.hxx>
#include <frameformats.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <sal/log.hxx>
#include <svl/stylepool.hxx>
#include <svx/unobrushitemhelper.hxx>
#include <editeng/unoipset.hxx>
#include <editeng/memberids.h>
#include <svx/unomid.hxx>
#include <svx/unoshape.hxx>
#include <svx/xflbstit.hxx>
#include <svx/xflbmtit.hxx>
#include <swunohelper.hxx>
#include <svx/xbtmpit.hxx>
#include <ccoll.hxx>
#include <hints.hxx>
#include <uiitems.hxx>
#include <cassert>
#include <memory>
#include <set>
#include <string_view>
#include <limits>
Include dependency graph for unostyle.cxx:

Go to the source code of this file.

Classes

class  SwAutoStylesEnumImpl
 

Macros

#define nPoolChrNormalRange   (RES_POOLCHR_NORMAL_END - RES_POOLCHR_NORMAL_BEGIN)
 
#define nPoolChrHtmlRange   (RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN)
 
#define nPoolCollTextRange   ( RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN)
 
#define nPoolCollListsRange   ( RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN)
 
#define nPoolCollExtraRange   ( RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN)
 
#define nPoolCollRegisterRange   ( RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN)
 
#define nPoolCollDocRange   ( RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN)
 
#define nPoolCollHtmlRange   ( RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN)
 
#define nPoolFrameRange   ( RES_POOLFRM_END - RES_POOLFRM_BEGIN)
 
#define nPoolPageRange   ( RES_POOLPAGE_END - RES_POOLPAGE_BEGIN)
 
#define nPoolNumRange   ( RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN)
 
#define nPoolCollListsStackedStart   ( nPoolCollTextRange)
 
#define nPoolCollExtraStackedStart   ( nPoolCollListsStackedStart + nPoolCollListsRange)
 
#define nPoolCollRegisterStackedStart   ( nPoolCollExtraStackedStart + nPoolCollExtraRange)
 
#define nPoolCollDocStackedStart   ( nPoolCollRegisterStackedStart + nPoolCollRegisterRange)
 
#define nPoolCollHtmlStackedStart   ( nPoolCollDocStackedStart + nPoolCollDocRange)
 
#define AUTOSTYLE_FAMILY_COUNT   3
 

Functions

static bool lcl_GetHeaderFooterItem (SfxItemSet const &rSet, std::u16string_view rPropName, bool const bFooter, SvxSetItem const *&o_rpItem)
 
static SwGetPoolIdFromName lcl_GetSwEnumFromSfxEnum (SfxStyleFamily eFamily)
 
static uno::Reference< beans::XPropertySetlcl_InitStandardStyle (const SfxStyleFamily eFamily, uno::Reference< container::XNameAccess > const &rxStyleFamily)
 
static uno::Reference< container::XNameAccess > lcl_InitStyleFamily (SwDoc *pDoc, const StyleFamilyEntry &rEntry)
 
static bool lcl_InitConditional (SfxStyleSheetBasePool *pBasePool, const SfxStyleFamily eFamily, const OUString &rStyleName)
 
static const StyleFamilyEntry & lcl_GetStyleEntry (const SfxStyleFamily eFamily)
 
static sal_uInt8 lcl_TranslateMetric (const SfxItemPropertyMapEntry &rEntry, SwDoc *pDoc, uno::Any &o_aValue)
 
static const SfxItemSetlcl_GetItemsetForProperty (const SfxItemSet &rSet, SfxStyleFamily eFamily, std::u16string_view rPropertyName)
 
static SwFormatlcl_GetFormatForStyle (SwDoc const *pDoc, const rtl::Reference< SwDocStyleSheet > &xStyle, const SfxStyleFamily eFamily)
 
static uno::Reference< text::XText > lcl_makeHeaderFooter (const sal_uInt16 nRes, const bool bHeader, SwFrameFormat const *const pFrameFormat)
 
std::shared_ptr< SfxItemSetPropValuesToAutoStyleItemSet (SwDoc &rDoc, IStyleAccess::SwAutoStyleFamily eFamily, const uno::Sequence< beans::PropertyValue > &Values, SwAttrSet &aSet)
 

Variables

const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex []
 

Macro Definition Documentation

◆ AUTOSTYLE_FAMILY_COUNT

#define AUTOSTYLE_FAMILY_COUNT   3

Definition at line 3381 of file unostyle.cxx.

◆ nPoolChrHtmlRange

#define nPoolChrHtmlRange   (RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN)

Definition at line 136 of file unostyle.cxx.

◆ nPoolChrNormalRange

#define nPoolChrNormalRange   (RES_POOLCHR_NORMAL_END - RES_POOLCHR_NORMAL_BEGIN)

Definition at line 135 of file unostyle.cxx.

◆ nPoolCollDocRange

#define nPoolCollDocRange   ( RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN)

Definition at line 141 of file unostyle.cxx.

◆ nPoolCollDocStackedStart

#define nPoolCollDocStackedStart   ( nPoolCollRegisterStackedStart + nPoolCollRegisterRange)

Definition at line 149 of file unostyle.cxx.

◆ nPoolCollExtraRange

#define nPoolCollExtraRange   ( RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN)

Definition at line 139 of file unostyle.cxx.

◆ nPoolCollExtraStackedStart

#define nPoolCollExtraStackedStart   ( nPoolCollListsStackedStart + nPoolCollListsRange)

Definition at line 147 of file unostyle.cxx.

◆ nPoolCollHtmlRange

#define nPoolCollHtmlRange   ( RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN)

Definition at line 142 of file unostyle.cxx.

◆ nPoolCollHtmlStackedStart

#define nPoolCollHtmlStackedStart   ( nPoolCollDocStackedStart + nPoolCollDocRange)

Definition at line 150 of file unostyle.cxx.

◆ nPoolCollListsRange

#define nPoolCollListsRange   ( RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN)

Definition at line 138 of file unostyle.cxx.

◆ nPoolCollListsStackedStart

#define nPoolCollListsStackedStart   ( nPoolCollTextRange)

Definition at line 146 of file unostyle.cxx.

◆ nPoolCollRegisterRange

#define nPoolCollRegisterRange   ( RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN)

Definition at line 140 of file unostyle.cxx.

◆ nPoolCollRegisterStackedStart

#define nPoolCollRegisterStackedStart   ( nPoolCollExtraStackedStart + nPoolCollExtraRange)

Definition at line 148 of file unostyle.cxx.

◆ nPoolCollTextRange

#define nPoolCollTextRange   ( RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN)

Definition at line 137 of file unostyle.cxx.

◆ nPoolFrameRange

#define nPoolFrameRange   ( RES_POOLFRM_END - RES_POOLFRM_BEGIN)

Definition at line 143 of file unostyle.cxx.

◆ nPoolNumRange

#define nPoolNumRange   ( RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN)

Definition at line 145 of file unostyle.cxx.

◆ nPoolPageRange

#define nPoolPageRange   ( RES_POOLPAGE_END - RES_POOLPAGE_BEGIN)

Definition at line 144 of file unostyle.cxx.

Function Documentation

◆ lcl_GetFormatForStyle()

static SwFormat * lcl_GetFormatForStyle ( SwDoc const *  pDoc,
const rtl::Reference< SwDocStyleSheet > &  xStyle,
const SfxStyleFamily  eFamily 
)
static

Definition at line 2596 of file unostyle.cxx.

References SwDoc::FindPageDesc(), and SwPageDesc::GetMaster().

◆ lcl_GetHeaderFooterItem()

static bool lcl_GetHeaderFooterItem ( SfxItemSet const &  rSet,
std::u16string_view  rPropName,
bool const  bFooter,
SvxSetItem const *&  o_rpItem 
)
static

Definition at line 982 of file unostyle.cxx.

References SfxItemSet::GetItemIfSet(), rSet, and UNO_NAME_FIRST_IS_SHARED.

Referenced by lcl_GetItemsetForProperty().

◆ lcl_GetItemsetForProperty()

static const SfxItemSet * lcl_GetItemsetForProperty ( const SfxItemSet rSet,
SfxStyleFamily  eFamily,
std::u16string_view  rPropertyName 
)
static

◆ lcl_GetStyleEntry()

static const StyleFamilyEntry & lcl_GetStyleEntry ( const SfxStyleFamily  eFamily)
static

Definition at line 1346 of file unostyle.cxx.

◆ lcl_GetSwEnumFromSfxEnum()

static SwGetPoolIdFromName lcl_GetSwEnumFromSfxEnum ( SfxStyleFamily  eFamily)
static

Definition at line 1239 of file unostyle.cxx.

References ChrFmt, and SAL_WARN.

◆ lcl_InitConditional()

static bool lcl_InitConditional ( SfxStyleSheetBasePool pBasePool,
const SfxStyleFamily  eFamily,
const OUString &  rStyleName 
)
static

◆ lcl_InitStandardStyle()

static uno::Reference< beans::XPropertySet > lcl_InitStandardStyle ( const SfxStyleFamily  eFamily,
uno::Reference< container::XNameAccess > const &  rxStyleFamily 
)
static

Definition at line 1305 of file unostyle.cxx.

References lcl_InitStandardStyle().

Referenced by lcl_InitStandardStyle().

◆ lcl_InitStyleFamily()

static uno::Reference< container::XNameAccess > lcl_InitStyleFamily ( SwDoc pDoc,
const StyleFamilyEntry &  rEntry 
)
static

◆ lcl_makeHeaderFooter()

static uno::Reference< text::XText > lcl_makeHeaderFooter ( const sal_uInt16  nRes,
const bool  bHeader,
SwFrameFormat const *const  pFrameFormat 
)
static

◆ lcl_TranslateMetric()

static sal_uInt8 lcl_TranslateMetric ( const SfxItemPropertyMapEntry rEntry,
SwDoc pDoc,
uno::Any o_aValue 
)
static

◆ PropValuesToAutoStyleItemSet()

std::shared_ptr< SfxItemSet > PropValuesToAutoStyleItemSet ( SwDoc rDoc,
IStyleAccess::SwAutoStyleFamily  eFamily,
const uno::Sequence< beans::PropertyValue > &  Values,
SwAttrSet aSet 
)

Variable Documentation

◆ aAutoStyleByIndex

const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex[]