LibreOffice Module sc (master) 1
afmtuno.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 <osl/diagnose.h>
23#include <svl/poolitem.hxx>
24#include <vcl/svapp.hxx>
25#include <svx/algitem.hxx>
26#include <editeng/boxitem.hxx>
27#include <svx/unomid.hxx>
28#include <unowids.hxx>
29#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
30#include <com/sun/star/table/TableBorder.hpp>
31#include <com/sun/star/table/CellHoriJustify.hpp>
32#include <com/sun/star/table/CellOrientation.hpp>
33#include <com/sun/star/table/TableBorder2.hpp>
34#include <com/sun/star/awt/FontSlant.hpp>
35
36#include <attrib.hxx>
37#include <afmtuno.hxx>
38#include <miscuno.hxx>
39#include <autoform.hxx>
40#include <scdll.hxx>
41#include <unonames.hxx>
42#include <cellsuno.hxx>
43
44using namespace ::com::sun::star;
45
46// an AutoFormat has always 16 entries
47#define SC_AF_FIELD_COUNT 16
48
49// AutoFormat map only for PropertySetInfo without Which-IDs
50
52{
53 static const SfxItemPropertyMapEntry aAutoFormatMap_Impl[] =
54 {
61 };
62 return aAutoFormatMap_Impl;
63}
64
67
69{
70 static const SfxItemPropertyMapEntry aAutoFieldMap_Impl[] =
71 {
119 };
120 return aAutoFieldMap_Impl;
121}
122
123constexpr OUStringLiteral SCAUTOFORMATSOBJ_SERVICE = u"com.sun.star.sheet.TableAutoFormats";
124
125SC_SIMPLE_SERVICE_INFO( ScAutoFormatFieldObj, "ScAutoFormatFieldObj", "com.sun.star.sheet.TableAutoFormatField" )
126SC_SIMPLE_SERVICE_INFO( ScAutoFormatObj, "ScAutoFormatObj", "com.sun.star.sheet.TableAutoFormat" )
128
129static bool lcl_FindAutoFormatIndex( const ScAutoFormat& rFormats, std::u16string_view rName, sal_uInt16& rOutIndex )
130{
131 ScAutoFormat::const_iterator itBeg = rFormats.begin(), itEnd = rFormats.end();
132 for (ScAutoFormat::const_iterator it = itBeg; it != itEnd; ++it)
133 {
134 const ScAutoFormatData *const pEntry = it->second.get();
135 const OUString& aEntryName = pEntry->GetName();
136 if ( aEntryName == rName )
137 {
138 size_t nPos = std::distance(itBeg, it);
139 rOutIndex = nPos;
140 return true;
141 }
142 }
143 return false;
144}
145
147{
150}
151
153{
154}
155
156extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
157ScAutoFormatsObj_get_implementation(css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const &)
158{
159 SolarMutexGuard aGuard;
160 ScDLL::Init();
161 return cppu::acquire(new ScAutoFormatsObj);
162}
163
164// XTableAutoFormats
165
167{
169 return new ScAutoFormatObj(nIndex);
170
171 return nullptr; // wrong index
172}
173
175{
176 sal_uInt16 nIndex;
180 return nullptr;
181}
182
183// container::XNameContainer
184
185void SAL_CALL ScAutoFormatsObj::insertByName( const OUString& aName, const uno::Any& aElement )
186{
187 SolarMutexGuard aGuard;
188 bool bDone = false;
189 // Reflection need not be uno::XInterface, can be any interface...
190 uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
191 if ( xInterface.is() )
192 {
193 ScAutoFormatObj* pFormatObj = dynamic_cast<ScAutoFormatObj*>( xInterface.get() );
194 if ( pFormatObj && !pFormatObj->IsInserted() )
195 {
197
198 sal_uInt16 nDummy;
199 if (lcl_FindAutoFormatIndex( *pFormats, aName, nDummy ))
200 {
201 throw container::ElementExistException();
202 }
203
204 std::unique_ptr<ScAutoFormatData> pNew(new ScAutoFormatData());
205 pNew->SetName( aName );
206
207 if (pFormats->insert(std::move(pNew)) != pFormats->end())
208 {
210 pFormats->Save();
211
212 sal_uInt16 nNewIndex;
213 if (lcl_FindAutoFormatIndex( *pFormats, aName, nNewIndex ))
214 {
215 pFormatObj->InitFormat( nNewIndex ); // can be used now
216 bDone = true;
217 }
218 }
219 else
220 {
221 OSL_FAIL("AutoFormat could not be inserted");
222 throw uno::RuntimeException();
223 }
224 }
225 }
226
227 if (!bDone)
228 {
229 // other errors are handled above
230 throw lang::IllegalArgumentException();
231 }
232}
233
234void SAL_CALL ScAutoFormatsObj::replaceByName( const OUString& aName, const uno::Any& aElement )
235{
236 SolarMutexGuard aGuard;
239 insertByName( aName, aElement );
240}
241
242void SAL_CALL ScAutoFormatsObj::removeByName( const OUString& aName )
243{
244 SolarMutexGuard aGuard;
246
247 ScAutoFormat::iterator it = pFormats->find(aName);
248 if (it == pFormats->end())
249 {
250 throw container::NoSuchElementException();
251 }
252 pFormats->erase(it);
253
255 pFormats->Save(); // save immediately
256
257}
258
259// container::XEnumerationAccess
260
261uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatsObj::createEnumeration()
262{
263 SolarMutexGuard aGuard;
264 return new ScIndexEnumeration(this, "com.sun.star.sheet.TableAutoFormatEnumeration");
265}
266
267// container::XIndexAccess
268
269sal_Int32 SAL_CALL ScAutoFormatsObj::getCount()
270{
271 SolarMutexGuard aGuard;
273}
274
275uno::Any SAL_CALL ScAutoFormatsObj::getByIndex( sal_Int32 nIndex )
276{
277 SolarMutexGuard aGuard;
278 uno::Reference< container::XNamed > xFormat(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex)));
279 if (!xFormat.is())
280 throw lang::IndexOutOfBoundsException();
281 return uno::Any(xFormat);
282}
283
285{
286 return cppu::UnoType<container::XNamed>::get(); // must match getByIndex
287}
288
290{
291 SolarMutexGuard aGuard;
292 return ( getCount() != 0 );
293}
294
295// container::XNameAccess
296
297uno::Any SAL_CALL ScAutoFormatsObj::getByName( const OUString& aName )
298{
299 SolarMutexGuard aGuard;
300 uno::Reference< container::XNamed > xFormat(GetObjectByName_Impl(aName));
301 if (!xFormat.is())
302 throw container::NoSuchElementException();
303 return uno::Any(xFormat);
304}
305
306uno::Sequence<OUString> SAL_CALL ScAutoFormatsObj::getElementNames()
307{
308 SolarMutexGuard aGuard;
310 uno::Sequence<OUString> aSeq(pFormats->size());
311 OUString* pAry = aSeq.getArray();
312 size_t i = 0;
313 for (const auto& rEntry : *pFormats)
314 {
315 pAry[i] = rEntry.second->GetName();
316 ++i;
317 }
318 return aSeq;
319}
320
321sal_Bool SAL_CALL ScAutoFormatsObj::hasByName( const OUString& aName )
322{
323 SolarMutexGuard aGuard;
324 sal_uInt16 nDummy;
327}
328
330 aPropSet( lcl_GetAutoFormatMap() ),
331 nFormatIndex( nIndex )
332{
333}
334
336{
337 // If an AutoFormat object is released, then eventually changes are saved
338 // so that they become visible in e.g Writer
339
340 if (IsInserted())
341 {
343 if ( pFormats && pFormats->IsSaveLater() )
344 pFormats->Save();
345
346 // Save() resets flag SaveLater
347 }
348}
349
350void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex )
351{
352 OSL_ENSURE( nFormatIndex == SC_AFMTOBJ_INVALID, "ScAutoFormatObj::InitFormat is multiple" );
353 nFormatIndex = nNewIndex;
354}
355
356// XTableAutoFormat
357
359{
362
363 return nullptr;
364}
365
366// container::XEnumerationAccess
367
368uno::Reference<container::XEnumeration> SAL_CALL ScAutoFormatObj::createEnumeration()
369{
370 SolarMutexGuard aGuard;
371 return new ScIndexEnumeration(this, "com.sun.star.sheet.TableAutoFormatEnumeration");
372}
373
374// container::XIndexAccess
375
376sal_Int32 SAL_CALL ScAutoFormatObj::getCount()
377{
378 SolarMutexGuard aGuard;
379 if (IsInserted())
380 return SC_AF_FIELD_COUNT; // always 16 elements
381 else
382 return 0;
383}
384
385uno::Any SAL_CALL ScAutoFormatObj::getByIndex( sal_Int32 nIndex )
386{
387 SolarMutexGuard aGuard;
388
389 if ( nIndex < 0 || nIndex >= getCount() )
390 throw lang::IndexOutOfBoundsException();
391
392 if (IsInserted())
393 return uno::Any(uno::Reference< beans::XPropertySet >(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex))));
394 return uno::Any();
395}
396
398{
399 return cppu::UnoType<beans::XPropertySet>::get(); // must match getByIndex
400}
401
403{
404 SolarMutexGuard aGuard;
405 return ( getCount() != 0 );
406}
407
408// container::XNamed
409
410OUString SAL_CALL ScAutoFormatObj::getName()
411{
412 SolarMutexGuard aGuard;
414 if (IsInserted() && nFormatIndex < pFormats->size())
415 return pFormats->findByIndex(nFormatIndex)->GetName();
416
417 return OUString();
418}
419
420void SAL_CALL ScAutoFormatObj::setName( const OUString& aNewName )
421{
422 SolarMutexGuard aGuard;
424
425 sal_uInt16 nDummy;
426 if (!IsInserted() || nFormatIndex >= pFormats->size() ||
427 lcl_FindAutoFormatIndex( *pFormats, aNewName, nDummy ))
428 {
429 // not inserted or name exists
430 throw uno::RuntimeException();
431 }
432
433 ScAutoFormat::iterator it = pFormats->begin();
434 std::advance(it, nFormatIndex);
435 ScAutoFormatData *const pData = it->second.get();
436 OSL_ENSURE(pData,"AutoFormat data not available");
437
438 std::unique_ptr<ScAutoFormatData> pNew(new ScAutoFormatData(*pData));
439 pNew->SetName( aNewName );
440
441 pFormats->erase(it);
442 it = pFormats->insert(std::move(pNew));
443 if (it != pFormats->end())
444 {
445 ScAutoFormat::iterator itBeg = pFormats->begin();
446 nFormatIndex = std::distance(itBeg, it);
447
449 pFormats->SetSaveLater(true);
450 }
451 else
452 {
453 OSL_FAIL("AutoFormat could not be inserted");
454 nFormatIndex = 0;
455 }
456}
457
458// beans::XPropertySet
459
460uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatObj::getPropertySetInfo()
461{
462 SolarMutexGuard aGuard;
463 static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
464 return aRef;
465}
466
468 const OUString& aPropertyName, const uno::Any& aValue )
469{
470 SolarMutexGuard aGuard;
472 if (!(IsInserted() && nFormatIndex < pFormats->size()))
473 return;
474
476 OSL_ENSURE(pData,"AutoFormat data not available");
477
478 bool bBool = false;
479 if (aPropertyName == SC_UNONAME_INCBACK && (aValue >>= bBool))
480 pData->SetIncludeBackground( bBool );
481 else if (aPropertyName == SC_UNONAME_INCBORD && (aValue >>= bBool))
482 pData->SetIncludeFrame( bBool );
483 else if (aPropertyName == SC_UNONAME_INCFONT && (aValue >>= bBool))
484 pData->SetIncludeFont( bBool );
485 else if (aPropertyName == SC_UNONAME_INCJUST && (aValue >>= bBool))
486 pData->SetIncludeJustify( bBool );
487 else if (aPropertyName == SC_UNONAME_INCNUM && (aValue >>= bBool))
488 pData->SetIncludeValueFormat( bBool );
489 else if (aPropertyName == SC_UNONAME_INCWIDTH && (aValue >>= bBool))
490 pData->SetIncludeWidthHeight( bBool );
491
492 // else error
493
495 pFormats->SetSaveLater(true);
496}
497
498uno::Any SAL_CALL ScAutoFormatObj::getPropertyValue( const OUString& aPropertyName )
499{
500 SolarMutexGuard aGuard;
501 uno::Any aAny;
502
504 if (IsInserted() && nFormatIndex < pFormats->size())
505 {
507 OSL_ENSURE(pData,"AutoFormat data not available");
508
509 bool bValue;
510 bool bError = false;
511
512 if (aPropertyName == SC_UNONAME_INCBACK)
513 bValue = pData->GetIncludeBackground();
514 else if (aPropertyName == SC_UNONAME_INCBORD)
515 bValue = pData->GetIncludeFrame();
516 else if (aPropertyName == SC_UNONAME_INCFONT)
517 bValue = pData->GetIncludeFont();
518 else if (aPropertyName == SC_UNONAME_INCJUST)
519 bValue = pData->GetIncludeJustify();
520 else if (aPropertyName == SC_UNONAME_INCNUM)
521 bValue = pData->GetIncludeValueFormat();
522 else if (aPropertyName == SC_UNONAME_INCWIDTH)
523 bValue = pData->GetIncludeWidthHeight();
524 else
525 bError = true; // unknown property
526
527 if (!bError)
528 aAny <<= bValue;
529 }
530
531 return aAny;
532}
533
535
536ScAutoFormatFieldObj::ScAutoFormatFieldObj(sal_uInt16 nFormat, sal_uInt16 nField) :
537 aPropSet( lcl_GetAutoFieldMap() ),
538 nFormatIndex( nFormat ),
539 nFieldIndex( nField )
540{
541}
542
544{
545}
546
547// beans::XPropertySet
548
549uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAutoFormatFieldObj::getPropertySetInfo()
550{
551 SolarMutexGuard aGuard;
552 static uno::Reference< beans::XPropertySetInfo > aRef(new SfxItemPropertySetInfo( aPropSet.getPropertyMap() ));
553 return aRef;
554}
555
557 const OUString& aPropertyName, const uno::Any& aValue )
558{
559 SolarMutexGuard aGuard;
561 const SfxItemPropertyMapEntry* pEntry =
562 aPropSet.getPropertyMap().getByName( aPropertyName );
563
564 if ( !(pEntry && pEntry->nWID && nFormatIndex < pFormats->size()) )
565 return;
566
568
569 if ( IsScItemWid( pEntry->nWID ) )
570 {
571 if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
572 {
573 bool bDone = false;
574
575 switch( pEntry->nWID )
576 {
577 case ATTR_STACKED:
578 {
579 table::CellOrientation eOrient;
580 if( aValue >>= eOrient )
581 {
582 switch( eOrient )
583 {
584 case table::CellOrientation_STANDARD:
585 pData->PutItem( nFieldIndex, ScVerticalStackCell( false ) );
586 break;
587 case table::CellOrientation_TOPBOTTOM:
588 pData->PutItem( nFieldIndex, ScVerticalStackCell( false ) );
589 pData->PutItem( nFieldIndex, ScRotateValueItem( 27000_deg100 ) );
590 break;
591 case table::CellOrientation_BOTTOMTOP:
592 pData->PutItem( nFieldIndex, ScVerticalStackCell( false ) );
593 pData->PutItem( nFieldIndex, ScRotateValueItem( 9000_deg100 ) );
594 break;
595 case table::CellOrientation_STACKED:
596 pData->PutItem( nFieldIndex, ScVerticalStackCell( true ) );
597 break;
598 default:
599 {
600 // added to avoid warnings
601 }
602 }
603 bDone = true;
604 }
605 }
606 break;
607 default:
608 std::unique_ptr<SfxPoolItem> pNewItem(pItem->Clone());
609 bDone = pNewItem->PutValue( aValue, pEntry->nMemberId );
610 if (bDone)
611 pData->PutItem( nFieldIndex, *pNewItem );
612 }
613
614 if (bDone)
616 pFormats->SetSaveLater(true);
617 }
618 }
619 else
620 {
621 switch (pEntry->nWID)
622 {
624 {
625 table::TableBorder aBorder;
626 if ( aValue >>= aBorder ) // empty = nothing to do
627 {
628 SvxBoxItem aOuter(ATTR_BORDER);
630 ScHelperFunctions::FillBoxItems( aOuter, aInner, aBorder );
631 pData->PutItem( nFieldIndex, aOuter );
632
634 pFormats->SetSaveLater(true);
635 }
636 }
637 break;
639 {
640 table::TableBorder2 aBorder2;
641 if ( aValue >>= aBorder2 ) // empty = nothing to do
642 {
643 SvxBoxItem aOuter(ATTR_BORDER);
645 ScHelperFunctions::FillBoxItems( aOuter, aInner, aBorder2 );
646 pData->PutItem( nFieldIndex, aOuter );
647
649 pFormats->SetSaveLater(true);
650 }
651 }
652 break;
653 }
654 }
655}
656
657uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const OUString& aPropertyName )
658{
659 SolarMutexGuard aGuard;
660 uno::Any aVal;
661
663 const SfxItemPropertyMapEntry* pEntry =
664 aPropSet.getPropertyMap().getByName( aPropertyName );
665
666 if ( pEntry && pEntry->nWID && nFormatIndex < pFormats->size() )
667 {
669
670 if ( IsScItemWid( pEntry->nWID ) )
671 {
672 if( const SfxPoolItem* pItem = pData->GetItem( nFieldIndex, pEntry->nWID ) )
673 {
674 switch( pEntry->nWID )
675 {
676 case ATTR_STACKED:
677 {
678 const ScRotateValueItem* pRotItem = pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE );
679 Degree100 nRot = pRotItem ? pRotItem->GetValue() : 0_deg100;
680 bool bStacked = static_cast<const ScVerticalStackCell*>(pItem)->GetValue();
682 }
683 break;
684 default:
685 pItem->QueryValue( aVal, pEntry->nMemberId );
686 }
687 }
688 }
689 else
690 {
691 switch (pEntry->nWID)
692 {
695 {
696 const SfxPoolItem* pItem = pData->GetItem(nFieldIndex, ATTR_BORDER);
697 if (pItem)
698 {
699 SvxBoxItem aOuter(*static_cast<const SvxBoxItem*>(pItem));
701
702 if (pEntry->nWID == SC_WID_UNO_TBLBORD2)
703 ScHelperFunctions::AssignTableBorder2ToAny( aVal, aOuter, aInner);
704 else
705 ScHelperFunctions::AssignTableBorderToAny( aVal, aOuter, aInner);
706 }
707 }
708 break;
709 }
710 }
711 }
712
713 return aVal;
714}
715
717
718/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetAutoFieldMap()
number format (String/Language) ??? (in XNumberFormat only ReadOnly) table::TableBorder ?...
Definition: afmtuno.cxx:68
constexpr OUStringLiteral SCAUTOFORMATSOBJ_SERVICE
Definition: afmtuno.cxx:123
#define SC_AF_FIELD_COUNT
Definition: afmtuno.cxx:47
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * ScAutoFormatsObj_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: afmtuno.cxx:157
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetAutoFormatMap()
Definition: afmtuno.cxx:51
static bool lcl_FindAutoFormatIndex(const ScAutoFormat &rFormats, std::u16string_view rName, sal_uInt16 &rOutIndex)
Definition: afmtuno.cxx:129
#define SC_AFMTOBJ_INVALID
Definition: afmtuno.hxx:38
const OUString & GetName() const
Definition: autoform.hxx:141
sal_uInt16 nFieldIndex
Definition: afmtuno.hxx:156
sal_uInt16 nFormatIndex
Definition: afmtuno.hxx:155
virtual ~ScAutoFormatFieldObj() override
Definition: afmtuno.cxx:543
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: afmtuno.cxx:657
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: afmtuno.cxx:556
SfxItemPropertySet aPropSet
Definition: afmtuno.hxx:154
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: afmtuno.cxx:549
rtl::Reference< ScAutoFormatFieldObj > GetObjectByIndex_Impl(sal_uInt16 nIndex)
Definition: afmtuno.cxx:358
ScAutoFormatObj(sal_uInt16 nIndex)
Definition: afmtuno.cxx:329
virtual ~ScAutoFormatObj() override
Definition: afmtuno.cxx:335
virtual sal_Int32 SAL_CALL getCount() override
Definition: afmtuno.cxx:376
virtual OUString SAL_CALL getName() override
Definition: afmtuno.cxx:410
bool IsInserted() const
Definition: afmtuno.hxx:104
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: afmtuno.cxx:368
virtual void SAL_CALL setName(const OUString &aName) override
Definition: afmtuno.cxx:420
virtual sal_Bool SAL_CALL hasElements() override
Definition: afmtuno.cxx:402
virtual css::uno::Type SAL_CALL getElementType() override
Definition: afmtuno.cxx:397
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: afmtuno.cxx:467
void InitFormat(sal_uInt16 nNewIndex)
Definition: afmtuno.cxx:350
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: afmtuno.cxx:498
SfxItemPropertySet aPropSet
Definition: afmtuno.hxx:94
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: afmtuno.cxx:385
sal_uInt16 nFormatIndex
Definition: afmtuno.hxx:95
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: afmtuno.cxx:460
bool Save()
Definition: autoform.cxx:889
void SetSaveLater(bool bSet)
Definition: autoform.cxx:757
MapType::const_iterator const_iterator
Definition: autoform.hxx:191
const_iterator begin() const
Definition: autoform.cxx:803
iterator insert(std::unique_ptr< ScAutoFormatData > pNew)
Definition: autoform.cxx:787
const ScAutoFormatData * findByIndex(size_t nIndex) const
Definition: autoform.cxx:762
void erase(const iterator &it)
Definition: autoform.cxx:793
const_iterator end() const
Definition: autoform.cxx:808
bool IsSaveLater() const
Definition: autoform.hxx:199
size_t size() const
Definition: autoform.cxx:798
MapType::iterator iterator
Definition: autoform.hxx:192
iterator find(const OUString &rName)
Definition: autoform.cxx:782
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: afmtuno.cxx:261
static rtl::Reference< ScAutoFormatObj > GetObjectByIndex_Impl(sal_uInt16 nIndex)
Definition: afmtuno.cxx:166
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: afmtuno.cxx:275
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: afmtuno.cxx:306
virtual css::uno::Type SAL_CALL getElementType() override
Definition: afmtuno.cxx:284
virtual sal_Bool SAL_CALL hasElements() override
Definition: afmtuno.cxx:289
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: afmtuno.cxx:234
virtual sal_Int32 SAL_CALL getCount() override
Definition: afmtuno.cxx:269
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: afmtuno.cxx:321
virtual ~ScAutoFormatsObj() override
Definition: afmtuno.cxx:152
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: afmtuno.cxx:297
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
Definition: afmtuno.cxx:185
virtual void SAL_CALL removeByName(const OUString &Name) override
Definition: afmtuno.cxx:242
static rtl::Reference< ScAutoFormatObj > GetObjectByName_Impl(std::u16string_view aName)
Definition: afmtuno.cxx:174
static SC_DLLPUBLIC void Init()
DLL-init/exit-code must be linked to the DLL only.
Definition: scdll.cxx:100
static SC_DLLPUBLIC ScAutoFormat * GetOrCreateAutoFormat()
Definition: global.cxx:266
static SC_DLLPUBLIC ScAutoFormat * GetAutoFormat()
Definition: global.cxx:261
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
Degree100 GetValue() const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() const
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
css::uno::Type const & get()
float u
sal_Int32 nIndex
OUString aName
sal_uInt16 nPos
Sequence< sal_Int8 > aSeq
#define MID_BACK_COLOR
#define MID_FONT_PITCH
#define MID_FONT_CHAR_SET
#define MID_POSTURE
#define MID_FONTHEIGHT
#define MID_FONT_FAMILY
#define MID_CROSSED_OUT
#define MID_WEIGHT
#define MID_TL_STYLE
#define MID_GRAPHIC_TRANSPARENT
#define MID_FONT_FAMILY_NAME
#define MID_FONT_STYLE_NAME
std::unique_ptr< sal_Int32[]> pData
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:63
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:72
size
int i
const char GetValue[]
#define CONVERT_TWIPS
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
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< 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< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
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< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
char aEntryName[20]
unsigned char sal_Bool
#define MID_MARGIN_LO_MARGIN
#define MID_MARGIN_R_MARGIN
#define MID_MARGIN_L_MARGIN
#define MID_MARGIN_UP_MARGIN
constexpr OUStringLiteral SC_UNO_CJK_CFFAMIL
Definition: unonames.hxx:80
constexpr OUStringLiteral SC_UNO_CJK_CFPITCH
Definition: unonames.hxx:82
constexpr OUStringLiteral SC_UNO_CJK_CPOST
Definition: unonames.hxx:85
constexpr OUStringLiteral SC_UNONAME_INCJUST
Definition: unonames.hxx:231
constexpr OUStringLiteral SC_UNONAME_PRMARGIN
Definition: unonames.hxx:119
constexpr OUStringLiteral SC_UNONAME_INCBORD
Definition: unonames.hxx:229
constexpr OUStringLiteral SC_UNONAME_CFCHARS
Definition: unonames.hxx:73
constexpr OUStringLiteral SC_UNO_CJK_CFCHARS
Definition: unonames.hxx:81
constexpr OUStringLiteral SC_UNONAME_CELLVJUS_METHOD
Definition: unonames.hxx:107
constexpr OUStringLiteral SC_UNONAME_CSHADD
Definition: unonames.hxx:66
constexpr OUStringLiteral SC_UNO_CTL_CFNAME
Definition: unonames.hxx:88
constexpr OUStringLiteral SC_UNO_CJK_CWEIGHT
Definition: unonames.hxx:84
constexpr OUStringLiteral SC_UNONAME_WRAP
Definition: unonames.hxx:114
constexpr OUStringLiteral SC_UNONAME_CPOST
Definition: unonames.hxx:62
constexpr OUStringLiteral SC_UNO_CTL_CFFAMIL
Definition: unonames.hxx:90
constexpr OUStringLiteral SC_UNONAME_CFFAMIL
Definition: unonames.hxx:72
constexpr OUStringLiteral SC_UNONAME_INCFONT
Definition: unonames.hxx:230
constexpr OUStringLiteral SC_UNONAME_PLMARGIN
Definition: unonames.hxx:118
constexpr OUStringLiteral SC_UNO_CJK_CFSTYLE
Definition: unonames.hxx:79
constexpr OUStringLiteral SC_UNO_CTL_CWEIGHT
Definition: unonames.hxx:94
constexpr OUStringLiteral SC_UNONAME_CELLTRAN
Definition: unonames.hxx:102
constexpr OUStringLiteral SC_UNONAME_INCWIDTH
Definition: unonames.hxx:233
constexpr OUStringLiteral SC_UNONAME_CCOLOR
Definition: unonames.hxx:52
constexpr OUStringLiteral SC_UNO_CTL_CFPITCH
Definition: unonames.hxx:92
constexpr OUStringLiteral SC_UNONAME_CELLORI
Definition: unonames.hxx:108
constexpr OUStringLiteral SC_UNO_CTL_CFCHARS
Definition: unonames.hxx:91
constexpr OUStringLiteral SC_UNONAME_CFNAME
Definition: unonames.hxx:70
constexpr OUStringLiteral SC_UNONAME_CFONT
Definition: unonames.hxx:67
constexpr OUStringLiteral SC_UNONAME_INCNUM
Definition: unonames.hxx:232
constexpr OUStringLiteral SC_UNO_CJK_CHEIGHT
Definition: unonames.hxx:83
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_PBMARGIN
Definition: unonames.hxx:117
constexpr OUStringLiteral SC_UNONAME_CFPITCH
Definition: unonames.hxx:74
constexpr OUStringLiteral SC_UNONAME_COVER
Definition: unonames.hxx:58
constexpr OUStringLiteral SC_UNONAME_COUTL
Definition: unonames.hxx:68
constexpr OUStringLiteral SC_UNONAME_ROTANG
Definition: unonames.hxx:120
constexpr OUStringLiteral SC_UNO_CTL_CHEIGHT
Definition: unonames.hxx:93
constexpr OUStringLiteral SC_UNONAME_CELLVJUS
Definition: unonames.hxx:105
constexpr OUStringLiteral SC_UNONAME_ROTREF
Definition: unonames.hxx:121
constexpr OUStringLiteral SC_UNONAME_TBLBORD
Definition: unonames.hxx:112
constexpr OUStringLiteral SC_UNONAME_CELLBACK
Definition: unonames.hxx:100
constexpr OUStringLiteral SC_UNONAME_CWEIGHT
Definition: unonames.hxx:61
constexpr OUStringLiteral SC_UNO_CTL_CPOST
Definition: unonames.hxx:95
constexpr OUStringLiteral SC_UNONAME_CUNDER
Definition: unonames.hxx:55
constexpr OUStringLiteral SC_UNONAME_TBLBORD2
Definition: unonames.hxx:113
constexpr OUStringLiteral SC_UNONAME_INCBACK
Definition: unonames.hxx:228
constexpr OUStringLiteral SC_UNONAME_CHEIGHT
Definition: unonames.hxx:54
constexpr OUStringLiteral SC_UNONAME_CELLHJUS
Definition: unonames.hxx:104
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
#define SC_WID_UNO_TBLBORD2
Definition: unowids.hxx:72
#define SC_WID_UNO_TBLBORD
Definition: unowids.hxx:35
bool IsScItemWid(sal_uInt16 nWid)
Definition: unowids.hxx:84