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