Kaydet (Commit) 0f11f30e authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Remove unused header files

Those are unused too.

Change-Id: I09c9dbcdbc68131c7c54bf0762a23f1280e6e22a
üst 8122fdb0
......@@ -41,10 +41,8 @@ $(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/cppudllapi.h,cppu/cppudllapi
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/EnvDcp.hxx,cppu/EnvDcp.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/Enterable.hxx,cppu/Enterable.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/EnvGuards.hxx,cppu/EnvGuards.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/FreeReference.hxx,cppu/FreeReference.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/macros.hxx,cppu/macros.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/Map.hxx,cppu/Map.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/Shield.hxx,cppu/Shield.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/unotype.hxx,cppu/unotype.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/helper/purpenv/Environment.hxx,cppu/helper/purpenv/Environment.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/cppu/helper/purpenv/Mapping.hxx,cppu/helper/purpenv/Mapping.hxx))
......@@ -53,7 +51,6 @@ $(eval $(call gb_Package_add_file,cppu_inc,inc/typelib/typedescription.h,typelib
$(eval $(call gb_Package_add_file,cppu_inc,inc/typelib/typedescription.hxx,typelib/typedescription.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/typelib/uik.h,typelib/uik.h))
$(eval $(call gb_Package_add_file,cppu_inc,inc/uno/any2.h,uno/any2.h))
$(eval $(call gb_Package_add_file,cppu_inc,inc/uno/cuno.h,uno/cuno.h))
$(eval $(call gb_Package_add_file,cppu_inc,inc/uno/current_context.h,uno/current_context.h))
$(eval $(call gb_Package_add_file,cppu_inc,inc/uno/current_context.hxx,uno/current_context.hxx))
$(eval $(call gb_Package_add_file,cppu_inc,inc/uno/data.h,uno/data.h))
......
/* -*- 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_cppu_FreeReference_hxx
#define INCLUDED_cppu_FreeReference_hxx
#include "uno/environment.hxx"
#include "cppu/Map.hxx"
#include "com/sun/star/uno/Reference.h"
namespace cssuno = com::sun::star::uno;
namespace cppu
{
/** Freely (environment independent) usable Reference.
(http://wiki.services.openoffice.org/wiki/Uno/Cpp/Spec/FreeReference)
@since UDK 3.2.7
*/
template< class T >
class FreeReference
{
cssuno::Environment m_env;
T * m_pObject;
public:
FreeReference() : m_pObject(NULL) {}
FreeReference(T * pObject, __sal_NoAcquire)
: m_env(cssuno::Environment::getCurrent()),
m_pObject(pObject)
{
}
FreeReference(T * pObject)
: m_env(cssuno::Environment::getCurrent()),
m_pObject(pObject)
{
if (m_pObject)
m_env.get()->pExtEnv->acquireInterface(m_env.get()->pExtEnv, m_pObject);
}
explicit FreeReference(cssuno::Reference<T> const & xRef)
: m_env(cssuno::Environment::getCurrent()),
m_pObject(xRef.get())
{
if (m_pObject)
m_env.get()->pExtEnv->acquireInterface(m_env.get()->pExtEnv, m_pObject);
}
FreeReference(FreeReference<T> const & rOther)
: m_env (rOther.m_env),
m_pObject(rOther.m_pObject)
{
if (m_pObject)
m_env.get()->pExtEnv->acquireInterface(m_env.get()->pExtEnv, m_pObject);
}
~FreeReference()
{
clear();
}
cssuno::Environment getEnv() const throw (cssuno::RuntimeException)
{
return m_env;
}
cssuno::Reference<T> get() const throw (cssuno::RuntimeException)
{
return cssuno::Reference<T>(cppu::mapIn(m_pObject, m_env), SAL_NO_ACQUIRE);
}
operator cssuno::Reference<T> () const throw (cssuno::RuntimeException)
{
return get();
}
cssuno::Reference<T> operator -> () const throw (cssuno::RuntimeException)
{
return get();
}
bool is() const throw (cssuno::RuntimeException)
{
return m_pObject != NULL;
}
void clear()
{
if (m_pObject)
{
m_env.get()->pExtEnv->releaseInterface(m_env.get()->pExtEnv, m_pObject);
m_pObject = NULL;
m_env.clear();
}
}
FreeReference<T> & operator = (FreeReference<T> const & rOther)
{
clear();
m_pObject = rOther.m_pObject;
if (m_pObject)
{
m_env = rOther.m_env;
m_env.get()->pExtEnv->acquireInterface(m_env.get()->pExtEnv, m_pObject);
}
return *this;
}
void set(cssuno::Reference<T> const & xRef)
{
clear();
m_pObject = xRef.get();
if (m_pObject)
{
m_env = cssuno::Environment::getCurrent();
m_env.get()->pExtEnv->acquireInterface(m_env.get()->pExtEnv, m_pObject);
}
}
bool operator == (FreeReference const & rOther) const
{
return get() == rOther.get();
}
bool operator != (FreeReference const & rOther) const
{
return !operator==(rOther);
}
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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_cppu_Shield_hxx
#define INCLUDED_cppu_Shield_hxx
#include <cppu/Map.hxx>
namespace cssu = com::sun::star::uno;
namespace cppu
{
/** Helpers for mapping objects relative to the thread-safe and current environments.
(http://wiki.services.openoffice.org/wiki/Uno/Cpp/Spec/Shield_Helpers)
*/
/** Maps an object from the current to the thread-safe Environment, returns mapped object.
@param pT the object to be mapped
@return the mapped object
@since UDK 3.2.7
*/
template<class T> inline T * shield(T * pT)
{
return mapOut(pT, cssu::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))));
}
/** Maps an object from the thread-safe Environment to the current one, returns mapped object.
@param pT the object to be mapped
@return the mapped object
@since UDK 3.2.7
*/
template<class T> inline T * unshield(T * pT)
{
return mapIn(pT, cssu::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))));
}
/** Maps an any from the current to the thread-safe Environment, fills the passed any.
@param any the any to be mapped
@param res the target any
@since UDK 3.2.7
*/
inline void shieldAny(cssu::Any const & any, cssu::Any * res)
{
mapOutAny(any, res, cssu::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))));
}
/** Maps an any from the thread-safe Environment to the current one, fills the passed any.
@param any the any to be mapped
@param res the target any
@since UDK 3.2.7
*/
inline void unshieldAny(cssu::Any const & any, cssu::Any * res)
{
mapInAny(any, res, cssu::Environment(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(CPPU_STRINGIFY(CPPU_ENV)))));
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 _UNO_CUNO_H_
#define _UNO_CUNO_H_
#include <sal/types.h>
#define CUNO_ERROR_NONE 0
#define CUNO_ERROR_CALL_FAILED (1 << 31)
#define CUNO_ERROR_EXCEPTION (1 | CUNO_ERROR_CALL_FAILED)
/** macro to call on a C interface
@param interface_pointer interface pointer
*/
#define CUNO_CALL( interface_pointer ) (*interface_pointer)
/** macro to test if an exception was signalled.
@param return_code return code of call
*/
#define CUNO_EXCEPTION_OCCURRED( return_code ) (0 != ((return_code) & CUNO_ERROR_EXCEPTION))
typedef sal_Int32 cuno_ErrorCode;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -33,7 +33,6 @@ $(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/dynload.hxx,dynloa
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/future.hxx,future.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/futurequeue.hxx,futurequeue.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/linkhelper.hxx,linkhelper.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/monitor.hxx,monitor.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/queue.hxx,queue.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/refobj.hxx,refobj.hxx))
$(eval $(call gb_Package_add_file,salhelper_inc,inc/salhelper/simplereferenceobject.hxx,simplereferenceobject.hxx))
......
/* -*- 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 _SALHELPER_MONITOR_HXX_
#define _SALHELPER_MONITOR_HXX_
#include <sal/types.h>
#include <osl/conditn.hxx>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <rtl/ref.hxx>
#include <salhelper/refobj.hxx>
#include <salhelper/future.hxx>
#include <salhelper/futurequeue.hxx>
namespace salhelper
{
//----------------------------------------------------------------------------
#ifndef SALHELPER_COPYCTOR_API
#define SALHELPER_COPYCTOR_API(C) C (const C&); C& operator= (const C&)
#endif
//----------------------------------------------------------------------------
class MonitorCondition : protected osl::Condition
{
/** Representation.
*/
oslInterlockedCount m_nReferenceCount;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API(MonitorCondition);
public:
/** Construction.
*/
inline MonitorCondition() SAL_THROW(()) : m_nReferenceCount (0)
{
Condition::set();
}
/** Destruction.
*/
inline ~MonitorCondition() SAL_THROW(())
{
OSL_ASSERT(m_nReferenceCount == 0);
}
/** Acquire or enter the monitor.
*/
inline void acquire() SAL_THROW(())
{
if (osl_incrementInterlockedCount (&m_nReferenceCount) == 1)
{
Condition::reset();
}
}
/** Release or leave the monitor.
*/
inline void release() SAL_THROW(())
{
if (osl_decrementInterlockedCount (&m_nReferenceCount) == 0)
{
Condition::set();
}
}
/** Wait until all references are released.
*/
inline void wait() SAL_THROW(())
{
Condition::wait();
}
};
//----------------------------------------------------------------------------
class QueuedReaderWriterMonitor : public salhelper::ReferenceObject
{
/** Representation.
*/
typedef salhelper::Future<sal_Int32> future_type;
salhelper::FutureQueue<sal_Int32> m_aQueue;
salhelper::MonitorCondition m_aMonitor;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API(QueuedReaderWriterMonitor);
public:
/** Construction.
*/
inline QueuedReaderWriterMonitor()
{
// Insert the token.
m_aQueue.put(0);
}
/** Acquire read access.
*/
inline void acquireReader()
{
// Obtain the token.
rtl::Reference<future_type> xFuture (m_aQueue.get());
xFuture->get();
// Enter the monitor.
m_aMonitor.acquire();
// Push back the token.
m_aQueue.put(0);
}
/** Release read access.
*/
inline void releaseReader()
{
// Leave the monitor.
m_aMonitor.release();
}
/** Acquire write access.
*/
inline void acquireWriter()
{
// Obtain the token.
rtl::Reference<future_type> xFuture (m_aQueue.get());
xFuture->get();
// Wait until all readers have left.
m_aMonitor.wait();
}
/** Release write access.
*/
inline void releaseWriter()
{
// Push back the token.
m_aQueue.put(0);
}
protected:
/** Destruction.
*/
virtual ~QueuedReaderWriterMonitor()
{}
};
//----------------------------------------------------------------------------
template<class monitor_type>
class ReaderGuard
{
/** Representation.
*/
monitor_type *m_pMonitor;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API(ReaderGuard<monitor_type>);
public:
/** Construction. Acquire monitor read access.
*/
inline ReaderGuard (monitor_type & rMonitor) : m_pMonitor (&rMonitor)
{
m_pMonitor->acquireReader();
}
/** Construction. Acquire monitor read access.
*/
inline ReaderGuard (monitor_type * pMonitor) : m_pMonitor (pMonitor)
{
OSL_PRECOND(m_pMonitor, "ReaderGuard::ReaderGuard(): No Monitor");
m_pMonitor->acquireReader();
}
/** Destruction. Release monitor read access.
*/
inline ~ReaderGuard()
{
if (m_pMonitor)
m_pMonitor->releaseReader();
}
/** Release monitor read access.
*/
inline void clear()
{
if (m_pMonitor)
{
m_pMonitor->releaseReader();
m_pMonitor = 0;
}
}
};
//----------------------------------------------------------------------------
typedef ReaderGuard<QueuedReaderWriterMonitor> QueuedReaderGuard;
//----------------------------------------------------------------------------
template<class monitor_type>
class WriterGuard
{
/** Representation.
*/
monitor_type *m_pMonitor;
/** Not implemented.
*/
SALHELPER_COPYCTOR_API(WriterGuard<monitor_type>);
public:
/** Construction. Acquire monitor write access.
*/
inline WriterGuard (monitor_type & rMonitor) : m_pMonitor (&rMonitor)
{
m_pMonitor->acquireWriter();
}
/** Construction. Acquire monitor write access.
*/
inline WriterGuard (monitor_type * pMonitor) : m_pMonitor (pMonitor)
{
OSL_PRECOND(m_pMonitor, "WriterGuard::WriterGuard(): No Monitor");
m_pMonitor->acquireWriter();
}
/** Destruction. Release monitor write access.
*/
inline ~WriterGuard()
{
if (m_pMonitor)
m_pMonitor->releaseWriter();
}
/** Release monitor write access.
*/
inline void clear()
{
if (m_pMonitor)
{
m_pMonitor->releaseWriter();
m_pMonitor = 0;
}
}
};
//----------------------------------------------------------------------------
typedef WriterGuard<QueuedReaderWriterMonitor> QueuedWriterGuard;
//----------------------------------------------------------------------------
} // namespace salhelper
#endif /* !_SALHELPER_MONITOR_HXX_ */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 SD_OPTDLG_HXX
#define SD_OPTDLG_HXX
#include <sfx2/tabdlg.hxx>
#include "pres.hxx"
class SfxItemSet;
class SdOptionsDlg : public SfxTabDialog
{
private:
DocumentType meDocType;
public:
SdOptionsDlg( Window* pParent, const SfxItemSet& rInAttrs,
DocumentType eDocType );
~SdOptionsDlg();
protected:
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
};
#endif // SD_OPTDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
// This is a definition file of a template class. It is therefore
// included by other files and thus has to be guarded against multiple
// inclusion.
#ifndef SD_TOOLPANEL_CONSTRAINED_ITERATOR_CXX
#define SD_TOOLPANEL_CONSTRAINED_ITERATOR_CXX
namespace sd { namespace toolpanel {
template <class Container>
ConstrainedIterator<Container>::value_type&
ConstrainedIterator<Container>::operator* (void)
{
return *maIterator;
}
template <class Container>
const ConstrainedIterator<Container>::value_type&
ConstrainedIterator<Container>::operator* (void)
const
{
return *maIterator;
}
template <class Container>
ConstrainedIterator<Container>::value_type&
ConstrainedIterator<Container>::operator-> (void)
{
return *maIterator;
}
template <class Container>
const ConstrainedIterator<Container>::value_type&
ConstrainedIterator<Container>::operator-> (void)
const
{
return *maIterator;
}
template <class Container>
ConstrainedIterator<Container>
::ConstrainedIterator (void)
: mpContainer (NULL)
{
}
template <class Container>
ConstrainedIterator<Container>::ConstrainedIterator (
const Container& rContainer,
const Container::iterator& rIterator)
: mpContainer(&rContainer),
maIterator (rIterator),
mpConstraint (NULL)
{
AdvanceToNextValidElement();
}
template <class Container>
ConstrainedIterator<Container>::ConstrainedIterator (
const Container& rContainer,
const Container::iterator& rIterator,
const Constraint<Container>& rConstraint)
: mpContainer(&rContainer),
maIterator (rIterator),
mpConstraint (&rConstraint)
{
AdvanceToNextValidElement();
}
template <class Container>
ConstrainedIterator<Container>::ConstrainedIterator (
const ConstrainedIterator& rIterator)
: mpContainer (rIterator.mpContainer),
maIterator (rIterator.maIterator),
mpConstraint (rIterator.mpConstraint)
{
// Everything has been done in the initializer
}
template <class Container>
ConstrainedIterator<Container>&
ConstrainedIterator<Container>
::operator= (const ConstrainedIterator& rIterator)
{
mpContainer = rIterator.mpContainer;
maIterator = rIterator.maIterator;
mpConstraint = rIterator.mpConstraint;
AdvanceToNextValidElement();
return *this;
}
template <class Container>
bool ConstrainedIterator<Container>::operator== (
const ConstrainedIterator& aIterator) const
{
return ! operator!=(aIterator);
}
template <class Container>
bool ConstrainedIterator<Container>::operator!= (
const ConstrainedIterator& aIterator) const
{
return maIterator != aIterator.maIterator;
}
template <class Container>
ConstrainedIterator<Container>&
ConstrainedIterator<Container>::operator++ (void)
{
maIterator++;
AdvanceToNextValidElement();
return *this;
}
template <class Container>
ConstrainedIterator<Container>
ConstrainedIterator<Container>::operator++ (int)
{
ConstrainedIterator aIterator (*this);
++(*this);
return aIterator;
}
template <class Container>
ConstrainedIterator<Container>&
ConstrainedIterator<Container>::operator-- (void)
{
maIterator--;
AdvanceToPreviousValidElement();
return *this;
}
template <class Container>
ConstrainedIterator<Container>
ConstrainedIterator<Container>::operator-- (int)
{
ConstrainedIterator aIterator (*this);
--(*this);
return aIterator;
}
template <class Container>
ConstrainedIterator<Container>
ConstrainedIterator<Container>::operator+ (int nValue) const
{
return ConstrainedIterator (*mpContainer, maIterator+nValue);
}
template <class Container>
ConstrainedIterator<Container>
ConstrainedIterator<Container>::operator- (int nValue) const
{
return ConstrainedIterator (*mpContainer, maIterator-nValue);
}
template <class Container>
void ConstrainedIterator<Container>::AdvanceToNextValidElement (void)
{
if (mpContainer!=NULL && mpConstraint!=NULL)
{
while (maIterator != mpContainer->end()
&& ! mpConstraint->operator()(*mpContainer, maIterator))
++maIterator;
}
}
template <class Container>
void ConstrainedIterator<Container>::AdvanceToPreviousValidElement (void)
{
if (mpContainer!=NULL && mpConstraint!=NULL)
{
while (maIterator != mpContainer->begin()
&& ! mpConstraint->operator()(*mpContainer, maIterator))
--maIterator;
}
}
} } // end of namespace ::sd::toolpanel
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 SD_TOOLPANEL_CONSTRAINED_ITERATOR_HXX
#define SD_TOOLPANEL_CONSTRAINED_ITERATOR_HXX
#include <iterator>
namespace sd { namespace toolpanel {
template <class Container>
class Constraint
{
public:
virtual bool operator() (
const Container& rContainer,
const Container::iterator& rIterator) const = 0;
};
/** This iterator is a bidirectional iterator with something of random
access thrown in. It uses a constraint object to jump over
elements in the underlying container that do not meet the
constraint.
*/
template <class Container>
class ConstrainedIterator
: public ::std::bidirectional_iterator_tag
{
public:
typedef Container::value_type value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
ConstrainedIterator (void);
ConstrainedIterator (
const Container& rContainer,
const Container::iterator& rIterator);
ConstrainedIterator (
const Container& rContainer,
const Container::iterator& rIterator,
const Constraint<Container>& pConstraint);
ConstrainedIterator (
const ConstrainedIterator& rIterator);
ConstrainedIterator& operator= (
const ConstrainedIterator& aIterator);
reference operator* (void);
const_reference operator* (void) const;
reference operator-> (void);
const_reference operator-> (void) const;
bool operator== (const ConstrainedIterator& aIterator) const;
bool operator!= (const ConstrainedIterator& aIterator) const;
ConstrainedIterator& operator++ (void);
ConstrainedIterator operator++ (int);
ConstrainedIterator& operator-- (void);
ConstrainedIterator operator-- (int);
ConstrainedIterator operator+ (int nValue) const;
ConstrainedIterator operator- (int nValue) const;
private:
const Container* mpContainer;
Container::iterator maIterator;
const Constraint<Container>* mpConstraint;
void AdvanceToNextValidElement (void);
void AdvanceToPreviousValidElement (void);
};
} } // end of namespace ::sd::toolpanel
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
/* HACK: include certain standard header to enable build on glibc-2.2 systems
* and compile vs. glibc-2.1 header
*
* please add more if necessary
*/
#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include <features.h>
#include <assert.h>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -60,7 +60,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editsyntaxhighlighter.
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ehdl.hxx,svtools/ehdl.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedhlp.hxx,svtools/embedhlp.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedtransfer.hxx,svtools/embedtransfer.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/expander.hxx,svtools/expander.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extcolorcfg.hxx,svtools/extcolorcfg.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extensionlistbox.hxx,svtools/extensionlistbox.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filectrl.hxx,svtools/filectrl.hxx))
......
/* -*- 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 _SV_EXPANDER_HXX
#define _SV_EXPANDER_HXX
#include <vcl/ctrl.hxx>
#include <vcl/image.hxx>
enum SvExpanderStateType
{
EST_MIN=1,
EST_PLUS=2,
EST_MIN_DOWN=3,
EST_PLUS_DOWN=4,
EST_NONE=5,
EST_MIN_DIS=6,
EST_PLUS_DIS=7,
EST_MIN_DOWN_DIS=8,
EST_PLUS_DOWN_DIS=9
};
class SvExpander: public Control
{
private:
Point aImagePos;
Point aTextPos;
Image aActiveImage;
Rectangle maFocusRect;
ImageList maExpanderImages;
sal_Bool mbIsExpanded;
sal_Bool mbHasFocusRect;
sal_Bool mbIsInMouseDown;
Link maToggleHdl;
SvExpanderStateType eType;
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonUp( const MouseEvent& rMEvt );
virtual void Paint( const Rectangle& rRect );
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void KeyUp( const KeyEvent& rKEvt );
virtual void Click();
virtual void Resize();
public:
SvExpander( Window* pParent, WinBits nStyle = 0 );
SvExpander( Window* pParent, const ResId& rResId );
sal_Bool IsExpanded() {return mbIsExpanded;}
void SetToExpanded(sal_Bool bFlag=sal_True);
void SetExpanderImage( SvExpanderStateType eType);
Image GetExpanderImage(SvExpanderStateType eType);
Size GetMinSize() const;
void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
const Link& GetToggleHdl() const { return maToggleHdl; }
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// Special class for IO. Used for system-independent representation
// (change of byte-order, conversion of characters)
// Writes in binary format for efficiency.
#ifndef _IO_HXX
#define _IO_HXX
#ifdef UNX
#include <unistd.h>
#else
#include <io.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <vcl/keycod.hxx>
#include <tools/stream.hxx>
class SwIOin {
private:
SvFileStream aStr; //$ ifstream
public:
// Stream is created in respective mode.
SwIOin(const String &rFilename, StreamMode nMode =
STREAM_READ | STREAM_NOCREATE );
SwIOin& operator>>(char& val);
SwIOin& operator>>(unsigned char& val);
SwIOin& operator>>(char* val);
SwIOin& operator>>(unsigned char* val);
SwIOin& operator>>(short& val);
SwIOin& operator>>(unsigned short& val);
SwIOin& operator>>(long& val);
SwIOin& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOin& Read(char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
};
class SwIOout {
private:
void _write(const char *buf, unsigned size);
SvFileStream aStr; //$ ofstream
public:
// Stream is created in respective mode.
SwIOout( const String &rFilename, StreamMode nMode =
STREAM_WRITE | STREAM_NOCREATE );
SwIOout& operator<<(char val);
SwIOout& operator<<(unsigned char val);
SwIOout& operator<<(char* val);
SwIOout& operator<<(unsigned char* val);
SwIOout& operator<<(short val);
SwIOout& operator<<(unsigned short val);
SwIOout& operator<<(long val);
SwIOout& operator<<(unsigned long val);
SwIOout& operator<<(const String &);
SwIOout& operator<<(const KeyCode &);
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
};
class SwIOinout {
private:
SvFileStream aStr; //$ fstream
public:
// Stream is created in respective mode.
SwIOinout(const String &rFilename, StreamMode nMode =
STREAM_READWRITE | STREAM_NOCREATE );
SwIOinout& operator>>(char& val);
SwIOinout& operator>>(unsigned char& val);
SwIOinout& operator>>(char* val);
SwIOinout& operator>>(unsigned char* val);
SwIOinout& operator>>(short& val);
SwIOinout& operator>>(unsigned short& val);
SwIOinout& operator>>(long& val);
SwIOinout& operator>>(unsigned long& val);
String ReadString();
KeyCode ReadKeyCode();
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOinout& Read(char *buf, unsigned nLen);
SwIOinout& Read(unsigned short *buf, unsigned nLen );
SwIOinout& operator<<(char val);
SwIOinout& operator<<(unsigned char val);
SwIOinout& operator<<(char* val);
SwIOinout& operator<<(unsigned char* val);
SwIOinout& operator<<(short val);
SwIOinout& operator<<(unsigned short val);
SwIOinout& operator<<(long val);
SwIOinout& operator<<(unsigned long val);
SwIOinout& operator<<(const String &);
SwIOinout& operator<<(const KeyCode &);
// Can be extended for more arrays of base types.
// nLen is count of elements.
SwIOinout& Write(const char *buf, unsigned nLen);
int operator!() { return aStr.GetError() != SVSTREAM_OK; }
SvFileStream &operator()() {
return aStr;
}
sal_Bool Ok();
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _XMLOFF_FUNCTIONAL_HXX
#define _XMLOFF_FUNCTIONAL_HXX
#include <rtl/ustring.hxx>
/* THIS HEADER IS DEPRECATED. USE comphelper/stl_types.hxx INSTEAD!!! */
/** @#file
*
* re-implement STL functors as needed
*
* The standard comparison operators from the STL cause warnings with
* several compilers about our sal_Bool (=unsigned char) being
* converted to bool (C++ bool). We wish to avoid that.
*/
struct less_functor
{
bool operator()(const ::rtl::OUString& x,
const ::rtl::OUString& y) const
{
return 0 != (x<y);
}
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment