LibreOffice Module svx (master)  1
tabledesign.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 
21 #include <com/sun/star/style/XStyle.hpp>
22 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/lang/XComponent.hpp>
25 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
26 #include <com/sun/star/container/XIndexAccess.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/util/XModifyBroadcaster.hpp>
30 #include <com/sun/star/util/XModifyListener.hpp>
31 
32 #include <osl/mutex.hxx>
33 #include <vcl/svapp.hxx>
34 
35 #include <cppuhelper/basemutex.hxx>
36 #include <cppuhelper/compbase.hxx>
37 #include <cppuhelper/implbase.hxx>
40 #include <comphelper/sequence.hxx>
41 
42 #include <svx/unoprov.hxx>
44 #include <svx/dialmgr.hxx>
45 #include <svx/strings.hrc>
46 
47 #include <celltypes.hxx>
48 
49 #include <vector>
50 #include <map>
51 
52 
53 using namespace ::com::sun::star::uno;
54 using namespace ::com::sun::star::style;
55 using namespace ::com::sun::star::lang;
56 using namespace ::com::sun::star::beans;
57 using namespace ::com::sun::star::util;
58 using namespace ::com::sun::star::container;
59 
60 using ::osl::MutexGuard;
61 using ::osl::ClearableMutexGuard;
62 using ::cppu::OInterfaceContainerHelper;
63 
64 namespace sdr::table {
65 
66 typedef std::map< OUString, sal_Int32 > CellStyleNameMap;
67 
68 typedef ::cppu::WeakComponentImplHelper< XStyle, XNameReplace, XServiceInfo, XIndexAccess, XModifyBroadcaster, XModifyListener > TableDesignStyleBase;
69 
70 namespace {
71 
72 class TableDesignStyle : private ::cppu::BaseMutex, public TableDesignStyleBase
73 {
74 public:
75  TableDesignStyle();
76 
77  // XServiceInfo
78  virtual OUString SAL_CALL getImplementationName() override;
79  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
80  virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
81 
82  // XStyle
83  virtual sal_Bool SAL_CALL isUserDefined() override;
84  virtual sal_Bool SAL_CALL isInUse() override;
85  virtual OUString SAL_CALL getParentStyle() override;
86  virtual void SAL_CALL setParentStyle( const OUString& aParentStyle ) override;
87 
88  // XNamed
89  virtual OUString SAL_CALL getName() override;
90  virtual void SAL_CALL setName( const OUString& aName ) override;
91 
92  // XNameAccess
93  virtual Any SAL_CALL getByName( const OUString& aName ) override;
94  virtual Sequence< OUString > SAL_CALL getElementNames() override;
95  virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
96 
97  // XElementAccess
98  virtual css::uno::Type SAL_CALL getElementType() override;
99  virtual sal_Bool SAL_CALL hasElements() override;
100 
101  // XIndexAccess
102  virtual sal_Int32 SAL_CALL getCount() override ;
103  virtual Any SAL_CALL getByIndex( sal_Int32 Index ) override;
104 
105  // XNameReplace
106  virtual void SAL_CALL replaceByName( const OUString& aName, const Any& aElement ) override;
107 
108  // XModifyBroadcaster
109  virtual void SAL_CALL addModifyListener( const Reference< XModifyListener >& aListener ) override;
110  virtual void SAL_CALL removeModifyListener( const Reference< XModifyListener >& aListener ) override;
111 
112  // XModifyListener
113  virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
114  virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
115 
116  void notifyModifyListener();
117 
118  // this function is called upon disposing the component
119  virtual void SAL_CALL disposing() override;
120 
121  static const CellStyleNameMap& getCellStyleNameMap();
122 
123  OUString msName;
124  Reference< XStyle > maCellStyles[style_count];
125 };
126 
127 }
128 
129 typedef std::vector< Reference< XStyle > > TableDesignStyleVector;
130 
131 namespace {
132 
133 class TableDesignFamily : public ::cppu::WeakImplHelper< XNameContainer, XNamed, XIndexAccess, XSingleServiceFactory, XServiceInfo, XComponent, XPropertySet >
134 {
135 public:
136  // XServiceInfo
137  virtual OUString SAL_CALL getImplementationName() override;
138  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
139  virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
140 
141  // XNamed
142  virtual OUString SAL_CALL getName( ) override;
143  virtual void SAL_CALL setName( const OUString& aName ) override;
144 
145  // XNameAccess
146  virtual Any SAL_CALL getByName( const OUString& aName ) override;
147  virtual Sequence< OUString > SAL_CALL getElementNames() override;
148  virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
149 
150  // XElementAccess
151  virtual Type SAL_CALL getElementType() override;
152  virtual sal_Bool SAL_CALL hasElements() override;
153 
154  // XIndexAccess
155  virtual sal_Int32 SAL_CALL getCount() override ;
156  virtual Any SAL_CALL getByIndex( sal_Int32 Index ) override;
157 
158  // XNameContainer
159  virtual void SAL_CALL insertByName( const OUString& aName, const Any& aElement ) override;
160  virtual void SAL_CALL removeByName( const OUString& Name ) override;
161 
162  // XNameReplace
163  virtual void SAL_CALL replaceByName( const OUString& aName, const Any& aElement ) override;
164 
165  // XSingleServiceFactory
166  virtual Reference< XInterface > SAL_CALL createInstance( ) override;
167  virtual Reference< XInterface > SAL_CALL createInstanceWithArguments( const Sequence< Any >& aArguments ) override;
168 
169  // XComponent
170  virtual void SAL_CALL dispose( ) override;
171  virtual void SAL_CALL addEventListener( const Reference< XEventListener >& xListener ) override;
172  virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) override;
173 
174  // XPropertySet
175  virtual Reference<XPropertySetInfo> SAL_CALL getPropertySetInfo() override;
176  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const Any& aValue ) override;
177  virtual Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
178  virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const Reference<XPropertyChangeListener>& xListener ) override;
179  virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const Reference<XPropertyChangeListener>& aListener ) override;
180  virtual void SAL_CALL addVetoableChangeListener(const OUString& PropertyName, const Reference<XVetoableChangeListener>& aListener ) override;
181  virtual void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName,const Reference<XVetoableChangeListener>&aListener ) override;
182 
183  TableDesignStyleVector maDesigns;
184 };
185 
186 }
187 
188 TableDesignStyle::TableDesignStyle()
189 : TableDesignStyleBase(m_aMutex)
190 {
191 }
192 
193 const CellStyleNameMap& TableDesignStyle::getCellStyleNameMap()
194 {
195  static CellStyleNameMap const aMap
196  {
197  { OUString( "first-row" ) , first_row_style },
198  { OUString( "last-row" ) , last_row_style },
199  { OUString( "first-column" ) , first_column_style },
200  { OUString( "last-column" ) , last_column_style },
201  { OUString( "body" ) , body_style },
202  { OUString( "even-rows" ) , even_rows_style },
203  { OUString( "odd-rows" ) , odd_rows_style },
204  { OUString( "even-columns" ) , even_columns_style },
205  { OUString( "odd-columns" ) , odd_columns_style },
206  { OUString( "background" ) , background_style },
207  };
208 
209  return aMap;
210 }
211 
212 // XServiceInfo
213 OUString SAL_CALL TableDesignStyle::getImplementationName()
214 {
215  return "TableDesignStyle";
216 }
217 
218 sal_Bool SAL_CALL TableDesignStyle::supportsService( const OUString& ServiceName )
219 {
220  return cppu::supportsService( this, ServiceName );
221 }
222 
223 Sequence< OUString > SAL_CALL TableDesignStyle::getSupportedServiceNames()
224 {
225  return { "com.sun.star.style.Style" };
226 }
227 
228 // XStyle
229 sal_Bool SAL_CALL TableDesignStyle::isUserDefined()
230 {
231  return false;
232 }
233 
234 sal_Bool SAL_CALL TableDesignStyle::isInUse()
235 {
236  ClearableMutexGuard aGuard( rBHelper.rMutex );
237  OInterfaceContainerHelper * pContainer = rBHelper.getContainer( cppu::UnoType<XModifyListener>::get() );
238  if( pContainer )
239  {
240  Sequence< Reference< XInterface > > aListener( pContainer->getElements() );
241  aGuard.clear();
242 
243  sal_Int32 nIndex = aListener.getLength();
244  while( --nIndex >= 0 )
245  {
246  TableDesignUser* pUser = dynamic_cast< TableDesignUser* >( aListener[nIndex].get() );
247  if( pUser && pUser->isInUse() )
248  return true;
249  }
250  }
251  return false;
252 }
253 
254 
255 OUString SAL_CALL TableDesignStyle::getParentStyle()
256 {
257  return OUString();
258 }
259 
260 
261 void SAL_CALL TableDesignStyle::setParentStyle( const OUString& )
262 {
263 }
264 
265 
266 // XNamed
267 
268 
269 OUString SAL_CALL TableDesignStyle::getName()
270 {
271  return msName;
272 }
273 
274 
275 void SAL_CALL TableDesignStyle::setName( const OUString& rName )
276 {
277  msName = rName;
278 }
279 
280 
281 // XNameAccess
282 
283 
284 Any SAL_CALL TableDesignStyle::getByName( const OUString& rName )
285 {
286  SolarMutexGuard aGuard;
287 
288  const CellStyleNameMap& rMap = getCellStyleNameMap();
289 
290  CellStyleNameMap::const_iterator iter = rMap.find( rName );
291  if( iter == rMap.end() )
292  throw NoSuchElementException();
293 
294  return Any( maCellStyles[(*iter).second] );
295 }
296 
297 
298 Sequence< OUString > SAL_CALL TableDesignStyle::getElementNames()
299 {
300  SolarMutexGuard aGuard;
301 
302  return comphelper::mapKeysToSequence( getCellStyleNameMap() );
303 }
304 
305 
306 sal_Bool SAL_CALL TableDesignStyle::hasByName( const OUString& rName )
307 {
308  SolarMutexGuard aGuard;
309 
310  const CellStyleNameMap& rMap = getCellStyleNameMap();
311 
312  CellStyleNameMap::const_iterator iter = rMap.find( rName );
313  return iter != rMap.end();
314 }
315 
316 
317 // XElementAccess
318 
319 
320 Type SAL_CALL TableDesignStyle::getElementType()
321 {
323 }
324 
325 
326 sal_Bool SAL_CALL TableDesignStyle::hasElements()
327 {
328  return true;
329 }
330 
331 
332 // XIndexAccess
333 
334 
335 sal_Int32 SAL_CALL TableDesignStyle::getCount()
336 {
337  return style_count;
338 }
339 
340 
341 Any SAL_CALL TableDesignStyle::getByIndex( sal_Int32 Index )
342 {
343  SolarMutexGuard aGuard;
344 
345  if( (Index < 0) || (Index >= style_count) )
346  throw IndexOutOfBoundsException();
347 
348  return Any( maCellStyles[Index] );
349 }
350 
351 
352 // XNameReplace
353 
354 
355 void SAL_CALL TableDesignStyle::replaceByName( const OUString& rName, const Any& aElement )
356 {
357  SolarMutexGuard aGuard;
358 
359  const CellStyleNameMap& rMap = getCellStyleNameMap();
360  CellStyleNameMap::const_iterator iter = rMap.find( rName );
361  if( iter == rMap.end() )
362  throw NoSuchElementException();
363 
364 
365  Reference< XStyle > xNewStyle;
366  if( !(aElement >>= xNewStyle) )
367  throw IllegalArgumentException();
368 
369  const sal_Int32 nIndex = (*iter).second;
370 
371  Reference< XStyle > xOldStyle( maCellStyles[nIndex] );
372 
373  if( xNewStyle != xOldStyle )
374  {
375  Reference< XModifyListener > xListener( this );
376 
377  // end listening to old style, if possible
378  Reference< XModifyBroadcaster > xOldBroadcaster( xOldStyle, UNO_QUERY );
379  if( xOldBroadcaster.is() )
380  xOldBroadcaster->removeModifyListener( xListener );
381 
382  // start listening to new style, if possible
383  Reference< XModifyBroadcaster > xNewBroadcaster( xNewStyle, UNO_QUERY );
384  if( xNewBroadcaster.is() )
385  xNewBroadcaster->addModifyListener( xListener );
386 
387  maCellStyles[nIndex] = xNewStyle;
388  }
389 }
390 
391 
392 // XComponent
393 
394 
395 void SAL_CALL TableDesignStyle::disposing()
396 {
397  for(Reference<XStyle> & rCellStyle : maCellStyles)
398  rCellStyle.clear();
399 }
400 
401 
402 // XModifyBroadcaster
403 
404 
405 void SAL_CALL TableDesignStyle::addModifyListener( const Reference< XModifyListener >& xListener )
406 {
407  ClearableMutexGuard aGuard( rBHelper.rMutex );
408  if (rBHelper.bDisposed || rBHelper.bInDispose)
409  {
410  aGuard.clear();
411  EventObject aEvt( static_cast< OWeakObject * >( this ) );
412  xListener->disposing( aEvt );
413  }
414  else
415  {
416  rBHelper.addListener( cppu::UnoType<XModifyListener>::get(), xListener );
417  }
418 }
419 
420 
421 void SAL_CALL TableDesignStyle::removeModifyListener( const Reference< XModifyListener >& xListener )
422 {
423  rBHelper.removeListener( cppu::UnoType<XModifyListener>::get(), xListener );
424 }
425 
426 
427 void TableDesignStyle::notifyModifyListener()
428 {
429  MutexGuard aGuard( rBHelper.rMutex );
430 
431  OInterfaceContainerHelper * pContainer = rBHelper.getContainer( cppu::UnoType<XModifyListener>::get() );
432  if( pContainer )
433  {
434  EventObject aEvt( static_cast< OWeakObject * >( this ) );
435  pContainer->forEach<XModifyListener>(
436  [&] (Reference<XModifyListener> const& xListener)
437  { return xListener->modified(aEvt); });
438  }
439 }
440 
441 
442 // XModifyListener
443 
444 
445 // if we get a modify hint from a style, notify all registered XModifyListener
446 void SAL_CALL TableDesignStyle::modified( const css::lang::EventObject& )
447 {
448  notifyModifyListener();
449 }
450 
451 
452 void SAL_CALL TableDesignStyle::disposing( const css::lang::EventObject& )
453 {
454 }
455 
456 
457 // TableStyle
458 
459 
460 // XServiceInfo
461 OUString SAL_CALL TableDesignFamily::getImplementationName()
462 {
463  return "TableDesignFamily";
464 }
465 
466 sal_Bool SAL_CALL TableDesignFamily::supportsService( const OUString& ServiceName )
467 {
468  return cppu::supportsService( this, ServiceName );
469 }
470 
471 Sequence< OUString > SAL_CALL TableDesignFamily::getSupportedServiceNames()
472 {
473  return { "com.sun.star.style.StyleFamily" };
474 }
475 
476 // XNamed
477 OUString SAL_CALL TableDesignFamily::getName()
478 {
479  return "table";
480 }
481 
482 void SAL_CALL TableDesignFamily::setName( const OUString& )
483 {
484 }
485 
486 // XNameAccess
487 Any SAL_CALL TableDesignFamily::getByName( const OUString& rName )
488 {
489  SolarMutexGuard aGuard;
490 
491  auto iter = std::find_if(maDesigns.begin(), maDesigns.end(),
492  [&rName](const Reference<XStyle>& rpStyle) { return rpStyle->getName() == rName; });
493  if (iter != maDesigns.end())
494  return Any( (*iter) );
495 
496  throw NoSuchElementException();
497 }
498 
499 
500 Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames()
501 {
502  SolarMutexGuard aGuard;
503 
504  Sequence< OUString > aRet( maDesigns.size() );
505  OUString* pNames = aRet.getArray();
506 
507  for( const auto& rpStyle : maDesigns )
508  *pNames++ = rpStyle->getName();
509 
510  return aRet;
511 }
512 
513 
514 sal_Bool SAL_CALL TableDesignFamily::hasByName( const OUString& aName )
515 {
516  SolarMutexGuard aGuard;
517 
518  return std::any_of(maDesigns.begin(), maDesigns.end(),
519  [&aName](const Reference<XStyle>& rpStyle) { return rpStyle->getName() == aName; });
520 }
521 
522 
523 // XElementAccess
524 
525 
526 Type SAL_CALL TableDesignFamily::getElementType()
527 {
529 }
530 
531 
532 sal_Bool SAL_CALL TableDesignFamily::hasElements()
533 {
534  SolarMutexGuard aGuard;
535 
536  return !maDesigns.empty();
537 }
538 
539 
540 // XIndexAccess
541 
542 
543 sal_Int32 SAL_CALL TableDesignFamily::getCount()
544 {
545  SolarMutexGuard aGuard;
546 
547  return sal::static_int_cast< sal_Int32 >( maDesigns.size() );
548 }
549 
550 
551 Any SAL_CALL TableDesignFamily::getByIndex( sal_Int32 Index )
552 {
553  SolarMutexGuard aGuard;
554 
555  if( (Index >= 0) && (Index < sal::static_int_cast< sal_Int32 >( maDesigns.size() ) ) )
556  return Any( maDesigns[Index] );
557 
558  throw IndexOutOfBoundsException();
559 }
560 
561 
562 // XNameContainer
563 
564 
565 void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any& rElement )
566 {
567  SolarMutexGuard aGuard;
568 
569  Reference< XStyle > xStyle( rElement, UNO_QUERY );
570  if( !xStyle.is() )
571  throw IllegalArgumentException();
572 
573  xStyle->setName( rName );
574  if (std::any_of(maDesigns.begin(), maDesigns.end(),
575  [&rName](const Reference<XStyle>& rpStyle) { return rpStyle->getName() == rName; }))
576  throw ElementExistException();
577 
578  maDesigns.push_back( xStyle );
579 }
580 
581 
582 void SAL_CALL TableDesignFamily::removeByName( const OUString& rName )
583 {
584  SolarMutexGuard aGuard;
585 
586  auto iter = std::find_if(maDesigns.begin(), maDesigns.end(),
587  [&rName](const Reference<XStyle>& rpStyle) { return rpStyle->getName() == rName; });
588  if (iter != maDesigns.end())
589  {
590  maDesigns.erase( iter );
591  return;
592  }
593 
594  throw NoSuchElementException();
595 }
596 
597 
598 // XNameReplace
599 
600 
601 void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any& aElement )
602 {
603  SolarMutexGuard aGuard;
604 
605  Reference< XStyle > xStyle( aElement, UNO_QUERY );
606  if( !xStyle.is() )
607  throw IllegalArgumentException();
608 
609  auto iter = std::find_if(maDesigns.begin(), maDesigns.end(),
610  [&rName](const Reference<XStyle>& rpStyle) { return rpStyle->getName() == rName; });
611  if (iter != maDesigns.end())
612  {
613  (*iter) = xStyle;
614  xStyle->setName( rName );
615  return;
616  }
617 
618  throw NoSuchElementException();
619 }
620 
621 
622 // XSingleServiceFactory
623 
624 
625 Reference< XInterface > SAL_CALL TableDesignFamily::createInstance()
626 {
627  SolarMutexGuard aGuard;
628 
629  return Reference< XInterface >( static_cast< XStyle* >( new TableDesignStyle ) );
630 }
631 
632 
633 Reference< XInterface > SAL_CALL TableDesignFamily::createInstanceWithArguments( const Sequence< Any >& )
634 {
635  return createInstance();
636 }
637 
638 
639 // XComponent
640 
641 
642 void SAL_CALL TableDesignFamily::dispose( )
643 {
644  TableDesignStyleVector aDesigns;
645  aDesigns.swap( maDesigns );
646 
647  for( const auto& rStyle : aDesigns )
648  {
649  Reference< XComponent > xComp( rStyle, UNO_QUERY );
650  if( xComp.is() )
651  xComp->dispose();
652  }
653 }
654 
655 
656 void SAL_CALL TableDesignFamily::addEventListener( const Reference< XEventListener >& )
657 {
658 }
659 
660 
661 void SAL_CALL TableDesignFamily::removeEventListener( const Reference< XEventListener >& )
662 {
663 }
664 
665 
666 // XPropertySet
667 
668 
669 Reference<XPropertySetInfo> TableDesignFamily::getPropertySetInfo()
670 {
671  OSL_FAIL( "###unexpected!" );
672  return Reference<XPropertySetInfo>();
673 }
674 
675 
676 void TableDesignFamily::setPropertyValue( const OUString& , const Any& )
677 {
678  OSL_FAIL( "###unexpected!" );
679 }
680 
681 
682 Any TableDesignFamily::getPropertyValue( const OUString& PropertyName )
683 {
684  if ( PropertyName != "DisplayName" )
685  {
686  throw UnknownPropertyException( "unknown property: " + PropertyName, static_cast<OWeakObject *>(this) );
687  }
688 
689  OUString sDisplayName( SvxResId( RID_SVXSTR_STYLEFAMILY_TABLEDESIGN ) );
690  return Any( sDisplayName );
691 }
692 
693 
694 void TableDesignFamily::addPropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& )
695 {
696  OSL_FAIL( "###unexpected!" );
697 }
698 
699 
700 void TableDesignFamily::removePropertyChangeListener( const OUString& , const Reference<XPropertyChangeListener>& )
701 {
702  OSL_FAIL( "###unexpected!" );
703 }
704 
705 
706 void TableDesignFamily::addVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& )
707 {
708  OSL_FAIL( "###unexpected!" );
709 }
710 
711 
712 void TableDesignFamily::removeVetoableChangeListener( const OUString& , const Reference<XVetoableChangeListener>& )
713 {
714  OSL_FAIL( "###unexpected!" );
715 }
716 
717 
718 Reference< XNameAccess > CreateTableDesignFamily()
719 {
720  return new TableDesignFamily;
721 }
722 
723 }
724 
725 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Type
sal_Int32 nIndex
std::vector< Reference< XStyle > > TableDesignStyleVector
osl::Mutex m_aMutex
Reference< XNameAccess > CreateTableDesignFamily()
std::map< OUString, sal_Int32 > CellStyleNameMap
Definition: tabledesign.cxx:66
OUString msName
OUString getImplementationName()
const sal_Int32 first_column_style
Definition: tabledesign.hxx:31
Reference< XStyle > maCellStyles[style_count]
OUString Name
const sal_Int32 last_column_style
Definition: tabledesign.hxx:32
HashMap_OWString_Interface aMap
Sequence< PropertyValue > aArguments
OUString SvxResId(const char *pId)
Definition: dialmgr.cxx:28
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
css::uno::Sequence< OUString > getSupportedServiceNames()
const sal_Int32 style_count
Definition: tabledesign.hxx:39
const sal_Int32 first_row_style
Definition: tabledesign.hxx:29
const sal_Int32 background_style
Definition: tabledesign.hxx:38
const sal_Int32 even_columns_style
Definition: tabledesign.hxx:35
HRESULT createInstance(REFIID iid, Ifc **ppIfc)
unsigned char sal_Bool
css::uno::Type const & get()
bool setPropertyValue(uno::Sequence< beans::PropertyValue > &aProp, const OUString &aName, const uno::Any &aValue)
::cppu::WeakComponentImplHelper< XStyle, XNameReplace, XServiceInfo, XIndexAccess, XModifyBroadcaster, XModifyListener > TableDesignStyleBase
Definition: tabledesign.cxx:68
TableDesignStyleVector maDesigns
const sal_Int32 odd_columns_style
Definition: tabledesign.hxx:36
const sal_Int32 body_style
Definition: tabledesign.hxx:37
const sal_Int32 even_rows_style
Definition: tabledesign.hxx:33
OUString aName
void dispose()
struct _ADOIndex Index
AnyEventRef aEvent
const sal_Int32 last_row_style
Definition: tabledesign.hxx:30
css::uno::Sequence< typename M::key_type > mapKeysToSequence(M const &map)
OUString sDisplayName
const sal_Int32 odd_rows_style
Definition: tabledesign.hxx:34