32 #include <sfx2/sfxsids.hrc>
40 #include <osl/diagnose.h>
42 #include <com/sun/star/table/BorderLine.hpp>
43 #include <com/sun/star/table/TableBorder.hpp>
44 #include <com/sun/star/table/TableBorder2.hpp>
45 #include <com/sun/star/table/ShadowFormat.hpp>
46 #include <com/sun/star/table/CellHoriJustify.hpp>
47 #include <com/sun/star/table/CellOrientation.hpp>
48 #include <com/sun/star/style/PageStyleLayout.hpp>
49 #include <com/sun/star/style/GraphicLocation.hpp>
50 #include <com/sun/star/sheet/XHeaderFooterContent.hpp>
51 #include <com/sun/star/util/CellProtection.hpp>
52 #include <com/sun/star/awt/FontSlant.hpp>
53 #include <com/sun/star/awt/Size.hpp>
54 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
55 #include <com/sun/star/lang/Locale.hpp>
56 #include <com/sun/star/beans/PropertyAttribute.hpp>
57 #include <com/sun/star/graphic/XGraphic.hpp>
64 #include <stlpool.hxx>
68 #include <unonames.hxx>
70 #include <globstr.hrc>
169 {
u"", 0, css::uno::Type(), 0, 0 }
172 return &aCellStyleSet_Impl;
293 {
u"", 0, css::uno::Type(), 0, 0 }
296 return &aPageStyleSet_Impl;
333 {
u"", 0, css::uno::Type(), 0, 0 }
336 return &aHeaderStyleMap;
373 {
u"", 0, css::uno::Type(), 0, 0 }
376 return &aFooterStyleMap;
381 #define SC_STYLE_FAMILY_COUNT 2
383 #define SC_FAMILYNAME_CELL u"CellStyles"
384 #define SC_FAMILYNAME_PAGE u"PageStyles"
391 #define SCSTYLE_SERVICE "com.sun.star.style.Style"
392 #define SCCELLSTYLE_SERVICE "com.sun.star.style.CellStyle"
393 #define SCPAGESTYLE_SERVICE "com.sun.star.style.PageStyle"
398 #define SC_PAPERBIN_DEFAULTNAME "[From printer settings]"
427 if ( rHint.
GetId() == SfxHintId::Dying )
439 if ( nType == SfxStyleFamily::Para )
440 return new ScStyleFamilyObj(
pDocShell, SfxStyleFamily::Para );
441 else if ( nType == SfxStyleFamily::Page )
442 return new ScStyleFamilyObj(
pDocShell, SfxStyleFamily::Page );
444 OSL_FAIL(
"getStyleFamilyByType: no DocShell or wrong SfxStyleFamily");
461 return new ScStyleFamilyObj(
pDocShell, SfxStyleFamily::Para );
463 return new ScStyleFamilyObj(
pDocShell, SfxStyleFamily::Page );
481 throw lang::IndexOutOfBoundsException();
483 return uno::makeAny(xFamily);
505 throw container::NoSuchElementException();
507 return uno::makeAny(xFamily);
523 const uno::Sequence<beans::PropertyValue>& aOptions )
530 uno::Reference<io::XInputStream> xInputStream;
531 if (aURL ==
"private:stream")
533 for (
const auto& rProp : aOptions)
535 if (rProp.Name ==
"InputStream")
537 rProp.Value >>= xInputStream;
538 if (!xInputStream.is())
540 throw lang::IllegalArgumentException(
541 "Parameter 'InputStream' could not be converted "
542 "to type 'com::sun::star::io::XInputStream'",
550 ScDocumentLoader aLoader( aURL, aFilter, aFiltOpt, 0,
nullptr, xInputStream );
570 const uno::Sequence<beans::PropertyValue>& aOptions )
573 if ( !aSourceComponent.is() )
574 throw uno::RuntimeException();
584 const uno::Sequence<beans::PropertyValue>& aOptions )
592 bool bLoadReplace =
true;
593 bool bLoadCellStyles =
true;
594 bool bLoadPageStyles =
true;
596 for (
const beans::PropertyValue& rProp : aOptions)
598 OUString aPropName(rProp.Name);
631 if ( rHint.
GetId() == SfxHintId::Dying )
647 if ( nIndex < aIter.
Count() )
676 uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
677 if ( xInterface.is() )
679 ScStyleObj* pStyleObj = comphelper::getUnoTunnelImplementation<ScStyleObj>( xInterface );
692 throw container::ElementExistException();
694 (
void)pStylePool->
Make( aNameStr,
eFamily, SfxStyleSearchBits::UserDefined );
711 throw lang::IllegalArgumentException();
741 if (
eFamily == SfxStyleFamily::Para )
746 double nPPTX = aLogic.X() / 1000.0;
747 double nPPTY = aLogic.Y() / 1000.0;
753 pStylePool->
Remove( pStyle );
762 pStylePool->
Remove( pStyle );
773 throw container::NoSuchElementException();
787 return aIter.
Count();
797 throw lang::IndexOutOfBoundsException();
799 return uno::makeAny(xObj);
819 uno::Reference< style::XStyle > xObj(
822 throw container::NoSuchElementException();
824 return uno::makeAny(xObj);
838 uno::Sequence<OUString>
aSeq(nCount);
839 OUString* pAry = aSeq.getArray();
844 OSL_ENSURE( nPos < nCount,
"Count is wrong" );
848 pStyle = aIter.
Next();
852 return uno::Sequence<OUString>();
874 OSL_FAIL(
"###unexpected!" );
875 return uno::Reference< beans::XPropertySetInfo >();
880 OSL_FAIL(
"###unexpected!" );
887 if ( sPropertyName !=
"DisplayName" )
889 throw beans::UnknownPropertyException(
"unknown property: " + sPropertyName, static_cast<OWeakObject *>(
this) );
893 const char* pResId =
nullptr;
896 case SfxStyleFamily::Para:
897 pResId = STR_STYLE_FAMILY_CELL;
break;
898 case SfxStyleFamily::Page:
899 pResId = STR_STYLE_FAMILY_PAGE;
break;
901 OSL_FAIL(
"ScStyleFamilyObj::getPropertyValue(): invalid family" );
906 aRet <<= sDisplayName;
914 OSL_FAIL(
"###unexpected!" );
919 OSL_FAIL(
"###unexpected!" );
924 OSL_FAIL(
"###unexpected!" );
929 OSL_FAIL(
"###unexpected!" );
939 , pStyle_cached(nullptr)
973 if ( rHint.
GetId() == SfxHintId::Dying )
981 if ( bUseCachedValue )
1038 bool bOk = pStyle->
SetParent( aString );
1045 if (
eFamily == SfxStyleFamily::Para )
1050 Point aLogic = pVDev->LogicToPixel(
Point(1000,1000),
MapMode(MapUnit::MapTwip));
1051 double nPPTX = aLogic.X() / 1000.0;
1052 double nPPTY = aLogic.Y() / 1000.0;
1095 bool bOk = pStyle->
SetName( aNewName );
1106 sal_uInt16
nId = (
eFamily == SfxStyleFamily::Para ) ?
1107 SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
1118 SvxNumRule aRule( SvxNumRuleFlags::NONE, 0,
true );
1131 if (
eFamily == SfxStyleFamily::Page )
1136 rpResultEntry = pEntry;
1142 rpResultEntry = pEntry;
1149 rpResultEntry = pEntry;
1154 rpResultEntry =
nullptr;
1160 beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
1165 if ( pItemSet && pResultEntry )
1167 sal_uInt16 nWhich = pResultEntry->
nWID;
1181 if ( eState == SfxItemState::SET )
1182 eRet = beans::PropertyState_DIRECT_VALUE;
1183 else if ( eState == SfxItemState::DEFAULT )
1184 eRet = beans::PropertyState_DEFAULT_VALUE;
1185 else if ( eState == SfxItemState::DONTCARE )
1186 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1189 OSL_FAIL(
"unknown ItemState");
1209 uno::Sequence<beans::PropertyState> aRet( aPropertyNames.getLength() );
1210 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aRet.begin(),
1222 throw beans::UnknownPropertyException(aPropertyName);
1234 if ( pStyleSet && pResultEntry )
1236 sal_uInt16 nWhich = pResultEntry->
nWID;
1245 if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich &&
1246 aEmptySet.GetItemState(nWhich,
false) == SfxItemState::DEFAULT )
1248 aEmptySet.Put( aEmptySet.Get( nWhich ) );
1256 aAny <<= sal_Int32( static_cast<const SfxUInt32Item&>(pItemSet->
Get(nWhich)).
GetValue() );
1259 aAny <<= sal_Int16( TwipsToHMM(static_cast<const ScIndentItem&>(
1265 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->
Get(nWhich)).
GetValue() );
1277 aAny <<= static_cast<sal_Int16>(aItem.
GetWidth());
1279 aAny <<= static_cast<sal_Int16>(aItem.
GetHeight());
1296 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1323 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1324 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.begin(),
1332 const uno::Sequence< uno::Any >& aValues )
1337 if ( aValues.getLength() != aPropertyNames.getLength() )
1338 throw lang::IllegalArgumentException();
1340 const OUString* pNames = aPropertyNames.getConstArray();
1343 for ( sal_Int32
i = 0;
i < aPropertyNames.getLength();
i++ )
1355 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1356 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.begin(),
1362 const uno::Reference<beans::XPropertiesChangeListener>& )
1368 const uno::Reference<beans::XPropertiesChangeListener>& )
1374 const uno::Reference<beans::XPropertiesChangeListener>& )
1392 throw uno::RuntimeException();
1400 if (
eFamily == SfxStyleFamily::Para )
1405 Point aLogic = pVDev->LogicToPixel(
Point(1000,1000),
MapMode(MapUnit::MapTwip));
1406 double nPPTX = aLogic.X() / 1000.0;
1407 double nPPTY = aLogic.Y() / 1000.0;
1424 aBoxInfoItem.
SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
1425 rSet.
Put( aBoxInfoItem );
1437 for (
const OUString& rName : aPropertyNames )
1459 throw beans::UnknownPropertyException(aPropertyName);
1467 if ( !(pStyle && pEntry) )
1472 throw uno::RuntimeException();
1476 if (
eFamily == SfxStyleFamily::Page )
1487 aNewHeader.GetItemSet().ClearItem( pHeaderEntry->
nWID );
1488 rSet.
Put( aNewHeader );
1501 aNewFooter.GetItemSet().ClearItem( pFooterEntry->
nWID );
1502 rSet.
Put( aNewFooter );
1513 switch (pEntry->
nWID)
1525 sal_uInt32 nNewFormat = 0;
1526 *pValue >>= nNewFormat;
1547 sal_Int32 nRotVal = 0;
1548 if (*pValue >>= nRotVal)
1560 table::CellOrientation eOrient;
1561 if (*pValue >>= eOrient)
1565 case table::CellOrientation_STANDARD:
1568 case table::CellOrientation_TOPBOTTOM:
1572 case table::CellOrientation_BOTTOMTOP:
1576 case table::CellOrientation_STACKED:
1619 bool bFound =
false;
1622 if (*pValue >>= aName)
1632 for (sal_uInt16
i = 0;
i < nCount;
i++)
1643 throw lang::IllegalArgumentException();
1651 sal_Int16 nPages = 0;
1652 if (*pValue >>= nPages)
1656 aItem.
SetWidth(static_cast<sal_uInt16>(nPages));
1658 aItem.
SetHeight(static_cast<sal_uInt16>(nPages));
1667 bool bHidden =
false;
1668 if (*pValue >>= bHidden)
1695 switch (pEntry->
nWID)
1701 table::TableBorder aBorder;
1702 if (*pValue >>= aBorder)
1720 table::TableBorder2 aBorder2;
1721 if (*pValue >>= aBorder2)
1743 if (
eFamily == SfxStyleFamily::Para )
1751 Point aLogic = pVDev->LogicToPixel(
Point(1000,1000),
MapMode(MapUnit::MapTwip));
1752 double nPPTX = aLogic.X() / 1000.0;
1753 double nPPTY = aLogic.Y() / 1000.0;
1788 if ( pItemSet && pResultEntry )
1790 sal_uInt16 nWhich = pResultEntry->
nWID;
1799 sal_uInt32 nOldFormat =
1804 GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
1805 aAny <<= nOldFormat;
1809 aAny <<= sal_Int16( TwipsToHMM(static_cast<const ScIndentItem&>(
1822 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->
Get(nWhich)).
GetValue() );
1851 aAny <<= static_cast<sal_Int16>(aItem.GetWidth());
1853 aAny <<= static_cast<sal_Int16>(aItem.GetHeight());
1858 bool bHidden = pStyle && pStyle->
IsHidden();
1866 pItemSet->
GetItemState(nWhich,
false) == SfxItemState::DEFAULT )
1869 aNoEmptySet.
Put( aNoEmptySet.
Get( nWhich ) );
1884 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1916 return "ScStyleObj";
1926 const bool bPage = (
eFamily == SfxStyleFamily::Page );
#define SC_UNO_PAGE_FTRLEFTMAR
#define SC_UNONAME_TBLBORD
#define OLD_UNO_PAGE_HDRBACKCOL
virtual void SAL_CALL setParentStyle(const OUString &aParentStyle) override
#define SC_UNO_CJK_CFSTYLE
#define SC_UNO_PAGE_HDRBOTTBDIS
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
sal_uInt16 GetHeight() const
#define SC_UNO_PAGE_PAPERTRAY
virtual bool IsUsed() const
#define OLD_UNO_PAGE_HDRBACKTRAN
constexpr TypedWhichId< SvxEmphasisMarkItem > ATTR_FONT_EMPHASISMARK(121)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
#define SC_UNO_PAGE_HDRRIGHTMAR
static OUString DisplayToProgrammaticName(const OUString &rDispName, SfxStyleFamily nType)
sal_uInt16 GetPaperBinCount() const
#define SC_UNONAME_PLMARGIN
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_DYNAMIC(165)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
#define OLD_UNO_PAGE_FTRBACKTRAN
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
void CellStyleCreated(std::u16string_view rName, const ScDocument &rDoc)
#define SC_UNO_PAGE_PRINTOBJS
#define SC_UNO_PAGE_HDRTOPBOR
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_DRAWINGS(172)
#define SC_UNO_PAGE_RIGHTMARGIN
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_GRID(168)
#define SC_UNO_PAGE_RIGHTFTRCON
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
#define SC_UNONAME_USERDEF
#define SC_UNO_PAGE_FTRGRFURL
virtual OUString SAL_CALL getParentStyle() override
SfxBindings * GetViewBindings()
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
constexpr TypedWhichId< SfxBoolItem > ATTR_VERTICAL_ASIAN(137)
#define SC_UNO_CTL_CFFAMIL
void loadStylesFromDocShell(ScDocShell *pSource, const css::uno::Sequence< css::beans::PropertyValue > &aOptions)
virtual bool SetParent(const OUString &)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_FORMULAS(183)
virtual bool IsHidden() const
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(175)
#define SC_UNONAME_PRMARGIN
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
#define SC_UNONAME_CUNDER
virtual void SAL_CALL setName(const OUString &aName) override
virtual ~ScStyleFamilyObj() override
#define SC_WID_UNO_TBLBORD2
static const SfxItemPropertySet * lcl_GetPageStyleSet()
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SC_UNO_PAGE_TOPMARGIN
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
#define SC_UNONAME_CEMPHAS
#define SC_UNO_PAGE_HDRGRF
#define SC_UNO_PAGE_FTRLEFTBOR
#define SC_UNO_PAGE_HDRGRFURL
#define SC_UNO_PAGE_GRAPHICFILT
ScStyleFamilyObj * GetObjectByName_Impl(std::u16string_view aName) const
static const SfxItemPropertyMap * lcl_GetHeaderStyleMap()
#define SC_UNO_PAGE_FTRRIGHTMAR
#define MID_GRAPHIC_TRANSPARENT
virtual const OUString & GetParent() const
#define RIGHT_BORDER_DISTANCE
const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT]
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
#define SC_UNO_PAGE_HDRBRDDIST
void SetDocumentModified()
#define MID_MARGIN_LO_MARGIN
#define SC_UNO_PAGE_PRINTZERO
#define SCCELLSTYLE_SERVICE
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SC_UNO_CJK_CFNAME
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
static void FillBoxItems(SvxBoxItem &rOuter, SvxBoxInfoItem &rInner, const css::table::TableBorder &rBorder)
#define SC_UNONAME_CRELIEF
const SfxItemSet * GetStyleItemSet_Impl(std::u16string_view rPropName, const SfxItemPropertySimpleEntry *&rpEntry)
#define SC_UNONAME_PTMARGIN
#define SC_WID_UNO_DISPNAME
constexpr TypedWhichId< SvxCharReliefItem > ATTR_FONT_RELIEF(124)
static OUString ProgrammaticToDisplayName(const OUString &rProgName, SfxStyleFamily nType)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
virtual SfxItemSet & GetItemSet()
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
#define SC_UNONAME_CCOLOR
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NULLVALS(184)
virtual void Remove(SfxStyleSheetBase *pStyle) override
#define SC_UNO_PAGE_HDRBACKCOL
virtual OUString SAL_CALL getName() override
void Invalidate(sal_uInt16 nId)
virtual sal_Bool SAL_CALL hasElements() override
ScStyleFamilyObj * GetObjectByType_Impl(SfxStyleFamily nType) const
#define SC_UNO_PAGE_HDRGRFFILT
void SetHeight(sal_uInt16 nHeight)
#define SC_UNO_PAGE_SCALETOPAG
const SfxItemPropertySet * pPropSet
#define SC_UNONAME_LEFTBORDER2
#define SC_UNONAME_CWEIGHT
#define SC_UNO_PAGE_FTRBACKCOL
#define SC_UNONAME_CELLBACK
virtual sal_Int32 SAL_CALL getCount() override
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
static void AssignTableBorder2ToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
#define SC_UNO_PAGE_PRINTCHARTS
#define SC_UNO_CJK_CLOCAL
static void AssignTableBorderToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
constexpr TypedWhichId< ScPageScaleToItem > ATTR_PAGE_SCALETO(185)
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
#define OLD_UNO_PAGE_FTRON
#define SC_UNONAME_CUNDLHAS
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL removeByName(const OUString &Name) override
#define SC_UNO_PAGE_FTRBOTTBOR
constexpr TypedWhichId< SvxScriptSpaceItem > ATTR_SCRIPTSPACE(126)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
SC_DLLPUBLIC ScDocumentPool * GetPool()
#define SC_UNO_CJK_CFPITCH
#define MID_MARGIN_R_MARGIN
#define SC_UNO_PAGE_HDRSHADOW
ScStyleFamiliesObj(ScDocShell *pDocSh)
#define PAPERBIN_PRINTER_SETTINGS
#define SC_UNONAME_CELLHJUS_METHOD
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
#define SC_UNO_CTL_CFCHARS
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
#define SC_UNO_PAGE_FTRTOPBDIS
virtual void SetHidden(bool bValue)
SfxStyleSheetBase * GetStyle_Impl(bool bUseCachedValue=false)
#define MID_FONT_FAMILY_NAME
#define SC_UNONAME_BOTTBORDER2
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
#define SC_UNO_CJK_CFFAMIL
#define SC_UNO_PAGE_TOPBORDER
#define SC_UNO_PAGE_HDRGRFLOC
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
const OUString & GetName() const
#define SC_UNONAME_LEFTBORDER
SC_DLLPUBLIC SCROW MaxRow() const
virtual sal_Bool SAL_CALL isInUse() override
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
SC_DLLPUBLIC SCTAB GetTableCount() const
#define SC_UNO_PAGE_PRINTDOWN
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
ScStyleFamilyObj * GetObjectByIndex_Impl(sal_uInt32 nIndex) const
#define SC_UNO_PAGE_SYTLELAYOUT
ScStyleFamilyObj(ScDocShell *pDocSh, SfxStyleFamily eFam)
#define SC_WID_UNO_FOOTERSET
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_VERCENTER(163)
#define SC_UNONAME_SHRINK_TO_FIT
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual css::uno::Type SAL_CALL getElementType() override
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
ScDocShell * GetDocShell()
#define SC_UNONAME_ASIANVERT
#define SC_UNONAME_WRITING
#define SC_UNONAME_ROTREF
#define SC_UNO_PAGE_HDRDYNAMIC
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
virtual SfxStyleSheetBase * First()
constexpr TypedWhichId< ScShrinkToFitCell > ATTR_SHRINKTOFIT(140)
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void getPropertyValue(const SfxItemPropertySimpleEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
#define SC_UNONAME_CWORDMOD
#define OLD_UNO_PAGE_FTRDYNAMIC
#define SC_UNO_PAGE_CENTERVER
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(169)
#define SC_UNO_PAGE_FTRGRF
#define SC_UNO_PAGE_HDRLEFTMAR
#define SC_UNO_PAGE_LEFTHDRCONT
#define SC_UNO_CTL_CFNAME
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
#define SC_UNO_PAGE_HDRBOTTBOR
#define SC_UNONAME_CFNAME
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
#define SC_UNO_PAGE_PRINTGRID
#define SC_UNO_CTL_CFSTYLE
#define SC_UNO_PAGE_HDRRIGHTBDIS
constexpr TypedWhichId< SvxPaperBinItem > ATTR_PAGE_PAPERBIN(160)
#define SC_UNONAME_CHEIGHT
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
#define SC_UNO_PAGE_LEFTBORDER
#define LEFT_BORDER_DISTANCE
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
#define SC_UNO_PAGE_CENTERHOR
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(178)
#define MID_MARGIN_L_MARGIN
OUString GetPaperBinName(sal_uInt16 nPaperBin) const
css::beans::PropertyState getPropertyState_Impl(std::u16string_view PropertyName)
#define SC_UNO_PAGE_HDRON
#define SC_UNONAME_CFPITCH
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_TOPDOWN(173)
#define SC_STYLE_FAMILY_COUNT
#define SC_UNO_PAGE_HDRBODYDIST
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
#define SC_UNONAME_PINDENT
#define MID_HORJUST_ADJUST
#define SC_UNO_PAGE_FTRHEIGHT
#define SC_UNONAME_CFCHARS
#define SC_UNONAME_CUNDLCOL
#define SC_UNONAME_PADJUST
#define SC_UNO_CTL_CWEIGHT
#define SC_UNONAME_TOPBORDER
sal_uInt16 GetWidth() const
SC_DLLPUBLIC SCCOL MaxCol() const
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
#define SC_UNO_PAGE_HDRHEIGHT
#define SC_UNO_CJK_CHEIGHT
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
#define SC_UNO_PAGE_FTRDYNAMIC
bool IsImportingXML() const
#define MID_HORJUST_HORJUST
#define SC_UNO_PAGE_BACKCOLOR
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define SC_UNO_PAGE_WIDTH
virtual sal_Bool SAL_CALL isUserDefined() override
#define SC_UNONAME_PLASTADJ
#define OLD_UNO_PAGE_HDRDYNAMIC
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(182)
#define SCPAGESTYLE_SERVICE
static const SfxItemPropertySet * lcl_GetCellStyleSet()
#define SC_UNONAME_CLOCAL
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getStyleLoaderOptions() override
#define SC_UNONAME_CELLPRO
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
#define SC_UNONAME_HIDDEN
#define SC_UNO_PAGE_FTRBRDDIST
virtual sal_Bool SAL_CALL hasElements() override
#define SC_WID_UNO_HEADERSET
void PageStyleModified(std::u16string_view rStyleName, bool bApi)
#define SC_UNO_PAGE_PRINTHEADER
#define OLD_UNO_PAGE_HDRSHARED
#define SC_UNONAME_CSHADD
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
#define SC_UNO_PAGE_NUMBERTYPE
#define SC_UNO_PAGE_HDRTOPBDIS
virtual sal_Int32 SAL_CALL getCount() override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
#define BOTTOM_BORDER_DISTANCE
OUString ScResId(const char *pId)
const SfxItemPropertyMap & getPropertyMap() const
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HORCENTER(162)
bool IsScUnoWid(sal_uInt16 nWid)
#define LANGUAGE_DONTKNOW
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
void setPropertyValue(const SfxItemPropertySimpleEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
#define SC_UNO_PAGE_FTRTOPBOR
#define SC_UNONAME_DIAGONAL_BLTR2
#define SC_UNONAME_CELLVJUS_METHOD
inline::tools::Long HMMToTwips(::tools::Long nHMM)
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_OBJECTS(171)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
#define MID_GRAPHIC_POSITION
#define SC_UNO_PAGE_GRAPHICURL
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(179)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
#define SC_UNO_PAGE_LEFTFTRCONT
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
#define SC_UNONAME_PISFORBID
SfxItemPool * GetPool() const
#define SC_UNONAME_CELLHJUS
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(180)
constexpr TypedWhichId< ScHyphenateCell > ATTR_HYPHENATE(125)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
#define SC_UNO_PAGE_HEIGHT
UNO3_GETIMPLEMENTATION_IMPL(ScStyleObj)
static css::uno::Reference< css::container::XIndexReplace > CreateEmptyNumberingRules()
#define SC_UNONAME_RIGHTBORDER2
#define MID_MARGIN_UP_MARGIN
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
#define SC_UNO_PAGE_BOTTBORDER
#define SC_UNO_PAGE_TOPBRDDIST
void AddUnoObject(SfxListener &rObject)
#define SC_UNO_PAGE_BACKTRANS
#define SC_UNO_PAGE_PRINTDRAW
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
#define SC_UNO_PAGE_BOTTMARGIN
#define SC_UNONAME_CFSTYLE
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
#define SC_UNO_PAGE_FTRLEFTBDIS
#define OLD_UNO_PAGE_BACKTRANS
#define SC_FAMILYNAME_PAGE
#define SC_WID_UNO_TBLBORD
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual SfxStyleSheetBase * Next()
virtual void SAL_CALL loadStylesFromDocument(const css::uno::Reference< css::lang::XComponent > &aSourceComponent, const css::uno::Sequence< css::beans::PropertyValue > &aOptions) override
#define SC_UNO_PAGE_FTRBOTTBDIS
virtual ~ScStyleFamiliesObj() override
#define MID_FONT_STYLE_NAME
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
#define SC_UNO_PAGE_FTRON
#define SC_UNONAME_DIAGONAL_BLTR
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
virtual css::uno::Type SAL_CALL getElementType() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
#define SC_PAPERBIN_DEFAULTNAME
#define SC_UNO_PAGE_PRINTANNOT
#define SC_UNO_PAGE_RIGHTBRDDIST
static bool lcl_AnyTabProtected(const ScDocument &rDoc)
#define SC_UNO_PAGE_HDRBACKTRAN
Contains the "scale to width/height" attribute in page styles.
SfxStyleSheetBase * pStyle_cached
bool IsScItemWid(sal_uInt16 nWid)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SC_UNONAME_OVERWSTL
#define OLD_UNO_PAGE_BACKCOLOR
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
virtual ~ScStyleObj() override
#define SC_UNO_PAGE_HDRRIGHTBOR
#define SC_UNO_CJK_CWEIGHT
#define SC_UNO_PAGE_FTRGRFFILT
#define SC_UNONAME_SHADOW
#define SC_UNO_PAGE_LEFTMARGIN
ScStyleObj * GetObjectByName_Impl(const OUString &Name)
#define SC_UNONAME_BOTTBORDER
#define OLD_UNO_PAGE_FTRSHARED
ScStyleObj * GetObjectByIndex_Impl(sal_Int32 nIndex)
#define SC_UNONAME_NUMFMT
#define SC_UNO_PAGE_SCALETOX
#define SC_UNO_PAGE_GRAPHIC
constexpr TypedWhichId< SvXMLAttrContainerItem > ATTR_USERDEF(122)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
#define SC_UNO_PAGE_BORDERDIST
#define SC_UNONAME_LOADCELL
#define SC_UNONAME_CFFAMIL
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
inline::tools::Long TwipsToHMM(::tools::Long nTwips)
#define SC_UNO_PAGE_HDRSHARED
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_CHARTS(170)
#define SC_UNONAME_HYPERLINK
#define SC_UNONAME_ROTANG
#define SC_UNONAME_CELLORI
#define SC_UNONAME_CELLVJUS
#define SC_UNONAME_PBMARGIN
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
#define TOP_BORDER_DISTANCE
void RemoveUnoObject(SfxListener &rObject)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
#define SC_UNO_PAGE_FTRGRFLOC
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
#define SC_UNONAME_COVRLCOL
#define MID_GRAPHIC_FILTER
#define SC_UNO_PAGE_GRAPHICLOC
Sequence< sal_Int8 > aSeq
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
#define SC_UNONAME_TOPBORDER2
const ScDocument & GetDocument() const
#define MID_PAGE_ORIENTATION
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
css::uno::Any getPropertyDefault_Impl(std::u16string_view aPropertyName)
#define SC_UNONAME_DIAGONAL_TLBR2
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
#define SC_UNO_CTL_CHEIGHT
void InitDoc(ScDocShell *pNewDocSh, const OUString &rNewName)
#define SC_UNO_PAGE_FIRSTPAGE
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
#define SC_UNONAME_PISCHDIST
SfxStyleFamily GetFamily() const
#define SC_UNO_PAGE_SCALEVAL
const sal_uInt16 * GetRanges() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
#define SC_UNO_PAGE_LEFTBRDDIST
#define SC_UNO_PAGE_FTRSHARED
bool IsUserDefined() const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(181)
#define SC_UNO_PAGE_FTRBODYDIST
void setPropertyValue_Impl(std::u16string_view rPropertyName, const SfxItemPropertySimpleEntry *pEntry, const css::uno::Any *pValue)
#define SC_UNONAME_CSTRIKE
#define OLD_UNO_PAGE_HDRON
virtual void SAL_CALL setAllPropertiesToDefault() override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
virtual sal_Int32 Count()
#define SC_UNONAME_CELLTRAN
#define SC_UNONAME_DIAGONAL_TLBR
constexpr TypedWhichId< SvxWordLineModeItem > ATTR_FONT_WORDLINE(123)
#define SC_FAMILYNAME_CELL
static bool GetBoolFromAny(const css::uno::Any &aAny)
#define SC_UNO_PAGE_LANDSCAPE
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(174)
void SetWidth(sal_uInt16 nWidth)
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
#define SC_UNO_PAGE_PRINTFORMUL
virtual void SAL_CALL loadStylesFromURL(const OUString &URL, const css::uno::Sequence< css::beans::PropertyValue > &aOptions) override
#define SC_UNO_PAGE_BOTTBRDDIST
constexpr TypedWhichId< SfxBoolItem > ATTR_HIDDEN(186)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
#define SC_UNONAME_PISHYPHEN
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(167)
#define SC_UNO_PAGE_HDRLEFTBOR
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
#define SC_UNO_PAGE_HDRLEFTBDIS
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(177)
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
#define SC_UNONAME_RIGHTBORDER
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
constexpr TypedWhichId< SvxHangingPunctuationItem > ATTR_HANGPUNCTUATION(127)
#define SC_UNO_PAGE_RIGHTBORDER
#define SC_UNO_PAGE_FTRRIGHTBDIS
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
#define SC_UNO_CTL_CFPITCH
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
#define OLD_UNO_PAGE_FTRBACKCOL
#define SC_UNO_PAGE_RIGHTHDRCON
#define SC_UNO_PAGE_FTRSHADOW
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(176)
#define SC_UNO_PAGE_FTRBACKTRAN
#define SC_UNO_CJK_CFCHARS
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
static SfxObjectShell * GetShellFromComponent(const css::uno::Reference< css::uno::XInterface > &xComp)
#define SC_UNONAME_PISHANG
#define MID_FONT_CHAR_SET
#define SC_UNO_PAGE_SHADOWFORM
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)
#define SC_UNONAME_COVRLHAS
#define SC_UNONAME_DISPNAME
#define SC_UNO_CTL_CLOCAL
#define SC_UNO_PAGE_FTRRIGHTBOR
#define SC_UNO_PAGE_SCALETOY
static const SfxItemPropertyMap * lcl_GetFooterStyleMap()
#define SC_UNONAME_CCROSS
css::uno::Any getPropertyValue_Impl(std::u16string_view aPropertyName)
constexpr TypedWhichId< SvxForbiddenRuleItem > ATTR_FORBIDDEN_RULES(128)
#define SC_UNONAME_LOADPAGE