32 uno::WeakReference< XHelperInterface >
mxParent;
33 uno::Reference< uno::XComponentContext >
mxContext;
34 uno::Reference< text::XTextTable > mxTextTable;
35 uno::Reference< container::XIndexAccess > mxIndexAccess;
39 ColumnsEnumWrapper(
const uno::Reference< XHelperInterface >& xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< text::XTextTable > xTextTable ) :
mxParent( xParent ),
mxContext(
std::move( xContext )), mxTextTable(
std::move( xTextTable )),
mnIndex( 0 )
41 mxIndexAccess = mxTextTable->getColumns();
43 virtual sal_Bool SAL_CALL hasMoreElements( )
override
45 return ( mnIndex < mxIndexAccess->getCount() );
48 virtual uno::Any SAL_CALL nextElement( )
override
50 if( mnIndex < mxIndexAccess->getCount() )
52 return uno::Any( uno::Reference< word::XColumn > (
new SwVbaColumn( mxParent, mxContext, mxTextTable, mnIndex++ ) ) );
54 throw container::NoSuchElementException();
60SwVbaColumns::SwVbaColumns(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable,
const uno::Reference< table::XTableColumns >& xTableColumns ) :
SwVbaColumns_BASE( xParent, xContext,
uno::
Reference< container::XIndexAccess >( xTableColumns,
uno::UNO_QUERY_THROW ) ), mxTextTable(
std::move( xTextTable ))
62 mnStartColumnIndex = 0;
64 mnEndColumnIndex = aTableHelper.getTabColumnsMaxCount( ) - 1;
67SwVbaColumns::SwVbaColumns(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< text::XTextTable > xTextTable,
const uno::Reference< table::XTableColumns >& xTableColumns, sal_Int32 nStartCol, sal_Int32 nEndCol ) :
SwVbaColumns_BASE( xParent, xContext,
uno::
Reference< container::XIndexAccess >( xTableColumns,
uno::UNO_QUERY_THROW ) ), mxTextTable(
std::move( xTextTable )), mnStartColumnIndex( nStartCol ), mnEndColumnIndex( nEndCol )
69 if( mnEndColumnIndex < mnStartColumnIndex )
70 throw uno::RuntimeException();
106 if( nIndex <= 0 || nIndex >
getCount() )
108 throw lang::IndexOutOfBoundsException(
"Index out of bounds" );
112 throw uno::RuntimeException(
"Index out of bounds" );
121uno::Reference< container::XEnumeration >
136 return "SwVbaColumns";
139uno::Sequence<OUString>
142 static uno::Sequence< OUString >
const sNames
144 "ooo.vba.word.Columns"
unotools::WeakReference< AnimationNode > mxParent
css::uno::Reference< css::uno::XComponentContext > mxContext
static void SelectColumn(const css::uno::Reference< css::frame::XModel > &xModel, const css::uno::Reference< css::text::XTextTable > &xTextTable, sal_Int32 nStartColumn, sal_Int32 nEndColumn)
virtual sal_Int32 SAL_CALL getWidth() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
css::uno::Reference< css::text::XTextTable > mxTextTable
SwVbaColumns(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::text::XTextTable > xTextTable, const css::uno::Reference< css::table::XTableColumns > &xTableColumns)
virtual ::sal_Int32 SAL_CALL getCount() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Sequence< OUString > getServiceNames() override
sal_Int32 mnStartColumnIndex
sal_Int32 mnEndColumnIndex
virtual void SAL_CALL setWidth(sal_Int32 _width) override
virtual OUString getServiceImplName() override
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
virtual void SAL_CALL Select() override
css::uno::Reference< ooo::vba::word::XColumn > getColumnAtIndex(sal_Int32 index)
virtual css::uno::Any SAL_CALL Item(const css::uno::Any &Index1, const css::uno::Any &) override
css::uno::Type const & get()
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc(const css::uno::Reference< css::uno::XComponentContext > &xContext)
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE