LibreOffice Module sw (master)  1
Classes | Namespaces | Macros | Functions | Variables
unostyle.cxx File Reference
#include <svx/svxids.hrc>
#include <hintids.hxx>
#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/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/shaditem.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 <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/io/IOException.hpp>
#include <com/sun/star/style/ParagraphStyleCategory.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/text/XTextTablesSupplier.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/IndexOutOfBoundsException.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <istyleaccess.hxx>
#include <GetMetricVal.hxx>
#include <fmtfsize.hxx>
#include <numrule.hxx>
#include <tblafmt.hxx>
#include <fmtautofmt.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 <cassert>
#include <memory>
#include <set>
#include <limits>
Include dependency graph for unostyle.cxx:

Go to the source code of this file.

Classes

class  sw::XStyleFamily
 
class  SwXStyle
 
class  SwXFrameStyle
 
class  SwXPageStyle
 
class  SwStyleProperties_Impl
 
class  SwStyleBase_Impl
 
struct  SwStyleBase_Impl::ItemSetOverrider
 
class  SwAutoStylesEnumImpl
 

Namespaces

 sw
 Dialog to specify the properties of date form field.
 

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 const std::vector< StyleFamilyEntry > * lcl_GetStyleFamilyEntries ()
 
static bool lcl_GetHeaderFooterItem (SfxItemSet const &rSet, OUString const &rPropName, bool const bFooter, SvxSetItem const *&o_rpItem)
 
template<enum SfxStyleFamily>
static sal_Int32 lcl_GetCountOrName (const SwDoc &, OUString *, sal_Int32)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Char > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Para > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Frame > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Page > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Pseudo > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Table > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Cell > (const SwDoc &rDoc, OUString *pString, sal_Int32 nIndex)
 
template<SfxStyleFamily eFamily>
static uno::Reference< css::style::XStyle > lcl_CreateStyle (SfxStyleSheetBasePool *pBasePool, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<>
uno::Reference< css::style::XStyle > lcl_CreateStyle< SfxStyleFamily::Para > (SfxStyleSheetBasePool *pBasePool, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<>
uno::Reference< css::style::XStyle > lcl_CreateStyle< SfxStyleFamily::Frame > (SfxStyleSheetBasePool *pBasePool, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<>
uno::Reference< css::style::XStyle > lcl_CreateStyle< SfxStyleFamily::Page > (SfxStyleSheetBasePool *pBasePool, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<>
uno::Reference< css::style::XStyle > lcl_CreateStyle< SfxStyleFamily::Table > (SfxStyleSheetBasePool *, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<>
uno::Reference< css::style::XStyle > lcl_CreateStyle< SfxStyleFamily::Cell > (SfxStyleSheetBasePool *, SwDocShell *pDocShell, const OUString &sStyleName)
 
template<enum SfxStyleFamily>
static sal_uInt16 lcl_TranslateIndex (const sal_uInt16 nIndex)
 
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Char > (const sal_uInt16 nIndex)
 
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Para > (const sal_uInt16 nIndex)
 
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Table > (const sal_uInt16 nIndex)
 
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Cell > (const sal_uInt16 nIndex)
 
template<sal_uInt16 nRangeBegin, sal_uInt16 nRangeSize>
static sal_uInt16 lcl_TranslateIndexRange (const sal_uInt16 nIndex)
 
static const std::vector< ParagraphStyleCategoryEntry > * lcl_GetParagraphStyleCategoryEntries ()
 
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 SfxItemPropertySimpleEntry &rEntry, SwDoc *pDoc, uno::Any &o_aValue)
 
static const SfxItemSetlcl_GetItemsetForProperty (const SfxItemSet &rSet, SfxStyleFamily eFamily, const OUString &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)
 

Variables

const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex []
 

Macro Definition Documentation

#define AUTOSTYLE_FAMILY_COUNT   3
#define nPoolChrHtmlRange   (RES_POOLCHR_HTML_END - RES_POOLCHR_HTML_BEGIN)
#define nPoolChrNormalRange   (RES_POOLCHR_NORMAL_END - RES_POOLCHR_NORMAL_BEGIN)
#define nPoolCollDocRange   ( RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN)

Definition at line 156 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollDocStackedStart   ( nPoolCollRegisterStackedStart + nPoolCollRegisterRange)

Definition at line 164 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollExtraRange   ( RES_POOLCOLL_EXTRA_END - RES_POOLCOLL_EXTRA_BEGIN)

Definition at line 154 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollExtraStackedStart   ( nPoolCollListsStackedStart + nPoolCollListsRange)

Definition at line 162 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollHtmlRange   ( RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN)
#define nPoolCollHtmlStackedStart   ( nPoolCollDocStackedStart + nPoolCollDocRange)
#define nPoolCollListsRange   ( RES_POOLCOLL_LISTS_END - RES_POOLCOLL_LISTS_BEGIN)

Definition at line 153 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollListsStackedStart   ( nPoolCollTextRange)

Definition at line 161 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollRegisterRange   ( RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN)

Definition at line 155 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollRegisterStackedStart   ( nPoolCollExtraStackedStart + nPoolCollExtraRange)

Definition at line 163 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolCollTextRange   ( RES_POOLCOLL_TEXT_END - RES_POOLCOLL_TEXT_BEGIN)

Definition at line 152 of file unostyle.cxx.

Referenced by lcl_TranslateIndex< SfxStyleFamily::Para >().

#define nPoolFrameRange   ( RES_POOLFRM_END - RES_POOLFRM_BEGIN)

Definition at line 158 of file unostyle.cxx.

Referenced by lcl_GetCountOrName< SfxStyleFamily::Frame >().

#define nPoolNumRange   ( RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN)

Definition at line 160 of file unostyle.cxx.

Referenced by lcl_GetCountOrName< SfxStyleFamily::Pseudo >().

#define nPoolPageRange   ( RES_POOLPAGE_END - RES_POOLPAGE_BEGIN)

Definition at line 159 of file unostyle.cxx.

Referenced by lcl_GetCountOrName< SfxStyleFamily::Page >().

Function Documentation

template<SfxStyleFamily eFamily>
static uno::Reference< css::style::XStyle> lcl_CreateStyle ( SfxStyleSheetBasePool pBasePool,
SwDocShell pDocShell,
const OUString &  sStyleName 
)
static

Definition at line 754 of file unostyle.cxx.

References SwDocShell::GetDoc().

template<>
uno::Reference< css::style::XStyle> lcl_CreateStyle< SfxStyleFamily::Cell > ( SfxStyleSheetBasePool ,
SwDocShell pDocShell,
const OUString &  sStyleName 
)

Definition at line 773 of file unostyle.cxx.

References SwXTextCellStyle::CreateXTextCellStyle().

template<>
uno::Reference< css::style::XStyle> lcl_CreateStyle< SfxStyleFamily::Frame > ( SfxStyleSheetBasePool pBasePool,
SwDocShell pDocShell,
const OUString &  sStyleName 
)

Definition at line 761 of file unostyle.cxx.

template<>
uno::Reference< css::style::XStyle> lcl_CreateStyle< SfxStyleFamily::Page > ( SfxStyleSheetBasePool pBasePool,
SwDocShell pDocShell,
const OUString &  sStyleName 
)

Definition at line 765 of file unostyle.cxx.

template<>
uno::Reference< css::style::XStyle> lcl_CreateStyle< SfxStyleFamily::Para > ( SfxStyleSheetBasePool pBasePool,
SwDocShell pDocShell,
const OUString &  sStyleName 
)

Definition at line 758 of file unostyle.cxx.

template<>
uno::Reference< css::style::XStyle> lcl_CreateStyle< SfxStyleFamily::Table > ( SfxStyleSheetBasePool ,
SwDocShell pDocShell,
const OUString &  sStyleName 
)

Definition at line 769 of file unostyle.cxx.

References SwXTextTableStyle::CreateXTextTableStyle().

template<enum SfxStyleFamily>
static sal_Int32 lcl_GetCountOrName ( const SwDoc ,
OUString *  ,
sal_Int32   
)
static
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Cell > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Char > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Frame > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)

Definition at line 653 of file unostyle.cxx.

References IsPoolUserFormat(), and nPoolFrameRange.

template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Page > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)
template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Para > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)

Definition at line 631 of file unostyle.cxx.

References IsPoolUserFormat(), nPoolCollHtmlRange, and nPoolCollHtmlStackedStart.

template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Pseudo > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)

Definition at line 696 of file unostyle.cxx.

References IsPoolUserFormat(), and nPoolNumRange.

template<>
sal_Int32 lcl_GetCountOrName< SfxStyleFamily::Table > ( const SwDoc rDoc,
OUString *  pString,
sal_Int32  nIndex 
)

Definition at line 717 of file unostyle.cxx.

static SwFormat* lcl_GetFormatForStyle ( SwDoc const *  pDoc,
const rtl::Reference< SwDocStyleSheet > &  xStyle,
const SfxStyleFamily  eFamily 
)
static
static bool lcl_GetHeaderFooterItem ( SfxItemSet const &  rSet,
OUString const &  rPropName,
bool const  bFooter,
SvxSetItem const *&  o_rpItem 
)
static
static const SfxItemSet* lcl_GetItemsetForProperty ( const SfxItemSet rSet,
SfxStyleFamily  eFamily,
const OUString &  rPropertyName 
)
static

Definition at line 2476 of file unostyle.cxx.

References lcl_GetHeaderFooterItem(), and UNO_NAME_FIRST_IS_SHARED.

Referenced by SwXStyle::getPropertyStates().

static const std::vector<ParagraphStyleCategoryEntry>* lcl_GetParagraphStyleCategoryEntries ( )
static
static const StyleFamilyEntry& lcl_GetStyleEntry ( const SfxStyleFamily  eFamily)
static

Definition at line 1293 of file unostyle.cxx.

References lcl_GetStyleFamilyEntries().

static const std::vector< StyleFamilyEntry > * lcl_GetStyleFamilyEntries ( )
static
static SwGetPoolIdFromName lcl_GetSwEnumFromSfxEnum ( SfxStyleFamily  eFamily)
static
static bool lcl_InitConditional ( SfxStyleSheetBasePool pBasePool,
const SfxStyleFamily  eFamily,
const OUString &  rStyleName 
)
static
static uno::Reference<beans::XPropertySet> lcl_InitStandardStyle ( const SfxStyleFamily  eFamily,
uno::Reference< container::XNameAccess > const &  rxStyleFamily 
)
static

Definition at line 1251 of file unostyle.cxx.

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

Definition at line 1262 of file unostyle.cxx.

References SfxObjectShell::GetBaseModel(), SwDoc::GetDocShell(), and xModel.

static uno::Reference<text::XText> lcl_makeHeaderFooter ( const sal_uInt16  nRes,
const bool  bHeader,
SwFrameFormat const *const  pFrameFormat 
)
static
template<enum SfxStyleFamily>
static sal_uInt16 lcl_TranslateIndex ( const sal_uInt16  nIndex)
static
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Cell > ( const sal_uInt16  nIndex)

Definition at line 828 of file unostyle.cxx.

template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Char > ( const sal_uInt16  nIndex)
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Para > ( const sal_uInt16  nIndex)
template<>
sal_uInt16 lcl_TranslateIndex< SfxStyleFamily::Table > ( const sal_uInt16  nIndex)

Definition at line 822 of file unostyle.cxx.

template<sal_uInt16 nRangeBegin, sal_uInt16 nRangeSize>
static sal_uInt16 lcl_TranslateIndexRange ( const sal_uInt16  nIndex)
static

Definition at line 834 of file unostyle.cxx.

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

Variable Documentation

const IStyleAccess::SwAutoStyleFamily aAutoStyleByIndex[]