Calc(21)SheetCellRangesサービスとインターフェイス一覧

2017-10-15

旧ブログ

t f B! P L
com.sun.star.sheet.SheetCellRangesサービスはドキュメントのcreateInstance()メソッドでインスタンス化するものです。

前の関連記事:Calc(20)CalcとWriterのコントローラのサービスとインターフェイスの比較


SheetCellRangesサービスとインターフェイス一覧

def macro():
 ctx = XSCRIPTCONTEXT.getComponentContext()  # コンポーネントコンテクストの取得。
 smgr = ctx.getServiceManager()  # サービスマネージャーの取得。 
 tcu = smgr.createInstanceWithContext("pq.Tcu", ctx)  # サービス名か実装名でインスタンス化。
 doc = XSCRIPTCONTEXT.getDocument()  # ドキュメントを取得。
 cellranges = doc.createInstance("com.sun.star.sheet.SheetCellRanges")  # com.sun.star.sheet.SheetCellRangesをインスタンス化。
 tcu.wtree(cellranges)

setProperyValue()メソッドをもっていますが、異なるシートのセル範囲をもっているセル範囲コレクションに対して背景色を設定すると、シートの情報は無視されてセル範囲が合体して背景色が設定されてしまいました。

シートごとにプロパティを設定しないといけないようです。

├─.sheet.SheetCellRanges
│   │                            string  AbsoluteName
│   │   .sheet.XSheetConditionalEntries  ConditionalFormat
│   │   .sheet.XSheetConditionalEntries  ConditionalFormatLocal
│   │               .beans.XPropertySet  Validation
│   │               .beans.XPropertySet  ValidationLocal
│   ├─.chart.XChartDataArray
│   │   │     [string]  getColumnDescriptions()
│   │   │   [[double]]  getData()
│   │   │     [string]  getRowDescriptions()
│   │   │         void  setColumnDescriptions( [in] [string] aColumnDescriptions)
│   │   │         void  setData( [in] [[double]] aData)
│   │   │         void  setRowDescriptions( [in] [string] aRowDescriptions)
│   │   └─.chart.XChartData
│   │           void  addChartDataChangeEventListener( [in] .chart.XChartDataChangeEventListener aListener)
│   │         double  getNotANumber()
│   │        boolean  isNotANumber( [in] double nNumber)
│   │           void  removeChartDataChangeEventListener( [in] .chart.XChartDataChangeEventListener aListener)
│   ├─.container.XEnumerationAccess
│   │   │   .container.XEnumeration  createEnumeration()
│   │   └─.container.XElementAccess
│   │           type  getElementType()
│   │        boolean  hasElements()
│   ├─.container.XNameContainer
│   │   │   void  insertByName( [in] string aName,
│   │   │                       [in]    any aElement
│   │   │            ) raises ( .lang.WrappedTargetException,
│   │   │                       .container.ElementExistException,
│   │   │                       .lang.IllegalArgumentException)
│   │   │   void  removeByName( [in] string Name
│   │   │            ) raises ( .lang.WrappedTargetException,
│   │   │                       .container.NoSuchElementException)
│   │   └─.container.XNameReplace
│   │     │   void  replaceByName( [in] string aName,
│   │     │                        [in]    any aElement
│   │     │             ) raises ( .lang.WrappedTargetException,
│   │     │                        .container.NoSuchElementException,
│   │     │                        .lang.IllegalArgumentException)
│   │     └─.container.XNameAccess
│   │                any  getByName( [in] string aName
│   │                     ) raises ( .lang.WrappedTargetException,
│   │                                .container.NoSuchElementException)
│   │           [string]  getElementNames()
│   │            boolean  hasByName( [in] string aName)
│   ├─.sheet.XSheetCellRangeContainer
│   │   │   void  addRangeAddress( [in] .table.CellRangeAddress aCellRangeAddress,
│   │   │                          [in]                 boolean bMergeRanges)
│   │   │   void  addRangeAddresses( [in] [.table.CellRangeAddress] aCellRangeAddresses,
│   │   │                            [in]                   boolean bMergeRanges)
│   │   │   void  removeRangeAddress( [in] .table.CellRangeAddress aCellRangeAddress
│   │   │                  ) raises ( .container.NoSuchElementException)
│   │   │   void  removeRangeAddresses( [in] [.table.CellRangeAddress] aCellRangeAddresses
│   │   │                    ) raises ( .container.NoSuchElementException)
│   │   └─.sheet.XSheetCellRanges
│   │     │   .container.XEnumerationAccess  getCells()
│   │     │       [.table.CellRangeAddress]  getRangeAddresses()
│   │     │                          string  getRangeAddressesAsString()
│   │     └─.container.XIndexAccess
│   │            any  getByIndex( [in] long Index
│   │                  ) raises ( .lang.WrappedTargetException,
│   │                             .lang.IndexOutOfBoundsException)
│   │           long  getCount()
│   ├─.sheet.XSheetOperation
│   │       void  clearContents( [in] long nContentFlags)
│   │     double  computeFunction( [in] .sheet.GeneralFunction nFunction
│   │                   ) raises ( .uno.Exception)
│   ├─.util.XIndent
│   │     void  decrementIndent()
│   │     void  incrementIndent()
│   ├─.util.XReplaceable
│   │   │   .util.XReplaceDescriptor  createReplaceDescriptor()
│   │   │                       long  replaceAll( [in] .util.XSearchDescriptor xDesc)
│   │   └─.util.XSearchable
│   │        .util.XSearchDescriptor  createSearchDescriptor()
│   │        .container.XIndexAccess  findAll( [in] .util.XSearchDescriptor xDesc)
│   │                .uno.XInterface  findFirst( [in] .util.XSearchDescriptor xDesc)
│   │                .uno.XInterface  findNext( [in]         .uno.XInterface xStartAt,
│   │                                           [in] .util.XSearchDescriptor xDesc)
│   ├─.sheet.SheetRangesQuery
│   │   ├─.sheet.XCellRangesQuery
│   │   │     .sheet.XSheetCellRanges  queryColumnDifferences( [in] .table.CellAddress aCompare)
│   │   │     .sheet.XSheetCellRanges  queryContentCells( [in] short nContentFlags)
│   │   │     .sheet.XSheetCellRanges  queryEmptyCells()
│   │   │     .sheet.XSheetCellRanges  queryFormulaCells( [in] long nResultFlags)
│   │   │     .sheet.XSheetCellRanges  queryIntersection( [in] .table.CellRangeAddress aRange)
│   │   │     .sheet.XSheetCellRanges  queryRowDifferences( [in] .table.CellAddress aCompare)
│   │   │     .sheet.XSheetCellRanges  queryVisibleCells()
│   │   └─.sheet.XFormulaQuery
│   │        .sheet.XSheetCellRanges  queryDependents( [in] boolean bRecursive)
│   │        .sheet.XSheetCellRanges  queryPrecedents( [in] boolean bRecursive)
│   ├─.style.CharacterProperties
│   │                       boolean  CharAutoKerning
│   │                   .util.Color  CharBackColor
│   │                       boolean  CharBackTransparent
│   │                          long  CharBorderDistance
│   │            .table.BorderLine2  CharBottomBorder
│   │                          long  CharBottomBorderDistance
│   │                         short  CharCaseMap
│   │                   .util.Color  CharColor
│   │                       boolean  CharCombineIsOn
│   │                        string  CharCombinePrefix
│   │                        string  CharCombineSuffix
│   │                       boolean  CharContoured
│   │                       boolean  CharCrossedOut
│   │                         short  CharEmphasis
│   │                         short  CharEscapement
│   │                          byte  CharEscapementHeight
│   │                       boolean  CharFlash
│   │                         short  CharFontCharSet
│   │                         short  CharFontFamily
│   │                        string  CharFontName
│   │                         short  CharFontPitch
│   │                        string  CharFontStyleName
│   │                         short  CharFontType
│   │                         float  CharHeight
│   │                       boolean  CharHidden
│   │                   .util.Color  CharHighlight
│   │        [.beans.PropertyValue]  CharInteropGrabBag
│   │                       boolean  CharKeepTogether
│   │                         short  CharKerning
│   │            .table.BorderLine2  CharLeftBorder
│   │                          long  CharLeftBorderDistance
│   │                  .lang.Locale  CharLocale
│   │                       boolean  CharNoHyphenation
│   │                       boolean  CharNoLineBreak
│   │                .awt.FontSlant  CharPosture
│   │                         short  CharRelief
│   │            .table.BorderLine2  CharRightBorder
│   │                          long  CharRightBorderDistance
│   │                         short  CharRotation
│   │                       boolean  CharRotationIsFitToLine
│   │                         short  CharScaleWidth
│   │                          long  CharShadingValue
│   │           .table.ShadowFormat  CharShadowFormat
│   │                       boolean  CharShadowed
│   │                         short  CharStrikeout
│   │                        string  CharStyleName
│   │                      [string]  CharStyleNames
│   │            .table.BorderLine2  CharTopBorder
│   │                          long  CharTopBorderDistance
│   │                         short  CharUnderline
│   │                   .util.Color  CharUnderlineColor
│   │                       boolean  CharUnderlineHasColor
│   │                         float  CharWeight
│   │                       boolean  CharWordMode
│   │                        string  HyperLinkName
│   │                        string  HyperLinkTarget
│   │                        string  HyperLinkURL
│   │                         short  RubyAdjust
│   │                        string  RubyCharStyleName
│   │                       boolean  RubyIsAbove
│   │                        string  RubyText
│   │     .container.XNameContainer  TextUserDefinedAttributes
│   │                        string  UnvisitedCharStyleName
│   │                        string  VisitedCharStyleName
│   ├─.style.CharacterPropertiesAsian
│   │              short  CharFontCharSetAsian
│   │              short  CharFontFamilyAsian
│   │             string  CharFontNameAsian
│   │              short  CharFontPitchAsian
│   │             string  CharFontStyleNameAsian
│   │              float  CharHeightAsian
│   │       .lang.Locale  CharLocaleAsian
│   │     .awt.FontSlant  CharPostureAsian
│   │              float  CharWeightAsian
│   ├─.style.CharacterPropertiesComplex
│   │              short  CharFontCharSetComplex
│   │              short  CharFontFamilyComplex
│   │             string  CharFontNameComplex
│   │              short  CharFontPitchComplex
│   │             string  CharFontStyleNameComplex
│   │              float  CharHeightComplex
│   │       .lang.Locale  CharLocaleComplex
│   │     .awt.FontSlant  CharPostureComplex
│   │              float  CharWeightComplex
│   ├─.style.ParagraphProperties
│   │                          long  BorderDistance
│   │             .table.BorderLine  BottomBorder
│   │                          long  BottomBorderDistance
│   │              .style.BreakType  BreakType
│   │                        string  DropCapCharStyleName
│   │          .style.DropCapFormat  DropCapFormat
│   │                       boolean  DropCapWholeWord
│   │             .table.BorderLine  LeftBorder
│   │                          long  LeftBorderDistance
│   │                        string  ListId
│   │                       boolean  NumberingIsNumber
│   │                         short  NumberingLevel
│   │      .container.XIndexReplace  NumberingRules
│   │                         short  NumberingStartValue
│   │                        string  NumberingStyleName
│   │                         short  OutlineLevel
│   │                        string  PageDescName
│   │                         short  PageNumberOffset
│   │                        string  PageStyleName
│   │        .style.ParagraphAdjust  ParaAdjust
│   │                   .util.Color  ParaBackColor
│   │                        string  ParaBackGraphicFilter
│   │        .style.GraphicLocation  ParaBackGraphicLocation
│   │                        string  ParaBackGraphicURL
│   │                       boolean  ParaBackTransparent
│   │                          long  ParaBottomMargin
│   │                       boolean  ParaContextMargin
│   │                       boolean  ParaExpandSingleWord
│   │                          long  ParaFirstLineIndent
│   │                         short  ParaHyphenationMaxHyphens
│   │                         short  ParaHyphenationMaxLeadingChars
│   │                         short  ParaHyphenationMaxTrailingChars
│   │        [.beans.PropertyValue]  ParaInteropGrabBag
│   │                       boolean  ParaIsAutoFirstLineIndent
│   │                       boolean  ParaIsConnectBorder
│   │                       boolean  ParaIsHyphenation
│   │                       boolean  ParaIsNumberingRestart
│   │                       boolean  ParaKeepTogether
│   │                         short  ParaLastLineAdjust
│   │                          long  ParaLeftMargin
│   │                       boolean  ParaLineNumberCount
│   │                          long  ParaLineNumberStartValue
│   │            .style.LineSpacing  ParaLineSpacing
│   │                          byte  ParaOrphans
│   │                       boolean  ParaRegisterModeActive
│   │                          long  ParaRightMargin
│   │           .table.ShadowFormat  ParaShadowFormat
│   │                       boolean  ParaSplit
│   │                        string  ParaStyleName
│   │              [.style.TabStop]  ParaTabStops
│   │                          long  ParaTopMargin
│   │     .container.XNameContainer  ParaUserDefinedAttributes
│   │                         short  ParaVertAlignment
│   │                          byte  ParaWidows
│   │             .table.BorderLine  RightBorder
│   │                          long  RightBorderDistance
│   │             .table.BorderLine  TopBorder
│   │                          long  TopBorderDistance
│   └─.table.CellProperties
│     │                     boolean  AsianVerticalMode
│     │           .table.BorderLine  BottomBorder
│     │          .table.BorderLine2  BottomBorder2
│     │                 .util.Color  CellBackColor
│     │      [.beans.PropertyValue]  CellInteropGrabBag
│     │        .util.CellProtection  CellProtection
│     │                      string  CellStyle
│     │           .table.BorderLine  DiagonalBLTR
│     │          .table.BorderLine2  DiagonalBLTR2
│     │           .table.BorderLine  DiagonalTLBR
│     │          .table.BorderLine2  DiagonalTLBR2
│     │      .table.CellHoriJustify  HoriJustify
│     │                     boolean  IsCellBackgroundTransparent
│     │                     boolean  IsTextWrapped
│     │           .table.BorderLine  LeftBorder
│     │          .table.BorderLine2  LeftBorder2
│     │                        long  NumberFormat
│     │      .table.CellOrientation  Orientation
│     │                       short  ParaIndent
│     │           .table.BorderLine  RightBorder
│     │          .table.BorderLine2  RightBorder2
│     │                        long  RotateAngle
│     │                        long  RotateReference
│     │         .table.ShadowFormat  ShadowFormat
│     │                     boolean  ShrinkToFit
│     │          .table.TableBorder  TableBorder
│     │         .table.TableBorder2  TableBorder2
│     │           .table.BorderLine  TopBorder
│     │          .table.BorderLine2  TopBorder2
│     │   .container.XNameContainer  UserDefinedAttributes
│     │                        long  VertJustify
│     └─.beans.XPropertySet
│                              void  addPropertyChangeListener( [in]                         string aPropertyName,
│                                                               [in] .beans.XPropertyChangeListener xListener
│                                                    ) raises ( .lang.WrappedTargetException,
│                                                               .beans.UnknownPropertyException)
│                              void  addVetoableChangeListener( [in]                         string PropertyName,
│                                                               [in] .beans.XVetoableChangeListener aListener
│                                                    ) raises ( .lang.WrappedTargetException,
│                                                               .beans.UnknownPropertyException)
│           .beans.XPropertySetInfo  getPropertySetInfo()
│                               any  getPropertyValue( [in] string PropertyName
│                                           ) raises ( .lang.WrappedTargetException,
│                                                      .beans.UnknownPropertyException)
│                              void  removePropertyChangeListener( [in]                         string aPropertyName,
│                                                                  [in] .beans.XPropertyChangeListener aListener
│                                                       ) raises ( .lang.WrappedTargetException,
│                                                                  .beans.UnknownPropertyException)
│                              void  removeVetoableChangeListener( [in]                         string PropertyName,
│                                                                  [in] .beans.XVetoableChangeListener aListener
│                                                       ) raises ( .lang.WrappedTargetException,
│                                                                  .beans.UnknownPropertyException)
│                              void  setPropertyValue( [in] string aPropertyName,
│                                                      [in]    any aValue
│                                           ) raises ( .lang.WrappedTargetException,
│                                                      .lang.IllegalArgumentException,
│                                                      .beans.PropertyVetoException,
│                                                      .beans.UnknownPropertyException)
├─.beans.XMultiPropertySet
│                        void  addPropertiesChangeListener( [in]                         [string] aPropertyNames,
│                                                           [in] .beans.XPropertiesChangeListener xListener)
│                        void  firePropertiesChangeEvent( [in]                         [string] aPropertyNames,
│                                                         [in] .beans.XPropertiesChangeListener xListener)
│     .beans.XPropertySetInfo  getPropertySetInfo()
│                       [any]  getPropertyValues( [in] [string] aPropertyNames)
│                        void  removePropertiesChangeListener( [in] .beans.XPropertiesChangeListener xListener)
│                        void  setPropertyValues( [in] [string] aPropertyNames,
│                                                 [in]    [any] aValues
│                                      ) raises ( .lang.WrappedTargetException,
│                                                 .lang.IllegalArgumentException,
│                                                 .beans.PropertyVetoException)
├─.beans.XPropertyState
│                        any  getPropertyDefault( [in] string aPropertyName
│                                      ) raises ( .lang.WrappedTargetException,
│                                                 .beans.UnknownPropertyException)
│       .beans.PropertyState  getPropertyState( [in] string PropertyName
│                                    ) raises ( .beans.UnknownPropertyException)
│     [.beans.PropertyState]  getPropertyStates( [in] [string] aPropertyName
│                                     ) raises ( .beans.UnknownPropertyException)
│                       void  setPropertyToDefault( [in] string PropertyName
│                                        ) raises ( .beans.UnknownPropertyException)
├─.util.XModifyBroadcaster
│     void  addModifyListener( [in] .util.XModifyListener aListener)
│     void  removeModifyListener( [in] .util.XModifyListener aListener)
└──(サービスやインターフェイスに属しないプロパティ)
                               short  CharFont
                               short  CharOverline
                                long  CharOverlineColor
                             boolean  CharOverlineHasColor
                             boolean  ChartColumnAsLabel
                             boolean  ChartRowAsLabel
     .sheet.XSheetConditionalEntries  ConditionalFormatXML
                      unsigned hyper  FormatID
                                long  HoriJustifyMethod
                              string  Hyperlink
                             boolean  ParaIsCharacterDistance
                             boolean  ParaIsForbiddenRules
                             boolean  ParaIsHangingPunctuation
                 .beans.XPropertySet  ValidationXML
                                long  VertJustifyMethod
                               short  WritingMode

次の関連記事:Calc(22)セル範囲とセル範囲コレクションのサービスとインターフェイスの比較

ブログ検索 by Blogger

Translate

最近のコメント

Created by Calendar Gadget

QooQ