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 <styleuno.hxx>
70#include <docsh.hxx>
71#include <attrib.hxx>
72#include <stlpool.hxx>
73#include <docpool.hxx>
74#include <miscuno.hxx>
75#include <tablink.hxx>
76#include <unonames.hxx>
77#include <unowids.hxx>
78#include <globstr.hrc>
79#include <scresid.hxx>
80#include <cellsuno.hxx>
81#include <stylehelper.hxx>
82
83using namespace ::com::sun::star;
84
86{
87 static const SfxItemPropertyMapEntry aGraphicStyleMap_Impl[] =
88 {
99 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
100 };
101 static SfxItemPropertySet aGraphicStyleSet_Impl( aGraphicStyleMap_Impl );
102 return &aGraphicStyleSet_Impl;
103}
104
106{
107 static const SfxItemPropertyMapEntry aCellStyleMap_Impl[] =
108 {
160 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME,::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
168// {SC_UNONAME_NUMRULES, SC_WID_UNO_NUMRULES,cppu::UnoType<container::XIndexReplace>::get(), 0, 0 },
197 };
198 static SfxItemPropertySet aCellStyleSet_Impl( aCellStyleMap_Impl );
199 return &aCellStyleSet_Impl;
200}
201
202// map with all site attributes including header and footer attributes
203
205{
206 static const SfxItemPropertyMapEntry aPageStyleMap_Impl[] =
207 {
221 {SC_UNONAME_DISPNAME, SC_WID_UNO_DISPNAME,::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
227
255
283
324 };
325 static SfxItemPropertySet aPageStyleSet_Impl( aPageStyleMap_Impl );
326 return &aPageStyleSet_Impl;
327}
328
329// map with content of the Header-Item-Sets
330
332{
333 static const SfxItemPropertyMapEntry aHeaderStyleMap_Impl[] =
334 {
364 };
365 static SfxItemPropertyMap aHeaderStyleMap( aHeaderStyleMap_Impl );
366 return &aHeaderStyleMap;
367}
368
369// map with content of the Footer-Item-Sets
370
372{
373 static const SfxItemPropertyMapEntry aFooterStyleMap_Impl[] =
374 {
404 };
405 static SfxItemPropertyMap aFooterStyleMap( aFooterStyleMap_Impl );
406 return &aFooterStyleMap;
407}
408
409// access index on the style types: 0 = Cell, 1 = Page, 2 = Drawing
410
411#define SC_STYLE_FAMILY_COUNT 3
412
413constexpr OUStringLiteral SC_FAMILYNAME_CELL = u"CellStyles";
414constexpr OUStringLiteral SC_FAMILYNAME_PAGE = u"PageStyles";
415constexpr OUStringLiteral SC_FAMILYNAME_GRAPHIC = u"GraphicStyles";
416
417const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page, SfxStyleFamily::Frame };
418
419constexpr OUStringLiteral SCSTYLE_SERVICE = u"com.sun.star.style.Style";
420constexpr OUStringLiteral SCCELLSTYLE_SERVICE = u"com.sun.star.style.CellStyle";
421constexpr OUStringLiteral SCPAGESTYLE_SERVICE = u"com.sun.star.style.PageStyle";
422constexpr OUStringLiteral SCGRAPHICSTYLE_SERVICE = u"com.sun.star.style.GraphicStyle";
423
424SC_SIMPLE_SERVICE_INFO( ScStyleFamiliesObj, "ScStyleFamiliesObj", "com.sun.star.style.StyleFamilies" )
425SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, "ScStyleFamilyObj", "com.sun.star.style.StyleFamily" )
426
427constexpr OUStringLiteral SC_PAPERBIN_DEFAULTNAME = u"[From printer settings]";
428
429static bool lcl_AnyTabProtected( const ScDocument& rDoc )
430{
431 SCTAB nTabCount = rDoc.GetTableCount();
432 for (SCTAB i=0; i<nTabCount; i++)
433 if (rDoc.IsTabProtected(i))
434 return true;
435 return false;
436}
437
439 pDocShell( pDocSh )
440{
442}
443
445{
447
448 if (pDocShell)
450}
451
453{
454 // reference update does not matter here
455
456 if ( rHint.GetId() == SfxHintId::Dying )
457 {
458 pDocShell = nullptr;
459 }
460}
461
462// XStyleFamilies
463
465{
466 if ( pDocShell )
467 {
468 if ( nType == SfxStyleFamily::Para )
469 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
470 else if ( nType == SfxStyleFamily::Page )
471 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
472 else if ( nType == SfxStyleFamily::Frame )
473 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Frame );
474 }
475 OSL_FAIL("getStyleFamilyByType: no DocShell or wrong SfxStyleFamily");
476 return nullptr;
477}
478
480{
483
484 return nullptr; // invalid index
485}
486
488{
489 if ( pDocShell )
490 {
491 if ( aName == SC_FAMILYNAME_CELL )
492 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
493 else if ( aName == SC_FAMILYNAME_PAGE )
494 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
495 else if ( aName == SC_FAMILYNAME_GRAPHIC )
496 return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Frame );
497 }
498 // no assertion - called directly from getByName
499 return nullptr;
500}
501
502// container::XIndexAccess
503
505{
507}
508
509uno::Any SAL_CALL ScStyleFamiliesObj::getByIndex( sal_Int32 nIndex )
510{
511 SolarMutexGuard aGuard;
512 uno::Reference< container::XNameContainer > xFamily(GetObjectByIndex_Impl(nIndex));
513 if (!xFamily.is())
514 throw lang::IndexOutOfBoundsException();
515
516 return uno::Any(xFamily);
517}
518
520{
521 return cppu::UnoType<container::XNameContainer>::get(); // has to fit to getByIndex
522}
523
525{
526 SolarMutexGuard aGuard;
527 return ( getCount() != 0 );
528}
529
530// container::XNameAccess
531
532uno::Any SAL_CALL ScStyleFamiliesObj::getByName( const OUString& aName )
533{
534 SolarMutexGuard aGuard;
535 uno::Reference< container::XNameContainer > xFamily(GetObjectByName_Impl(aName));
536 if (!xFamily.is())
537 throw container::NoSuchElementException();
538
539 return uno::Any(xFamily);
540}
541
542uno::Sequence<OUString> SAL_CALL ScStyleFamiliesObj::getElementNames()
543{
545}
546
547sal_Bool SAL_CALL ScStyleFamiliesObj::hasByName( const OUString& aName )
548{
550}
551
552// style::XStyleLoader
553
554void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const OUString& aURL,
555 const uno::Sequence<beans::PropertyValue>& aOptions )
556{
559
560 OUString aFilter; // empty - detect
561 OUString aFiltOpt;
562 uno::Reference<io::XInputStream> xInputStream;
563 if (aURL == "private:stream")
564 {
565 for (const auto& rProp : aOptions)
566 {
567 if (rProp.Name == "InputStream")
568 {
569 rProp.Value >>= xInputStream;
570 if (!xInputStream.is())
571 {
572 throw lang::IllegalArgumentException(
573 "Parameter 'InputStream' could not be converted "
574 "to type 'com::sun::star::io::XInputStream'",
575 nullptr, 0);
576 }
577 break;
578 }
579 }
580 }
581
582 ScDocumentLoader aLoader( aURL, aFilter, aFiltOpt, 0, nullptr, xInputStream );
583
584 ScDocShell* pSource = aLoader.GetDocShell();
585
586 loadStylesFromDocShell(pSource, aOptions);
587}
588
589uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderOptions()
590{
591 // return defaults for options (?)
593 { SC_UNONAME_OVERWSTL, uno::Any(true) },
594 { SC_UNONAME_LOADCELL, uno::Any(true) },
596 });
597}
598
599// style::XStyleLoader2
600
601void SAL_CALL ScStyleFamiliesObj::loadStylesFromDocument( const uno::Reference < lang::XComponent > & aSourceComponent,
602 const uno::Sequence<beans::PropertyValue>& aOptions )
603{
604 // Source document docShell
605 if ( !aSourceComponent.is() )
606 throw uno::RuntimeException();
607
608 ScDocShell* pDocShellSrc = dynamic_cast<ScDocShell*> (SfxObjectShell::GetShellFromComponent(aSourceComponent));
609
610 loadStylesFromDocShell(pDocShellSrc, aOptions);
611}
612
613// private
614
616 const uno::Sequence<beans::PropertyValue>& aOptions )
617{
618
619 if ( !(pSource && pDocShell) )
620 return;
621
622 // collect options
623
624 bool bLoadReplace = true; // defaults
625 bool bLoadCellStyles = true;
626 bool bLoadPageStyles = true;
627
628 for (const beans::PropertyValue& rProp : aOptions)
629 {
630 OUString aPropName(rProp.Name);
631
633 bLoadReplace = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
634 else if (aPropName == SC_UNONAME_LOADCELL)
635 bLoadCellStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
636 else if (aPropName == SC_UNONAME_LOADPAGE)
637 bLoadPageStyles = ScUnoHelpFunctions::GetBoolFromAny( rProp.Value );
638 }
639
640 pDocShell->LoadStylesArgs( *pSource, bLoadReplace, bLoadCellStyles, bLoadPageStyles );
641 pDocShell->SetDocumentModified(); // paint is inside LoadStyles
642}
643
645 pDocShell( pDocSh ),
646 eFamily( eFam )
647{
649}
650
652{
654
655 if (pDocShell)
657}
658
660{
661 // reference update does not matter here
662
663 if ( rHint.GetId() == SfxHintId::Dying )
664 {
665 pDocShell = nullptr; // has become invalid
666 }
667}
668
669// XStyleFamily
670
672{
673 if ( pDocShell )
674 {
676 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
677
678 SfxStyleSheetIterator aIter( pStylePool, eFamily );
679 if ( nIndex < aIter.Count() )
680 {
681 SfxStyleSheetBase* pStyle = aIter[nIndex];
682 if ( pStyle )
683 {
684 return new ScStyleObj( pDocShell, eFamily, pStyle->GetName() );
685 }
686 }
687 }
688 return nullptr;
689}
690
692{
693 if ( pDocShell )
694 {
696 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
697 if ( pStylePool->Find( aName, eFamily ) )
698 return new ScStyleObj( pDocShell, eFamily, aName );
699 }
700 return nullptr;
701}
702
703void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::Any& aElement )
704{
705 SolarMutexGuard aGuard;
706 bool bDone = false;
707 // reflection does not need to be uno::XInterface, can be any interface...
708 uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
709 if ( xInterface.is() )
710 {
711 ScStyleObj* pStyleObj = dynamic_cast<ScStyleObj*>( xInterface.get() );
712 if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
713 !pStyleObj->IsInserted() ) // not yet inserted?
714 {
716
718 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
719
722
723 if ( pStylePool->Find( aNameStr, eFamily ) ) // not available yet
724 throw container::ElementExistException();
725
726 (void)pStylePool->Make( aNameStr, eFamily, SfxStyleSearchBits::UserDefined );
727
728 if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
729 rDoc.GetPool()->CellStyleCreated( aNameStr, rDoc );
730
731 pStyleObj->InitDoc( pDocShell, aNameStr ); // object can be used
732
733 if (!rDoc.IsImportingXML())
734 pDocShell->SetDocumentModified(); // new style not used yet
735 bDone = true;
736
737 }
738 }
739
740 if (!bDone)
741 {
742 // other errors are handled above
743 throw lang::IllegalArgumentException();
744 }
745}
746
747void SAL_CALL ScStyleFamilyObj::replaceByName( const OUString& aName, const uno::Any& aElement )
748{
749 SolarMutexGuard aGuard;
752 insertByName( aName, aElement );
753}
754
755void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
756{
757 SolarMutexGuard aGuard;
758 bool bFound = false;
759 if ( pDocShell )
760 {
762
764 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
765
768
769 SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily );
770 if (pStyle)
771 {
772 bFound = true;
773 if ( eFamily == SfxStyleFamily::Para )
774 {
775 // like ScViewFunc::RemoveStyleSheetInUse
777 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
778 double nPPTX = aLogic.X() / 1000.0;
779 double nPPTY = aLogic.Y() / 1000.0;
780 Fraction aZoom(1,1);
781 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
784
785 pStylePool->Remove( pStyle );
786
788 }
789 else if ( eFamily == SfxStyleFamily::Page )
790 {
791 if ( rDoc.RemovePageStyleInUse( aString ) )
792 pDocShell->PageStyleModified( ScResId(STR_STYLENAME_STANDARD), true );
793
794 pStylePool->Remove( pStyle );
795
796 SfxBindings* pBindings = pDocShell->GetViewBindings();
797 if (pBindings)
798 pBindings->Invalidate( SID_STYLE_FAMILY4 );
800 }
801 else
802 {
803 pStylePool->Remove( pStyle );
804
805 SfxBindings* pBindings = pDocShell->GetViewBindings();
806 if (pBindings)
807 pBindings->Invalidate( SID_STYLE_FAMILY3 );
809 }
810 }
811 }
812
813 if (!bFound)
814 throw container::NoSuchElementException();
815}
816
817// container::XIndexAccess
818
819sal_Int32 SAL_CALL ScStyleFamilyObj::getCount()
820{
821 SolarMutexGuard aGuard;
822 if ( pDocShell )
823 {
825 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
826
827 SfxStyleSheetIterator aIter( pStylePool, eFamily );
828 return aIter.Count();
829 }
830 return 0;
831}
832
833uno::Any SAL_CALL ScStyleFamilyObj::getByIndex( sal_Int32 nIndex )
834{
835 SolarMutexGuard aGuard;
836 uno::Reference< style::XStyle > xObj(GetObjectByIndex_Impl(nIndex));
837 if (!xObj.is())
838 throw lang::IndexOutOfBoundsException();
839
840 return uno::Any(xObj);
841}
842
844{
845 return cppu::UnoType<style::XStyle>::get(); // has to fit to getByIndex
846}
847
849{
850 SolarMutexGuard aGuard;
851 return ( getCount() != 0 );
852}
853
854// container::XNameAccess
855
856uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName )
857{
858 SolarMutexGuard aGuard;
859 uno::Reference< style::XStyle > xObj(
861 if (!xObj.is())
862 throw container::NoSuchElementException();
863
864 return uno::Any(xObj);
865}
866
867uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
868{
869 SolarMutexGuard aGuard;
870 if ( pDocShell )
871 {
873 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
874
875 SfxStyleSheetIterator aIter( pStylePool, eFamily );
876 sal_uInt16 nCount = aIter.Count();
877
878 uno::Sequence<OUString> aSeq(nCount);
879 OUString* pAry = aSeq.getArray();
880 SfxStyleSheetBase* pStyle = aIter.First();
881 sal_uInt16 nPos = 0;
882 while (pStyle)
883 {
884 OSL_ENSURE( nPos < nCount, "Count is wrong" );
885 if (nPos < nCount)
887 pStyle->GetName(), eFamily );
888 pStyle = aIter.Next();
889 }
890 return aSeq;
891 }
892 return uno::Sequence<OUString>();
893}
894
895sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName )
896{
897 SolarMutexGuard aGuard;
898 if ( pDocShell )
899 {
901
903 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
904 if ( pStylePool->Find( aString, eFamily ) )
905 return true;
906 }
907 return false;
908}
909
910// XPropertySet
911
912uno::Reference< beans::XPropertySetInfo > SAL_CALL ScStyleFamilyObj::getPropertySetInfo( )
913{
914 OSL_FAIL( "###unexpected!" );
915 return uno::Reference< beans::XPropertySetInfo >();
916}
917
918void SAL_CALL ScStyleFamilyObj::setPropertyValue( const OUString&, const uno::Any& )
919{
920 OSL_FAIL( "###unexpected!" );
921}
922
923uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyName )
924{
925 uno::Any aRet;
926
927 if ( sPropertyName != "DisplayName" )
928 {
929 throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) );
930 }
931
932 SolarMutexGuard aGuard;
933 TranslateId pResId;
934 switch ( eFamily )
935 {
936 case SfxStyleFamily::Para:
937 pResId = STR_STYLE_FAMILY_CELL; break;
938 case SfxStyleFamily::Page:
939 pResId = STR_STYLE_FAMILY_PAGE; break;
940 case SfxStyleFamily::Frame:
941 pResId = STR_STYLE_FAMILY_GRAPHICS; break;
942 default:
943 OSL_FAIL( "ScStyleFamilyObj::getPropertyValue(): invalid family" );
944 }
945 if (pResId)
946 {
947 OUString sDisplayName(ScResId(pResId));
948 aRet <<= sDisplayName;
949 }
950
951 return aRet;
952}
953
954void SAL_CALL ScStyleFamilyObj::addPropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& )
955{
956 OSL_FAIL( "###unexpected!" );
957}
958
959void SAL_CALL ScStyleFamilyObj::removePropertyChangeListener( const OUString&, const uno::Reference< beans::XPropertyChangeListener >& )
960{
961 OSL_FAIL( "###unexpected!" );
962}
963
964void SAL_CALL ScStyleFamilyObj::addVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& )
965{
966 OSL_FAIL( "###unexpected!" );
967}
968
969void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, const uno::Reference< beans::XVetoableChangeListener >& )
970{
971 OSL_FAIL( "###unexpected!" );
972}
973
974// default ctor is needed for reflection
975
977 : pDocShell(pDocSh)
978 , eFamily(eFam)
979 , aStyleName(std::move(aName))
980 , pStyle_cached(nullptr)
981{
982 if (eFam == SfxStyleFamily::Para)
984 else if (eFam == SfxStyleFamily::Page)
986 else
988
989 // if create by ServiceProvider then pDocShell is NULL
990
991 if (pDocShell)
993}
994
995void ScStyleObj::InitDoc( ScDocShell* pNewDocSh, const OUString& rNewName )
996{
997 if ( pNewDocSh && !pDocShell )
998 {
999 aStyleName = rNewName;
1000 pDocShell = pNewDocSh;
1002 }
1003}
1004
1006{
1008
1009 if (pDocShell)
1011}
1012
1014{
1015 // reference update does not matter here
1016
1017 if ( rHint.GetId() == SfxHintId::Dying )
1018 {
1019 pDocShell = nullptr; // has become invalid
1020 }
1021}
1022
1024{
1025 if ( bUseCachedValue )
1026 return pStyle_cached;
1027
1028 pStyle_cached = nullptr;
1029 if ( pDocShell )
1030 {
1031 ScDocument& rDoc = pDocShell->GetDocument();
1032 ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
1033 pStyle_cached = pStylePool->Find( aStyleName, eFamily );
1034 }
1035 return pStyle_cached;
1036}
1037
1038// style::XStyle
1039
1041{
1042 SolarMutexGuard aGuard;
1043 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1044 if (pStyle)
1045 return pStyle->IsUserDefined();
1046 return false;
1047}
1048
1050{
1051 SolarMutexGuard aGuard;
1052 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1053 if (pStyle)
1054 return pStyle->IsUsed();
1055 return false;
1056}
1057
1059{
1060 SolarMutexGuard aGuard;
1061 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1062 if (pStyle)
1064 return OUString();
1065}
1066
1067void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
1068{
1069 SolarMutexGuard aGuard;
1070 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1071 if (!pStyle)
1072 return;
1073
1074 // cell styles cannot be modified if any sheet is protected
1075 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1076 return;
1077
1080
1081 OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, eFamily ));
1082 bool bOk = pStyle->SetParent( aString );
1083 if (!bOk)
1084 return;
1085
1086 // as by setPropertyValue
1087
1088 ScDocument& rDoc = pDocShell->GetDocument();
1089 if ( eFamily == SfxStyleFamily::Para )
1090 {
1091 // update line height
1092
1094 Point aLogic = pVDev->LogicToPixel( Point(1000,1000), MapMode(MapUnit::MapTwip));
1095 double nPPTX = aLogic.X() / 1000.0;
1096 double nPPTY = aLogic.Y() / 1000.0;
1097 Fraction aZoom(1,1);
1098 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1099
1100 if (!rDoc.IsImportingXML())
1101 {
1104 }
1105 }
1106 else if ( eFamily == SfxStyleFamily::Page )
1107 {
1109
1111 }
1112 else
1113 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1114}
1115
1116// container::XNamed
1117
1118OUString SAL_CALL ScStyleObj::getName()
1119{
1120 SolarMutexGuard aGuard;
1121 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1122 if (pStyle)
1124 return OUString();
1125}
1126
1127void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
1128{
1129 SolarMutexGuard aGuard;
1130 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1131 if (!pStyle)
1132 return;
1133
1134 // cell styles cannot be renamed if any sheet is protected
1135 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1136 return;
1137
1140
1141 bool bOk = pStyle->SetName( aNewName );
1142 if (!bOk)
1143 return;
1144
1145 aStyleName = aNewName;
1146
1147 ScDocument& rDoc = pDocShell->GetDocument();
1148 if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
1149 rDoc.GetPool()->CellStyleCreated( aNewName, rDoc );
1150
1151 // cell styles = 2, drawing styles = 3, page styles = 4
1152 sal_uInt16 nId = eFamily == SfxStyleFamily::Para ? SID_STYLE_FAMILY2 :
1153 (eFamily == SfxStyleFamily::Page ? SID_STYLE_FAMILY4 : SID_STYLE_FAMILY3);
1154 SfxBindings* pBindings = pDocShell->GetViewBindings();
1155 if (pBindings)
1156 {
1157 pBindings->Invalidate( nId );
1158 pBindings->Invalidate( SID_STYLE_APPLY );
1159 }
1160}
1161
1162uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules()
1163{
1164 SvxNumRule aRule( SvxNumRuleFlags::NONE, 0, true ); // nothing supported
1165 return SvxCreateNumRule( aRule );
1166}
1167
1168// beans::XPropertyState
1169
1170const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( std::u16string_view rPropName,
1171 const SfxItemPropertyMapEntry*& rpResultEntry )
1172{
1173 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1174 if ( pStyle )
1175 {
1176 const SfxItemPropertyMapEntry* pEntry = nullptr;
1177 if ( eFamily == SfxStyleFamily::Page )
1178 {
1179 pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
1180 if ( pEntry ) // only item-WIDs in header/footer map
1181 {
1182 rpResultEntry = pEntry;
1183 return &pStyle->GetItemSet().Get(ATTR_PAGE_HEADERSET).GetItemSet();
1184 }
1185 pEntry = lcl_GetFooterStyleMap()->getByName( rPropName );
1186 if ( pEntry ) // only item-WIDs in header/footer map
1187 {
1188 rpResultEntry = pEntry;
1189 return &pStyle->GetItemSet().Get(ATTR_PAGE_FOOTERSET).GetItemSet();
1190 }
1191 }
1192 pEntry = pPropSet->getPropertyMap().getByName( rPropName );
1193 if ( pEntry )
1194 {
1195 rpResultEntry = pEntry;
1196 return &pStyle->GetItemSet();
1197 }
1198 }
1199
1200 rpResultEntry = nullptr;
1201 return nullptr;
1202}
1203
1204beans::PropertyState ScStyleObj::getPropertyState_Impl( std::u16string_view aPropertyName )
1205{
1206 beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
1207
1208 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1209 const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1210
1211 if ( pItemSet && pResultEntry )
1212 {
1213 sal_uInt16 nWhich = pResultEntry->nWID;
1214 if ( nWhich == SC_WID_UNO_TBLBORD || nWhich == SC_WID_UNO_TBLBORD2 )
1215 {
1216 nWhich = ATTR_BORDER;
1217 }
1218 if ( nWhich == OWN_ATTR_FILLBMP_MODE )
1219 {
1220 if ( pItemSet->GetItemState( XATTR_FILLBMP_STRETCH, false ) == SfxItemState::SET ||
1221 pItemSet->GetItemState( XATTR_FILLBMP_TILE, false ) == SfxItemState::SET )
1222 {
1223 eRet = beans::PropertyState_DIRECT_VALUE;
1224 }
1225 else
1226 {
1227 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1228 }
1229 }
1230 else if ( nWhich == SDRATTR_TEXTDIRECTION )
1231 {
1232 eRet = beans::PropertyState_DEFAULT_VALUE;
1233 }
1234 else if ( IsScItemWid( nWhich ) || eFamily == SfxStyleFamily::Frame )
1235 {
1236 SfxItemState eState = pItemSet->GetItemState( nWhich, false );
1237
1238// // if no rotate value is set, look at orientation
1239// //! also for a fixed value of 0 (in case orientation is ambiguous)?
1240// if ( nWhich == ATTR_ROTATE_VALUE && eState == SfxItemState::DEFAULT )
1241// eState = pItemSet->GetItemState( ATTR_ORIENTATION, sal_False );
1242
1243 if ( eState == SfxItemState::SET )
1244 eRet = beans::PropertyState_DIRECT_VALUE;
1245 else if ( eState == SfxItemState::DEFAULT )
1246 eRet = beans::PropertyState_DEFAULT_VALUE;
1247 else
1248 {
1249 assert(eFamily == SfxStyleFamily::Frame);
1250 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1251 }
1252 }
1253 }
1254 return eRet;
1255}
1256
1257beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPropertyName )
1258{
1259 SolarMutexGuard aGuard;
1260 GetStyle_Impl();
1261
1262 return getPropertyState_Impl( aPropertyName );
1263}
1264
1265uno::Sequence<beans::PropertyState> SAL_CALL ScStyleObj::getPropertyStates( const uno::Sequence<OUString>& aPropertyNames )
1266{
1267 SolarMutexGuard aGuard;
1268 GetStyle_Impl();
1269
1270 uno::Sequence<beans::PropertyState> aRet( aPropertyNames.getLength() );
1271 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aRet.getArray(),
1272 [this](const OUString& rName) -> beans::PropertyState { return getPropertyState_Impl(rName); });
1273 return aRet;
1274}
1275
1276void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName )
1277{
1278 SolarMutexGuard aGuard;
1279 GetStyle_Impl();
1280
1281 const SfxItemPropertyMapEntry* pEntry = pPropSet->getPropertyMap().getByName( aPropertyName );
1282 if ( !pEntry )
1283 throw beans::UnknownPropertyException(aPropertyName);
1284
1285 setPropertyValue_Impl( aPropertyName, pEntry, nullptr );
1286}
1287
1288uno::Any ScStyleObj::getPropertyDefault_Impl( std::u16string_view aPropertyName )
1289{
1290 uno::Any aAny;
1291
1292 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1293 const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1294
1295 if ( pStyleSet && pResultEntry )
1296 {
1297 sal_uInt16 nWhich = pResultEntry->nWID;
1298
1299 if ( IsScItemWid( nWhich ) )
1300 {
1301 // Default is default from ItemPool, not from Standard-Style,
1302 // so it is the same as in setPropertyToDefault
1303 SfxItemSet aEmptySet( *pStyleSet->GetPool(), pStyleSet->GetRanges() );
1304 // default items with wrong Slot-ID are not functional in SfxItemPropertySet3
1306 if ( aEmptySet.GetPool()->GetSlotId(nWhich) == nWhich &&
1307 aEmptySet.GetItemState(nWhich, false) == SfxItemState::DEFAULT )
1308 {
1309 aEmptySet.Put( aEmptySet.Get( nWhich ) );
1310 }
1311 const SfxItemSet* pItemSet = &aEmptySet;
1312
1313 switch ( nWhich ) // special item handling
1314 {
1315 case ATTR_VALUE_FORMAT:
1316 // default has no language set
1317 aAny <<= sal_Int32( static_cast<const SfxUInt32Item&>(pItemSet->Get(nWhich)).GetValue() );
1318 break;
1319 case ATTR_INDENT:
1320 aAny <<= sal_Int16( convertTwipToMm100(static_cast<const ScIndentItem&>(
1321 pItemSet->Get(nWhich)).GetValue()) );
1322 break;
1323 case ATTR_PAGE_SCALE:
1326 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->Get(nWhich)).GetValue() );
1327 break;
1328 case ATTR_PAGE_CHARTS:
1329 case ATTR_PAGE_OBJECTS:
1330 case ATTR_PAGE_DRAWINGS:
1332 aAny <<= static_cast<const ScViewObjectModeItem&>(pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW;
1333 break;
1334 case ATTR_PAGE_SCALETO:
1335 {
1336 const ScPageScaleToItem aItem(static_cast<const ScPageScaleToItem&>(pItemSet->Get(nWhich)));
1337 if ( aPropertyName == SC_UNO_PAGE_SCALETOX )
1338 aAny <<= static_cast<sal_Int16>(aItem.GetWidth());
1339 else
1340 aAny <<= static_cast<sal_Int16>(aItem.GetHeight());
1341 }
1342 break;
1343 default:
1344 pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
1345 }
1346 }
1347 else if ( IsScUnoWid( nWhich ) )
1348 {
1349 SfxItemSet aEmptySet( *pStyleSet->GetPool(), pStyleSet->GetRanges() );
1350 const SfxItemSet* pItemSet = &aEmptySet;
1351 switch ( nWhich )
1352 {
1353 case SC_WID_UNO_TBLBORD:
1355 {
1356 const SfxPoolItem& rItem = pItemSet->Get(ATTR_BORDER);
1357 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1359 if (nWhich == SC_WID_UNO_TBLBORD2)
1360 ScHelperFunctions::AssignTableBorder2ToAny(aAny, aOuter, aInner, true);
1361 else
1362 ScHelperFunctions::AssignTableBorderToAny(aAny, aOuter, aInner, true);
1363 }
1364 break;
1365 }
1366 }
1367 else if ( nWhich == SDRATTR_TEXTDIRECTION )
1368 {
1369 aAny <<= false;
1370 }
1371 else if ( nWhich == OWN_ATTR_FILLBMP_MODE )
1372 {
1373 aAny <<= css::drawing::BitmapMode_REPEAT;
1374 }
1375 else if ( nWhich != OWN_ATTR_TEXTCOLUMNS )
1376 {
1377 SfxItemSet aItemSet(*pStyleSet->GetPool(), pStyleSet->GetRanges());
1378 aAny = SvxItemPropertySet_getPropertyValue(pResultEntry, aItemSet);
1379 }
1380 }
1381 return aAny;
1382}
1383
1384uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName )
1385{
1386 SolarMutexGuard aGuard;
1387 GetStyle_Impl();
1388
1389 return getPropertyDefault_Impl( aPropertyName );
1390}
1391
1392uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyDefaults( const uno::Sequence<OUString>& aPropertyNames )
1393{
1394 SolarMutexGuard aGuard;
1395 GetStyle_Impl();
1396
1397 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1398 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.getArray(),
1399 [this](const OUString& rName) -> uno::Any { return getPropertyDefault_Impl(rName); });
1400 return aSequence;
1401}
1402
1403// XMultiPropertySet
1404
1405void SAL_CALL ScStyleObj::setPropertyValues( const uno::Sequence< OUString >& aPropertyNames,
1406 const uno::Sequence< uno::Any >& aValues )
1407{
1408 SolarMutexGuard aGuard;
1409 GetStyle_Impl();
1410
1411 if ( aValues.getLength() != aPropertyNames.getLength() )
1412 throw lang::IllegalArgumentException();
1413
1414 const OUString* pNames = aPropertyNames.getConstArray();
1415 const uno::Any* pValues = aValues.getConstArray();
1416 const SfxItemPropertyMap& rPropertyMap = pPropSet->getPropertyMap();
1417 for ( sal_Int32 i = 0; i < aPropertyNames.getLength(); i++ )
1418 {
1419 const SfxItemPropertyMapEntry* pEntry = rPropertyMap.getByName( pNames[i] );
1420 setPropertyValue_Impl( pNames[i], pEntry, &pValues[i] );
1421 }
1422}
1423
1424uno::Sequence<uno::Any> SAL_CALL ScStyleObj::getPropertyValues( const uno::Sequence< OUString >& aPropertyNames )
1425{
1426 SolarMutexGuard aGuard;
1427 GetStyle_Impl();
1428
1429 uno::Sequence<uno::Any> aSequence( aPropertyNames.getLength() );
1430 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aSequence.getArray(),
1431 [this](const OUString& rName) -> uno::Any { return getPropertyValue_Impl(rName); });
1432 return aSequence;
1433}
1434
1435void SAL_CALL ScStyleObj::addPropertiesChangeListener( const uno::Sequence<OUString>& /* aPropertyNames */,
1436 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1437{
1438 // no bound properties
1439}
1440
1442 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1443{
1444 // no bound properties
1445}
1446
1447void SAL_CALL ScStyleObj::firePropertiesChangeEvent( const uno::Sequence<OUString>& /* aPropertyNames */,
1448 const uno::Reference<beans::XPropertiesChangeListener>& /* xListener */ )
1449{
1450 // no bound properties
1451}
1452
1453// XMultiPropertyStates
1454// getPropertyStates already defined for XPropertyState
1455
1457{
1458 SolarMutexGuard aGuard;
1459
1460 SfxStyleSheetBase* pStyle = GetStyle_Impl();
1461 if ( !pStyle )
1462 return;
1463
1464 // cell styles cannot be modified if any sheet is protected
1465 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1466 throw uno::RuntimeException();
1467
1468 SfxItemSet& rSet = pStyle->GetItemSet();
1469 rSet.ClearItem(); // set all items to default
1470
1472
1473 ScDocument& rDoc = pDocShell->GetDocument();
1474 if ( eFamily == SfxStyleFamily::Para )
1475 {
1476 // row heights
1477
1479 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
1480 double nPPTX = aLogic.X() / 1000.0;
1481 double nPPTY = aLogic.Y() / 1000.0;
1482 Fraction aZoom(1,1);
1483 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1484
1485 if (!rDoc.IsImportingXML())
1486 {
1489 }
1490 }
1491 else if ( eFamily == SfxStyleFamily::Page )
1492 {
1493 // #i22448# apply the default BoxInfoItem for page styles again
1494 // (same content as in ScStyleSheet::GetItemSet, to control the dialog)
1495 SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
1496 aBoxInfoItem.SetTable( false );
1497 aBoxInfoItem.SetDist( true );
1498 aBoxInfoItem.SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
1499 rSet.Put( aBoxInfoItem );
1500
1502 }
1503 else
1504 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1505}
1506
1507void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>& aPropertyNames )
1508{
1509 SolarMutexGuard aGuard;
1510 GetStyle_Impl();
1511
1512 const SfxItemPropertyMap& rPropertyMap = pPropSet->getPropertyMap();
1513 for ( const OUString& rName : aPropertyNames )
1514 {
1515 const SfxItemPropertyMapEntry* pEntry = rPropertyMap.getByName( rName );
1516 setPropertyValue_Impl( rName, pEntry, nullptr );
1517 }
1518}
1519
1520// beans::XPropertySet
1521
1522uno::Reference<beans::XPropertySetInfo> SAL_CALL ScStyleObj::getPropertySetInfo()
1523{
1524 SolarMutexGuard aGuard;
1525 return pPropSet->getPropertySetInfo();
1526}
1527
1528void SAL_CALL ScStyleObj::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue )
1529{
1530 SolarMutexGuard aGuard;
1531 GetStyle_Impl();
1532
1533 const SfxItemPropertyMapEntry* pEntry = pPropSet->getPropertyMap().getByName( aPropertyName );
1534 if ( !pEntry )
1535 throw beans::UnknownPropertyException(aPropertyName);
1536
1537 setPropertyValue_Impl( aPropertyName, pEntry, &aValue );
1538}
1539
1540void ScStyleObj::setPropertyValue_Impl( std::u16string_view rPropertyName, const SfxItemPropertyMapEntry* pEntry, const uno::Any* pValue )
1541{
1542 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1543 if ( !(pStyle && pEntry) )
1544 return;
1545
1546 // cell styles cannot be modified if any sheet is protected
1547 if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
1548 throw uno::RuntimeException();
1549
1550 SfxItemSet& rSet = pStyle->GetItemSet(); // change directly in active Style
1551 bool bDone = false;
1552 if ( eFamily == SfxStyleFamily::Page )
1553 {
1554 if(pEntry->nWID == SC_WID_UNO_HEADERSET)
1555 {
1556 const SfxItemPropertyMapEntry* pHeaderEntry = lcl_GetHeaderStyleMap()->getByName( rPropertyName );
1557 if ( pHeaderEntry ) // only item-WIDs in header/footer map
1558 {
1559 SvxSetItem aNewHeader( rSet.Get(ATTR_PAGE_HEADERSET) );
1560 if (pValue)
1561 pPropSet->setPropertyValue( *pHeaderEntry, *pValue, aNewHeader.GetItemSet() );
1562 else
1563 aNewHeader.GetItemSet().ClearItem( pHeaderEntry->nWID );
1564 rSet.Put( aNewHeader );
1565 bDone = true;
1566 }
1567 }
1568 else if(pEntry->nWID == SC_WID_UNO_FOOTERSET)
1569 {
1570 const SfxItemPropertyMapEntry* pFooterEntry = lcl_GetFooterStyleMap()->getByName( rPropertyName );
1571 if ( pFooterEntry ) // only item-WIDs in header/footer map
1572 {
1573 SvxSetItem aNewFooter( rSet.Get(ATTR_PAGE_FOOTERSET) );
1574 if (pValue)
1575 pPropSet->setPropertyValue( *pFooterEntry, *pValue, aNewFooter.GetItemSet() );
1576 else
1577 aNewFooter.GetItemSet().ClearItem( pFooterEntry->nWID );
1578 rSet.Put( aNewFooter );
1579 bDone = true;
1580 }
1581 }
1582 }
1583 if (!bDone)
1584 {
1585 if (IsScItemWid(pEntry->nWID))
1586 {
1587 if (pValue)
1588 {
1589 switch (pEntry->nWID) // special item handling
1590 {
1591 case ATTR_VALUE_FORMAT:
1592 {
1593 // language for number formats
1594 SvNumberFormatter* pFormatter
1596 sal_uInt32 nOldFormat = rSet.Get(ATTR_VALUE_FORMAT).GetValue();
1597 LanguageType eOldLang
1598 = rSet.Get(ATTR_LANGUAGE_FORMAT).GetLanguage();
1599 pFormatter->GetFormatForLanguageIfBuiltIn(nOldFormat, eOldLang);
1600
1601 sal_uInt32 nNewFormat = 0;
1602 *pValue >>= nNewFormat;
1604
1605 const SvNumberformat* pNewEntry = pFormatter->GetEntry(nNewFormat);
1606 LanguageType eNewLang
1607 = pNewEntry ? pNewEntry->GetLanguage() : LANGUAGE_DONTKNOW;
1608 if (eNewLang != eOldLang && eNewLang != LANGUAGE_DONTKNOW)
1610
1612 }
1613 break;
1614 case ATTR_INDENT:
1615 {
1616 sal_Int16 nVal = 0;
1617 *pValue >>= nVal;
1619 }
1620 break;
1621 case ATTR_ROTATE_VALUE:
1622 {
1623 sal_Int32 nRotVal = 0;
1624 if (*pValue >>= nRotVal)
1625 {
1626 // stored value is always between 0 and 360 deg.
1627 nRotVal %= 36000;
1628 if (nRotVal < 0)
1629 nRotVal += 36000;
1631 }
1632 }
1633 break;
1634 case ATTR_STACKED:
1635 {
1636 table::CellOrientation eOrient;
1637 if (*pValue >>= eOrient)
1638 {
1639 switch (eOrient)
1640 {
1641 case table::CellOrientation_STANDARD:
1643 break;
1644 case table::CellOrientation_TOPBOTTOM:
1646 rSet.Put(ScRotateValueItem(27000_deg100));
1647 break;
1648 case table::CellOrientation_BOTTOMTOP:
1650 rSet.Put(ScRotateValueItem(9000_deg100));
1651 break;
1652 case table::CellOrientation_STACKED:
1654 break;
1655 default:
1656 {
1657 // added to avoid warnings
1658 }
1659 }
1660 }
1661 }
1662 break;
1663 case ATTR_PAGE_SCALE:
1665 {
1669 sal_Int16 nVal = 0;
1670 *pValue >>= nVal;
1671 rSet.Put(SfxUInt16Item(pEntry->nWID, nVal));
1672 }
1673 break;
1675 {
1676 sal_Int16 nVal = 0;
1677 *pValue >>= nVal;
1679 }
1680 break;
1681 case ATTR_PAGE_CHARTS:
1682 case ATTR_PAGE_OBJECTS:
1683 case ATTR_PAGE_DRAWINGS:
1684 {
1685 bool bBool = false;
1686 *pValue >>= bBool;
1689 pEntry->nWID, bBool ? VOBJ_MODE_SHOW : VOBJ_MODE_HIDE));
1690 }
1691 break;
1692 case ATTR_PAGE_PAPERBIN:
1693 {
1695 bool bFound = false;
1696
1697 OUString aName;
1698 if (*pValue >>= aName)
1699 {
1701 bFound = true;
1702 else
1703 {
1704 Printer* pPrinter = pDocShell->GetPrinter();
1705 if (pPrinter)
1706 {
1707 const sal_uInt16 nCount = pPrinter->GetPaperBinCount();
1708 for (sal_uInt16 i = 0; i < nCount; i++)
1709 if (aName == pPrinter->GetPaperBinName(i))
1710 {
1711 nTray = static_cast<sal_uInt8>(i);
1712 bFound = true;
1713 break;
1714 }
1715 }
1716 }
1717 }
1718 if (!bFound)
1719 throw lang::IllegalArgumentException();
1720
1722
1723 }
1724 break;
1725 case ATTR_PAGE_SCALETO:
1726 {
1727 sal_Int16 nPages = 0;
1728 if (*pValue >>= nPages)
1729 {
1731 if (rPropertyName == SC_UNO_PAGE_SCALETOX)
1732 aItem.SetWidth(static_cast<sal_uInt16>(nPages));
1733 else
1734 aItem.SetHeight(static_cast<sal_uInt16>(nPages));
1735 rSet.Put(aItem);
1738 }
1739 }
1740 break;
1741 case ATTR_HIDDEN:
1742 {
1743 bool bHidden = false;
1744 if (*pValue >>= bHidden)
1745 pStyle->SetHidden(bHidden);
1746 }
1747 break;
1748 default:
1749 // default items with wrong Slot-ID are not working in SfxItemPropertySet3
1751 if (rSet.GetPool()->GetSlotId(pEntry->nWID) == pEntry->nWID
1752 && rSet.GetItemState(pEntry->nWID, false) == SfxItemState::DEFAULT)
1753 {
1754 rSet.Put(rSet.Get(pEntry->nWID));
1755 }
1756 pPropSet->setPropertyValue(*pEntry, *pValue, rSet);
1757 }
1758 }
1759 else
1760 {
1761 rSet.ClearItem(pEntry->nWID);
1762 // language for number formats
1763 if (pEntry->nWID == ATTR_VALUE_FORMAT)
1765
1767 }
1768 }
1769 else if (IsScUnoWid(pEntry->nWID))
1770 {
1771 switch (pEntry->nWID)
1772 {
1773 case SC_WID_UNO_TBLBORD:
1774 {
1775 if (pValue)
1776 {
1777 table::TableBorder aBorder;
1778 if (*pValue >>= aBorder)
1779 {
1780 SvxBoxItem aOuter(ATTR_BORDER);
1782 ScHelperFunctions::FillBoxItems(aOuter, aInner, aBorder);
1783 rSet.Put(aOuter);
1784 }
1785 }
1786 else
1787 {
1789 }
1790 }
1791 break;
1793 {
1794 if (pValue)
1795 {
1796 table::TableBorder2 aBorder2;
1797 if (*pValue >>= aBorder2)
1798 {
1799 SvxBoxItem aOuter(ATTR_BORDER);
1801 ScHelperFunctions::FillBoxItems(aOuter, aInner, aBorder2);
1802 rSet.Put(aOuter);
1803 }
1804 }
1805 else
1806 {
1808 }
1809 }
1810 break;
1811 }
1812 }
1813 else if (pEntry->nWID == OWN_ATTR_FILLBMP_MODE)
1814 {
1815 css::drawing::BitmapMode eMode;
1816 if (!pValue)
1817 {
1820 }
1821 else if (*pValue >>= eMode)
1822 {
1823 rSet.Put(XFillBmpStretchItem(eMode == css::drawing::BitmapMode_STRETCH));
1824 rSet.Put(XFillBmpTileItem(eMode == css::drawing::BitmapMode_REPEAT));
1825 }
1826 }
1827 else if(pEntry->nMemberId == MID_NAME &&
1828 (pEntry->nWID == XATTR_FILLBITMAP || pEntry->nWID == XATTR_FILLGRADIENT ||
1829 pEntry->nWID == XATTR_FILLHATCH || pEntry->nWID == XATTR_FILLFLOATTRANSPARENCE ||
1830 pEntry->nWID == XATTR_LINESTART || pEntry->nWID == XATTR_LINEEND || pEntry->nWID == XATTR_LINEDASH))
1831 {
1832 OUString aTempName;
1833 if (*pValue >>= aTempName)
1834 SvxShape::SetFillAttribute(pEntry->nWID, aTempName, rSet);
1835 }
1836 else if(pEntry->nWID == SDRATTR_TEXTDIRECTION)
1837 {
1838 return; // not yet implemented for styles
1839 }
1840 else if(!SvxUnoTextRangeBase::SetPropertyValueHelper(pEntry, *pValue, rSet))
1841 {
1842 SvxItemPropertySet_setPropertyValue(pEntry, *pValue, rSet);
1843 }
1844 }
1845
1848
1849 if ( eFamily == SfxStyleFamily::Para )
1850 {
1851 // If we are loading, we can delay line height calculation, because we are going to re-calc all of those
1852 // after load.
1853 if (pDocShell && !pDocShell->IsLoading())
1854 {
1855 // update line height
1857 Point aLogic = pVDev->LogicToPixel(Point(1000,1000), MapMode(MapUnit::MapTwip));
1858 double nPPTX = aLogic.X() / 1000.0;
1859 double nPPTY = aLogic.Y() / 1000.0;
1860 Fraction aZoom(1,1);
1861 ScDocument& rDoc = pDocShell->GetDocument();
1862 rDoc.StyleSheetChanged( pStyle, false, pVDev, nPPTX, nPPTY, aZoom, aZoom );
1863
1864 if (!rDoc.IsImportingXML())
1865 {
1868 }
1869 }
1870 }
1871 else if ( eFamily == SfxStyleFamily::Page )
1872 {
1874
1876 }
1877 else
1878 static_cast<SfxStyleSheet*>(GetStyle_Impl())->Broadcast(SfxHint(SfxHintId::DataChanged));
1879}
1880
1881uno::Any ScStyleObj::getPropertyValue_Impl( std::u16string_view aPropertyName )
1882{
1883 uno::Any aAny;
1884 SfxStyleSheetBase* pStyle = GetStyle_Impl( true );
1885
1886 if ( aPropertyName == SC_UNONAME_DISPNAME ) // read-only
1887 {
1888 // core always has the display name
1889 if ( pStyle )
1890 aAny <<= pStyle->GetName();
1891 }
1892 else
1893 {
1894 const SfxItemPropertyMapEntry* pResultEntry = nullptr;
1895 const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
1896
1897 if ( pItemSet && pResultEntry )
1898 {
1899 sal_uInt16 nWhich = pResultEntry->nWID;
1900
1901 if ( IsScItemWid( nWhich ) )
1902 {
1903 switch ( nWhich ) // for special item handling
1904 {
1905 case ATTR_VALUE_FORMAT:
1906 if ( pDocShell )
1907 {
1908 sal_uInt32 nOldFormat =
1909 pItemSet->Get( ATTR_VALUE_FORMAT ).GetValue();
1910 LanguageType eOldLang =
1911 pItemSet->Get( ATTR_LANGUAGE_FORMAT ).GetLanguage();
1912 nOldFormat = pDocShell->GetDocument().GetFormatTable()->
1913 GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
1914 aAny <<= nOldFormat;
1915 }
1916 break;
1917 case ATTR_INDENT:
1918 aAny <<= sal_Int16( convertTwipToMm100(static_cast<const ScIndentItem&>(
1919 pItemSet->Get(nWhich)).GetValue()) );
1920 break;
1921 case ATTR_STACKED:
1922 {
1923 Degree100 nRot = pItemSet->Get(ATTR_ROTATE_VALUE).GetValue();
1924 bool bStacked = static_cast<const ScVerticalStackCell&>(pItemSet->Get(nWhich)).GetValue();
1926 }
1927 break;
1928 case ATTR_PAGE_SCALE:
1931 aAny <<= sal_Int16( static_cast<const SfxUInt16Item&>(pItemSet->Get(nWhich)).GetValue() );
1932 break;
1933 case ATTR_PAGE_CHARTS:
1934 case ATTR_PAGE_OBJECTS:
1935 case ATTR_PAGE_DRAWINGS:
1937 aAny <<= static_cast<const ScViewObjectModeItem&>(pItemSet->Get(nWhich)).GetValue() == VOBJ_MODE_SHOW;
1938 break;
1939 case ATTR_PAGE_PAPERBIN:
1940 {
1941 // property PrinterPaperTray is the name of the tray
1942
1943 sal_uInt8 nValue = static_cast<const SvxPaperBinItem&>(pItemSet->Get(nWhich)).GetValue();
1944 OUString aName;
1947 else
1948 {
1949 Printer* pPrinter = pDocShell->GetPrinter();
1950 if (pPrinter)
1951 aName = pPrinter->GetPaperBinName( nValue );
1952 }
1953 aAny <<= aName;
1954 }
1955 break;
1956 case ATTR_PAGE_SCALETO:
1957 {
1958 const ScPageScaleToItem& aItem(pItemSet->Get(ATTR_PAGE_SCALETO));
1959 if ( aPropertyName == SC_UNO_PAGE_SCALETOX )
1960 aAny <<= static_cast<sal_Int16>(aItem.GetWidth());
1961 else
1962 aAny <<= static_cast<sal_Int16>(aItem.GetHeight());
1963 }
1964 break;
1965 case ATTR_HIDDEN:
1966 {
1967 bool bHidden = pStyle && pStyle->IsHidden();
1968 aAny <<= bHidden;
1969 }
1970 break;
1971 default:
1972 // Default-Items with wrong Slot-ID don't work in SfxItemPropertySet3
1974 if ( pItemSet->GetPool()->GetSlotId(nWhich) == nWhich &&
1975 pItemSet->GetItemState(nWhich, false) == SfxItemState::DEFAULT )
1976 {
1977 SfxItemSet aNoEmptySet( *pItemSet );
1978 aNoEmptySet.Put( aNoEmptySet.Get( nWhich ) );
1979 pPropSet->getPropertyValue( *pResultEntry, aNoEmptySet, aAny );
1980 }
1981 else
1982 pPropSet->getPropertyValue( *pResultEntry, *pItemSet, aAny );
1983 }
1984 }
1985 else if ( IsScUnoWid( nWhich ) )
1986 {
1987 switch ( nWhich )
1988 {
1989 case SC_WID_UNO_TBLBORD:
1991 {
1992 const SfxPoolItem& rItem = pItemSet->Get(ATTR_BORDER);
1993 SvxBoxItem aOuter(static_cast<const SvxBoxItem&>(rItem));
1995 if (nWhich == SC_WID_UNO_TBLBORD2)
1996 ScHelperFunctions::AssignTableBorder2ToAny(aAny, aOuter, aInner,
1997 true);
1998 else
1999 ScHelperFunctions::AssignTableBorderToAny(aAny, aOuter, aInner,
2000 true);
2001 }
2002 break;
2003 }
2004 }
2005 else if ( nWhich == SDRATTR_TEXTDIRECTION )
2006 {
2007 aAny <<= false;
2008 }
2009 else if ( nWhich == OWN_ATTR_FILLBMP_MODE )
2010 {
2011 const XFillBmpStretchItem* pStretchItem = pItemSet->GetItem<XFillBmpStretchItem>(XATTR_FILLBMP_STRETCH);
2012 const XFillBmpTileItem* pTileItem = pItemSet->GetItem<XFillBmpTileItem>(XATTR_FILLBMP_TILE);
2013
2014 if ( pStretchItem && pTileItem )
2015 {
2016 if ( pTileItem->GetValue() )
2017 aAny <<= css::drawing::BitmapMode_REPEAT;
2018 else if ( pStretchItem->GetValue() )
2019 aAny <<= css::drawing::BitmapMode_STRETCH;
2020 else
2021 aAny <<= css::drawing::BitmapMode_NO_REPEAT;
2022 }
2023 }
2024 else if ( nWhich != OWN_ATTR_TEXTCOLUMNS )
2025 {
2026 if (!SvxUnoTextRangeBase::GetPropertyValueHelper(*pItemSet, pResultEntry, aAny))
2027 aAny = SvxItemPropertySet_getPropertyValue(pResultEntry, *pItemSet);
2028
2029 // since the sfx uint16 item now exports a sal_Int32, we may have to fix this here
2030 if (pResultEntry->aType == ::cppu::UnoType<sal_Int16>::get() &&
2031 aAny.getValueType() == ::cppu::UnoType<sal_Int32>::get())
2032 {
2033 aAny <<= static_cast<sal_Int16>(aAny.get<sal_Int32>());
2034 }
2035 }
2036 }
2037 }
2038
2039 return aAny;
2040}
2041
2042uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName )
2043{
2044 SolarMutexGuard aGuard;
2045 GetStyle_Impl();
2046
2047 return getPropertyValue_Impl( aPropertyName );
2048}
2049
2051
2052// lang::XServiceInfo
2053
2054OUString SAL_CALL ScStyleObj::getImplementationName()
2055{
2056 return "ScStyleObj";
2057}
2058
2059sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
2060{
2061 return cppu::supportsService(this, rServiceName);
2062}
2063
2064uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
2065{
2066 if (eFamily == SfxStyleFamily::Page)
2068
2069 if (eFamily == SfxStyleFamily::Frame)
2071
2073}
2074
2075/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
const SCTAB MAXTAB
Definition: address.hxx:70
sal_uInt16 GetPaperBinCount() const
OUString GetPaperBinName(sal_uInt16 nPaperBin) const
void SetDocumentModified()
Definition: docsh.cxx:2998
SfxBindings * GetViewBindings()
Definition: docsh4.cxx:2643
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:1779
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:6165
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:903
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
Definition: document.cxx:6170
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
Definition: document.cxx:5032
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:467
void RemoveUnoObject(SfxListener &rObject)
Definition: documen3.cxx:911
bool IsImportingXML() const
Definition: document.hxx:2226
static void AssignTableBorder2ToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
Definition: cellsuno.cxx:1019
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:1011
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:542
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: styleuno.cxx:509
virtual sal_Bool SAL_CALL hasElements() override
Definition: styleuno.cxx:524
rtl::Reference< ScStyleFamilyObj > GetObjectByName_Impl(std::u16string_view aName) const
Definition: styleuno.cxx:487
virtual css::uno::Type SAL_CALL getElementType() override
Definition: styleuno.cxx:519
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: styleuno.cxx:547
virtual ~ScStyleFamiliesObj() override
Definition: styleuno.cxx:444
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:601
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: styleuno.cxx:532
rtl::Reference< ScStyleFamilyObj > GetObjectByIndex_Impl(sal_uInt32 nIndex) const
Definition: styleuno.cxx:479
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getStyleLoaderOptions() override
Definition: styleuno.cxx:589
ScDocShell * pDocShell
Definition: styleuno.hxx:55
virtual sal_Int32 SAL_CALL getCount() override
Definition: styleuno.cxx:504
void loadStylesFromDocShell(ScDocShell *pSource, const css::uno::Sequence< css::beans::PropertyValue > &aOptions)
Definition: styleuno.cxx:615
ScStyleFamiliesObj(ScDocShell *pDocSh)
Definition: styleuno.cxx:438
virtual void SAL_CALL loadStylesFromURL(const OUString &URL, const css::uno::Sequence< css::beans::PropertyValue > &aOptions) override
Definition: styleuno.cxx:554
rtl::Reference< ScStyleFamilyObj > GetObjectByType_Impl(SfxStyleFamily nType) const
Definition: styleuno.cxx:464
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:452
SfxStyleFamily eFamily
Definition: styleuno.hxx:109
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: styleuno.cxx:912
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: styleuno.cxx:969
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: styleuno.cxx:918
ScStyleFamilyObj(ScDocShell *pDocSh, SfxStyleFamily eFam)
Definition: styleuno.cxx:644
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: styleuno.cxx:867
virtual sal_Int32 SAL_CALL getCount() override
Definition: styleuno.cxx:819
rtl::Reference< ScStyleObj > GetObjectByIndex_Impl(sal_Int32 nIndex)
Definition: styleuno.cxx:671
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:659
virtual sal_Bool SAL_CALL hasElements() override
Definition: styleuno.cxx:848
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: styleuno.cxx:703
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: styleuno.cxx:747
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: styleuno.cxx:856
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: styleuno.cxx:833
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: styleuno.cxx:954
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: styleuno.cxx:895
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:964
virtual ~ScStyleFamilyObj() override
Definition: styleuno.cxx:651
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: styleuno.cxx:923
virtual void SAL_CALL removeByName(const OUString &Name) override
Definition: styleuno.cxx:755
rtl::Reference< ScStyleObj > GetObjectByName_Impl(const OUString &Name)
Definition: styleuno.cxx:691
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: styleuno.cxx:959
virtual css::uno::Type SAL_CALL getElementType() override
Definition: styleuno.cxx:843
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:1405
ScStyleObj()=delete
OUString aStyleName
Definition: styleuno.hxx:170
css::beans::PropertyState getPropertyState_Impl(std::u16string_view PropertyName)
Definition: styleuno.cxx:1204
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: styleuno.cxx:2059
virtual OUString SAL_CALL getParentStyle() override
Definition: styleuno.cxx:1058
virtual void SAL_CALL setParentStyle(const OUString &aParentStyle) override
Definition: styleuno.cxx:1067
virtual sal_Bool SAL_CALL isUserDefined() override
Definition: styleuno.cxx:1040
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: styleuno.cxx:2064
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:1540
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: styleuno.cxx:1528
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
Definition: styleuno.cxx:1265
const SfxItemPropertySet * pPropSet
Definition: styleuno.hxx:167
virtual void SAL_CALL setAllPropertiesToDefault() override
Definition: styleuno.cxx:1456
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1441
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1424
SfxStyleFamily GetFamily() const
Definition: styleuno.hxx:198
virtual OUString SAL_CALL getName() override
Definition: styleuno.cxx:1118
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: styleuno.cxx:1013
const SfxItemSet * GetStyleItemSet_Impl(std::u16string_view rPropName, const SfxItemPropertyMapEntry *&rpEntry)
Definition: styleuno.cxx:1170
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1435
virtual sal_Bool SAL_CALL isInUse() override
Definition: styleuno.cxx:1049
virtual ~ScStyleObj() override
Definition: styleuno.cxx:1005
static css::uno::Reference< css::container::XIndexReplace > CreateEmptyNumberingRules()
Definition: styleuno.cxx:1162
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
Definition: styleuno.cxx:1384
SfxStyleSheetBase * GetStyle_Impl(bool bUseCachedValue=false)
Definition: styleuno.cxx:1023
virtual void SAL_CALL setName(const OUString &aName) override
Definition: styleuno.cxx:1127
SfxStyleSheetBase * pStyle_cached
Definition: styleuno.hxx:171
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
Definition: styleuno.cxx:1257
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1507
void InitDoc(ScDocShell *pNewDocSh, const OUString &rNewName)
Definition: styleuno.cxx:995
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
Definition: styleuno.cxx:1276
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: styleuno.cxx:1392
css::uno::Any getPropertyValue_Impl(std::u16string_view aPropertyName)
Definition: styleuno.cxx:1881
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
Definition: styleuno.cxx:1447
SfxStyleFamily eFamily
Definition: styleuno.hxx:169
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: styleuno.cxx:1522
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: styleuno.cxx:2042
css::uno::Any getPropertyDefault_Impl(std::u16string_view aPropertyName)
Definition: styleuno.cxx:1288
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) const
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< SvxColorItem > ATTR_FONT_COLOR(109)
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:421
constexpr OUStringLiteral SC_FAMILYNAME_CELL
Definition: styleuno.cxx:413
#define SC_STYLE_FAMILY_COUNT
Definition: styleuno.cxx:411
static const SfxItemPropertySet * lcl_GetCellStyleSet()
Definition: styleuno.cxx:105
constexpr OUStringLiteral SCGRAPHICSTYLE_SERVICE
Definition: styleuno.cxx:422
static const SfxItemPropertySet * lcl_GetGraphicStyleSet()
Definition: styleuno.cxx:85
static const SfxItemPropertySet * lcl_GetPageStyleSet()
Definition: styleuno.cxx:204
const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT]
Definition: styleuno.cxx:417
static const SfxItemPropertyMap * lcl_GetHeaderStyleMap()
Definition: styleuno.cxx:331
constexpr OUStringLiteral SC_PAPERBIN_DEFAULTNAME
Definition: styleuno.cxx:427
constexpr OUStringLiteral SCSTYLE_SERVICE
Definition: styleuno.cxx:419
static const SfxItemPropertyMap * lcl_GetFooterStyleMap()
Definition: styleuno.cxx:371
constexpr OUStringLiteral SC_FAMILYNAME_PAGE
Definition: styleuno.cxx:414
constexpr OUStringLiteral SCCELLSTYLE_SERVICE
Definition: styleuno.cxx:420
constexpr OUStringLiteral SC_FAMILYNAME_GRAPHIC
Definition: styleuno.cxx:415
static bool lcl_AnyTabProtected(const ScDocument &rDoc)
Definition: styleuno.cxx:429
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:502
constexpr OUStringLiteral SC_UNO_PAGE_CENTERVER
Definition: unonames.hxx:434
constexpr OUStringLiteral OLD_UNO_PAGE_BACKTRANS
Definition: unonames.hxx:393
constexpr OUStringLiteral SC_UNONAME_PADJUST
Definition: unonames.hxx:146
constexpr OUStringLiteral OLD_UNO_PAGE_FTRON
Definition: unonames.hxx:403
constexpr OUStringLiteral SC_UNO_CJK_CFFAMIL
Definition: unonames.hxx:79
constexpr OUStringLiteral SC_UNO_CJK_CFPITCH
Definition: unonames.hxx:81
constexpr OUStringLiteral SC_UNONAME_LEFTBORDER2
Definition: unonames.hxx:130
constexpr OUStringLiteral SC_UNONAME_DISPNAME
Definition: unonames.hxx:152
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHIC
Definition: unonames.hxx:411
constexpr OUStringLiteral SC_UNONAME_TOPBORDER
Definition: unonames.hxx:127
constexpr OUStringLiteral SC_UNO_CJK_CPOST
Definition: unonames.hxx:84
constexpr OUStringLiteral SC_UNONAME_CEMPHAS
Definition: unonames.hxx:68
constexpr OUStringLiteral SC_UNONAME_PRMARGIN
Definition: unonames.hxx:117
constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBOR
Definition: unonames.hxx:466
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTFTRSHARED
Definition: unonames.hxx:448
constexpr OUStringLiteral SC_UNONAME_COVRLHAS
Definition: unonames.hxx:59
constexpr OUStringLiteral SC_UNONAME_CFCHARS
Definition: unonames.hxx:72
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFFILT
Definition: unonames.hxx:459
constexpr OUStringLiteral SC_UNO_PAGE_PRINTDRAW
Definition: unonames.hxx:440
constexpr OUStringLiteral SC_UNONAME_LOADCELL
Definition: unonames.hxx:156
constexpr OUStringLiteral SC_UNONAME_CLOCAL
Definition: unonames.hxx:64
constexpr OUStringLiteral SC_UNONAME_HYPERLINK
Definition: unonames.hxx:199
constexpr OUStringLiteral SC_UNO_PAGE_HDRSHARED
Definition: unonames.hxx:479
constexpr OUStringLiteral SC_UNO_PAGE_SIZE
Definition: unonames.hxx:430
constexpr OUStringLiteral OLD_UNO_PAGE_HDRBACKCOL
Definition: unonames.hxx:394
constexpr OUStringLiteral SC_UNO_CJK_CFCHARS
Definition: unonames.hxx:80
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTMAR
Definition: unonames.hxx:474
constexpr OUStringLiteral SC_UNONAME_TOPBORDER2
Definition: unonames.hxx:132
constexpr OUStringLiteral SC_UNONAME_PISHYPHEN
Definition: unonames.hxx:145
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTMARGIN
Definition: unonames.hxx:423
constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBOR
Definition: unonames.hxx:489
constexpr OUStringLiteral SC_UNONAME_BOTTBORDER
Definition: unonames.hxx:124
constexpr OUStringLiteral SC_UNONAME_WRITING
Definition: unonames.hxx:121
constexpr OUStringLiteral SC_UNONAME_CELLVJUS_METHOD
Definition: unonames.hxx:105
constexpr OUStringLiteral SC_UNO_PAGE_BACKTRANS
Definition: unonames.hxx:407
constexpr OUStringLiteral SC_UNO_PAGE_HDRBODYDIST
Definition: unonames.hxx:475
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBOR
Definition: unonames.hxx:487
#define SC_UNO_PAGE_TOPBORDER
Definition: unonames.hxx:415
constexpr OUStringLiteral SC_UNO_PAGE_PRINTZERO
Definition: unonames.hxx:456
constexpr OUStringLiteral SC_UNO_PAGE_NUMBERTYPE
Definition: unonames.hxx:427
constexpr OUStringLiteral SC_UNO_PAGE_PRINTANNOT
Definition: unonames.hxx:435
constexpr OUStringLiteral SC_UNONAME_LOADPAGE
Definition: unonames.hxx:157
constexpr OUStringLiteral SC_UNONAME_CSHADD
Definition: unonames.hxx:65
constexpr OUStringLiteral SC_UNONAME_CRELIEF
Definition: unonames.hxx:74
constexpr OUStringLiteral SC_UNO_PAGE_PAPERTRAY
Definition: unonames.hxx:429
constexpr OUStringLiteral SC_UNO_CTL_CFNAME
Definition: unonames.hxx:87
constexpr OUStringLiteral SC_UNO_PAGE_FTRON
Definition: unonames.hxx:500
constexpr OUStringLiteral SC_UNO_CJK_CWEIGHT
Definition: unonames.hxx:83
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTPAGE
Definition: unonames.hxx:446
constexpr OUStringLiteral SC_UNONAME_CUNDLHAS
Definition: unonames.hxx:56
constexpr OUStringLiteral SC_UNONAME_NUMFMT
Definition: unonames.hxx:107
constexpr OUStringLiteral SC_UNO_PAGE_LEFTBRDDIST
Definition: unonames.hxx:416
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBDIS
Definition: unonames.hxx:468
constexpr OUStringLiteral SC_UNONAME_WRAP
Definition: unonames.hxx:112
constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKCOL
Definition: unonames.hxx:480
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTFTRCONT
Definition: unonames.hxx:454
constexpr OUStringLiteral SC_UNONAME_CPOST
Definition: unonames.hxx:61
constexpr OUStringLiteral SC_UNO_PAGE_PRINTGRID
Definition: unonames.hxx:436
constexpr OUStringLiteral SC_UNO_PAGE_LEFTHDRCONT
Definition: unonames.hxx:449
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICURL
Definition: unonames.hxx:410
constexpr OUStringLiteral SC_UNO_PAGE_FTRBODYDIST
Definition: unonames.hxx:498
constexpr OUStringLiteral SC_UNO_CTL_CFFAMIL
Definition: unonames.hxx:89
constexpr OUStringLiteral SC_UNO_PAGE_LANDSCAPE
Definition: unonames.hxx:426
constexpr OUStringLiteral SC_UNO_PAGE_HDRDYNAMIC
Definition: unonames.hxx:478
constexpr OUStringLiteral OLD_UNO_PAGE_HDRSHARED
Definition: unonames.hxx:396
constexpr OUStringLiteral SC_UNONAME_HIDDEN
Definition: unonames.hxx:122
constexpr OUStringLiteral SC_UNONAME_CFFAMIL
Definition: unonames.hxx:71
constexpr OUStringLiteral SC_UNONAME_PINDENT
Definition: unonames.hxx:113
constexpr OUStringLiteral SC_UNONAME_PLMARGIN
Definition: unonames.hxx:116
constexpr OUStringLiteral OLD_UNO_PAGE_FTRBACKTRAN
Definition: unonames.hxx:400
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOX
Definition: unonames.hxx:444
constexpr OUStringLiteral SC_UNO_PAGE_PRINTCHARTS
Definition: unonames.hxx:438
constexpr OUStringLiteral SC_UNO_CJK_CFSTYLE
Definition: unonames.hxx:78
constexpr OUStringLiteral SC_UNO_PAGE_LEFTFTRCONT
Definition: unonames.hxx:450
constexpr OUStringLiteral SC_UNONAME_COVRLCOL
Definition: unonames.hxx:58
constexpr OUStringLiteral SC_UNO_CTL_CWEIGHT
Definition: unonames.hxx:93
constexpr OUStringLiteral SC_UNONAME_CELLTRAN
Definition: unonames.hxx:100
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTMAR
Definition: unonames.hxx:496
constexpr OUStringLiteral SC_UNO_PAGE_LEFTMARGIN
Definition: unonames.hxx:422
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTHDRCONT
Definition: unonames.hxx:453
constexpr OUStringLiteral SC_UNONAME_CCOLOR
Definition: unonames.hxx:52
constexpr OUStringLiteral SC_UNO_CTL_CFPITCH
Definition: unonames.hxx:91
constexpr OUStringLiteral SC_UNONAME_CELLORI
Definition: unonames.hxx:106
constexpr OUStringLiteral SC_UNONAME_CSTRIKE
Definition: unonames.hxx:63
constexpr OUStringLiteral SC_UNO_PAGE_SHADOWFORM
Definition: unonames.hxx:421
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBDIS
Definition: unonames.hxx:467
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFLOC
Definition: unonames.hxx:460
constexpr OUStringLiteral SC_UNO_CTL_CFCHARS
Definition: unonames.hxx:90
constexpr OUStringLiteral SC_UNO_PAGE_HDRTOPBDIS
Definition: unonames.hxx:470
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRF
Definition: unonames.hxx:484
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR2
Definition: unonames.hxx:138
constexpr OUStringLiteral SC_UNO_PAGE_BACKCOLOR
Definition: unonames.hxx:406
constexpr OUStringLiteral SC_UNO_PAGE_HDRBRDDIST
Definition: unonames.hxx:471
constexpr OUStringLiteral SC_UNO_PAGE_FTRHEIGHT
Definition: unonames.hxx:499
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTMAR
Definition: unonames.hxx:473
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOY
Definition: unonames.hxx:445
constexpr OUStringLiteral SC_UNO_PAGE_SYTLELAYOUT
Definition: unonames.hxx:428
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTBDIS
Definition: unonames.hxx:491
constexpr OUStringLiteral SC_UNONAME_CFNAME
Definition: unonames.hxx:69
constexpr OUStringLiteral SC_UNO_PAGE_HDRSHADOW
Definition: unonames.hxx:472
constexpr OUStringLiteral SC_UNONAME_PISFORBID
Definition: unonames.hxx:144
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBOR
Definition: unonames.hxx:486
constexpr OUStringLiteral SC_UNO_PAGE_FTRBRDDIST
Definition: unonames.hxx:494
constexpr OUStringLiteral SC_UNONAME_CFONT
Definition: unonames.hxx:66
constexpr OUStringLiteral SC_UNONAME_RIGHTBORDER
Definition: unonames.hxx:126
constexpr OUStringLiteral SC_UNO_PAGE_FIRSTHDRSHARED
Definition: unonames.hxx:447
constexpr OUStringLiteral SC_UNO_PAGE_FTRSHADOW
Definition: unonames.hxx:495
constexpr OUStringLiteral SC_UNO_PAGE_BOTTBRDDIST
Definition: unonames.hxx:418
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFURL
Definition: unonames.hxx:485
constexpr OUStringLiteral SC_UNO_PAGE_BOTTMARGIN
Definition: unonames.hxx:425
constexpr OUStringLiteral SC_UNO_CTL_CLOCAL
Definition: unonames.hxx:95
constexpr OUStringLiteral SC_UNO_CJK_CHEIGHT
Definition: unonames.hxx:82
constexpr OUStringLiteral SC_UNONAME_CELLPRO
Definition: unonames.hxx:101
constexpr OUStringLiteral SC_UNO_PAGE_BORDERDIST
Definition: unonames.hxx:420
constexpr OUStringLiteral SC_UNONAME_PTMARGIN
Definition: unonames.hxx:114
constexpr OUStringLiteral SC_UNONAME_CCROSS
Definition: unonames.hxx:62
constexpr OUStringLiteral SC_UNO_CJK_CFNAME
Definition: unonames.hxx:77
constexpr OUStringLiteral SC_UNONAME_BOTTBORDER2
Definition: unonames.hxx:129
constexpr OUStringLiteral SC_UNONAME_CWORDMOD
Definition: unonames.hxx:75
constexpr OUStringLiteral SC_UNONAME_PBMARGIN
Definition: unonames.hxx:115
#define SC_UNO_PAGE_LEFTBORDER
Definition: unonames.hxx:412
constexpr OUStringLiteral SC_UNO_PAGE_FTRTOPBDIS
Definition: unonames.hxx:493
constexpr OUStringLiteral SC_UNONAME_LEFTBORDER
Definition: unonames.hxx:125
constexpr OUStringLiteral SC_UNONAME_SHRINK_TO_FIT
Definition: unonames.hxx:140
constexpr OUStringLiteral SC_UNO_PAGE_HDRHEIGHT
Definition: unonames.hxx:476
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICFILT
Definition: unonames.hxx:408
constexpr OUStringLiteral SC_UNONAME_CFPITCH
Definition: unonames.hxx:73
constexpr OUStringLiteral SC_UNO_PAGE_HDRLEFTBOR
Definition: unonames.hxx:463
constexpr OUStringLiteral SC_UNO_PAGE_HDRRIGHTBOR
Definition: unonames.hxx:464
constexpr OUStringLiteral SC_UNONAME_ASIANVERT
Definition: unonames.hxx:120
constexpr OUStringLiteral SC_UNONAME_COVER
Definition: unonames.hxx:57
constexpr OUStringLiteral SC_UNONAME_COUTL
Definition: unonames.hxx:67
constexpr OUStringLiteral SC_UNO_PAGE_SCALETOPAG
Definition: unonames.hxx:443
constexpr OUStringLiteral SC_UNONAME_OVERWSTL
Definition: unonames.hxx:155
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTFTRCON
Definition: unonames.hxx:452
constexpr OUStringLiteral SC_UNONAME_ROTANG
Definition: unonames.hxx:118
constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBDIS
Definition: unonames.hxx:469
constexpr OUStringLiteral SC_UNO_CTL_CHEIGHT
Definition: unonames.hxx:92
constexpr OUStringLiteral SC_UNO_PAGE_FTRBACKTRAN
Definition: unonames.hxx:481
#define SC_UNO_PAGE_RIGHTBORDER
Definition: unonames.hxx:413
constexpr OUStringLiteral SC_UNONAME_RIGHTBORDER2
Definition: unonames.hxx:131
constexpr OUStringLiteral SC_UNO_PAGE_PRINTDOWN
Definition: unonames.hxx:441
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR
Definition: unonames.hxx:135
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR
Definition: unonames.hxx:134
constexpr OUStringLiteral SC_UNONAME_USERDEF
Definition: unonames.hxx:217
constexpr OUStringLiteral SC_UNONAME_CELLVJUS
Definition: unonames.hxx:103
constexpr OUStringLiteral SC_UNONAME_PLASTADJ
Definition: unonames.hxx:147
constexpr OUStringLiteral SC_UNONAME_ROTREF
Definition: unonames.hxx:119
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRF
Definition: unonames.hxx:461
constexpr OUStringLiteral SC_UNONAME_CUNDLCOL
Definition: unonames.hxx:55
constexpr OUStringLiteral SC_UNO_PAGE_TOPMARGIN
Definition: unonames.hxx:424
constexpr OUStringLiteral SC_UNO_PAGE_HEIGHT
Definition: unonames.hxx:432
constexpr OUStringLiteral SC_UNONAME_TBLBORD
Definition: unonames.hxx:110
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR2
Definition: unonames.hxx:137
constexpr OUStringLiteral SC_UNONAME_CELLBACK
Definition: unonames.hxx:99
constexpr OUStringLiteral OLD_UNO_PAGE_HDRDYNAMIC
Definition: unonames.hxx:397
constexpr OUStringLiteral SC_UNONAME_PISHANG
Definition: unonames.hxx:142
constexpr OUStringLiteral SC_UNO_PAGE_GRAPHICLOC
Definition: unonames.hxx:409
constexpr OUStringLiteral OLD_UNO_PAGE_HDRBACKTRAN
Definition: unonames.hxx:395
constexpr OUStringLiteral SC_UNONAME_CWEIGHT
Definition: unonames.hxx:60
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFLOC
Definition: unonames.hxx:483
constexpr OUStringLiteral OLD_UNO_PAGE_FTRBACKCOL
Definition: unonames.hxx:399
constexpr OUStringLiteral SC_UNO_PAGE_TOPBRDDIST
Definition: unonames.hxx:419
constexpr OUStringLiteral SC_UNO_CTL_CPOST
Definition: unonames.hxx:94
constexpr OUStringLiteral SC_UNONAME_CUNDER
Definition: unonames.hxx:54
constexpr OUStringLiteral SC_UNONAME_SHADOW
Definition: unonames.hxx:109
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTBRDDIST
Definition: unonames.hxx:417
constexpr OUStringLiteral SC_UNO_PAGE_FTRDYNAMIC
Definition: unonames.hxx:501
constexpr OUStringLiteral SC_UNO_PAGE_PRINTFORMUL
Definition: unonames.hxx:455
constexpr OUStringLiteral SC_UNO_PAGE_FTRRIGHTMAR
Definition: unonames.hxx:497
constexpr OUStringLiteral OLD_UNO_PAGE_FTRSHARED
Definition: unonames.hxx:401
constexpr OUStringLiteral SC_UNO_PAGE_RIGHTHDRCON
Definition: unonames.hxx:451
constexpr OUStringLiteral SC_UNO_PAGE_PRINTHEADER
Definition: unonames.hxx:437
constexpr OUStringLiteral SC_UNONAME_PISCHDIST
Definition: unonames.hxx:143
constexpr OUStringLiteral OLD_UNO_PAGE_BACKCOLOR
Definition: unonames.hxx:392
#define SC_UNO_PAGE_BOTTBORDER
Definition: unonames.hxx:414
constexpr OUStringLiteral OLD_UNO_PAGE_FTRDYNAMIC
Definition: unonames.hxx:402
constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKCOL
Definition: unonames.hxx:457
constexpr OUStringLiteral SC_UNO_PAGE_HDRBOTTBOR
Definition: unonames.hxx:465
constexpr OUStringLiteral SC_UNO_PAGE_SCALEVAL
Definition: unonames.hxx:442
constexpr OUStringLiteral SC_UNONAME_CHEIGHT
Definition: unonames.hxx:53
constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBOR
Definition: unonames.hxx:488
constexpr OUStringLiteral SC_UNO_PAGE_FTRGRFFILT
Definition: unonames.hxx:482
constexpr OUStringLiteral SC_UNO_PAGE_CENTERHOR
Definition: unonames.hxx:433
constexpr OUStringLiteral SC_UNO_PAGE_HDRON
Definition: unonames.hxx:477
constexpr OUStringLiteral SC_UNO_PAGE_HDRBACKTRAN
Definition: unonames.hxx:458
constexpr OUStringLiteral SC_UNO_PAGE_FTRBOTTBDIS
Definition: unonames.hxx:492
constexpr OUStringLiteral SC_UNONAME_CELLHJUS
Definition: unonames.hxx:102
constexpr OUStringLiteral SC_UNO_PAGE_WIDTH
Definition: unonames.hxx:431
constexpr OUStringLiteral OLD_UNO_PAGE_HDRON
Definition: unonames.hxx:398
constexpr OUStringLiteral SC_UNO_PAGE_PRINTOBJS
Definition: unonames.hxx:439
constexpr OUStringLiteral SC_UNO_PAGE_FTRLEFTBDIS
Definition: unonames.hxx:490
constexpr OUStringLiteral SC_UNO_PAGE_HDRGRFURL
Definition: unonames.hxx:462
constexpr OUStringLiteral SC_UNO_CTL_CFSTYLE
Definition: unonames.hxx:88
constexpr OUStringLiteral SC_UNONAME_CFSTYLE
Definition: unonames.hxx:70
constexpr OUStringLiteral SC_UNONAME_CELLHJUS_METHOD
Definition: unonames.hxx:104
constexpr OUStringLiteral SC_UNO_CJK_CLOCAL
Definition: unonames.hxx:85
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)