LibreOffice Module sc (master) 1
styleuno.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
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 http://mozilla.org/MPL/2.0/.
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 http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <scitems.hxx>
21#include <editeng/memberids.h>
22#include <svx/algitem.hxx>
23#include <editeng/boxitem.hxx>
24#include <editeng/langitem.hxx>
25#include <editeng/numitem.hxx>
26#include <svx/pageitem.hxx>
27#include <editeng/pbinitem.hxx>
28#include <svx/unomid.hxx>
29#include <svx/unoshape.hxx>
30#include <svx/unoshprp.hxx>
31#include <svx/xflbstit.hxx>
32#include <svx/xflbmtit.hxx>
33#include <editeng/unonrule.hxx>
34#include <sfx2/bindings.hxx>
35#include <sfx2/printer.hxx>
36#include <sfx2/sfxsids.hrc>
37#include <utility>
38#include <vcl/virdev.hxx>
39#include <vcl/svapp.hxx>
40#include <svl/itempool.hxx>
41#include <svl/itemset.hxx>
42#include <svl/numformat.hxx>
43#include <svl/intitem.hxx>
44#include <svl/zformat.hxx>
45#include <tools/fract.hxx>
47#include <osl/diagnose.h>
48
49#include <com/sun/star/drawing/BitmapMode.hpp>
50#include <com/sun/star/table/BorderLine.hpp>
51#include <com/sun/star/table/TableBorder.hpp>
52#include <com/sun/star/table/TableBorder2.hpp>
53#include <com/sun/star/table/ShadowFormat.hpp>
54#include <com/sun/star/table/CellHoriJustify.hpp>
55#include <com/sun/star/table/CellOrientation.hpp>
56#include <com/sun/star/style/PageStyleLayout.hpp>
57#include <com/sun/star/style/GraphicLocation.hpp>
58#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
59#include <com/sun/star/util/CellProtection.hpp>
60#include <com/sun/star/awt/FontSlant.hpp>
61#include <com/sun/star/awt/Size.hpp>
62#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
63#include <com/sun/star/lang/Locale.hpp>
64#include <com/sun/star/beans/PropertyAttribute.hpp>
65#include <com/sun/star/graphic/XGraphic.hpp>
68
69#include <CommonProperties.hxx>
70#include <styleuno.hxx>
71#include <docsh.hxx>
72#include <attrib.hxx>
73#include <stlpool.hxx>
74#include <docpool.hxx>
75#include <miscuno.hxx>
76#include <tablink.hxx>
77#include <unonames.hxx>
78#include <unowids.hxx>
79#include <globstr.hrc>
80#include <scresid.hxx>
81#include <cellsuno.hxx>
82#include <stylehelper.hxx>
83
84using namespace ::com::sun::star;
85
87{
88 static const SfxItemPropertyMapEntry aGraphicStyleMap_Impl[] =
89 {
100 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
101 };
102 static SfxItemPropertySet aGraphicStyleSet_Impl( aGraphicStyleMap_Impl );
103 return &aGraphicStyleSet_Impl;
104}
105
107{
108 static const SfxItemPropertyMapEntry aCellStyleMap_Impl[] =
109 {
160 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME,::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
166// {SC_UNONAME_NUMRULES, SC_WID_UNO_NUMRULES,cppu::UnoType<container::XIndexReplace>::get(), 0, 0 },
191 };
192 static SfxItemPropertySet aCellStyleSet_Impl( aCellStyleMap_Impl );
193 return &aCellStyleSet_Impl;
194}
195
196// map with all site attributes including header and footer attributes
197
199{
200 static const SfxItemPropertyMapEntry aPageStyleMap_Impl[] =
201 {
215 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME,::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
221
249
277
318 };
319 static SfxItemPropertySet aPageStyleSet_Impl( aPageStyleMap_Impl );
320 return &aPageStyleSet_Impl;
321}
322
323// map with content of the Header-Item-Sets
324
326{
327 static const SfxItemPropertyMapEntry aHeaderStyleMap_Impl[] =
328 {
358 };
359 static SfxItemPropertyMap aHeaderStyleMap( aHeaderStyleMap_Impl );
360 return &aHeaderStyleMap;
361}
362
363// map with content of the Footer-Item-Sets
364
366{
367 static const SfxItemPropertyMapEntry aFooterStyleMap_Impl[] =
368 {
398 };
399 static SfxItemPropertyMap aFooterStyleMap( aFooterStyleMap_Impl );
400 return &aFooterStyleMap;
401}
402
403// access index on the style types: 0 = Cell, 1 = Page, 2 = Drawing
404
405#define SC_STYLE_FAMILY_COUNT 3
406
407constexpr OUStringLiteral SC_FAMILYNAME_CELL = u"CellStyles";
408constexpr OUStringLiteral SC_FAMILYNAME_PAGE = u"PageStyles";
409constexpr OUStringLiteral SC_FAMILYNAME_GRAPHIC = u"GraphicStyles";
410
411const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page, SfxStyleFamily::Frame };
412
413constexpr OUStringLiteral SCSTYLE_SERVICE = u"com.sun.star.style.Style";
414constexpr OUStringLiteral SCCELLSTYLE_SERVICE = u"com.sun.star.style.CellStyle";
415constexpr OUStringLiteral SCPAGESTYLE_SERVICE = u"com.sun.star.style.PageStyle";
416constexpr OUStringLiteral SCGRAPHICSTYLE_SERVICE = u"com.sun.star.style.GraphicStyle";
417
418SC_SIMPLE_SERVICE_INFO( ScStyleFamiliesObj, "ScStyleFamiliesObj", "com.sun.star.style.StyleFamilies" )
419SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, "ScStyleFamilyObj", "com.sun.star.style.StyleFamily" )
420
421constexpr OUStringLiteral SC_PAPERBIN_DEFAULTNAME = u"[From printer settings]";
422
423static bool lcl_AnyTabProtected( const ScDocument& rDoc )
424{
425 SCTAB nTabCount = rDoc.GetTableCount();
426 for (SCTAB i=0; i<nTabCount; i++)
427 if (rDoc.IsTabProtected(i))
428 return true;
429 return false;
430}
431
433 pDocShell( pDocSh )
434{
436}
437
439{
441
442 if (pDocShell)
444}
445
447{
448 // reference update does not matter here
449
450 if ( rHint.GetId() == SfxHintId::Dying )
451 {
452 pDocShell = nullptr;
453 }
454}
455
456// XStyleFamilies
457
459{
460 if ( pDocShell )
461 {
462 if ( nType == SfxStyleFamily::Para )
463 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
464 else if ( nType == SfxStyleFamily::Page )
465 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
466 else if ( nType == SfxStyleFamily::Frame )
467 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Frame );
468 }
469 OSL_FAIL("getStyleFamilyByType: no DocShell or wrong SfxStyleFamily");
470 return nullptr;
471}
472
474{
477
478 return nullptr; // invalid index
479}
480
482{
483 if ( pDocShell )
484 {
485 if ( aName == SC_FAMILYNAME_CELL )
486 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
487 else if ( aName == SC_FAMILYNAME_PAGE )
488 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
489 else if ( aName == SC_FAMILYNAME_GRAPHIC )
490 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Frame );
491 }
492 // no assertion - called directly from getByName
493 return nullptr;
494}
495
496// container::XIndexAccess
497
499{
501}
502
503uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex )
504{
505 SolarMutexGuard aGuard;
506 uno::Reference< container::XNameContainer > xFamily(GetObjectByIndex_Impl(nIndex));
507 if (!xFamily.is())
508 throw lang::IndexOutOfBoundsException();
509
510 return uno::Any(xFamily);
511}
512
514{
515 return cppu::UnoType<container::XNameContainer>::get(); // has to fit to getByIndex
516}
517
519{
520 SolarMutexGuard aGuard;
521 return ( getCount() != 0 );
522}
523
524// container::XNameAccess
525
526uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const OUString& aName )
527{
528 SolarMutexGuard aGuard;
529 uno::Reference< container::XNameContainer > xFamily(GetObjectByName_Impl(aName));
530 if (!xFamily.is())
531 throw container::NoSuchElementException();
532
533 return uno::Any(xFamily);
534}
535
536uno::Sequence<OUString> SAL_CALL ScStyleFamiliesObj::getElementNames()
537{
539}
540
541sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const OUString& aName )
542{
544}
545
546// style::XStyleLoader
547
548void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL,
549 const uno::Sequence<beans::PropertyValue>& aOptions )
550{
553
554 OUString aFilter; // empty - detect
555 OUString aFiltOpt;
556 uno::Reference<io::XInputStream> xInputStream;
557 if (aURL == "private:stream")
558 {
559 for (const auto& rProp : aOptions)
560 {
561 if (rProp.Name == "InputStream")
562 {
563 rProp.Value >>= xInputStream;
564 if (!xInputStream.is())
565 {
566 throw lang::IllegalArgumentException(
567 "Parameter 'InputStream' could not be converted "
568 "to type 'com::sun::star::io::XInputStream'",
569 nullptr, 0);
570 }
571 break;
572 }
573 }
574 }
575
576 ScDocumentLoader aLoader( aURL, aFilter, aFiltOpt, 0, nullptr, xInputStream );
577
578 ScDocShell* pSource = aLoader.GetDocShell();
579
580 loadStylesFromDocShell(pSource, aOptions);
581}
582
583uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderOptions()
584{
585 // return defaults for options (?)
587 { SC_UNONAME_OVERWSTL, uno::Any(true) },
588 { SC_UNONAME_LOADCELL, uno::Any(true) },
590 });
591}
592
593// style::XStyleLoader2
594
595void SAL_CALL ScStyleFamiliesObj::loadStylesFromDocument( const uno::Reference < lang::XComponent > & aSourceComponent,
596 const uno::Sequence<beans::PropertyValue>& aOptions )
597{
598 // Source document docShell
599 if ( !aSourceComponent.is() )
600 throw uno::RuntimeException();
601
602 ScDocShell* pDocShellSrc = dynamic_cast<ScDocShell*> (SfxObjectShell::GetShellFromComponent(aSourceComponent));
603
604 loadStylesFromDocShell(pDocShellSrc, aOptions);
605}
606
607// private
608
610 const uno::Sequence<beans::PropertyValue>& aOptions )
611{
612
613 if ( !(pSource && pDocShell) )
614 return;
615
616 // collect options
617
618 bool bLoadReplace = true; // defaults
619 bool bLoadCellStyles = true;
620 bool bLoadPageStyles = true;
621
622 for (const beans::PropertyValue& rProp : aOptions)
623 {
624 OUString aPropName(rProp.Name);
625
627 bLoadReplace = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
628 else if (aPropName == SC_UNONAME_LOADCELL)
629 bLoadCellStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
630 else if (aPropName == SC_UNONAME_LOADPAGE)
631 bLoadPageStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
632 }
633
634 pDocShell->LoadStylesArgs( *pSource, bLoadReplace, bLoadCellStyles, bLoadPageStyles );
635 pDocShell->SetDocumentModified(); // paint is inside LoadStyles
636}
637
639 pDocShell( pDocSh ),
640 eFamily( eFam )
641{
643}
644
646{
648
649 if (pDocShell)
651}
652
654{
655 // reference update does not matter here
656
657 if ( rHint.GetId() == SfxHintId::Dying )
658 {
659 pDocShell = nullptr; // has become invalid
660 }
661}
662
663// XStyleFamily
664
666{
667 if ( pDocShell )
668 {
670 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
671
672 SfxStyleSheetIterator aIter( pStylePool, eFamily );
673 if ( nIndex < aIter.Count() )
674 {
675 SfxStyleSheetBase* pStyle = aIter[nIndex];
676 if ( pStyle )
677 {
678 return new ScStyleObj( pDocShell, eFamily, pStyle->GetName() );
679 }
680 }
681 }
682 return nullptr;
683}
684
686{
687 if ( pDocShell )
688 {
690 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
691 if ( pStylePool->Find( aName, eFamily ) )
692 return new ScStyleObj( pDocShell, eFamily, aName );
693 }
694 return nullptr;
695}
696
697void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::Any& aElement )
698{
699 SolarMutexGuard aGuard;
700 bool bDone = false;
701 // reflection does not need to be uno::XInterface, can be any interface...
702 uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
703 if ( xInterface.is() )
704 {
705 ScStyleObj* pStyleObj = dynamic_cast<ScStyleObj*>( xInterface.get() );
706 if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
707 !pStyleObj->IsInserted() ) // not yet inserted?
708 {
710
712 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
713
716
717 if ( pStylePool->Find( aNameStr, eFamily ) ) // not available yet
718 throw container::ElementExistException();
719
720 (void)pStylePool->Make( aNameStr, eFamily, SfxStyleSearchBits::UserDefined );
721
722 if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
723 rDoc.GetPool()->CellStyleCreated( aNameStr, rDoc );
724
725 pStyleObj->InitDoc( pDocShell, aNameStr ); // object can be used
726
727 if (!rDoc.IsImportingXML())
728 pDocShell->SetDocumentModified(); // new style not used yet
729 bDone = true;
730
731 }
732 }
733
734 if (!bDone)
735 {
736 // other errors are handled above
737 throw lang::IllegalArgumentException();
738 }
739}
740
741void SAL_CALL ScStyleFamilyObj::replaceByName( const OUString& aName, const uno::Any& aElement )
742{
743 SolarMutexGuard aGuard;
746 insertByName( aName, aElement );
747}
748
749void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
750{
751 SolarMutexGuard aGuard;
752 bool bFound = false;
753 if ( pDocShell )
754 {
756
758 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
759
762
763 SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily );
764 if (pStyle)
765 {
766 bFound = true;
767 if ( eFamily == SfxStyleFamily::Para )
768 {
769 // like ScViewFunc::RemoveStyleSheetInUse
771 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
772 double nPPTX = aLogic.X() / 1000.0;
773 double nPPTY = aLogic.Y() / 1000.0;
774 Fraction aZoom(1,1);
775 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
778
779 pStylePool->Remove( pStyle );
780
782 }
783 else if ( eFamily == SfxStyleFamily::Page )
784 {
785 if ( rDoc.RemovePageStyleInUse( aString ) )
786 pDocShell->PageStyleModified( ScResId(STR_STYLENAME_STANDARD), true );
787
788 pStylePool->Remove( pStyle );
789
790 SfxBindings* pBindings = pDocShell->GetViewBindings();
791 if (pBindings)
792 pBindings->Invalidate( SID_STYLE_FAMILY4 );
794 }
795 else
796 {
797 pStylePool->Remove( pStyle );
798
799 SfxBindings* pBindings = pDocShell->GetViewBindings();
800 if (pBindings)
801 pBindings->Invalidate( SID_STYLE_FAMILY3 );
803 }
804 }
805 }
806
807 if (!bFound)
808 throw container::NoSuchElementException();
809}
810
811// container::XIndexAccess
812
813sal_Int32 SAL_CALL ScStyleFamilyObj::getCount()
814{
815 SolarMutexGuard aGuard;
816 if ( pDocShell )
817 {
819 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
820
821 SfxStyleSheetIterator aIter( pStylePool, eFamily );
822 return aIter.Count();
823 }
824 return 0;
825}
826
827uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex )
828{
829 SolarMutexGuard aGuard;
830 uno::Reference< style::XStyle > xObj(GetObjectByIndex_Impl(nIndex));
831 if (!xObj.is())
832 throw lang::IndexOutOfBoundsException();
833
834 return uno::Any(xObj);
835}
836
838{
839 return cppu::UnoType<style::XStyle>::get(); // has to fit to getByIndex
840}
841
843{
844 SolarMutexGuard aGuard;
845 return ( getCount() != 0 );
846}
847
848// container::XNameAccess
849
850uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName )
851{
852 SolarMutexGuard aGuard;
853 uno::Reference< style::XStyle > xObj(
855 if (!xObj.is())
856 throw container::NoSuchElementException();
857
858 return uno::Any(xObj);
859}
860
861uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
862{
863 SolarMutexGuard aGuard;
864 if ( pDocShell )
865 {
867 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
868
869 SfxStyleSheetIterator aIter( pStylePool, eFamily );
870 sal_uInt16 nCount = aIter.Count();
871
872 uno::Sequence<OUString> aSeq(nCount);
873 OUString* pAry = aSeq.getArray();
874 SfxStyleSheetBase* pStyle = aIter.First();
875 sal_uInt16 nPos = 0;
876 while (pStyle)
877 {
878 OSL_ENSURE( nPos < nCount, "Count is wrong" );
879 if (nPos < nCount)
881 pStyle->GetName(), eFamily );
882 pStyle = aIter.Next();
883 }
884 return aSeq;
885 }
886 return uno::Sequence<OUString>();
887}
888
889sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName )
890{
891 SolarMutexGuard aGuard;
892 if ( pDocShell )
893 {
895
897 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
898 if ( pStylePool->Find( aString, eFamily ) )
899 return true;
900 }
901 return false;
902}
903
904// XPropertySet
905
906uno::Reference< beans::XPropertySetInfo > SAL_CALL ScStyleFamilyObj::getPropertySetInfo( )
907{
908 OSL_FAIL( "###unexpected!" );
909 return uno::Reference< beans::XPropertySetInfo >();
910}
911
912void SAL_CALL ScStyleFamilyObj::setPropertyValue( const OUString&, const uno::Any& )
913{
914 OSL_FAIL( "###unexpected!" );
915}
916
917uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyName )
918{
919 uno::Any aRet;
920
921 if ( sPropertyName != "DisplayName" )
922 {
923 throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, getXWeak() );
924 }
925
926 SolarMutexGuard aGuard;
927 TranslateId pResId;
928 switch ( eFamily )
929 {
930 case SfxStyleFamily::Para:
931 pResId = STR_STYLE_FAMILY_CELL; break;
932 case SfxStyleFamily::Page:
933 pResId = STR_STYLE_FAMILY_PAGE; break;
934 case SfxStyleFamily::Frame:
935 pResId = STR_STYLE_FAMILY_GRAPHICS; break;
936 default:
937 OSL_FAIL( "ScStyleFamilyObj::getPropertyValue(): invalid family" );
938 }
939 if (pResId)
940 {
941 OUString sDisplayName(ScResId(pResId));
942 aRet <<= sDisplayName;
943 }
944
945 return aRet;
946}
947
948void SAL_CALL ScStyleFamilyObj::addPropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& )
949{
950 OSL_FAIL( "###unexpected!" );
951}
952
953void SAL_CALL ScStyleFamilyObj::removePropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& )
954{
955 OSL_FAIL( "###unexpected!" );
956}
957
958void SAL_CALL ScStyleFamilyObj::addVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& )
959{
960 OSL_FAIL( "###unexpected!" );
961}
962
963void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& )
964{
965 OSL_FAIL( "###unexpected!" );
966}
967
968// default ctor is needed for reflection
969
971 : pDocShell(pDocSh)
972 , eFamily(eFam)
973 , aStyleName(std::move(aName))
974 , pStyle_cached(nullptr)
975{
976 if (eFam == SfxStyleFamily::Para)
978 else if (eFam == SfxStyleFamily::Page)
980 else
982
983 // if create by ServiceProvider then pDocShell is NULL
984
985 if (pDocShell)
987}
988
989void ScStyleObj::InitDoc( ScDocShell* pNewDocSh, const OUString& rNewName )
990{
991 if ( pNewDocSh && !pDocShell )
992 {
993 aStyleName = rNewName;
994 pDocShell = pNewDocSh;
996 }
997}
998
1000{
1002
1003 if (pDocShell)
1005}
1006
1008{
1009 // reference update does not matter here
1010
1011 if ( rHint.GetId() == SfxHintId::Dying )
1012 {
1013 pDocShell = nullptr; // has become invalid
1014 }
1015}
1016
1018{
1019 if ( bUseCachedValue )
1020 return pStyle_cached;
1021
1022 pStyle_cached = nullptr;
1023 if ( pDocShell )
1024 {
1025 ScDocument& rDoc = pDocShell->GetDocument();
1026 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
1027 pStyle_cached = pStylePool->Find( aStyleName, eFamily );
1028 }
1029 return pStyle_cached;
1030}
1031
1032// style::XStyle
1033
1035{
1036 SolarMutexGuard aGuard;
1037 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1038 if (pStyle)
1039 return pStyle->IsUserDefined();
1040 return false;
1041}
1042
1044{
1045 SolarMutexGuard aGuard;
1046 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1047 if (pStyle)
1048 return pStyle->IsUsed();
1049 return false;
1050}
1051
1053{
1054 SolarMutexGuard aGuard;
1055 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1056 if (pStyle)
1058 return OUString();
1059}
1060
1061void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
1062{
1063 SolarMutexGuard aGuard;
1064 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1065 if (!pStyle)
1066 return;
1067
1068 // cell styles cannot be modified if any sheet is protected
1069 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1070 return;
1071
1074
1075 OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, eFamily ));
1076 bool bOk = pStyle->SetParent( aString );
1077 if (!bOk)
1078 return;
1079
1080 // as by setPropertyValue
1081
1082 ScDocument& rDoc = pDocShell->GetDocument();
1083 if ( eFamily == SfxStyleFamily::Para )
1084 {
1085 // update line height
1086
1088 Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapMode(MapUnit::MapTwip));
1089 double nPPTX = aLogic.X() / 1000.0;
1090 double nPPTY = aLogic.Y() / 1000.0;
1091 Fraction aZoom(1,1);
1092 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1093
1094 if (!rDoc.IsImportingXML())
1095 {
1098 }
1099 }
1100 else if ( eFamily == SfxStyleFamily::Page )
1101 {
1103
1105 }
1106 else
1107 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1108}
1109
1110// container::XNamed
1111
1112OUString SAL_CALL ScStyleObj::getName()
1113{
1114 SolarMutexGuard aGuard;
1115 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1116 if (pStyle)
1118 return OUString();
1119}
1120
1121void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
1122{
1123 SolarMutexGuard aGuard;
1124 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1125 if (!pStyle)
1126 return;
1127
1128 // cell styles cannot be renamed if any sheet is protected
1129 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1130 return;
1131
1134
1135 bool bOk = pStyle->SetName( aNewName );
1136 if (!bOk)
1137 return;
1138
1139 aStyleName = aNewName;
1140
1141 ScDocument& rDoc = pDocShell->GetDocument();
1142 if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
1143 rDoc.GetPool()->CellStyleCreated( aNewName, rDoc );
1144
1145 // cell styles = 2, drawing styles = 3, page styles = 4
1146 sal_uInt16 nId = eFamily == SfxStyleFamily::Para ? SID_STYLE_FAMILY2 :
1147 (eFamily == SfxStyleFamily::Page ? SID_STYLE_FAMILY4 : SID_STYLE_FAMILY3);
1148 SfxBindings* pBindings = pDocShell->GetViewBindings();
1149 if (pBindings)
1150 {
1151 pBindings->Invalidate( nId );
1152 pBindings->Invalidate( SID_STYLE_APPLY );
1153 }
1154}
1155
1156uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
1157{
1158 SvxNumRule aRule( SvxNumRuleFlags::NONE, 0, true ); // nothing supported
1159 return SvxCreateNumRule( aRule );
1160}
1161
1162// beans::XPropertyState
1163
1164const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( std::u16string_view rPropName,
1165 const SfxItemPropertyMapEntry*& rpResultEntry )
1166{
1167 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1168 if ( pStyle )
1169 {
1170 const SfxItemPropertyMapEntry* pEntry = nullptr;
1171 if ( eFamily == SfxStyleFamily::Page )
1172 {
1173 pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
1174 if ( pEntry ) // only item-WIDs in header/footer map
1175 {
1176 rpResultEntry = pEntry;
1177 return &pStyle->GetItemSet().Get(ATTR_PAGE_HEADERSET).GetItemSet();
1178 }
1179 pEntry = lcl_GetFooterStyleMap()->getByName( rPropName );
1180 if ( pEntry ) // only item-WIDs in header/footer map
1181 {
1182 rpResultEntry = pEntry;
1183 return &pStyle->GetItemSet().Get(ATTR_PAGE_FOOTERSET).GetItemSet();
1184 }
1185 }
1186 pEntry = pPropSet->getPropertyMap().getByName( rPropName );
1187 if ( pEntry )
1188 {
1189 rpResultEntry = pEntry;
1190 return &pStyle->GetItemSet();
1191 }
1192 }
1193
1194 rpResultEntry = nullptr;
1195 return nullptr;
1196}
1197
1198beans::PropertyState ScStyleObj::getPropertyState_Impl( std::u16string_view aPropertyName )
1199{
1200 beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
1201
1202 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1203 const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1204
1205 if ( pItemSet && pResultEntry )
1206 {
1207 sal_uInt16 nWhich = pResultEntry->nWID;
1208 if ( nWhich == SC_WID_UNO_TBLBORD || nWhich == SC_WID_UNO_TBLBORD2 )
1209 {
1210 nWhich = ATTR_BORDER;
1211 }
1212 if ( nWhich == OWN_ATTR_FILLBMP_MODE )
1213 {
1214 if ( pItemSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET ||
1215 pItemSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET )
1216 {
1217 eRet = beans::PropertyState_DIRECT_VALUE;
1218 }
1219 else
1220 {
1221 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1222 }
1223 }
1224 else if ( nWhich == SDRATTR_TEXTDIRECTION )
1225 {
1226 eRet = beans::PropertyState_DEFAULT_VALUE;
1227 }
1228 else if ( IsScItemWid( nWhich ) || eFamily == SfxStyleFamily::Frame )
1229 {
1230 SfxItemState eState = pItemSet->GetItemState( nWhich, false );
1231
1232// // if no rotate value is set, look at orientation
1233// //! also for a fixed value of 0 (in case orientation is ambiguous)?
1234// if ( nWhich == ATTR_ROTATE_VALUE && eState == SfxItemState::DEFAULT )
1235// eState = pItemSet->GetItemState( ATTR_ORIENTATION, sal_False );
1236
1237 if ( eState == SfxItemState::SET )
1238 eRet = beans::PropertyState_DIRECT_VALUE;
1239 else if ( eState == SfxItemState::DEFAULT )
1240 eRet = beans::PropertyState_DEFAULT_VALUE;
1241 else
1242 {
1243 assert(eFamily == SfxStyleFamily::Frame);
1244 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1245 }
1246 }
1247 }
1248 return eRet;
1249}
1250
1251beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPropertyName )
1252{
1253 SolarMutexGuard aGuard;
1254 GetStyle_Impl();
1255
1256 return getPropertyState_Impl( aPropertyName );
1257}
1258
1259uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates( const uno::Sequence<OUString>& aPropertyNames )
1260{
1261 SolarMutexGuard aGuard;
1262 GetStyle_Impl();
1263
1264 uno::Sequence<beans::PropertyState> aRet( aPropertyNames.getLength() );
1265 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aRet.getArray(),
1266 [this](const OUString& rName) -> beans::PropertyState { return getPropertyState_Impl(rName); });
1267 return aRet;
1268}
1269
1270void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName )
1271{
1272 SolarMutexGuard aGuard;
1273 GetStyle_Impl();
1274
1275 const SfxItemPropertyMapEntry* pEntry = pPropSet->getPropertyMap().getByName( aPropertyName );
1276 if ( !pEntry )
1277 throw beans::UnknownPropertyException(aPropertyName);
1278
1279 setPropertyValue_Impl( aPropertyName, pEntry, nullptr );
1280}
1281
1282uno::Any ScStyleObj::getPropertyDefault_Impl( std::u16string_view aPropertyName )
1283{
1284 uno::Any aAny;
1285
1286 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1287 const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1288
1289 if ( pStyleSet && pResultEntry )
1290 {
1291 sal_uInt16 nWhich = pResultEntry->nWID;
1292
1293 if ( IsScItemWid( nWhich ) )
1294 {
1295 // Default is default from ItemPool, not from Standard-Style,
1296 // so it is the same as in setPropertyToDefault
1297 SfxItemSet aEmptySet( *pStyleSet->GetPool(), pStyleSet->GetRanges() );
1298 // default items with wrong Slot-ID are not functional in SfxItemPropertySet3
1300 if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich &&
1301 aEmptySet.GetItemState(nWhich, false) == SfxItemState::DEFAULT )
1302 {
1303 aEmptySet.Put( aEmptySet.Get( nWhich ) );
1304 }
1305 const SfxItemSet* pItemSet = &aEmptySet;
1306
1307 switch ( nWhich ) // special item handling
1308 {
1309 case ATTR_VALUE_FORMAT:
1310 // default has no language set
1311 aAny <<= sal_Int32( static_cast<const SfxUInt32Item&>(pItemSet->Get(nWhich)).GetValue() );
1312 break;
1313 case ATTR_INDENT:
1314 aAny <<= sal_Int16( convertTwipToMm100(static_cast<const ScIndentItem&>(
1315 pItemSet->Get(nWhich)).GetValue()) );
1316 break;
1317 case ATTR_PAGE_SCALE:
1320 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->Get(nWhich)).GetValue() );
1321 break;
1322 case ATTR_PAGE_CHARTS:
1323 case ATTR_PAGE_OBJECTS:
1324 case ATTR_PAGE_DRAWINGS:
1326 aAny <<= static_cast<const ScViewObjectModeItem&>(pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW;
1327 break;
1328 case ATTR_PAGE_SCALETO:
1329 {
1330 const ScPageScaleToItem aItem(static_cast<const ScPageScaleToItem&>(pItemSet->Get(nWhich)));
1331 if ( aPropertyName == SC_UNO_PAGE_SCALETOX )
1332 aAny <<= static_cast<sal_Int16>(aItem.GetWidth());
1333 else
1334 aAny <<= static_cast<sal_Int16>(aItem.GetHeight());
1335 }
1336 break;
1337 default:
1338 pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
1339 }
1340 }
1341 else if ( IsScUnoWid( nWhich ) )
1342 {
1343 SfxItemSet aEmptySet( *pStyleSet->GetPool(), pStyleSet->GetRanges() );
1344 const SfxItemSet* pItemSet = &aEmptySet;
1345 switch ( nWhich )
1346 {
1347 case SC_WID_UNO_TBLBORD:
1349 {
1350 const SfxPoolItem& rItem = pItemSet->Get(ATTR_BORDER);
1351 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1353 if (nWhich == SC_WID_UNO_TBLBORD2)
1354 ScHelperFunctions::AssignTableBorder2ToAny(aAny, aOuter, aInner, true);
1355 else
1356 ScHelperFunctions::AssignTableBorderToAny(aAny, aOuter, aInner, true);
1357 }
1358 break;
1359 }
1360 }
1361 else if ( nWhich == SDRATTR_TEXTDIRECTION )
1362 {
1363 aAny <<= false;
1364 }
1365 else if ( nWhich == OWN_ATTR_FILLBMP_MODE )
1366 {
1367 aAny <<= css::drawing::BitmapMode_REPEAT;
1368 }
1369 else if ( nWhich != OWN_ATTR_TEXTCOLUMNS )
1370 {
1371 SfxItemSet aItemSet(*pStyleSet->GetPool(), pStyleSet->GetRanges());
1372 aAny = SvxItemPropertySet_getPropertyValue(pResultEntry, aItemSet);
1373 }
1374 }
1375 return aAny;
1376}
1377
1378uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName )
1379{
1380 SolarMutexGuard aGuard;
1381 GetStyle_Impl();
1382
1383 return getPropertyDefault_Impl( aPropertyName );
1384}
1385
1386uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults( const uno::Sequence<OUString>& aPropertyNames )
1387{
1388 SolarMutexGuard aGuard;
1389 GetStyle_Impl();
1390
1391 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1392 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.getArray(),
1393 [this](const OUString& rName) -> uno::Any { return getPropertyDefault_Impl(rName); });
1394 return aSequence;
1395}
1396
1397// XMultiPropertySet
1398
1399void SAL_CALL ScStyleObj::setPropertyValues( const uno::Sequence< OUString >& aPropertyNames,
1400 const uno::Sequence< uno::Any >& aValues )
1401{
1402 SolarMutexGuard aGuard;
1403 GetStyle_Impl();
1404
1405 if ( aValues.getLength() != aPropertyNames.getLength() )
1406 throw lang::IllegalArgumentException();
1407
1408 const OUString* pNames = aPropertyNames.getConstArray();
1409 const uno::Any* pValues = aValues.getConstArray();
1410 const SfxItemPropertyMap& rPropertyMap = pPropSet->getPropertyMap();
1411 for ( sal_Int32 i = 0; i < aPropertyNames.getLength(); i++ )
1412 {
1413 const SfxItemPropertyMapEntry* pEntry = rPropertyMap.getByName( pNames[i] );
1414 setPropertyValue_Impl( pNames[i], pEntry, &pValues[i] );
1415 }
1416}
1417
1418uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyValues( const uno::Sequence< OUString >& aPropertyNames )
1419{
1420 SolarMutexGuard aGuard;
1421 GetStyle_Impl();
1422
1423 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1424 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.getArray(),
1425 [this](const OUString& rName) -> uno::Any { return getPropertyValue_Impl(rName); });
1426 return aSequence;
1427}
1428
1429void SAL_CALL ScStyleObj::addPropertiesChangeListener( const uno::Sequence<OUString>& /* aPropertyNames */,
1430 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1431{
1432 // no bound properties
1433}
1434
1436 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1437{
1438 // no bound properties
1439}
1440
1441void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<OUString>& /* aPropertyNames */,
1442 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1443{
1444 // no bound properties
1445}
1446
1447// XMultiPropertyStates
1448// getPropertyStates already defined for XPropertyState
1449
1451{
1452 SolarMutexGuard aGuard;
1453
1454 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1455 if ( !pStyle )
1456 return;
1457
1458 // cell styles cannot be modified if any sheet is protected
1459 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1460 throw uno::RuntimeException();
1461
1462 SfxItemSet& rSet = pStyle->GetItemSet();
1463 rSet.ClearItem(); // set all items to default
1464
1466
1467 ScDocument& rDoc = pDocShell->GetDocument();
1468 if ( eFamily == SfxStyleFamily::Para )
1469 {
1470 // row heights
1471
1473 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
1474 double nPPTX = aLogic.X() / 1000.0;
1475 double nPPTY = aLogic.Y() / 1000.0;
1476 Fraction aZoom(1,1);
1477 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1478
1479 if (!rDoc.IsImportingXML())
1480 {
1483 }
1484 }
1485 else if ( eFamily == SfxStyleFamily::Page )
1486 {
1487 // #i22448# apply the default BoxInfoItem for page styles again
1488 // (same content as in ScStyleSheet::GetItemSet, to control the dialog)
1489 SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
1490 aBoxInfoItem.SetTable( false );
1491 aBoxInfoItem.SetDist( true );
1492 aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
1493 rSet.Put( aBoxInfoItem );
1494
1496 }
1497 else
1498 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1499}
1500
1501void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>& aPropertyNames )
1502{
1503 SolarMutexGuard aGuard;
1504 GetStyle_Impl();
1505
1506 const SfxItemPropertyMap& rPropertyMap = pPropSet->getPropertyMap();
1507 for ( const OUString& rName : aPropertyNames )
1508 {
1509 const SfxItemPropertyMapEntry* pEntry = rPropertyMap.getByName( rName );
1510 setPropertyValue_Impl( rName, pEntry, nullptr );
1511 }
1512}
1513
1514// beans::XPropertySet
1515
1516uno::Reference<beans::XPropertySetInfo> SAL_CALL ScStyleObj::getPropertySetInfo()
1517{
1518 SolarMutexGuard aGuard;
1519 return pPropSet->getPropertySetInfo();
1520}
1521
1522void SAL_CALL ScStyleObj::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
1523{
1524 SolarMutexGuard aGuard;
1525 GetStyle_Impl();
1526
1527 const SfxItemPropertyMapEntry* pEntry = pPropSet->getPropertyMap().getByName( aPropertyName );
1528 if ( !pEntry )
1529 throw beans::UnknownPropertyException(aPropertyName);
1530
1531 setPropertyValue_Impl( aPropertyName, pEntry, &aValue );
1532}
1533
1534void ScStyleObj::setPropertyValue_Impl( std::u16string_view rPropertyName, const SfxItemPropertyMapEntry* pEntry, const uno::Any* pValue )
1535{
1536 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1537 if ( !(pStyle && pEntry) )
1538 return;
1539
1540 // cell styles cannot be modified if any sheet is protected
1541 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1542 throw uno::RuntimeException();
1543
1544 SfxItemSet& rSet = pStyle->GetItemSet(); // change directly in active Style
1545 bool bDone = false;
1546 if ( eFamily == SfxStyleFamily::Page )
1547 {
1548 if(pEntry->nWID == SC_WID_UNO_HEADERSET)
1549 {
1550 const SfxItemPropertyMapEntry* pHeaderEntry = lcl_GetHeaderStyleMap()->getByName( rPropertyName );
1551 if ( pHeaderEntry ) // only item-WIDs in header/footer map
1552 {
1553 SvxSetItem aNewHeader( rSet.Get(ATTR_PAGE_HEADERSET) );
1554 if (pValue)
1555 pPropSet->setPropertyValue( *pHeaderEntry, *pValue, aNewHeader.GetItemSet() );
1556 else
1557 aNewHeader.GetItemSet().ClearItem( pHeaderEntry->nWID );
1558 rSet.Put( aNewHeader );
1559 bDone = true;
1560 }
1561 }
1562 else if(pEntry->nWID == SC_WID_UNO_FOOTERSET)
1563 {
1564 const SfxItemPropertyMapEntry* pFooterEntry = lcl_GetFooterStyleMap()->getByName( rPropertyName );
1565 if ( pFooterEntry ) // only item-WIDs in header/footer map
1566 {
1567 SvxSetItem aNewFooter( rSet.Get(ATTR_PAGE_FOOTERSET) );
1568 if (pValue)
1569 pPropSet->setPropertyValue( *pFooterEntry, *pValue, aNewFooter.GetItemSet() );
1570 else
1571 aNewFooter.GetItemSet().ClearItem( pFooterEntry->nWID );
1572 rSet.Put( aNewFooter );
1573 bDone = true;
1574 }
1575 }
1576 }
1577 if (!bDone)
1578 {
1579 if (IsScItemWid(pEntry->nWID))
1580 {
1581 if (pValue)
1582 {
1583 switch (pEntry->nWID) // special item handling
1584 {
1585 case ATTR_VALUE_FORMAT:
1586 {
1587 // language for number formats
1588 SvNumberFormatter* pFormatter
1590 sal_uInt32 nOldFormat = rSet.Get(ATTR_VALUE_FORMAT).GetValue();
1591 LanguageType eOldLang
1592 = rSet.Get(ATTR_LANGUAGE_FORMAT).GetLanguage();
1593 pFormatter->GetFormatForLanguageIfBuiltIn(nOldFormat, eOldLang);
1594
1595 sal_uInt32 nNewFormat = 0;
1596 *pValue >>= nNewFormat;
1598
1599 const SvNumberformat* pNewEntry = pFormatter->GetEntry(nNewFormat);
1600 LanguageType eNewLang
1601 = pNewEntry ? pNewEntry->GetLanguage() : LANGUAGE_DONTKNOW;
1602 if (eNewLang != eOldLang && eNewLang != LANGUAGE_DONTKNOW)
1604
1606 }
1607 break;
1608 case ATTR_INDENT:
1609 {
1610 sal_Int16 nVal = 0;
1611 *pValue >>= nVal;
1613 }
1614 break;
1615 case ATTR_ROTATE_VALUE:
1616 {
1617 sal_Int32 nRotVal = 0;
1618 if (*pValue >>= nRotVal)
1619 {
1620 // stored value is always between 0 and 360 deg.
1621 nRotVal %= 36000;
1622 if (nRotVal < 0)
1623 nRotVal += 36000;
1625 }
1626 }
1627 break;
1628 case ATTR_STACKED:
1629 {
1630 table::CellOrientation eOrient;
1631 if (*pValue >>= eOrient)
1632 {
1633 switch (eOrient)
1634 {
1635 case table::CellOrientation_STANDARD:
1637 break;
1638 case table::CellOrientation_TOPBOTTOM:
1640 rSet.Put(ScRotateValueItem(27000_deg100));
1641 break;
1642 case table::CellOrientation_BOTTOMTOP:
1644 rSet.Put(ScRotateValueItem(9000_deg100));
1645 break;
1646 case table::CellOrientation_STACKED:
1648 break;
1649 default:
1650 {
1651 // added to avoid warnings
1652 }
1653 }
1654 }
1655 }
1656 break;
1657 case ATTR_PAGE_SCALE:
1659 {
1663 sal_Int16 nVal = 0;
1664 *pValue >>= nVal;
1665 rSet.Put(SfxUInt16Item(pEntry->nWID, nVal));
1666 }
1667 break;
1669 {
1670 sal_Int16 nVal = 0;
1671 *pValue >>= nVal;
1673 }
1674 break;
1675 case ATTR_PAGE_CHARTS:
1676 case ATTR_PAGE_OBJECTS:
1677 case ATTR_PAGE_DRAWINGS:
1678 {
1679 bool bBool = false;
1680 *pValue >>= bBool;
1683 pEntry->nWID, bBool ? VOBJ_MODE_SHOW : VOBJ_MODE_HIDE));
1684 }
1685 break;
1686 case ATTR_PAGE_PAPERBIN:
1687 {
1689 bool bFound = false;
1690
1691 OUString aName;
1692 if (*pValue >>= aName)
1693 {
1695 bFound = true;
1696 else
1697 {
1698 Printer* pPrinter = pDocShell->GetPrinter();
1699 if (pPrinter)
1700 {
1701 const sal_uInt16 nCount = pPrinter->GetPaperBinCount();
1702 for (sal_uInt16 i = 0; i < nCount; i++)
1703 if (aName == pPrinter->GetPaperBinName(i))
1704 {
1705 nTray = static_cast<sal_uInt8>(i);
1706 bFound = true;
1707 break;
1708 }
1709 }
1710 }
1711 }
1712 if (!bFound)
1713 throw lang::IllegalArgumentException();
1714
1716
1717 }
1718 break;
1719 case ATTR_PAGE_SCALETO:
1720 {
1721 sal_Int16 nPages = 0;
1722 if (*pValue >>= nPages)
1723 {
1725 if (rPropertyName == SC_UNO_PAGE_SCALETOX)
1726 aItem.SetWidth(static_cast<sal_uInt16>(nPages));
1727 else
1728 aItem.SetHeight(static_cast<sal_uInt16>(nPages));
1729 rSet.Put(aItem);
1732 }
1733 }
1734 break;
1735 case ATTR_HIDDEN:
1736 {
1737 bool bHidden = false;
1738 if (*pValue >>= bHidden)
1739 pStyle->SetHidden(bHidden);
1740 }
1741 break;
1742 default:
1743 // default items with wrong Slot-ID are not working in SfxItemPropertySet3
1745 if (rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID
1746 && rSet.GetItemState(pEntry->nWID, false) == SfxItemState::DEFAULT)
1747 {
1748 rSet.Put(rSet.Get(pEntry->nWID));
1749 }
1750 pPropSet->setPropertyValue(*pEntry, *pValue, rSet);
1751 }
1752 }
1753 else
1754 {
1755 rSet.ClearItem(pEntry->nWID);
1756 // language for number formats
1757 if (pEntry->nWID == ATTR_VALUE_FORMAT)
1759
1761 }
1762 }
1763 else if (IsScUnoWid(pEntry->nWID))
1764 {
1765 switch (pEntry->nWID)
1766 {
1767 case SC_WID_UNO_TBLBORD:
1768 {
1769 if (pValue)
1770 {
1771 table::TableBorder aBorder;
1772 if (*pValue >>= aBorder)
1773 {
1774 SvxBoxItem aOuter(ATTR_BORDER);
1776 ScHelperFunctions::FillBoxItems(aOuter, aInner, aBorder);
1777 rSet.Put(aOuter);
1778 }
1779 }
1780 else
1781 {
1783 }
1784 }
1785 break;
1787 {
1788 if (pValue)
1789 {
1790 table::TableBorder2 aBorder2;
1791 if (*pValue >>= aBorder2)
1792 {
1793 SvxBoxItem aOuter(ATTR_BORDER);
1795 ScHelperFunctions::FillBoxItems(aOuter, aInner, aBorder2);
1796 rSet.Put(aOuter);
1797 }
1798 }
1799 else
1800 {
1802 }
1803 }
1804 break;
1805 }
1806 }
1807 else if (pEntry->nWID == OWN_ATTR_FILLBMP_MODE)
1808 {
1809 css::drawing::BitmapMode eMode;
1810 if (!pValue)
1811 {
1814 }
1815 else if (*pValue >>= eMode)
1816 {
1817 rSet.Put(XFillBmpStretchItem(eMode == css::drawing::BitmapMode_STRETCH));
1818 rSet.Put(XFillBmpTileItem(eMode == css::drawing::BitmapMode_REPEAT));
1819 }
1820 }
1821 else if(pEntry->nMemberId == MID_NAME &&
1822 (pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT ||
1823 pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ||
1824 pEntry->nWID == XATTR_LINESTART || pEntry->nWID == XATTR_LINEEND || pEntry->nWID == XATTR_LINEDASH))
1825 {
1826 OUString aTempName;
1827 if (*pValue >>= aTempName)
1828 SvxShape::SetFillAttribute(pEntry->nWID, aTempName, rSet);
1829 }
1830 else if(pEntry->nWID == SDRATTR_TEXTDIRECTION)
1831 {
1832 return; // not yet implemented for styles
1833 }
1834 else if(!SvxUnoTextRangeBase::SetPropertyValueHelper(pEntry, *pValue, rSet))
1835 {
1836 SvxItemPropertySet_setPropertyValue(pEntry, *pValue, rSet);
1837 }
1838 }
1839
1842
1843 if ( eFamily == SfxStyleFamily::Para )
1844 {
1845 // If we are loading, we can delay line height calculation, because we are going to re-calc all of those
1846 // after load.
1847 if (pDocShell && !pDocShell->IsLoading())
1848 {
1849 // update line height
1851 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
1852 double nPPTX = aLogic.X() / 1000.0;
1853 double nPPTY = aLogic.Y() / 1000.0;
1854 Fraction aZoom(1,1);
1855 ScDocument& rDoc = pDocShell->GetDocument();
1856 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1857
1858 if (!rDoc.IsImportingXML())
1859 {
1862 }
1863 }
1864 }
1865 else if ( eFamily == SfxStyleFamily::Page )
1866 {
1868
1870 }
1871 else
1872 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1873}
1874
1875uno::Any ScStyleObj::getPropertyValue_Impl( std::u16string_view aPropertyName )
1876{
1877 uno::Any aAny;
1878 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1879
1880 if ( aPropertyName == SC_UNONAME_DISPNAME ) // read-only
1881 {
1882 // core always has the display name
1883 if ( pStyle )
1884 aAny <<= pStyle->GetName();
1885 }
1886 else
1887 {
1888 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1889 const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1890
1891 if ( pItemSet && pResultEntry )
1892 {
1893 sal_uInt16 nWhich = pResultEntry->nWID;
1894
1895 if ( IsScItemWid( nWhich ) )
1896 {
1897 switch ( nWhich ) // for special item handling
1898 {
1899 case ATTR_VALUE_FORMAT:
1900 if ( pDocShell )
1901 {
1902 sal_uInt32 nOldFormat =
1903 pItemSet->Get( ATTR_VALUE_FORMAT ).GetValue();
1904 LanguageType eOldLang =
1905 pItemSet->Get( ATTR_LANGUAGE_FORMAT ).GetLanguage();
1906 nOldFormat = pDocShell->GetDocument().GetFormatTable()->
1907 GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
1908 aAny <<= nOldFormat;
1909 }
1910 break;
1911 case ATTR_INDENT:
1912 aAny <<= sal_Int16( convertTwipToMm100(static_cast<const ScIndentItem&>(
1913 pItemSet->Get(nWhich)).GetValue()) );
1914 break;
1915 case ATTR_STACKED:
1916 {
1917 Degree100 nRot = pItemSet->Get(ATTR_ROTATE_VALUE).GetValue();
1918 bool bStacked = static_cast<const ScVerticalStackCell&>(pItemSet->Get(nWhich)).GetValue();
1920 }
1921 break;
1922 case ATTR_PAGE_SCALE:
1925 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->Get(nWhich)).GetValue() );
1926 break;
1927 case ATTR_PAGE_CHARTS:
1928 case ATTR_PAGE_OBJECTS:
1929 case ATTR_PAGE_DRAWINGS:
1931 aAny <<= static_cast<const ScViewObjectModeItem&>(pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW;
1932 break;
1933 case ATTR_PAGE_PAPERBIN:
1934 {
1935 // property PrinterPaperTray is the name of the tray
1936
1937 sal_uInt8 nValue = static_cast<const SvxPaperBinItem&>(pItemSet->Get(nWhich)).GetValue();
1938 OUString aName;
1941 else
1942 {
1943 Printer* pPrinter = pDocShell->GetPrinter();
1944 if (pPrinter)
1945 aName = pPrinter->GetPaperBinName( nValue );
1946 }
1947 aAny <<= aName;
1948 }
1949 break;
1950 case ATTR_PAGE_SCALETO:
1951 {
1952 const ScPageScaleToItem& aItem(pItemSet->Get(ATTR_PAGE_SCALETO));
1953 if ( aPropertyName == SC_UNO_PAGE_SCALETOX )
1954 aAny <<= static_cast<sal_Int16>(aItem.GetWidth());
1955 else
1956 aAny <<= static_cast<sal_Int16>(aItem.GetHeight());
1957 }
1958 break;
1959 case ATTR_HIDDEN:
1960 {
1961 bool bHidden = pStyle && pStyle->IsHidden();
1962 aAny <<= bHidden;
1963 }
1964 break;
1965 default:
1966 // Default-Items with wrong Slot-ID don't work in SfxItemPropertySet3
1968 if ( pItemSet->GetPool()->GetSlotId(nWhich) == nWhich &&
1969 pItemSet->GetItemState(nWhich, false) == SfxItemState::DEFAULT )
1970 {
1971 SfxItemSet aNoEmptySet( *pItemSet );
1972 aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) );
1973 pPropSet->getPropertyValue( *pResultEntry, aNoEmptySet, aAny );
1974 }
1975 else
1976 pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
1977 }
1978 }
1979 else if ( IsScUnoWid( nWhich ) )
1980 {
1981 switch ( nWhich )
1982 {
1983 case SC_WID_UNO_TBLBORD:
1985 {
1986 const SfxPoolItem& rItem = pItemSet->Get(ATTR_BORDER);
1987 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1989 if (nWhich == SC_WID_UNO_TBLBORD2)
1990 ScHelperFunctions::AssignTableBorder2ToAny(aAny, aOuter, aInner,
1991 true);
1992 else
1993 ScHelperFunctions::AssignTableBorderToAny(aAny, aOuter, aInner,
1994 true);
1995 }
1996 break;
1997 }
1998 }
1999 else if ( nWhich == SDRATTR_TEXTDIRECTION )
2000 {
2001 aAny <<= false;
2002 }
2003 else if ( nWhich == OWN_ATTR_FILLBMP_MODE )
2004 {
2005 const XFillBmpStretchItem* pStretchItem = pItemSet->GetItem<XFillBmpStretchItem>(XATTR_FILLBMP_STRETCH);
2006 const XFillBmpTileItem* pTileItem = pItemSet->GetItem<XFillBmpTileItem>(XATTR_FILLBMP_TILE);
2007
2008 if ( pStretchItem && pTileItem )
2009 {
2010 if ( pTileItem->GetValue() )
2011 aAny <<= css::drawing::BitmapMode_REPEAT;
2012 else if ( pStretchItem->GetValue() )
2013 aAny <<= css::drawing::BitmapMode_STRETCH;
2014 else
2015 aAny <<= css::drawing::BitmapMode_NO_REPEAT;
2016 }
2017 }
2018 else if ( nWhich != OWN_ATTR_TEXTCOLUMNS )
2019 {
2020 if (!SvxUnoTextRangeBase::GetPropertyValueHelper(*pItemSet, pResultEntry, aAny))
2021 aAny = SvxItemPropertySet_getPropertyValue(pResultEntry, *pItemSet);
2022
2023 // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
2024 if (pResultEntry->aType == ::cppu::UnoType<sal_Int16>::get() &&
2025 aAny.getValueType() == ::cppu::UnoType<sal_Int32>::get())
2026 {
2027 aAny <<= static_cast<sal_Int16>(aAny.get<sal_Int32>());
2028 }
2029 }
2030 }
2031 }
2032
2033 return aAny;
2034}
2035
2036uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName )
2037{
2038 SolarMutexGuard aGuard;
2039 GetStyle_Impl();
2040
2041 return getPropertyValue_Impl( aPropertyName );
2042}
2043
2045
2046// lang::XServiceInfo
2047
2048OUString SAL_CALL ScStyleObj::getImplementationName()
2049{
2050 return "ScStyleObj";
2051}
2052
2053sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
2054{
2055 return cppu::supportsService(this, rServiceName);
2056}
2057
2058uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
2059{
2060 if (eFamily == SfxStyleFamily::Page)
2062
2063 if (eFamily == SfxStyleFamily::Frame)
2065
2067}
2068
2069/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
#define CHAR_COLOR_PROPERTIES
#define CELL_BORDER_PROPERTIES
#define CELL_BACKGROUND_COLOR_PROPERTIES
const SCTAB MAXTAB
Definition: address.hxx:70
constexpr tools::Long Y() const
constexpr tools::Long X() const
sal_uInt16 GetPaperBinCount() const
OUString GetPaperBinName(sal_uInt16 nPaperBin) const
void SetDocumentModified()
Definition: docsh.cxx:2982
SfxBindings * GetViewBindings()
Definition: docsh4.cxx:2642
const ScDocument & GetDocument() const
Definition: docsh.hxx:219
void LoadStylesArgs(ScDocShell &rSource, bool bReplace, bool bCellStyles, bool bPageStyles)
Definition: docsh6.cxx:245
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
Definition: docsh3.cxx:101
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: docsh3.cxx:451
void PageStyleModified(std::u16string_view rStyleName, bool bApi)
Definition: docsh4.cxx:1778
ScDocShell * GetDocShell()
Definition: tablink.hxx:90
void CellStyleCreated(std::u16string_view rName, const ScDocument &rDoc)
Definition: docpool.cxx:369
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:325
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:892
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6050
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:901
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6055
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
Definition: document.cxx:4924
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:467
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:909
bool IsImportingXML() const
Definition: document.hxx:2227
static void AssignTableBorder2ToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
Definition: cellsuno.cxx:979
static void FillBoxItems(SvxBoxItem &rOuter, SvxBoxInfoItem &rInner, const css::table::TableBorder &rBorder)
static void AssignTableBorderToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
Definition: cellsuno.cxx:971
Contains the "scale to width/height" attribute in page styles.
Definition: attrib.hxx:230
sal_uInt16 GetHeight() const
Definition: attrib.hxx:248
sal_uInt16 GetWidth() const
Definition: attrib.hxx:247
void SetHeight(sal_uInt16 nHeight)
Definition: attrib.hxx:252
void SetWidth(sal_uInt16 nWidth)
Definition: attrib.hxx:251
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: styleuno.cxx:536
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: styleuno.cxx:503
virtual sal_Bool SAL_CALL hasElements() override
Definition: styleuno.cxx:518
rtl::Reference< ScStyleFamilyObj > GetObjectByName_Impl(std::u16string_view aName) const
Definition: styleuno.cxx:481
virtual css::uno::Type SAL_CALL getElementType() override
Definition: styleuno.cxx:513
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: styleuno.cxx:541
virtual ~ScStyleFamiliesObj() override
Definition: styleuno.cxx:438
virtual void SAL_CALL loadStylesFromDocument(const css::uno::Reference< css::lang::XComponent > &aSourceComponent, const css::uno::Sequence< css::beans::PropertyValue > &aOptions) override
Definition: styleuno.cxx:595
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: styleuno.cxx:526
rtl::Reference< ScStyleFamilyObj > GetObjectByIndex_Impl(sal_uInt32 nIndex) const
Definition: styleuno.cxx:473
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getStyleLoaderOptions() override
Definition: styleuno.cxx:583
ScDocShell * pDocShell
Definition: styleuno.hxx:55
virtual sal_Int32 SAL_CALL getCount() override
Definition: styleuno.cxx:498
void loadStylesFromDocShell(ScDocShell *pSource, const css::uno::Sequence< css::beans::PropertyValue > &aOptions)
Definition: styleuno.cxx:609
ScStyleFamiliesObj(ScDocShell *pDocSh)
Definition: styleuno.cxx:432
virtual void SAL_CALL loadStylesFromURL(const OUString &URL, const css::uno::Sequence< css::beans::PropertyValue > &aOptions) override
Definition: styleuno.cxx:548
rtl::Reference< ScStyleFamilyObj > GetObjectByType_Impl(SfxStyleFamily nType) const
Definition: styleuno.cxx:458
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:446
SfxStyleFamily eFamily
Definition: styleuno.hxx:109
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: styleuno.cxx:906
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: styleuno.cxx:963
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: styleuno.cxx:912
ScStyleFamilyObj(ScDocShell *pDocSh, SfxStyleFamily eFam)
Definition: styleuno.cxx:638
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: styleuno.cxx:861
virtual sal_Int32 SAL_CALL getCount() override
Definition: styleuno.cxx:813
rtl::Reference< ScStyleObj > GetObjectByIndex_Impl(sal_Int32 nIndex)
Definition: styleuno.cxx:665
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:653
virtual sal_Bool SAL_CALL hasElements() override
Definition: styleuno.cxx:842
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: styleuno.cxx:697
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: styleuno.cxx:741
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: styleuno.cxx:850
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: styleuno.cxx:827
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: styleuno.cxx:948
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: styleuno.cxx:889
ScDocShell * pDocShell
Definition: styleuno.hxx:108
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: styleuno.cxx:958
virtual ~ScStyleFamilyObj() override
Definition: styleuno.cxx:645
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: styleuno.cxx:917
virtual void SAL_CALL removeByName(const OUString &Name) override
Definition: styleuno.cxx:749
rtl::Reference< ScStyleObj > GetObjectByName_Impl(const OUString &Name)
Definition: styleuno.cxx:685
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: styleuno.cxx:953
virtual css::uno::Type SAL_CALL getElementType() override
Definition: styleuno.cxx:837
static SC_DLLPUBLIC OUString ProgrammaticToDisplayName(const OUString &rProgName, SfxStyleFamily nType)
static OUString DisplayToProgrammaticName(const OUString &rDispName, SfxStyleFamily nType)
ScDocShell * pDocShell
Definition: styleuno.hxx:168
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
Definition: styleuno.cxx:1399
ScStyleObj()=delete
OUString aStyleName
Definition: styleuno.hxx:170
css::beans::PropertyState getPropertyState_Impl(std::u16string_view PropertyName)
Definition: styleuno.cxx:1198
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: styleuno.cxx:2053
virtual OUString SAL_CALL getParentStyle() override
Definition: styleuno.cxx:1052
virtual void SAL_CALL setParentStyle(const OUString &aParentStyle) override
Definition: styleuno.cxx:1061
virtual sal_Bool SAL_CALL isUserDefined() override
Definition: styleuno.cxx:1034
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: styleuno.cxx:2058
bool IsInserted() const
Definition: styleuno.hxx:197
void setPropertyValue_Impl(std::u16string_view rPropertyName, const SfxItemPropertyMapEntry *pEntry, const css::uno::Any *pValue)
Definition: styleuno.cxx:1534
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: styleuno.cxx:1522
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
Definition: styleuno.cxx:1259
const SfxItemPropertySet * pPropSet
Definition: styleuno.hxx:167
virtual void SAL_CALL setAllPropertiesToDefault() override
Definition: styleuno.cxx:1450
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1435
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1418
SfxStyleFamily GetFamily() const
Definition: styleuno.hxx:198
virtual OUString SAL_CALL getName() override
Definition: styleuno.cxx:1112
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:1007
const SfxItemSet * GetStyleItemSet_Impl(std::u16string_view rPropName, const SfxItemPropertyMapEntry *&rpEntry)
Definition: styleuno.cxx:1164
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1429
virtual sal_Bool SAL_CALL isInUse() override
Definition: styleuno.cxx:1043
virtual ~ScStyleObj() override
Definition: styleuno.cxx:999
static css::uno::Reference< css::container::XIndexReplace > CreateEmptyNumberingRules()
Definition: styleuno.cxx:1156
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
Definition: styleuno.cxx:1378
SfxStyleSheetBase * GetStyle_Impl(bool bUseCachedValue=false)
Definition: styleuno.cxx:1017
virtual void SAL_CALL setName(const OUString &aName) override
Definition: styleuno.cxx:1121
SfxStyleSheetBase * pStyle_cached
Definition: styleuno.hxx:171
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
Definition: styleuno.cxx:1251
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1501
void InitDoc(ScDocShell *pNewDocSh, const OUString &rNewName)
Definition: styleuno.cxx:989
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
Definition: styleuno.cxx:1270
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1386
css::uno::Any getPropertyValue_Impl(std::u16string_view aPropertyName)
Definition: styleuno.cxx:1875
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1441
SfxStyleFamily eFamily
Definition: styleuno.hxx:169
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: styleuno.cxx:1516
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: styleuno.cxx:2036
css::uno::Any getPropertyDefault_Impl(std::u16string_view aPropertyName)
Definition: styleuno.cxx:1282
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
Definition: stlpool.cxx:72
virtual void Remove(SfxStyleSheetBase *pStyle) override
Definition: stlpool.cxx:116
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:139
void Invalidate(sal_uInt16 nId)
SfxHintId GetId() const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
void getPropertyValue(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SfxObjectShell * GetShellFromComponent(const css::uno::Reference< css::uno::XInterface > &xComp)
bool IsLoading() const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual const OUString & GetParent() const
const OUString & GetName() const
virtual void SetHidden(bool bValue)
bool IsUserDefined() const
virtual bool IsHidden() const
virtual bool SetParent(const OUString &)
virtual SfxItemSet & GetItemSet()
virtual bool IsUsed() const
virtual sal_Int32 Count()
virtual SfxStyleSheetBase * Next()
virtual SfxStyleSheetBase * First()
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
sal_uInt32 GetFormatForLanguageIfBuiltIn(sal_uInt32 nFormat, LanguageType eLnge=LANGUAGE_DONTKNOW)
LanguageType GetLanguage() const
void SetTable(bool bNew)
void SetDist(bool bNew)
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
static bool SetFillAttribute(sal_uInt16 nWID, const OUString &rName, SfxItemSet &rSet, SdrModel const *pModel)
css::uno::Type const & get()
int nCount
constexpr double nPPTX
constexpr double nPPTY
URL aURL
float u
sal_Int16 nValue
OUString sDisplayName
@ VOBJ_MODE_SHOW
Definition: global.hxx:369
@ VOBJ_MODE_HIDE
Definition: global.hxx:370
sal_Int32 nIndex
OUString aName
Mode eMode
#define LANGUAGE_DONTKNOW
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
#define MID_SIZE_HEIGHT
#define MID_SIZE_WIDTH
#define MID_SIZE_SIZE
#define MID_TL_HASCOLOR
#define BOTTOM_BORDER
#define MID_HORJUST_ADJUST
#define MID_BACK_COLOR
#define MID_LO_MARGIN
#define MID_LANG_LOCALE
#define MID_RELIEF
#define MID_EMPHASIS
#define MID_FONT_PITCH
#define MID_GRAPHIC_URL
#define MID_GRAPHIC_POSITION
#define MID_FONT_CHAR_SET
#define BORDER_DISTANCE
#define TOP_BORDER
#define LEFT_BORDER_DISTANCE
#define RIGHT_BORDER
#define MID_POSTURE
#define MID_R_MARGIN
#define MID_FONTHEIGHT
#define TOP_BORDER_DISTANCE
#define RIGHT_BORDER_DISTANCE
#define MID_FONT_FAMILY
#define MID_CROSSED_OUT
#define BOTTOM_BORDER_DISTANCE
#define MID_NAME
#define MID_WEIGHT
#define MID_L_MARGIN
#define MID_TL_STYLE
#define MID_HORJUST_HORJUST
#define MID_GRAPHIC_TRANSPARENT
#define MID_UP_MARGIN
#define MID_GRAPHIC
#define MID_TL_COLOR
#define LEFT_BORDER
#define MID_CROSS_OUT
#define MID_FONT_FAMILY_NAME
#define MID_FONT_STYLE_NAME
#define MID_GRAPHIC_FILTER
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:63
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
OUString aPropName
constexpr auto toTwips(N number, Length from)
sal_Int16 nId
const char GetValue[]
#define PAPERBIN_PRINTER_SETTINGS
#define CONVERT_TWIPS
SfxItemState
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(175)
constexpr TypedWhichId< SfxBoolItem > ATTR_HIDDEN(189)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(179)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(178)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HORCENTER(162)
constexpr TypedWhichId< SfxBoolItem > ATTR_VERTICAL_ASIAN(137)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_DYNAMIC(165)
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NULLVALS(187)
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_VERCENTER(163)
constexpr TypedWhichId< SvxForbiddenRuleItem > ATTR_FORBIDDEN_RULES(128)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(170)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_FORMULAS(186)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< SvxEmphasisMarkItem > ATTR_FONT_EMPHASISMARK(121)
constexpr TypedWhichId< ScShrinkToFitCell > ATTR_SHRINKTOFIT(140)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
constexpr TypedWhichId< SvxScriptSpaceItem > ATTR_SCRIPTSPACE(126)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_GRID(169)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_TOPDOWN(174)
constexpr TypedWhichId< SvxWordLineModeItem > ATTR_FONT_WORDLINE(123)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_CHARTS(171)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_OBJECTS(172)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
constexpr TypedWhichId< SvxPaperBinItem > ATTR_PAGE_PAPERBIN(160)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(177)
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(168)
constexpr TypedWhichId< SvxHangingPunctuationItem > ATTR_HANGPUNCTUATION(127)
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERFIRST(182)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
constexpr TypedWhichId< SvxCharReliefItem > ATTR_FONT_RELIEF(124)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERFIRST(183)
constexpr TypedWhichId< ScPageScaleToItem > ATTR_PAGE_SCALETO(188)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED_FIRST(167)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< ScHyphenateCell > ATTR_HYPHENATE(125)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(176)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
constexpr TypedWhichId< SvXMLAttrContainerItem > ATTR_USERDEF(122)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_DRAWINGS(173)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
static SfxItemSet & rSet
css::uno::Type aType
SfxStyleFamily
constexpr OUStringLiteral SCPAGESTYLE_SERVICE
Definition: styleuno.cxx:415
constexpr OUStringLiteral SC_FAMILYNAME_CELL
Definition: styleuno.cxx:407
#define SC_STYLE_FAMILY_COUNT
Definition: styleuno.cxx:405
static const SfxItemPropertySet * lcl_GetCellStyleSet()
Definition: styleuno.cxx:106
constexpr OUStringLiteral SCGRAPHICSTYLE_SERVICE
Definition: styleuno.cxx:416
static const SfxItemPropertySet * lcl_GetGraphicStyleSet()
Definition: styleuno.cxx:86
static const SfxItemPropertySet * lcl_GetPageStyleSet()
Definition: styleuno.cxx:198
const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT]
Definition: styleuno.cxx:411
static const SfxItemPropertyMap * lcl_GetHeaderStyleMap()
Definition: styleuno.cxx:325
constexpr OUStringLiteral SC_PAPERBIN_DEFAULTNAME
Definition: styleuno.cxx:421
constexpr OUStringLiteral SCSTYLE_SERVICE
Definition: styleuno.cxx:413
static const SfxItemPropertyMap * lcl_GetFooterStyleMap()
Definition: styleuno.cxx:365
constexpr OUStringLiteral SC_FAMILYNAME_PAGE
Definition: styleuno.cxx:408
constexpr OUStringLiteral SCCELLSTYLE_SERVICE
Definition: styleuno.cxx:414
constexpr OUStringLiteral SC_FAMILYNAME_GRAPHIC
Definition: styleuno.cxx:409
static bool lcl_AnyTabProtected(const ScDocument &rDoc)
Definition: styleuno.cxx:423
constexpr TypedWhichId< SvxWritingModeItem > SDRATTR_TEXTDIRECTION(SDRATTR_NOTPERSIST_FIRST+34)
unsigned char sal_uInt8
unsigned char sal_Bool
sal_Int16 SCTAB
Definition: types.hxx:22
#define OWN_ATTR_FILLBMP_MODE
#define MID_MARGIN_LO_MARGIN
#define MID_PAGE_ORIENTATION
#define MID_PAGE_LAYOUT
#define MID_MARGIN_R_MARGIN
#define MID_MARGIN_L_MARGIN
#define MID_MARGIN_UP_MARGIN
#define MID_PAGE_NUMTYPE
SVXCORE_DLLPUBLIC css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(SdrModel *pModel)
constexpr OUStringLiteral SC_UNO_PAGE_FTRSHARED
Definition: unonames.hxx:509
constexpr OUStringLiteral SC_UNO_PAGE_CENTERVER
Definition: unonames.hxx:441
constexpr OUStringLiteral OLD_UNO_PAGE_BACKTRANS
Definition: unonames.hxx:400
constexpr OUStringLiteral SC_UNONAME_PADJUST
Definition: unonames.hxx:153
constexpr OUStringLiteral OLD_UNO_PAGE_FTRON
Definition: unonames.hxx:410
constexpr OUStringLiteral SC_UNO_CJK_CFFAMIL
Definition: unonames.hxx:80
constexpr OUStringLiteral SC_UNO_CJK_CFPITCH
Definition: unonames.hxx:82
constexpr OUStringLiteral SC_UNONAME_DISPNAME
Definition: unonames.hxx:159
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHIC
Definition: unonames.hxx:418
constexpr OUStringLiteral SC_UNO_CJK_CPOST
Definition: unonames.hxx:85
constexpr OUStringLiteral SC_UNONAME_CEMPHAS
Definition: unonames.hxx:69
constexpr OUStringLiteral SC_UNONAME_PRMARGIN
Definition: unonames.hxx:119
constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBOR
Definition: unonames.hxx:473
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTFTRSHARED
Definition: unonames.hxx:455
constexpr OUStringLiteral SC_UNONAME_COVRLHAS
Definition: unonames.hxx:60
constexpr OUStringLiteral SC_UNONAME_CFCHARS
Definition: unonames.hxx:73
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFFILT
Definition: unonames.hxx:466
constexpr OUStringLiteral SC_UNO_PAGE_PRINTDRAW
Definition: unonames.hxx:447
constexpr OUStringLiteral SC_UNONAME_LOADCELL
Definition: unonames.hxx:163
constexpr OUStringLiteral SC_UNONAME_CLOCAL
Definition: unonames.hxx:65
constexpr OUStringLiteral SC_UNONAME_HYPERLINK
Definition: unonames.hxx:206
constexpr OUStringLiteral SC_UNO_PAGE_HDRSHARED
Definition: unonames.hxx:486
constexpr OUStringLiteral SC_UNO_PAGE_SIZE
Definition: unonames.hxx:437
constexpr OUStringLiteral OLD_UNO_PAGE_HDRBACKCOL
Definition: unonames.hxx:401
constexpr OUStringLiteral SC_UNO_CJK_CFCHARS
Definition: unonames.hxx:81
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTMAR
Definition: unonames.hxx:481
constexpr OUStringLiteral SC_UNONAME_PISHYPHEN
Definition: unonames.hxx:152
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTMARGIN
Definition: unonames.hxx:430
constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBOR
Definition: unonames.hxx:496
constexpr OUStringLiteral SC_UNONAME_WRITING
Definition: unonames.hxx:123
constexpr OUStringLiteral SC_UNONAME_CELLVJUS_METHOD
Definition: unonames.hxx:107
constexpr OUStringLiteral SC_UNO_PAGE_BACKTRANS
Definition: unonames.hxx:414
constexpr OUStringLiteral SC_UNO_PAGE_HDRBODYDIST
Definition: unonames.hxx:482
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBOR
Definition: unonames.hxx:494
#define SC_UNO_PAGE_TOPBORDER
Definition: unonames.hxx:422
constexpr OUStringLiteral SC_UNO_PAGE_PRINTZERO
Definition: unonames.hxx:463
constexpr OUStringLiteral SC_UNO_PAGE_NUMBERTYPE
Definition: unonames.hxx:434
constexpr OUStringLiteral SC_UNO_PAGE_PRINTANNOT
Definition: unonames.hxx:442
constexpr OUStringLiteral SC_UNONAME_LOADPAGE
Definition: unonames.hxx:164
constexpr OUStringLiteral SC_UNONAME_CSHADD
Definition: unonames.hxx:66
constexpr OUStringLiteral SC_UNONAME_CRELIEF
Definition: unonames.hxx:75
constexpr OUStringLiteral SC_UNO_PAGE_PAPERTRAY
Definition: unonames.hxx:436
constexpr OUStringLiteral SC_UNO_CTL_CFNAME
Definition: unonames.hxx:88
constexpr OUStringLiteral SC_UNO_PAGE_FTRON
Definition: unonames.hxx:507
constexpr OUStringLiteral SC_UNO_CJK_CWEIGHT
Definition: unonames.hxx:84
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTPAGE
Definition: unonames.hxx:453
constexpr OUStringLiteral SC_UNONAME_CUNDLHAS
Definition: unonames.hxx:57
constexpr OUStringLiteral SC_UNONAME_NUMFMT
Definition: unonames.hxx:109
constexpr OUStringLiteral SC_UNO_PAGE_LEFTBRDDIST
Definition: unonames.hxx:423
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBDIS
Definition: unonames.hxx:475
constexpr OUStringLiteral SC_UNONAME_WRAP
Definition: unonames.hxx:114
constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKCOL
Definition: unonames.hxx:487
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTFTRCONT
Definition: unonames.hxx:461
constexpr OUStringLiteral SC_UNONAME_CPOST
Definition: unonames.hxx:62
constexpr OUStringLiteral SC_UNO_PAGE_PRINTGRID
Definition: unonames.hxx:443
constexpr OUStringLiteral SC_UNO_PAGE_LEFTHDRCONT
Definition: unonames.hxx:456
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICURL
Definition: unonames.hxx:417
constexpr OUStringLiteral SC_UNO_PAGE_FTRBODYDIST
Definition: unonames.hxx:505
constexpr OUStringLiteral SC_UNO_CTL_CFFAMIL
Definition: unonames.hxx:90
constexpr OUStringLiteral SC_UNO_PAGE_LANDSCAPE
Definition: unonames.hxx:433
constexpr OUStringLiteral SC_UNO_PAGE_HDRDYNAMIC
Definition: unonames.hxx:485
constexpr OUStringLiteral OLD_UNO_PAGE_HDRSHARED
Definition: unonames.hxx:403
constexpr OUStringLiteral SC_UNONAME_HIDDEN
Definition: unonames.hxx:124
constexpr OUStringLiteral SC_UNONAME_CFFAMIL
Definition: unonames.hxx:72
constexpr OUStringLiteral SC_UNONAME_PINDENT
Definition: unonames.hxx:115
constexpr OUStringLiteral SC_UNONAME_PLMARGIN
Definition: unonames.hxx:118
constexpr OUStringLiteral OLD_UNO_PAGE_FTRBACKTRAN
Definition: unonames.hxx:407
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOX
Definition: unonames.hxx:451
constexpr OUStringLiteral SC_UNO_PAGE_PRINTCHARTS
Definition: unonames.hxx:445
constexpr OUStringLiteral SC_UNO_CJK_CFSTYLE
Definition: unonames.hxx:79
constexpr OUStringLiteral SC_UNO_PAGE_LEFTFTRCONT
Definition: unonames.hxx:457
constexpr OUStringLiteral SC_UNONAME_COVRLCOL
Definition: unonames.hxx:59
constexpr OUStringLiteral SC_UNO_CTL_CWEIGHT
Definition: unonames.hxx:94
constexpr OUStringLiteral SC_UNONAME_CELLTRAN
Definition: unonames.hxx:102
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTMAR
Definition: unonames.hxx:503
constexpr OUStringLiteral SC_UNO_PAGE_LEFTMARGIN
Definition: unonames.hxx:429
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTHDRCONT
Definition: unonames.hxx:460
constexpr OUStringLiteral SC_UNO_CTL_CFPITCH
Definition: unonames.hxx:92
constexpr OUStringLiteral SC_UNONAME_CELLORI
Definition: unonames.hxx:108
constexpr OUStringLiteral SC_UNONAME_CSTRIKE
Definition: unonames.hxx:64
constexpr OUStringLiteral SC_UNO_PAGE_SHADOWFORM
Definition: unonames.hxx:428
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBDIS
Definition: unonames.hxx:474
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFLOC
Definition: unonames.hxx:467
constexpr OUStringLiteral SC_UNO_CTL_CFCHARS
Definition: unonames.hxx:91
constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBDIS
Definition: unonames.hxx:477
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRF
Definition: unonames.hxx:491
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR2
Definition: unonames.hxx:145
constexpr OUStringLiteral SC_UNO_PAGE_BACKCOLOR
Definition: unonames.hxx:413
constexpr OUStringLiteral SC_UNO_PAGE_HDRBRDDIST
Definition: unonames.hxx:478
constexpr OUStringLiteral SC_UNO_PAGE_FTRHEIGHT
Definition: unonames.hxx:506
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTMAR
Definition: unonames.hxx:480
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOY
Definition: unonames.hxx:452
constexpr OUStringLiteral SC_UNO_PAGE_SYTLELAYOUT
Definition: unonames.hxx:435
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBDIS
Definition: unonames.hxx:498
constexpr OUStringLiteral SC_UNONAME_CFNAME
Definition: unonames.hxx:70
constexpr OUStringLiteral SC_UNO_PAGE_HDRSHADOW
Definition: unonames.hxx:479
constexpr OUStringLiteral SC_UNONAME_PISFORBID
Definition: unonames.hxx:151
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBOR
Definition: unonames.hxx:493
constexpr OUStringLiteral SC_UNO_PAGE_FTRBRDDIST
Definition: unonames.hxx:501
constexpr OUStringLiteral SC_UNONAME_CFONT
Definition: unonames.hxx:67
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTHDRSHARED
Definition: unonames.hxx:454
constexpr OUStringLiteral SC_UNO_PAGE_FTRSHADOW
Definition: unonames.hxx:502
constexpr OUStringLiteral SC_UNO_PAGE_BOTTBRDDIST
Definition: unonames.hxx:425
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFURL
Definition: unonames.hxx:492
constexpr OUStringLiteral SC_UNO_PAGE_BOTTMARGIN
Definition: unonames.hxx:432
constexpr OUStringLiteral SC_UNO_CTL_CLOCAL
Definition: unonames.hxx:96
constexpr OUStringLiteral SC_UNO_CJK_CHEIGHT
Definition: unonames.hxx:83
constexpr OUStringLiteral SC_UNONAME_CELLPRO
Definition: unonames.hxx:103
constexpr OUStringLiteral SC_UNO_PAGE_BORDERDIST
Definition: unonames.hxx:427
constexpr OUStringLiteral SC_UNONAME_PTMARGIN
Definition: unonames.hxx:116
constexpr OUStringLiteral SC_UNONAME_CCROSS
Definition: unonames.hxx:63
constexpr OUStringLiteral SC_UNO_CJK_CFNAME
Definition: unonames.hxx:78
constexpr OUStringLiteral SC_UNONAME_CWORDMOD
Definition: unonames.hxx:76
constexpr OUStringLiteral SC_UNONAME_PBMARGIN
Definition: unonames.hxx:117
#define SC_UNO_PAGE_LEFTBORDER
Definition: unonames.hxx:419
constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBDIS
Definition: unonames.hxx:500
constexpr OUStringLiteral SC_UNONAME_SHRINK_TO_FIT
Definition: unonames.hxx:147
constexpr OUStringLiteral SC_UNO_PAGE_HDRHEIGHT
Definition: unonames.hxx:483
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICFILT
Definition: unonames.hxx:415
constexpr OUStringLiteral SC_UNONAME_CFPITCH
Definition: unonames.hxx:74
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBOR
Definition: unonames.hxx:470
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBOR
Definition: unonames.hxx:471
constexpr OUStringLiteral SC_UNONAME_ASIANVERT
Definition: unonames.hxx:122
constexpr OUStringLiteral SC_UNONAME_COVER
Definition: unonames.hxx:58
constexpr OUStringLiteral SC_UNONAME_COUTL
Definition: unonames.hxx:68
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOPAG
Definition: unonames.hxx:450
constexpr OUStringLiteral SC_UNONAME_OVERWSTL
Definition: unonames.hxx:162
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTFTRCON
Definition: unonames.hxx:459
constexpr OUStringLiteral SC_UNONAME_ROTANG
Definition: unonames.hxx:120
constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBDIS
Definition: unonames.hxx:476
constexpr OUStringLiteral SC_UNO_CTL_CHEIGHT
Definition: unonames.hxx:93
constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKTRAN
Definition: unonames.hxx:488
#define SC_UNO_PAGE_RIGHTBORDER
Definition: unonames.hxx:420
constexpr OUStringLiteral SC_UNO_PAGE_PRINTDOWN
Definition: unonames.hxx:448
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR
Definition: unonames.hxx:142
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR
Definition: unonames.hxx:141
constexpr OUStringLiteral SC_UNONAME_USERDEF
Definition: unonames.hxx:224
constexpr OUStringLiteral SC_UNONAME_CELLVJUS
Definition: unonames.hxx:105
constexpr OUStringLiteral SC_UNONAME_PLASTADJ
Definition: unonames.hxx:154
constexpr OUStringLiteral SC_UNONAME_ROTREF
Definition: unonames.hxx:121
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRF
Definition: unonames.hxx:468
constexpr OUStringLiteral SC_UNONAME_CUNDLCOL
Definition: unonames.hxx:56
constexpr OUStringLiteral SC_UNO_PAGE_TOPMARGIN
Definition: unonames.hxx:431
constexpr OUStringLiteral SC_UNO_PAGE_HEIGHT
Definition: unonames.hxx:439
constexpr OUStringLiteral SC_UNONAME_TBLBORD
Definition: unonames.hxx:112
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR2
Definition: unonames.hxx:144
constexpr OUStringLiteral OLD_UNO_PAGE_HDRDYNAMIC
Definition: unonames.hxx:404
constexpr OUStringLiteral SC_UNONAME_PISHANG
Definition: unonames.hxx:149
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICLOC
Definition: unonames.hxx:416
constexpr OUStringLiteral OLD_UNO_PAGE_HDRBACKTRAN
Definition: unonames.hxx:402
constexpr OUStringLiteral SC_UNONAME_CWEIGHT
Definition: unonames.hxx:61
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFLOC
Definition: unonames.hxx:490
constexpr OUStringLiteral OLD_UNO_PAGE_FTRBACKCOL
Definition: unonames.hxx:406
constexpr OUStringLiteral SC_UNO_PAGE_TOPBRDDIST
Definition: unonames.hxx:426
constexpr OUStringLiteral SC_UNO_CTL_CPOST
Definition: unonames.hxx:95
constexpr OUStringLiteral SC_UNONAME_CUNDER
Definition: unonames.hxx:55
constexpr OUStringLiteral SC_UNONAME_SHADOW
Definition: unonames.hxx:111
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTBRDDIST
Definition: unonames.hxx:424
constexpr OUStringLiteral SC_UNO_PAGE_FTRDYNAMIC
Definition: unonames.hxx:508
constexpr OUStringLiteral SC_UNO_PAGE_PRINTFORMUL
Definition: unonames.hxx:462
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTMAR
Definition: unonames.hxx:504
constexpr OUStringLiteral OLD_UNO_PAGE_FTRSHARED
Definition: unonames.hxx:408
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTHDRCON
Definition: unonames.hxx:458
constexpr OUStringLiteral SC_UNO_PAGE_PRINTHEADER
Definition: unonames.hxx:444
constexpr OUStringLiteral SC_UNONAME_PISCHDIST
Definition: unonames.hxx:150
constexpr OUStringLiteral OLD_UNO_PAGE_BACKCOLOR
Definition: unonames.hxx:399
#define SC_UNO_PAGE_BOTTBORDER
Definition: unonames.hxx:421
constexpr OUStringLiteral OLD_UNO_PAGE_FTRDYNAMIC
Definition: unonames.hxx:409
constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKCOL
Definition: unonames.hxx:464
constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBOR
Definition: unonames.hxx:472
constexpr OUStringLiteral SC_UNO_PAGE_SCALEVAL
Definition: unonames.hxx:449
constexpr OUStringLiteral SC_UNONAME_CHEIGHT
Definition: unonames.hxx:54
constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBOR
Definition: unonames.hxx:495
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFFILT
Definition: unonames.hxx:489
constexpr OUStringLiteral SC_UNO_PAGE_CENTERHOR
Definition: unonames.hxx:440
constexpr OUStringLiteral SC_UNO_PAGE_HDRON
Definition: unonames.hxx:484
constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKTRAN
Definition: unonames.hxx:465
constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBDIS
Definition: unonames.hxx:499
constexpr OUStringLiteral SC_UNONAME_CELLHJUS
Definition: unonames.hxx:104
constexpr OUStringLiteral SC_UNO_PAGE_WIDTH
Definition: unonames.hxx:438
constexpr OUStringLiteral OLD_UNO_PAGE_HDRON
Definition: unonames.hxx:405
constexpr OUStringLiteral SC_UNO_PAGE_PRINTOBJS
Definition: unonames.hxx:446
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBDIS
Definition: unonames.hxx:497
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFURL
Definition: unonames.hxx:469
constexpr OUStringLiteral SC_UNO_CTL_CFSTYLE
Definition: unonames.hxx:89
constexpr OUStringLiteral SC_UNONAME_CFSTYLE
Definition: unonames.hxx:71
constexpr OUStringLiteral SC_UNONAME_CELLHJUS_METHOD
Definition: unonames.hxx:106
constexpr OUStringLiteral SC_UNO_CJK_CLOCAL
Definition: unonames.hxx:86
void SVXCORE_DLLPUBLIC SvxItemPropertySet_setPropertyValue(const SfxItemPropertyMapEntry *pMap, const css::uno::Any &rVal, SfxItemSet &rSet)
css::uno::Any SVXCORE_DLLPUBLIC SvxItemPropertySet_getPropertyValue(const SfxItemPropertyMapEntry *pMap, const SfxItemSet &rSet)
#define LINE_PROPERTIES
#define FILL_PROPERTIES
#define OWN_ATTR_TEXTCOLUMNS
#define LINE_PROPERTIES_START_END
#define CONNECTOR_PROPERTIES
#define EDGERADIUS_PROPERTIES
#define SHADOW_PROPERTIES
#define TEXT_PROPERTIES_DEFAULTS
#define SPECIAL_DIMENSIONING_PROPERTIES_DEFAULTS
#define SVX_UNOEDIT_NUMBERING_PROPERTY
#define SC_WID_UNO_TBLBORD2
Definition: unowids.hxx:72
#define SC_WID_UNO_HEADERSET
Definition: unowids.hxx:55
#define SC_WID_UNO_TBLBORD
Definition: unowids.hxx:35
bool IsScUnoWid(sal_uInt16 nWid)
Definition: unowids.hxx:79
#define SC_WID_UNO_DISPNAME
Definition: unowids.hxx:54
bool IsScItemWid(sal_uInt16 nWid)
Definition: unowids.hxx:84
#define SC_WID_UNO_FOOTERSET
Definition: unowids.hxx:56
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)