summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-05-06 17:19:22 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-05-06 18:12:28 +0200
commit09abd826a0e26517ea722659491e8eb525a9b8bc (patch)
treefd6a2a09bcf42bdcdc16b8104a9073a5ad9177c0 /sw/source/ui
parentc2d7ee9abfc02febfd16e9f19c7395115036ecc5 (diff)
remove uncompiled source files
how to find possible candidates: find . -name *.cxx | grep -v compilerplugins > cxx.list for i in `cat cxx.list`; do basename $i .cxx; done > cxx.base.list for i in `cat cxx.base.list | sort -u`; do echo $(git grep -w $i -- '*.mk' | wc -l) $i; done > cxx.count Change-Id: I15c6cc7195e58d79967388850a0c90b915b001b7
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/vba/vbadocument.cxx1
-rw-r--r--sw/source/ui/vba/vbaformfield.cxx128
-rw-r--r--sw/source/ui/vba/vbaformfield.hxx52
-rw-r--r--sw/source/ui/vba/vbaformfields.cxx195
-rw-r--r--sw/source/ui/vba/vbaformfields.hxx51
5 files changed, 0 insertions, 427 deletions
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 35ea653e51e0..f3c26cb1c928 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -47,7 +47,6 @@
#include <vbahelper/vbahelper.hxx>
#include "vbarevisions.hxx"
#include "vbaframes.hxx"
-#include "vbaformfields.hxx"
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
diff --git a/sw/source/ui/vba/vbaformfield.cxx b/sw/source/ui/vba/vbaformfield.cxx
deleted file mode 100644
index dbd42e5b24b1..000000000000
--- a/sw/source/ui/vba/vbaformfield.cxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "vbaformfield.hxx"
-#include <vbahelper/vbahelper.hxx>
-#include <tools/diagnose_ex.h>
-#include <com/sun/star/text/XTextDocument.hpp>
-#include <com/sun/star/text/XTextContent.hpp>
-#include <com/sun/star/text/XTextViewCursor.hpp>
-#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
-#include <ecmaflds.hxx>
-#include "vbacheckbox.hxx"
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-
-SwVbaFormField::SwVbaFormField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& rModel, const uno::Reference< text::XFormField >& xFormField ) throw ( uno::RuntimeException ) : SwVbaFormField_BASE( rParent, rContext ), mxModel( rModel ), mxFormField( xFormField )
-{
-}
-
-SwVbaFormField::~SwVbaFormField()
-{
-}
-
-OUString SAL_CALL SwVbaFormField::getResult() throw ( uno::RuntimeException )
-{
- OUString sResult;
- OUString sType = mxFormField->getFieldType();
- if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMTEXT ) )
- {
- uno::Reference< text::XTextContent > xTextContent( mxFormField, uno::UNO_QUERY_THROW );
- uno::Reference< text::XTextRange > xTextRange = xTextContent->getAnchor();
- sResult = xTextRange->getString();
- }
- else if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
- {
- sal_Int32 nValue = 0;
- sal_Int32 nCount = mxFormField->getParamCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- if( mxFormField->getParamName(i).equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX_CHECKED ) )
- {
- if( mxFormField->getParamValue(i).equalsIgnoreAsciiCase("on") )
- nValue = 1;
- else
- nValue = 0;
- break;
- }
-
- }
- sResult = OUString::valueOf( nValue );
- }
- else
- {
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
- }
- return sResult;
-}
-
-void SAL_CALL SwVbaFormField::setResult( const OUString& result ) throw ( uno::RuntimeException )
-{
- OUString sType = mxFormField->getFieldType();
- if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMTEXT ) )
- {
- uno::Reference< text::XTextContent > xTextContent( mxFormField, uno::UNO_QUERY_THROW );
- uno::Reference< text::XTextRange > xTextRange = xTextContent->getAnchor();
- xTextRange->setString( result );
- }
- else if( sType.equalsIgnoreAsciiCaseAscii( ECMA_FORMCHECKBOX ) )
- {
- // do nothing
- }
- else
- {
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
- }
-}
-
-sal_Bool SAL_CALL SwVbaFormField::getEnabled() throw ( uno::RuntimeException )
-{
- //always return true
- return sal_True;
-}
-
-void SAL_CALL SwVbaFormField::setEnabled( sal_Bool/* enabled */ ) throw ( uno::RuntimeException )
-{
- // not support in Writer
-}
-
-uno::Any SAL_CALL SwVbaFormField::CheckBox() throw ( uno::RuntimeException )
-{
- return uno::makeAny( uno::Reference< word::XCheckBox >( new SwVbaCheckBox( this, mxContext, mxModel, mxFormField ) ) );
-}
-
-OUString
-SwVbaFormField::getServiceImplName()
-{
- return OUString("SwVbaFormField");
-}
-
-uno::Sequence< OUString >
-SwVbaFormField::getServiceNames()
-{
- static uno::Sequence< OUString > aServiceNames;
- if ( aServiceNames.getLength() == 0 )
- {
- aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = "ooo.vba.word.FormField";
- }
- return aServiceNames;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfield.hxx b/sw/source/ui/vba/vbaformfield.hxx
deleted file mode 100644
index 67e604a1204f..000000000000
--- a/sw/source/ui/vba/vbaformfield.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELD_HXX
-#define INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELD_HXX
-
-#include <ooo/vba/word/XFormField.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/text/XFormField.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
-
-typedef InheritedHelperInterfaceImpl1< ooo::vba::word::XFormField > SwVbaFormField_BASE;
-
-class SwVbaFormField : public SwVbaFormField_BASE
-{
-private:
- css::uno::Reference< css::frame::XModel > mxModel;
- css::uno::Reference< css::text::XFormField > mxFormField;
-
-public:
- SwVbaFormField( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::text::XFormField >& xFormField ) throw ( css::uno::RuntimeException );
- virtual ~SwVbaFormField();
-
- // Methods
- OUString SAL_CALL getResult() throw ( css::uno::RuntimeException );
- void SAL_CALL setResult( const OUString& result ) throw ( css::uno::RuntimeException );
- sal_Bool SAL_CALL getEnabled() throw ( css::uno::RuntimeException );
- void SAL_CALL setEnabled( sal_Bool enabled ) throw ( css::uno::RuntimeException );
- css::uno::Any SAL_CALL CheckBox() throw ( css::uno::RuntimeException );
-
- // XHelperInterface
- virtual OUString getServiceImplName();
- virtual css::uno::Sequence<OUString> getServiceNames();
-};
-#endif // INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELD_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfields.cxx b/sw/source/ui/vba/vbaformfields.cxx
deleted file mode 100644
index 2f59e6097928..000000000000
--- a/sw/source/ui/vba/vbaformfields.cxx
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "vbaformfields.hxx"
-#include "vbaformfield.hxx"
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/text/XTextDocument.hpp>
-#include <com/sun/star/text/XTextViewCursor.hpp>
-#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
-#include "wordvbahelper.hxx"
-#include <cppuhelper/implbase3.hxx>
-
-using namespace ::ooo::vba;
-using namespace ::com::sun::star;
-
-typedef std::vector< uno::Reference< text::XFormField > > XFormFieldVec;
-typedef ::cppu::WeakImplHelper1< container::XEnumeration > FormFiledEnumeration_BASE;
-typedef ::cppu::WeakImplHelper3< container::XNameAccess, container::XIndexAccess, container::XEnumerationAccess > FormFieldCollectionHelper_BASE;
-
-OUString lcl_getFormFieldName( const uno::Reference< text::XFormField >& xFormField )
-{
- OUString sName;
- sal_Int32 nCount = xFormField->getParamCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- if( xFormField->getParamName(i).equalsIgnoreAsciiCase("Name") )
- {
- sName = xFormField->getParamValue(i);
- OSL_TRACE("lcl_getFormFieldName: %s", OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr() );
- break;
- }
- }
- return sName;
-}
-
-class FormFieldsEnumeration : public FormFiledEnumeration_BASE
-{
-private:
- uno::Reference< XHelperInterface > mxParent;
- uno::Reference< uno::XComponentContext > mxContext;
- uno::Reference< frame::XModel > mxModel;
- XFormFieldVec mxFormFields;
- XFormFieldVec::iterator cachePos;
-public:
- FormFieldsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const XFormFieldVec& xFormFiels ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxFormFields( xFormFiels ), cachePos( mxFormFields.begin() )
- {
- }
- virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
- {
- return ( cachePos != mxFormFields.end() );
- }
-
- virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( !hasMoreElements() )
- throw container::NoSuchElementException();
- uno::Reference< text::XFormField > xFormField( *cachePos++ );
- return uno::makeAny( uno::Reference< word::XFormField > ( new SwVbaFormField( mxParent, mxContext, mxModel, xFormField ) ) );
- }
-
-};
-
-class FormFieldCollectionHelper : public FormFieldCollectionHelper_BASE
-{
-private:
- uno::Reference< XHelperInterface > mxParent;
- uno::Reference< uno::XComponentContext > mxContext;
- uno::Reference< frame::XModel > mxModel;
- XFormFieldVec mxFormFields;
- XFormFieldVec::iterator cachePos;
-public:
- FormFieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
- {
- uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( xModel,uno::UNO_QUERY_THROW );
- uno::Reference< container::XIndexAccess > xIndexAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
- sal_Int32 nCount = xIndexAccess->getCount();
- for( sal_Int32 i = 0; i < nCount; i++ )
- {
- uno::Reference< text::XFormField > xFormField( xIndexAccess->getByIndex( i ), uno::UNO_QUERY );
- if( xFormField.is() )
- mxFormFields.push_back( xFormField );
- }
- cachePos = mxFormFields.begin();
- }
- // XElementAccess
- virtual uno::Type SAL_CALL getElementType( ) throw (uno::RuntimeException) { return cppu::UnoType<word::XFormField>::get(); }
- virtual sal_Bool SAL_CALL hasElements( ) throw (uno::RuntimeException) { return getCount() > 0 ; }
- // XNameAcess
- virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
- {
- if ( !hasByName(aName) )
- throw container::NoSuchElementException();
- uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
- return uno::makeAny( uno::Reference< word::XFormField >( new SwVbaFormField( mxParent, mxContext, mxModel, xFormField ) ) );
- }
- virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
- {
- uno::Sequence< OUString > sNames( mxFormFields.size() );
- OUString* pString = sNames.getArray();
- XFormFieldVec::iterator it = mxFormFields.begin();
- XFormFieldVec::iterator it_end = mxFormFields.end();
- for ( ; it != it_end; ++it, ++pString )
- {
- uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
- *pString = lcl_getFormFieldName( xFormField );
- }
- return sNames;
- }
- virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException)
- {
- cachePos = mxFormFields.begin();
- XFormFieldVec::iterator it_end = mxFormFields.end();
- for ( ; cachePos != it_end; ++cachePos )
- {
- //uno::Reference< container::XNamed > xName( *cachePos, uno::UNO_QUERY_THROW );
- uno::Reference< text::XFormField > xFormField( *cachePos, uno::UNO_QUERY_THROW );
- if ( aName.equalsIgnoreAsciiCase( lcl_getFormFieldName( xFormField )) )
- break;
- }
- return ( cachePos != it_end );
- }
- // XIndexAccess
- virtual ::sal_Int32 SAL_CALL getCount( ) throw (uno::RuntimeException)
- {
- return mxFormFields.size();
- }
- virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException )
- {
- if ( Index < 0 || Index >= getCount() )
- throw lang::IndexOutOfBoundsException();
- return uno::makeAny( uno::Reference< word::XFormField >( new SwVbaFormField( mxParent, mxContext, mxModel, mxFormFields[ Index ] ) ) );
- }
- // XEnumerationAccess
- virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) throw (uno::RuntimeException)
- {
- return new FormFieldsEnumeration( mxParent, mxContext, mxModel, mxFormFields );
- }
-};
-
-SwVbaFormFields::SwVbaFormFields( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< ::com::sun::star::uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ): SwVbaFormFields_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new FormFieldCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel )
-{
-}
-// XEnumerationAccess
-uno::Type
-SwVbaFormFields::getElementType() throw (uno::RuntimeException)
-{
- return cppu::UnoType<word::XFormField>::get();
-}
-uno::Reference< container::XEnumeration >
-SwVbaFormFields::createEnumeration() throw (uno::RuntimeException)
-{
- uno::Reference< container::XEnumerationAccess > xEnumAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- return xEnumAccess->createEnumeration();
-}
-
-uno::Any
-SwVbaFormFields::createCollectionObject( const css::uno::Any& aSource )
-{
- return aSource;
-}
-
-OUString
-SwVbaFormFields::getServiceImplName()
-{
- return OUString("SwVbaFormFields");
-}
-
-css::uno::Sequence<OUString>
-SwVbaFormFields::getServiceNames()
-{
- static uno::Sequence< OUString > sNames;
- if ( sNames.getLength() == 0 )
- {
- sNames.realloc( 1 );
- sNames[0] = "ooo.vba.word.FormFields";
- }
- return sNames;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaformfields.hxx b/sw/source/ui/vba/vbaformfields.hxx
deleted file mode 100644
index 860069e44de2..000000000000
--- a/sw/source/ui/vba/vbaformfields.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELDS_HXX
-#define INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELDS_HXX
-
-#include <vbahelper/vbacollectionimpl.hxx>
-#include <ooo/vba/word/XFormFields.hpp>
-#include <vbahelper/vbahelperinterface.hxx>
-#include <com/sun/star/text/XBookmarksSupplier.hpp>
-#include <com/sun/star/text/XTextRange.hpp>
-
-typedef CollTestImplHelper< ooo::vba::word::XFormFields > SwVbaFormFields_BASE;
-
-class SwVbaFormFields : public SwVbaFormFields_BASE
-{
-private:
- css::uno::Reference< css::frame::XModel > mxModel;
-
-public:
- SwVbaFormFields( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel );
- virtual ~SwVbaFormFields() {}
-
- // XEnumerationAccess
- virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException) SAL_OVERRIDE;
- virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE;
-
- // SwVbaFormFields_BASE
- virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) SAL_OVERRIDE;
- virtual OUString getServiceImplName() SAL_OVERRIDE;
- virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE;
-};
-
-#endif // INCLUDED_SW_SOURCE_UI_VBA_VBAFORMFIELDS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */