actualizacion automatica 2024-12-09
Some checks failed
Repo Lockdown / point-to-upstream (pull_request_target) Has been cancelled

This commit is contained in:
Israel Paredes 2024-12-09 19:35:01 -06:00
commit 9a3962aab0
474 changed files with 11960 additions and 14882 deletions

View file

@ -61,15 +61,6 @@ properties:
Uri: https://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
ChecksumType: SHA256
Checksum: 36a747ca1e0b86f6ea88055b8723bb87030d627766da6288bf077afdeeb0f75a
- resource: xPSDesiredStateConfiguration/xRemoteFile
id: ucrt
directives:
description: download ucrts
settings:
DestinationPath: C:/Users/Public/Downloads
Uri: https://download.microsoft.com/download/C/5/D/C5D68AA1-F62E-422A-9084-4AD85CEB8D4D/WindowsUCRT.zip
ChecksumType: SHA256
Checksum: 3c9fff1e102adbab55e588ce58b4291db885a530b2ae3bcca851c2721c8be3e1
- resource: xPSDesiredStateConfiguration/xMsiPackage
id: JDK_x64
directives:

View file

@ -18,7 +18,6 @@ properties:
# the empty string element is so that each file can be specified with trailing comma
TestScript: |
$files = @(
"WindowsUCRT.zip",
"apache-ant-1.10.15-bin.zip",
"clang-format-5.0.0-win.exe",
"jom_1_1_4.zip",
@ -93,16 +92,6 @@ properties:
TestScript: Test-Path -Path "$env:USERPROFILE/lo/apache-ant-1.10.15/bin/ant"
GetScript: Test-Path -Path "$env:USERPROFILE/lo/apache-ant-1.10.15/bin/ant"
SetScript: Expand-Archive -LiteralPath "$env:PUBLIC/Downloads/apache-ant-1.10.15-bin.zip" -Destination "$env:USERPROFILE/lo/"
- resource: xPSDesiredStateConfiguration/xScript
id: ucrt-extract
dependsOn:
- lodir
directives:
description: extract ucrts to the ~/lo directory
settings:
TestScript: Test-Path -Path "$env:USERPROFILE/lo/ucrt/Windows8.1-KB2999226-x64.msu"
GetScript: Test-Path -Path "$env:USERPROFILE/lo/ucrt/Windows8.1-KB2999226-x64.msu"
SetScript: Expand-Archive -LiteralPath "$env:PUBLIC/Downloads/WindowsUCRT.zip" -Destination "$env:USERPROFILE/lo/ucrt"
- resource: xPSDesiredStateConfiguration/xScript
id: spp-extract
dependsOn:
@ -172,7 +161,6 @@ properties:
--with-ant-home=$env:USERPROFILE\lo\apache-ant-1.10.15
--with-junit=$env:USERPROFILE\lo\junit-4.10.jar
--with-doxygen=$env:USERPROFILE\lo\spp\c\bin\doxygen.exe
--with-ucrt-dir=$env:USERPROFILE\lo\ucrt
#--enable-odk
#--disable-dependency-tracking
#--enable-dbgutil

View file

@ -35,7 +35,7 @@ These are the current minimal operating system and compiler versions to
run and compile LibreOffice, also used by the TDF builds:
* Windows:
* Runtime: Windows 7
* Runtime: Windows 10
* Build: Cygwin + Visual Studio 2019 version 16.10
* macOS:
* Runtime: 10.15

View file

@ -745,7 +745,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,spsuppfiles
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooobinarytable, \
$(if $(WINDOWS_SDK_HOME),\
instooofiltmsi \
inst_msu_msi \
qslnkmsi \
reg_dlls \
reg4allmsdoc \

View file

@ -4310,10 +4310,6 @@ $(call gb_ExternalProject_use_static_libraries,$(1),dtoa)
endef
$(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
$(if $(UCRT_REDISTDIR),ucrt) \
))
ifneq ($(SYSTEM_BOX2D),)
define gb_LinkTarget__use_box2d

View file

@ -33,9 +33,11 @@ struct IMPL_ControlInfo
OUString sName;
};
class BaseContainerControl : public css::awt::XControlModel
, public css::awt::XControlContainer
, public BaseControl
using BaseContainerControl_BASE = cppu::ImplInheritanceHelper<BaseControl,
css::awt::XControlModel,
css::awt::XControlContainer>;
class BaseContainerControl : public BaseContainerControl_BASE
{
public:
@ -43,37 +45,6 @@ public:
virtual ~BaseContainerControl() override;
// XInterface
/**
@short give answer, if interface is supported
@descr The interfaces are searched by type.
@seealso XInterface
@param "rType" is the type of searched interface.
@return Any information about found interface
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type& aType
) override;
// XTypeProvider
/**
@short get information about supported interfaces
@seealso XTypeProvider
@return Sequence of types of all supported interfaces
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
// XControl
virtual void SAL_CALL createPeer(
@ -121,7 +92,7 @@ public:
virtual void SAL_CALL setVisible( sal_Bool bVisible ) override;
protected:
using WeakComponentImplHelper::disposing;
using WeakComponentImplHelperBase::disposing;
virtual css::awt::WindowDescriptor impl_getWindowDescriptor(
const css::uno::Reference< css::awt::XWindowPeer >& xParentPeer

View file

@ -39,82 +39,19 @@ namespace unocontrols { class OMRCListenerMultiplexerHelper; }
namespace unocontrols {
class BaseControl : public css::lang::XServiceInfo
, public css::awt::XPaintListener
, public css::awt::XWindowListener
, public css::awt::XView
, public css::awt::XWindow
, public css::awt::XControl
, public cppu::BaseMutex
, public ::cppu::WeakComponentImplHelper<>
class BaseControl : public cppu::BaseMutex,
public cppu::WeakComponentImplHelper<css::lang::XServiceInfo,
css::awt::XPaintListener,
css::awt::XWindowListener,
css::awt::XView,
css::awt::XWindow,
css::awt::XControl>
{
public:
BaseControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~BaseControl() override;
// XInterface
/**
@short give answer, if interface is supported
@descr The interfaces are searched by type.
@seealso XInterface
@param "rType" is the type of searched interface.
@return Any information about found interface
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type& aType
) override;
/**
@short increment refcount
@seealso XInterface
@seealso release()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL acquire() noexcept override;
/**
@short decrement refcount
@seealso XInterface
@seealso acquire()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
/**
@short get information about supported interfaces
@seealso XTypeProvider
@return Sequence of types of all supported interfaces
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
/**
@short get implementation id
@descr This ID is necessary for UNO-caching. If there no ID, cache is disabled.
Another way, cache is enabled.
@seealso XTypeProvider
@return ID as Sequence of byte
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
// XServiceInfo
virtual sal_Bool SAL_CALL supportsService(
@ -265,7 +202,7 @@ public:
virtual void SAL_CALL windowHidden( const css::lang::EventObject& aEvent ) override;
protected:
using WeakComponentImplHelper::disposing;
using WeakComponentImplHelperBase::disposing;
const css::uno::Reference< css::uno::XComponentContext >& impl_getComponentContext() const { return m_xComponentContext;}

View file

@ -40,7 +40,7 @@ namespace unocontrols {
// construct/destruct
BaseContainerControl::BaseContainerControl( const Reference< XComponentContext >& rxContext )
: BaseControl ( rxContext )
: BaseContainerControl_BASE(rxContext)
, m_aListeners ( m_aMutex )
{
}
@ -49,43 +49,6 @@ BaseContainerControl::~BaseContainerControl()
{
}
// XInterface
Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XControlModel* > ( this ) ,
static_cast< XControlContainer* > ( this )
)
);
// If searched interface supported by this class ...
if ( aReturn.hasValue() )
{
// ... return this information.
return aReturn;
}
else
{
// Else; ... ask baseclass for interfaces!
return BaseControl::queryInterface( rType );
}
}
// XTypeProvider
Sequence< Type > SAL_CALL BaseContainerControl::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XControlModel>::get(),
cppu::UnoType<XControlContainer>::get(),
BaseControl::getTypes() );
return ourTypeCollection.getTypes();
}
// XControl
void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& xToolkit ,

View file

@ -65,80 +65,6 @@ BaseControl::~BaseControl()
{
}
// XInterface
Any SAL_CALL BaseControl::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XPaintListener*> ( this ) ,
static_cast< XWindowListener*> ( this ) ,
static_cast< XView* > ( this ) ,
static_cast< XWindow* > ( this ) ,
static_cast< XServiceInfo* > ( this ) ,
static_cast< XControl* > ( this )
)
);
// If searched interface supported by this class ...
if ( aReturn.hasValue() )
{
// ... return this information.
return aReturn;
}
else
{
// Else; ... ask baseclass for interfaces!
return WeakComponentImplHelper::queryInterface( rType );
}
}
// XInterface
void SAL_CALL BaseControl::acquire() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
WeakComponentImplHelper::acquire();
}
// XInterface
void SAL_CALL BaseControl::release() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
WeakComponentImplHelper::release();
}
// XTypeProvider
Sequence< Type > SAL_CALL BaseControl::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XPaintListener>::get(),
cppu::UnoType<XWindowListener>::get(),
cppu::UnoType<XView>::get(),
cppu::UnoType<XWindow>::get(),
cppu::UnoType<XServiceInfo>::get(),
cppu::UnoType<XControl>::get(),
WeakComponentImplHelper::getTypes() );
return ourTypeCollection.getTypes();
}
// XTypeProvider
Sequence< sal_Int8 > SAL_CALL BaseControl::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// XServiceInfo
OUString SAL_CALL BaseControl::getImplementationName()

View file

@ -27,6 +27,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <osl/diagnose.h>
@ -58,7 +59,7 @@ enum PropertyHandle // values represent index in PropertyArray
// construct/destruct
FrameControl::FrameControl( const Reference< XComponentContext >& rxContext)
: BaseControl ( rxContext )
: FrameControl_BASE ( rxContext )
, OBroadcastHelper ( m_aMutex )
, OPropertySetHelper ( *static_cast< OBroadcastHelper * >(this) )
, m_aConnectionPointContainer ( new OConnectionPointContainerHelper(m_aMutex) )
@ -72,23 +73,10 @@ FrameControl::~FrameControl()
// XInterface
Any SAL_CALL FrameControl::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XControlModel* > ( this ) ,
static_cast< XConnectionPointContainer* > ( this )
)
);
Any aReturn = OPropertySetHelper::queryInterface(rType);
if (aReturn.hasValue())
return aReturn;
// If searched interface not supported by this class ...
// ... ask baseclasses.
aReturn = OPropertySetHelper::queryInterface(rType);
if (aReturn.hasValue())
return aReturn;
return BaseControl::queryInterface(rType);
return FrameControl_BASE::queryInterface(rType);
}
// XInterface
@ -98,7 +86,7 @@ void SAL_CALL FrameControl::acquire() noexcept
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::acquire();
FrameControl_BASE::acquire();
}
// XInterface
@ -108,20 +96,16 @@ void SAL_CALL FrameControl::release() noexcept
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::release();
FrameControl_BASE::release();
}
// XTypeProvider
Sequence< Type > SAL_CALL FrameControl::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XControlModel>::get(),
cppu::UnoType<XControlContainer>::get(),
cppu::UnoType<XConnectionPointContainer>::get(),
BaseControl::getTypes() );
return ourTypeCollection.getTypes();
static Sequence myTypes = comphelper::concatSequences(FrameControl_BASE::getTypes(),
OPropertySetHelper::getTypes());
return myTypes;
}
OUString FrameControl::getImplementationName()

View file

@ -34,7 +34,7 @@ namespace unocontrols {
// construct/destruct
ProgressBar::ProgressBar( const Reference< XComponentContext >& rxContext )
: BaseControl ( rxContext )
: ProgressBar_BASE ( rxContext )
, m_bHorizontal ( PROGRESSBAR_DEFAULT_HORIZONTAL )
, m_aBlockSize ( PROGRESSBAR_DEFAULT_BLOCKDIMENSION )
, m_nForegroundColor ( PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR )
@ -50,57 +50,6 @@ ProgressBar::~ProgressBar()
{
}
// XInterface
Any SAL_CALL ProgressBar::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XControlModel* > ( this ) ,
static_cast< XProgressBar* > ( this )
)
);
if (aReturn.hasValue())
return aReturn;
// If searched interface not supported by this class ...
// ... ask baseclasses.
return BaseControl::queryInterface(rType);
}
// XInterface
void SAL_CALL ProgressBar::acquire() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::acquire();
}
// XInterface
void SAL_CALL ProgressBar::release() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::release();
}
// XTypeProvider
Sequence< Type > SAL_CALL ProgressBar::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XControlModel>::get(),
cppu::UnoType<XProgressBar>::get(),
BaseControl::getTypes() );
return ourTypeCollection.getTypes();
}
// XProgressBar
void SAL_CALL ProgressBar::setForegroundColor( sal_Int32 nColor )

View file

@ -51,7 +51,7 @@ constexpr OUStringLiteral DEFAULT_BUTTONLABEL = u"Abbrechen";
namespace unocontrols {
ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext >& rxContext )
: BaseContainerControl ( rxContext )
: ProgressMonitor_BASE(rxContext)
{
// It's not allowed to work with member in this method (refcounter !!!)
// But with a HACK (++refcount) its "OK" :-(
@ -109,58 +109,6 @@ ProgressMonitor::~ProgressMonitor()
impl_cleanMemory ();
}
// XInterface
Any SAL_CALL ProgressMonitor::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XLayoutConstrains* > ( this ) ,
static_cast< XButton* > ( this ) ,
static_cast< XProgressMonitor* > ( this )
)
);
if (aReturn.hasValue())
return aReturn;
// If searched interface not supported by this class ...
// ... ask baseclasses.
return BaseControl::queryInterface(rType);
}
// XInterface
void SAL_CALL ProgressMonitor::acquire() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::acquire();
}
// XInterface
void SAL_CALL ProgressMonitor::release() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::release();
}
// XTypeProvider
Sequence< Type > SAL_CALL ProgressMonitor::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XLayoutConstrains>::get(),
cppu::UnoType<XButton>::get(),
cppu::UnoType<XProgressMonitor>::get(),
BaseContainerControl::getTypes() );
return ourTypeCollection.getTypes();
}
// XProgressMonitor
void SAL_CALL ProgressMonitor::addText(
const OUString& rTopic,

View file

@ -44,7 +44,7 @@ namespace unocontrols {
// construct/destruct
StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext >& rxContext )
: BaseContainerControl ( rxContext )
: StatusIndicator_BASE(rxContext)
{
// It's not allowed to work with member in this method (refcounter !!!)
// But with a HACK (++refcount) its "OK" :-(
@ -72,62 +72,6 @@ StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext >
StatusIndicator::~StatusIndicator() {}
// XInterface
Any SAL_CALL StatusIndicator::queryInterface( const Type& rType )
{
// Ask for my own supported interfaces ...
// Attention: XTypeProvider and XInterface are supported by WeakComponentImplHelper!
Any aReturn ( ::cppu::queryInterface( rType ,
static_cast< XLayoutConstrains* > ( this ) ,
static_cast< XStatusIndicator* > ( this )
)
);
// If searched interface not supported by this class ...
if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = BaseControl::queryInterface( rType );
}
return aReturn;
}
// XInterface
void SAL_CALL StatusIndicator::acquire() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::acquire();
}
// XInterface
void SAL_CALL StatusIndicator::release() noexcept
{
// Attention:
// Don't use mutex or guard in this method!!! Is a method of XInterface.
// Forward to baseclass
BaseControl::release();
}
// XTypeProvider
Sequence< Type > SAL_CALL StatusIndicator::getTypes()
{
static OTypeCollection ourTypeCollection(
cppu::UnoType<XLayoutConstrains>::get(),
cppu::UnoType<XStatusIndicator>::get(),
BaseContainerControl::getTypes() );
return ourTypeCollection.getTypes();
}
// XStatusIndicator
void SAL_CALL StatusIndicator::start( const OUString& sText, sal_Int32 nRange )

View file

@ -31,9 +31,10 @@ namespace unocontrols { class OConnectionPointContainerHelper; }
namespace unocontrols {
class FrameControl final : public css::awt::XControlModel
, public css::lang::XConnectionPointContainer
, public BaseControl // This order is necessary for right initialization of m_aMutex!
using FrameControl_BASE = cppu::ImplInheritanceHelper<BaseControl, css::awt::XControlModel,
css::lang::XConnectionPointContainer>;
class FrameControl final : public FrameControl_BASE // This order is necessary for right initialization of m_aMutex!
, public ::cppu::OBroadcastHelper
, public ::cppu::OPropertySetHelper
{

View file

@ -41,9 +41,11 @@ constexpr auto PROGRESSBAR_DEFAULT_BLOCKVALUE = 1;
constexpr sal_Int32 PROGRESSBAR_LINECOLOR_BRIGHT = sal_Int32(COL_WHITE);
constexpr sal_Int32 PROGRESSBAR_LINECOLOR_SHADOW = sal_Int32(COL_BLACK);
class ProgressBar final : public css::awt::XControlModel
, public css::awt::XProgressBar
, public BaseControl
using ProgressBar_BASE = cppu::ImplInheritanceHelper<BaseControl,
css::awt::XControlModel,
css::awt::XProgressBar>;
class ProgressBar final : public ProgressBar_BASE
{
public:
@ -51,32 +53,6 @@ public:
virtual ~ProgressBar() override;
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
/**
@short increment refcount
@seealso XInterface
@seealso release()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL acquire() noexcept override;
/**
@short decrement refcount
@seealso XInterface
@seealso acquire()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
// XProgressBar
virtual void SAL_CALL setForegroundColor( sal_Int32 nColor ) override;

View file

@ -50,63 +50,17 @@ struct IMPL_TextlistItem
OUString sText; /// Right site of textline in dialog
};
class ProgressMonitor final : public css::awt::XLayoutConstrains
, public css::awt::XButton
, public css::awt::XProgressMonitor
, public BaseContainerControl
using ProgressMonitor_BASE = cppu::ImplInheritanceHelper<BaseContainerControl,
css::awt::XLayoutConstrains,
css::awt::XButton,
css::awt::XProgressMonitor>;
class ProgressMonitor final : public ProgressMonitor_BASE
{
public:
ProgressMonitor( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~ProgressMonitor() override;
// XInterface
/**
@short give answer, if interface is supported
@descr The interfaces are searched by type.
@seealso XInterface
@param "rType" is the type of searched interface.
@return Any information about found interface
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
/**
@short increment refcount
@seealso XInterface
@seealso release()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL acquire() noexcept override;
/**
@short decrement refcount
@seealso XInterface
@seealso acquire()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
/**
@short get information about supported interfaces
@seealso XTypeProvider
@return Sequence of types of all supported interfaces
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
// XProgressMonitor
/**

View file

@ -42,62 +42,16 @@ constexpr sal_Int32 STATUSINDICATOR_BACKGROUNDCOLOR = sal_Int32(COL_LIGHTGRAY);
constexpr sal_Int32 STATUSINDICATOR_LINECOLOR_BRIGHT = sal_Int32(COL_WHITE);
constexpr sal_Int32 STATUSINDICATOR_LINECOLOR_SHADOW = sal_Int32(COL_BLACK);
class StatusIndicator final : public css::awt::XLayoutConstrains
, public css::task::XStatusIndicator
, public BaseContainerControl
using StatusIndicator_BASE = cppu::ImplInheritanceHelper<BaseContainerControl,
css::awt::XLayoutConstrains,
css::task::XStatusIndicator>;
class StatusIndicator final : public StatusIndicator_BASE
{
public:
StatusIndicator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~StatusIndicator() override;
// XInterface
/**
@short give answer, if interface is supported
@descr The interfaces are searched by type.
@seealso XInterface
@param "rType" is the type of searched interface.
@return Any information about found interface
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
/**
@short increment refcount
@seealso XInterface
@seealso release()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL acquire() noexcept override;
/**
@short decrement refcount
@seealso XInterface
@seealso acquire()
@onerror A RuntimeException is thrown.
*/
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
/**
@short get information about supported interfaces
@seealso XTypeProvider
@return Sequence of types of all supported interfaces
@onerror A RuntimeException is thrown.
*/
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
// XStatusIndicator
virtual void SAL_CALL start(

View file

@ -309,12 +309,10 @@ private:
// a version of AccessibleBrowseBoxBase which implements not only the XAccessibleContext,
// but also the XAccessible
typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible
> BrowseBoxAccessibleElement_Base;
typedef cppu::ImplInheritanceHelper<AccessibleBrowseBoxBase, css::accessibility::XAccessible>
BrowseBoxAccessibleElement_Base;
class BrowseBoxAccessibleElement
:public AccessibleBrowseBoxBase
,public BrowseBoxAccessibleElement_Base
class BrowseBoxAccessibleElement : public BrowseBoxAccessibleElement_Base
{
protected:
/** Constructor sets specified name and description. If the constant of a
@ -355,10 +353,6 @@ public:
// noncopyable
BrowseBoxAccessibleElement(const BrowseBoxAccessibleElement&) = delete;
const BrowseBoxAccessibleElement& operator=(const BrowseBoxAccessibleElement&) = delete;
// XInterface
DECLARE_XINTERFACE( )
// XTypeProvider
DECLARE_XTYPEPROVIDER( )
protected:
virtual ~BrowseBoxAccessibleElement() override;

View file

@ -27,16 +27,14 @@
namespace accessibility {
typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleTable >
typedef cppu::ImplInheritanceHelper<BrowseBoxAccessibleElement, css::accessibility::XAccessibleTable>
AccessibleBrowseBoxTableImplHelper;
/** The BrowseBox accessible table objects inherit from this base class. It
implements basic functionality for the XAccessibleTable interface.
BrowseBox table objects are: the data table, the column header bar and the
row header bar. */
class AccessibleBrowseBoxTableBase :
public BrowseBoxAccessibleElement,
public AccessibleBrowseBoxTableImplHelper
class AccessibleBrowseBoxTableBase : public AccessibleBrowseBoxTableImplHelper
{
public:
/** Constructor sets specified name and description. If the constant of a
@ -121,25 +119,6 @@ public:
- getAccessibleCellAt,
- isAccessibleSelected. */
// XInterface
/** Queries for a new interface. */
css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
/** Acquires the object (calls acquire() on base class). */
virtual void SAL_CALL acquire() noexcept override;
/** Releases the object (calls release() on base class). */
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
/** @return a sequence of possible types (received from base classes). */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
/** @return a unique implementation ID. */
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
// XServiceInfo
/* Derived classes have to implement:

View file

@ -252,12 +252,10 @@ private:
// a version of AccessibleGridControlBase which implements not only the XAccessibleContext,
// but also the XAccessible
typedef ::cppu::ImplHelper1 < css::accessibility::XAccessible
> GridControlAccessibleElement_Base;
typedef cppu::ImplInheritanceHelper <AccessibleGridControlBase, css::accessibility::XAccessible>
GridControlAccessibleElement_Base;
class GridControlAccessibleElement
:public AccessibleGridControlBase
,public GridControlAccessibleElement_Base
class GridControlAccessibleElement : public GridControlAccessibleElement_Base
{
protected:
/** Constructor sets specified name and description.
@ -271,12 +269,6 @@ protected:
::vcl::table::IAccessibleTable& rTable,
::vcl::table::AccessibleTableControlObjType eObjType );
public:
// XInterface
DECLARE_XINTERFACE( )
// XTypeProvider
DECLARE_XTYPEPROVIDER( )
protected:
virtual ~GridControlAccessibleElement() override;

View file

@ -27,7 +27,7 @@
namespace accessibility {
typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleTable >
typedef cppu::ImplInheritanceHelper<GridControlAccessibleElement, css::accessibility::XAccessibleTable>
AccessibleGridControlTableImplHelper;
/** The Grid Control accessible table objects inherit from this base class. It
@ -35,7 +35,6 @@ typedef ::cppu::ImplHelper1 < css::accessibility::XAccessibleTable >
Grid COntrol table objects are: the data table, the column header bar and the
row header bar. */
class AccessibleGridControlTableBase :
public GridControlAccessibleElement,
public AccessibleGridControlTableImplHelper
{
public:
@ -115,25 +114,6 @@ public:
- getAccessibleCellAt,
- isAccessibleSelected. */
// XInterface
/** Queries for a new interface. */
css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
/** Acquires the object (calls acquire() on base class). */
virtual void SAL_CALL acquire() noexcept override;
/** Releases the object (calls release() on base class). */
virtual void SAL_CALL release() noexcept override;
// XTypeProvider
/** @return a sequence of possible types (received from base classes). */
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
/** @return a unique implementation ID. */
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
protected:
// internal helper methods

View file

@ -515,12 +515,6 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getBackground( )
}
// XInterface
IMPLEMENT_FORWARD_XINTERFACE2( BrowseBoxAccessibleElement, AccessibleBrowseBoxBase, BrowseBoxAccessibleElement_Base )
// XTypeProvider
IMPLEMENT_FORWARD_XTYPEPROVIDER2( BrowseBoxAccessibleElement, AccessibleBrowseBoxBase, BrowseBoxAccessibleElement_Base )
// css::accessibility::XAccessible
Reference< css::accessibility::XAccessibleContext > SAL_CALL BrowseBoxAccessibleElement::getAccessibleContext()
@ -533,7 +527,7 @@ Reference< css::accessibility::XAccessibleContext > SAL_CALL BrowseBoxAccessible
BrowseBoxAccessibleElement::BrowseBoxAccessibleElement( const css::uno::Reference< css::accessibility::XAccessible >& rxParent, ::vcl::IAccessibleTableProvider& rBrowseBox,
const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType eObjType )
:AccessibleBrowseBoxBase( rxParent, rBrowseBox, _xFocusWindow, eObjType )
: BrowseBoxAccessibleElement_Base(rxParent, rBrowseBox, _xFocusWindow, eObjType)
{
}
@ -541,7 +535,7 @@ BrowseBoxAccessibleElement::BrowseBoxAccessibleElement( const css::uno::Referenc
BrowseBoxAccessibleElement::BrowseBoxAccessibleElement( const css::uno::Reference< css::accessibility::XAccessible >& rxParent, ::vcl::IAccessibleTableProvider& rBrowseBox,
const css::uno::Reference< css::awt::XWindow >& _xFocusWindow, AccessibleBrowseBoxObjType eObjType,
const OUString& rName, const OUString& rDescription )
:AccessibleBrowseBoxBase( rxParent, rBrowseBox, _xFocusWindow, eObjType, rName, rDescription )
: BrowseBoxAccessibleElement_Base(rxParent, rBrowseBox, _xFocusWindow, eObjType, rName, rDescription)
{
}

View file

@ -41,7 +41,7 @@ AccessibleBrowseBoxTableBase::AccessibleBrowseBoxTableBase(
const Reference< XAccessible >& rxParent,
vcl::IAccessibleTableProvider& rBrowseBox,
AccessibleBrowseBoxObjType eObjType ) :
BrowseBoxAccessibleElement( rxParent, rBrowseBox,nullptr, eObjType )
AccessibleBrowseBoxTableImplHelper( rxParent, rBrowseBox, nullptr, eObjType )
{
}
@ -132,39 +132,6 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxTableBase::getAccessibleColumn( sal_Int64
return implGetColumn( nChildIndex );
}
// XInterface -----------------------------------------------------------------
Any SAL_CALL AccessibleBrowseBoxTableBase::queryInterface( const uno::Type& rType )
{
Any aAny( BrowseBoxAccessibleElement::queryInterface( rType ) );
return aAny.hasValue() ?
aAny : AccessibleBrowseBoxTableImplHelper::queryInterface( rType );
}
void SAL_CALL AccessibleBrowseBoxTableBase::acquire() noexcept
{
BrowseBoxAccessibleElement::acquire();
}
void SAL_CALL AccessibleBrowseBoxTableBase::release() noexcept
{
BrowseBoxAccessibleElement::release();
}
// XTypeProvider --------------------------------------------------------------
Sequence< uno::Type > SAL_CALL AccessibleBrowseBoxTableBase::getTypes()
{
return ::comphelper::concatSequences(
BrowseBoxAccessibleElement::getTypes(),
AccessibleBrowseBoxTableImplHelper::getTypes() );
}
Sequence< sal_Int8 > SAL_CALL AccessibleBrowseBoxTableBase::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// internal virtual methods ---------------------------------------------------
sal_Int32 AccessibleBrowseBoxTableBase::implGetRowCount() const

View file

@ -430,16 +430,10 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getBackground( )
GridControlAccessibleElement::GridControlAccessibleElement( const css::uno::Reference< css::accessibility::XAccessible >& rxParent,
::vcl::table::IAccessibleTable& rTable,
::vcl::table::AccessibleTableControlObjType eObjType )
:AccessibleGridControlBase( rxParent, rTable, eObjType )
: GridControlAccessibleElement_Base(rxParent, rTable, eObjType)
{
}
// XInterface
IMPLEMENT_FORWARD_XINTERFACE2( GridControlAccessibleElement, AccessibleGridControlBase, GridControlAccessibleElement_Base)
// XTypeProvider
IMPLEMENT_FORWARD_XTYPEPROVIDER2( GridControlAccessibleElement, AccessibleGridControlBase, GridControlAccessibleElement_Base )
// css::accessibility::XAccessible
css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL GridControlAccessibleElement::getAccessibleContext()

View file

@ -41,7 +41,7 @@ AccessibleGridControlTableBase::AccessibleGridControlTableBase(
const Reference< XAccessible >& rxParent,
IAccessibleTable& rTable,
AccessibleTableControlObjType eObjType ) :
GridControlAccessibleElement( rxParent, rTable, eObjType )
AccessibleGridControlTableImplHelper( rxParent, rTable, eObjType )
{
}
@ -158,39 +158,6 @@ sal_Int32 SAL_CALL AccessibleGridControlTableBase::getAccessibleColumn( sal_Int6
return implGetColumn( nChildIndex );
}
// XInterface -----------------------------------------------------------------
Any SAL_CALL AccessibleGridControlTableBase::queryInterface( const uno::Type& rType )
{
Any aAny( GridControlAccessibleElement::queryInterface( rType ) );
return aAny.hasValue() ?
aAny : AccessibleGridControlTableImplHelper::queryInterface( rType );
}
void SAL_CALL AccessibleGridControlTableBase::acquire() noexcept
{
GridControlAccessibleElement::acquire();
}
void SAL_CALL AccessibleGridControlTableBase::release() noexcept
{
GridControlAccessibleElement::release();
}
// XTypeProvider --------------------------------------------------------------
Sequence< uno::Type > SAL_CALL AccessibleGridControlTableBase::getTypes()
{
return ::comphelper::concatSequences(
GridControlAccessibleElement::getTypes(),
AccessibleGridControlTableImplHelper::getTypes() );
}
Sequence< sal_Int8 > SAL_CALL AccessibleGridControlTableBase::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
// internal helper methods ----------------------------------------------------
sal_Int32 AccessibleGridControlTableBase::implGetRow( sal_Int64 nChildIndex )

View file

@ -41,7 +41,7 @@ OUString VCLXAccessibleComboBox::getImplementationName()
Sequence< OUString > VCLXAccessibleComboBox::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleBox::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleComboBox"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleComboBox"_ustr});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -60,7 +60,7 @@ OUString VCLXAccessibleDropDownComboBox::getImplementationName()
Sequence< OUString > VCLXAccessibleDropDownComboBox::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleBox::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleDropDownComboBox"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleDropDownComboBox"_ustr});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -39,7 +39,7 @@ OUString VCLXAccessibleDropDownListBox::getImplementationName()
Sequence< OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleBox::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleDropDownListBox"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleDropDownListBox"_ustr});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -602,7 +602,7 @@ OUString VCLXAccessibleList::getImplementationName()
Sequence< OUString > VCLXAccessibleList::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleComponent::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleList"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleList"_ustr});
}
void VCLXAccessibleList::UpdateVisibleLineCount()

View file

@ -40,7 +40,7 @@ OUString VCLXAccessibleListBox::getImplementationName()
Sequence< OUString > VCLXAccessibleListBox::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleBox::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleListBox"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleListBox"_ustr});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -96,7 +96,7 @@ OUString VCLXAccessibleTextField::getImplementationName()
Sequence< OUString > VCLXAccessibleTextField::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleTextComponent::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleTextField"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleTextField"_ustr});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -589,7 +589,7 @@ OUString VCLXAccessibleToolBox::getImplementationName()
Sequence< OUString > VCLXAccessibleToolBox::getSupportedServiceNames()
{
return comphelper::concatSequences(VCLXAccessibleComponent::getSupportedServiceNames(),
Sequence<OUString>{u"com.sun.star.accessibility.AccessibleToolBox"_ustr});
std::initializer_list<OUString>{u"com.sun.star.accessibility.AccessibleToolBox"_ustr});
}
// XAccessibleContext

View file

@ -33,61 +33,7 @@
namespace avmedia{
// XInterface, XTypeProvider, XServiceInfo
void SAL_CALL SoundHandler::acquire() noexcept
{
/* Don't use mutex in methods of XInterface! */
OWeakObject::acquire();
}
void SAL_CALL SoundHandler::release() noexcept
{
/* Don't use mutex in methods of XInterface! */
OWeakObject::release();
}
css::uno::Any SAL_CALL SoundHandler::queryInterface( const css::uno::Type& aType )
{
/* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */
/* Ask for my own supported interfaces ...*/
css::uno::Any aReturn( ::cppu::queryInterface( aType,
static_cast< css::lang::XTypeProvider* >(this),
static_cast< css::lang::XServiceInfo* >(this),
static_cast< css::frame::XNotifyingDispatch* >(this),
static_cast< css::frame::XDispatch* >(this),
static_cast< css::document::XExtendedFilterDetection* >(this)));
/* If searched interface not supported by this class ... */
if ( !aReturn.hasValue() )
{
/* ... ask baseclass for interfaces! */
aReturn = OWeakObject::queryInterface( aType );
}
/* Return result of this search. */
return aReturn;
}
css::uno::Sequence< sal_Int8 > SAL_CALL SoundHandler::getImplementationId()
{
return css::uno::Sequence<sal_Int8>();
}
css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes()
{
static ::cppu::OTypeCollection aTypeCollection(
cppu::UnoType<css::lang::XTypeProvider>::get(),
cppu::UnoType<css::lang::XServiceInfo>::get(),
cppu::UnoType<css::frame::XNotifyingDispatch>::get(),
cppu::UnoType<css::frame::XDispatch>::get(),
cppu::UnoType<css::document::XExtendedFilterDetection>::get());
return aTypeCollection.getTypes();
}
/*===========================================================================================================*/
/* XServiceInfo */
/*===========================================================================================================*/
// XServiceInfo
OUString SAL_CALL SoundHandler::getImplementationName()
{
return u"com.sun.star.comp.framework.SoundHandler"_ustr;
@ -162,7 +108,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL&
const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
{
// SAFE {
const ::osl::MutexGuard aLock( m_aMutex );
const std::unique_lock aLock(m_aMutex);
utl::MediaDescriptor aDescriptor(lDescriptor);
@ -274,7 +220,7 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property
IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify, Timer *, void)
{
// SAFE {
::osl::ClearableMutexGuard aLock( m_aMutex );
std::unique_lock aLock(m_aMutex);
if (m_xPlayer.is() && m_xPlayer->isPlaying() && m_xPlayer->getMediaTime() < m_xPlayer->getDuration())
{
@ -304,7 +250,7 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify, Timer *, void)
// } SAFE
//release aLock before end of method at which point xOperationHold goes out of scope and pThis dies
aLock.clear();
aLock.unlock();
}
} // namespace framework

View file

@ -29,6 +29,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/weak.hxx>
@ -49,15 +50,9 @@ namespace avmedia{
@devstatus ready
@threadsafe yes
*//*-*************************************************************************************************************/
class SoundHandler : // interfaces
public css::lang::XTypeProvider
, public css::lang::XServiceInfo
, public css::frame::XNotifyingDispatch // => XDispatch
, public css::document::XExtendedFilterDetection
// baseclasses
// Order is necessary for right initialization!
, private cppu::BaseMutex
, public ::cppu::OWeakObject
class SoundHandler : public comphelper::WeakImplHelper<css::lang::XServiceInfo,
css::frame::XNotifyingDispatch, // => XDispatch
css::document::XExtendedFilterDetection>
{
// public methods
public:
@ -66,14 +61,7 @@ class SoundHandler : // interfaces
SoundHandler();
virtual ~SoundHandler( ) override;
// XInterface, XTypeProvider, XServiceInfo
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
/* interface XServiceInfo */
// XServiceInfo
virtual OUString SAL_CALL getImplementationName ( ) override;
virtual sal_Bool SAL_CALL supportsService ( const OUString& sServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames ( ) override;

View file

@ -58,7 +58,7 @@ void ColorSchemeDialog::Init()
m_xOk->connect_clicked(LINK(this, ColorSchemeDialog, BtnOkHdl));
m_xUseAppCollors->connect_toggled(LINK(this, ColorSchemeDialog, OptionHdl));
m_xUseScheme->connect_toggled(LINK(this, ColorSchemeDialog, OptionHdl));
m_xSchemeList->connect_changed(LINK(this, ColorSchemeDialog, SelectHdl));
m_xSchemeList->connect_selection_changed(LINK(this, ColorSchemeDialog, SelectHdl));
// Populate the list with available color schemes
for (auto const& rName : m_pColorConfig->GetColorSchemeNames())

View file

@ -1740,7 +1740,7 @@ WatchWindow::WatchWindow(Layout* pParent)
m_xTreeListBox->set_help_id(HID_BASICIDE_WATCHWINDOW_LIST);
m_xTreeListBox->connect_editing(LINK(this, WatchWindow, EditingEntryHdl),
LINK(this, WatchWindow, EditedEntryHdl));
m_xTreeListBox->connect_changed( LINK( this, WatchWindow, TreeListHdl ) );
m_xTreeListBox->connect_selection_changed(LINK(this, WatchWindow, TreeListHdl));
m_xTreeListBox->connect_expanding(LINK(this, WatchWindow, RequestingChildrenHdl));
// VarTabWidth, ValueTabWidth, TypeTabWidth
@ -2864,7 +2864,7 @@ CodeCompleteWindow::CodeCompleteWindow(EditorWindow* pPar)
, m_xListBox(m_xBuilder->weld_tree_view(u"treeview"_ustr))
{
m_xListBox->connect_row_activated(LINK(this, CodeCompleteWindow, ImplDoubleClickHdl));
m_xListBox->connect_changed(LINK(this, CodeCompleteWindow, ImplSelectHdl));
m_xListBox->connect_selection_changed(LINK(this, CodeCompleteWindow, ImplSelectHdl));
m_xListBox->connect_key_press(LINK(this, CodeCompleteWindow, KeyInputHdl));
m_xListBox->make_sorted();
m_xListBox->set_direction(false);

View file

@ -31,8 +31,7 @@ BreakPointList::BreakPointList()
BreakPointList::BreakPointList(BreakPointList const & rList)
{
for (size_t i = 0; i < rList.size(); ++i)
maBreakPoints.push_back( rList.at( i ) );
maBreakPoints.insert(maBreakPoints.end(), rList.maBreakPoints.begin(), rList.maBreakPoints.end());
}
BreakPointList::~BreakPointList()

View file

@ -100,7 +100,7 @@ MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame
m_xBasicBox->connect_changed( LINK( this, MacroChooser, BasicSelectHdl ) );
m_xMacroBox->connect_row_activated( LINK( this, MacroChooser, MacroDoubleClickHdl ) );
m_xMacroBox->connect_changed( LINK( this, MacroChooser, MacroSelectHdl ) );
m_xMacroBox->connect_selection_changed(LINK(this, MacroChooser, MacroSelectHdl));
m_xMacroBox->connect_popup_menu( LINK( this, MacroChooser, ContextMenuHdl ) );
m_xBasicBox->SetMode( BrowseMode::Modules );

View file

@ -246,7 +246,7 @@ LibPage::LibPage(weld::Container* pParent, OrganizeDialog* pDialog)
m_xExportButton->connect_clicked( LINK( this, LibPage, ButtonHdl ) );
m_xInsertLibButton->connect_clicked( LINK( this, LibPage, ButtonHdl ) );
m_xDelButton->connect_clicked( LINK( this, LibPage, ButtonHdl ) );
m_xLibBox->connect_changed( LINK( this, LibPage, TreeListHighlightHdl ) );
m_xLibBox->connect_selection_changed(LINK(this, LibPage, TreeListHighlightHdl));
m_xBasicsBox->connect_changed( LINK( this, LibPage, BasicSelectHdl ) );
@ -817,7 +817,8 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog,
// remove existing libraries
if ( bRemove )
{
func_remove_entry(aLibName); // LibPage::InsertLib
if (func_remove_entry)
func_remove_entry(aLibName); // LibPage::InsertLib
// remove module library
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
@ -939,15 +940,16 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog,
}
}
}
func_insert_entry(aLibName); // LibPage::InsertLib
if (func_insert_entry)
func_insert_entry(aLibName); // LibPage::InsertLib
bChanges = true;
}
}
if (bChanges)
{
func_insert_entries(); // MacroManager
if (func_insert_entries)
func_insert_entries(); // MacroManager
MarkDocumentModified(rDocument);
}
});

View file

@ -88,7 +88,7 @@ void ManageLanguageDialog::Init()
m_xAddPB->connect_clicked( LINK( this, ManageLanguageDialog, AddHdl ) );
m_xDeletePB->connect_clicked( LINK( this, ManageLanguageDialog, DeleteHdl ) );
m_xMakeDefPB->connect_clicked( LINK( this, ManageLanguageDialog, MakeDefHdl ) );
m_xLanguageLB->connect_changed( LINK( this, ManageLanguageDialog, SelectHdl ) );
m_xLanguageLB->connect_selection_changed(LINK(this, ManageLanguageDialog, SelectHdl));
m_xLanguageLB->set_selection_mode(SelectionMode::Multiple);
}

View file

@ -227,7 +227,10 @@ public:
std::unique_ptr<Entry>&& rUserData,
weld::TreeIter* pRet = nullptr);
void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
void connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xControl->connect_selection_changed(rLink);
}
std::unique_ptr<weld::TreeIter> make_iterator(const weld::TreeIter* pIter = nullptr) const { return m_xControl->make_iterator(pIter); }
void copy_iterator(const weld::TreeIter& rSource, weld::TreeIter& rDest) const { m_xControl->copy_iterator(rSource, rDest); }
bool get_selected(weld::TreeIter* pIter) const { return m_xControl->get_selected(pIter); }

View file

@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/vector/b2dvector.hxx>
@ -32,6 +31,7 @@
#include <vector>
#include <algorithm>
#include <numeric>
#include <tuple>
namespace basegfx
{
@ -72,23 +72,12 @@ namespace basegfx
public:
PN* mpPN;
// For this to be a strict weak ordering, the assumption is that none of the involved
// maPoint coordinates are NaN:
bool operator<(const SN& rComp) const
{
if(fTools::equal(mpPN->maPoint.getX(), rComp.mpPN->maPoint.getX()))
{
if(fTools::equal(mpPN->maPoint.getY(), rComp.mpPN->maPoint.getY()))
{
return (mpPN->mnI < rComp.mpPN->mnI);
}
else
{
return fTools::less(mpPN->maPoint.getY(), rComp.mpPN->maPoint.getY());
}
}
else
{
return fTools::less(mpPN->maPoint.getX(), rComp.mpPN->maPoint.getX());
}
return std::tie(mpPN->maPoint, mpPN->mnI)
< std::tie(rComp.mpPN->maPoint, rComp.mpPN->mnI);
}
};

View file

@ -60,7 +60,6 @@ namespace basic
{
class NameContainer final
{
std::mutex m_aMutex;
cppu::OWeakObject& rOwner;
std::unordered_map<OUString, css::uno::Any> maMap;
@ -84,7 +83,8 @@ public:
/// @throws css::lang::IllegalArgumentException
/// @throws css::lang::WrappedTargetException
/// @throws css::uno::RuntimeException
void insertNoCheck(const OUString& aName, const css::uno::Any& aElement);
void insertNoCheck(const OUString& aName, const css::uno::Any& aElement,
std::unique_lock<std::mutex>& guard);
// Methods XElementAccess
css::uno::Type getElementType();
@ -96,58 +96,65 @@ public:
sal_Bool hasByName(const OUString& aName);
// Methods XNameReplace
void replaceByName(const OUString& aName, const css::uno::Any& aElement);
void replaceByName(const OUString& aName, const css::uno::Any& aElement,
std::unique_lock<std::mutex>& guard);
// Methods XNameContainer
void insertByName(const OUString& aName, const css::uno::Any& aElement);
void removeByName(const OUString& Name);
void insertByName(const OUString& aName, const css::uno::Any& aElement,
std::unique_lock<std::mutex>& guard);
void removeByName(const OUString& Name, std::unique_lock<std::mutex>& guard);
// Methods XContainer
void addContainerListener(const css::uno::Reference<css::container::XContainerListener >& xListener);
void removeContainerListener(const css::uno::Reference<css::container::XContainerListener >& xListener);
void addContainerListener(
const css::uno::Reference<css::container::XContainerListener>& xListener,
std::unique_lock<std::mutex>& guard);
void removeContainerListener(
const css::uno::Reference<css::container::XContainerListener>& xListener,
std::unique_lock<std::mutex>& guard);
// Methods XChangesNotifier
void addChangesListener(const css::uno::Reference<css::util::XChangesListener>& xListener);
void removeChangesListener(const css::uno::Reference<css::util::XChangesListener>& xListener);
void addChangesListener(const css::uno::Reference<css::util::XChangesListener>& xListener,
std::unique_lock<std::mutex>& guard);
void removeChangesListener(const css::uno::Reference<css::util::XChangesListener>& xListener,
std::unique_lock<std::mutex>& guard);
};
class ModifiableHelper
{
private:
::comphelper::OInterfaceContainerHelper3<css::util::XModifyListener> m_aModifyListeners;
comphelper::OInterfaceContainerHelper4<css::util::XModifyListener> m_aModifyListeners;
::cppu::OWeakObject& m_rEventSource;
bool mbModified;
public:
ModifiableHelper( ::cppu::OWeakObject& _rEventSource, ::osl::Mutex& _rMutex )
:m_aModifyListeners( _rMutex )
,m_rEventSource( _rEventSource )
ModifiableHelper( ::cppu::OWeakObject& _rEventSource )
:m_rEventSource( _rEventSource )
,mbModified( false )
{
}
bool isModified() const { return mbModified; }
void setModified( bool _bModified );
void setModified( bool _bModified, std::unique_lock<std::mutex>& guard );
void addModifyListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener )
void addModifyListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener, std::unique_lock<std::mutex>& guard )
{
m_aModifyListeners.addInterface( _rxListener );
m_aModifyListeners.addInterface(guard, _rxListener);
}
void removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener )
void removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& _rxListener, std::unique_lock<std::mutex>& guard )
{
m_aModifyListeners.removeInterface( _rxListener );
m_aModifyListeners.removeInterface(guard, _rxListener);
}
};
typedef ::comphelper::OInterfaceContainerHelper3<
typedef comphelper::OInterfaceContainerHelper4<
css::script::vba::XVBAScriptListener > VBAScriptListenerContainer;
class SfxLibrary;
typedef ::cppu::WeakComponentImplHelper<
typedef comphelper::WeakComponentImplHelper<
css::lang::XInitialization,
css::script::XStorageBasedLibraryContainer,
css::script::XLibraryContainerPassword,
@ -160,8 +167,7 @@ typedef ::cppu::WeakComponentImplHelper<
css::beans::XPropertySet> SfxLibraryContainer_BASE;
class SfxLibraryContainer
: public ::cppu::BaseMutex
, public SfxLibraryContainer_BASE
: public SfxLibraryContainer_BASE
, public ::utl::OEventListenerAdapter
{
VBAScriptListenerContainer maVBAScriptListeners;
@ -226,9 +232,11 @@ protected:
bool implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib,
const css::uno::Reference< css::embed::XStorage >& xStorage,
const OUString& aIndexFileName );
const OUString& aIndexFileName,
std::unique_lock<std::mutex>& guard );
void implImportLibDescriptor( SfxLibrary* pLib, ::xmlscript::LibDescriptor const & rLib );
void implImportLibDescriptor(SfxLibrary* pLib, ::xmlscript::LibDescriptor const& rLib,
std::unique_lock<std::mutex>& guard);
// Methods to distinguish between different library types
virtual rtl::Reference<SfxLibrary> implCreateLibrary( const OUString& aName ) = 0;
@ -266,7 +274,8 @@ protected:
/// @throws css::lang::WrappedTargetException
/// @throws css::uno::RuntimeException
virtual bool implLoadPasswordLibrary( SfxLibrary* pLib, const OUString& Name,
bool bVerifyPasswordOnly=false );
bool bVerifyPasswordOnly,
std::unique_lock<std::mutex>& guard );
virtual void onNewRootStorage() = 0;
@ -281,7 +290,8 @@ protected:
OUString createAppLibraryFolder( SfxLibrary* pLib, std::u16string_view aName );
void init( const OUString& rInitialDocumentURL,
const css::uno::Reference< css::embed::XStorage >& _rxInitialStorage );
const css::uno::Reference< css::embed::XStorage >& _rxInitialStorage,
std::unique_lock<std::mutex>& guard );
virtual OUString getInfoFileName() const = 0;
virtual OUString getOldInfoFileName() const = 0;
@ -303,20 +313,31 @@ protected:
void storeLibraries_Impl(
const css::uno::Reference< css::embed::XStorage >& xStorage,
bool bComplete );
bool bComplete,
std::unique_lock<std::mutex>& guard );
void initializeFromDocument( const css::uno::Reference< css::document::XStorageBasedDocument >& _rxDocument,
std::unique_lock<std::mutex>& guard );
css::uno::Reference<css::container::XNameContainer>
createLibrary_Impl(const OUString& Name, std::unique_lock<std::mutex>& guard);
css::uno::Reference<css::container::XNameAccess>
createLibraryLink_Impl(const OUString& Name, const OUString& StorageURL, sal_Bool ReadOnly,
std::unique_lock<std::mutex>& guard);
void loadLibrary_Impl(const OUString& Name, std::unique_lock<std::mutex>& guard);
void initializeFromDocument( const css::uno::Reference< css::document::XStorageBasedDocument >& _rxDocument );
// OEventListenerAdapter
virtual void _disposing( const css::lang::EventObject& _rSource ) override;
// OComponentHelper
virtual void SAL_CALL disposing() override;
// WeakComponentImplHelperBase
virtual void disposing(std::unique_lock<std::mutex>& guard) override;
private:
void init_Impl( const OUString& rInitialDocumentURL,
const css::uno::Reference< css::embed::XStorage >& _rxInitialStorage );
void implScanExtensions();
const css::uno::Reference< css::embed::XStorage >& _rxInitialStorage,
std::unique_lock<std::mutex>& guard );
void implScanExtensions(std::unique_lock<std::mutex>& guard);
static constexpr OUString sVBATextEncodingPropName = u"VBATextEncoding"_ustr;
public:
@ -497,7 +518,7 @@ private:
protected:
bool implIsModified() const { return mbIsModified; }
void implSetModified( bool _bIsModified );
void implSetModified(bool _bIsModified, std::unique_lock<std::mutex>& guard);
bool isPasswordProtected() const { return mbPasswordProtected; }
private:
@ -510,7 +531,8 @@ private:
void impl_checkLoaded();
private:
void impl_removeWithoutChecks( const OUString& _rElementName );
void impl_removeWithoutChecks(const OUString& _rElementName,
std::unique_lock<std::mutex>& guard);
public:
SfxLibrary(

View file

@ -70,7 +70,8 @@ class SfxScriptLibraryContainer final : public SfxLibraryContainer
const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& rToUseSFI, const css::uno::Reference< css::task::XInteractionHandler >& Handler ) override;
virtual bool implLoadPasswordLibrary( SfxLibrary* pLib, const OUString& Name,
bool bVerifyPasswordOnly=false ) override;
bool bVerifyPasswordOnly,
std::unique_lock<std::mutex>& guard ) override;
virtual void onNewRootStorage() override;

View file

@ -34,6 +34,7 @@
#include <comphelper/fileformat.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <o3tl/temporary.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@ -92,7 +93,7 @@ SfxDialogLibraryContainer::SfxDialogLibraryContainer()
SfxDialogLibraryContainer::SfxDialogLibraryContainer( const uno::Reference< embed::XStorage >& xStorage )
{
init( OUString(), xStorage );
init(OUString(), xStorage, o3tl::temporary(std::unique_lock(m_aMutex)));
}
// Methods to get library instances of the correct type

View file

@ -33,6 +33,7 @@
#include <utility>
#include <vcl/svapp.hxx>
#include <o3tl/string_view.hxx>
#include <o3tl/temporary.hxx>
#include <osl/mutex.hxx>
#include <vcl/errinf.hxx>
#include <rtl/ustring.hxx>
@ -133,7 +134,8 @@ sal_Bool NameContainer::hasByName( const OUString& aName )
// Methods XNameReplace
void NameContainer::replaceByName( const OUString& aName, const Any& aElement )
void NameContainer::replaceByName(const OUString& aName, const Any& aElement,
std::unique_lock<std::mutex>& guard)
{
const Type& aAnyType = aElement.getValueType();
if( mType != aAnyType )
@ -148,33 +150,32 @@ void NameContainer::replaceByName( const OUString& aName, const Any& aElement )
Any aOldElement = aIt->second;
aIt->second = aElement;
std::unique_lock aGuard(m_aMutex);
// Fire event
if( maContainerListeners.getLength(aGuard) > 0 )
if (maContainerListeners.getLength(guard) > 0)
{
ContainerEvent aEvent;
aEvent.Source = mpxEventSource;
aEvent.Accessor <<= aName;
aEvent.Element = aElement;
aEvent.ReplacedElement = aOldElement;
maContainerListeners.notifyEach( aGuard, &XContainerListener::elementReplaced, aEvent );
maContainerListeners.notifyEach(guard, &XContainerListener::elementReplaced, aEvent);
}
/* After the container event has been fired (one listener will update the
core Basic manager), fire change event. Listeners can rely on that the
Basic source code of the core Basic manager is up-to-date. */
if( maChangesListeners.getLength(aGuard) > 0 )
if (maChangesListeners.getLength(guard) > 0)
{
ChangesEvent aEvent;
aEvent.Source = mpxEventSource;
aEvent.Base <<= aEvent.Source;
aEvent.Changes = { { Any(aName), aElement, aOldElement } };
maChangesListeners.notifyEach( aGuard, &XChangesListener::changesOccurred, aEvent );
maChangesListeners.notifyEach(guard, &XChangesListener::changesOccurred, aEvent);
}
}
void NameContainer::insertNoCheck(const OUString& aName, const Any& aElement)
void NameContainer::insertNoCheck(const OUString& aName, const Any& aElement,
std::unique_lock<std::mutex>& guard)
{
const Type& aAnyType = aElement.getValueType();
if( mType != aAnyType )
@ -184,40 +185,39 @@ void NameContainer::insertNoCheck(const OUString& aName, const Any& aElement)
maMap[aName] = aElement;
std::unique_lock aGuard(m_aMutex);
// Fire event
if( maContainerListeners.getLength(aGuard) > 0 )
if (maContainerListeners.getLength(guard) > 0)
{
ContainerEvent aEvent;
aEvent.Source = mpxEventSource;
aEvent.Accessor <<= aName;
aEvent.Element = aElement;
maContainerListeners.notifyEach( aGuard, &XContainerListener::elementInserted, aEvent );
maContainerListeners.notifyEach(guard, &XContainerListener::elementInserted, aEvent);
}
/* After the container event has been fired (one listener will update the
core Basic manager), fire change event. Listeners can rely on that the
Basic source code of the core Basic manager is up-to-date. */
if( maChangesListeners.getLength(aGuard) > 0 )
if (maChangesListeners.getLength(guard) > 0)
{
ChangesEvent aEvent;
aEvent.Source = mpxEventSource;
aEvent.Base <<= aEvent.Source;
aEvent.Changes = { { Any(aName), aElement, {} } };
maChangesListeners.notifyEach( aGuard, &XChangesListener::changesOccurred, aEvent );
maChangesListeners.notifyEach(guard, &XChangesListener::changesOccurred, aEvent);
}
}
// Methods XNameContainer
void NameContainer::insertByName( const OUString& aName, const Any& aElement )
void NameContainer::insertByName(const OUString& aName, const Any& aElement,
std::unique_lock<std::mutex>& guard)
{
if (hasByName(aName))
throw ElementExistException(aName);
insertNoCheck(aName, aElement);
insertNoCheck(aName, aElement, guard);
}
void NameContainer::removeByName( const OUString& aName )
void NameContainer::removeByName(const OUString& aName, std::unique_lock<std::mutex>& guard)
{
auto aIt = maMap.find(aName);
if (aIt == maMap.end())
@ -228,22 +228,20 @@ void NameContainer::removeByName( const OUString& aName )
Any aOldElement = aIt->second;
maMap.erase(aIt);
std::unique_lock aGuard(m_aMutex);
// Fire event
if( maContainerListeners.getLength(aGuard) > 0 )
if (maContainerListeners.getLength(guard) > 0)
{
ContainerEvent aEvent;
aEvent.Source = mpxEventSource;
aEvent.Accessor <<= aName;
aEvent.Element = aOldElement;
maContainerListeners.notifyEach( aGuard, &XContainerListener::elementRemoved, aEvent );
maContainerListeners.notifyEach(guard, &XContainerListener::elementRemoved, aEvent);
}
/* After the container event has been fired (one listener will update the
core Basic manager), fire change event. Listeners can rely on that the
Basic source code of the core Basic manager is up-to-date. */
if( maChangesListeners.getLength(aGuard) > 0 )
if (maChangesListeners.getLength(guard) > 0)
{
ChangesEvent aEvent;
aEvent.Source = mpxEventSource;
@ -251,57 +249,57 @@ void NameContainer::removeByName( const OUString& aName )
aEvent.Changes = { { Any(aName),
{}, // Element remains empty (meaning "replaced with nothing")
aOldElement } };
maChangesListeners.notifyEach( aGuard, &XChangesListener::changesOccurred, aEvent );
maChangesListeners.notifyEach(guard, &XChangesListener::changesOccurred, aEvent);
}
}
// Methods XContainer
void NameContainer::addContainerListener(const Reference<XContainerListener>& xListener)
void NameContainer::addContainerListener(const Reference<XContainerListener>& xListener,
std::unique_lock<std::mutex>& guard)
{
if( !xListener.is() )
{
throw RuntimeException(u"addContainerListener called with null xListener"_ustr,rOwner);
}
std::unique_lock aGuard(m_aMutex);
maContainerListeners.addInterface( aGuard, xListener );
maContainerListeners.addInterface(guard, xListener);
}
void NameContainer::removeContainerListener(const Reference<XContainerListener>& xListener)
void NameContainer::removeContainerListener(const Reference<XContainerListener>& xListener,
std::unique_lock<std::mutex>& guard)
{
if( !xListener.is() )
{
throw RuntimeException(u"removeContainerListener called with null xListener"_ustr,rOwner);
}
std::unique_lock aGuard(m_aMutex);
maContainerListeners.removeInterface( aGuard, xListener );
maContainerListeners.removeInterface(guard, xListener);
}
// Methods XChangesNotifier
void NameContainer::addChangesListener(const Reference<XChangesListener>& xListener)
void NameContainer::addChangesListener(const Reference<XChangesListener>& xListener,
std::unique_lock<std::mutex>& guard)
{
if( !xListener.is() )
{
throw RuntimeException(u"addChangesListener called with null xListener"_ustr,rOwner);
}
std::unique_lock aGuard(m_aMutex);
maChangesListeners.addInterface( aGuard, xListener );
maChangesListeners.addInterface(guard, xListener);
}
void NameContainer::removeChangesListener(const Reference<XChangesListener>& xListener)
void NameContainer::removeChangesListener(const Reference<XChangesListener>& xListener,
std::unique_lock<std::mutex>& guard)
{
if( !xListener.is() )
{
throw RuntimeException(u"removeChangesListener called with null xListener"_ustr,rOwner);
}
std::unique_lock aGuard(m_aMutex);
maChangesListeners.removeInterface( aGuard, xListener );
maChangesListeners.removeInterface(guard, xListener);
}
// ModifiableHelper
void ModifiableHelper::setModified( bool _bModified )
void ModifiableHelper::setModified(bool _bModified, std::unique_lock<std::mutex>& guard)
{
if ( _bModified == mbModified )
{
@ -309,23 +307,21 @@ void ModifiableHelper::setModified( bool _bModified )
}
mbModified = _bModified;
if ( m_aModifyListeners.getLength() == 0 )
if (m_aModifyListeners.getLength(guard) == 0)
{
return;
}
EventObject aModifyEvent( m_rEventSource );
m_aModifyListeners.notifyEach( &XModifyListener::modified, aModifyEvent );
m_aModifyListeners.notifyEach(guard, &XModifyListener::modified, aModifyEvent);
}
// Ctor
SfxLibraryContainer::SfxLibraryContainer()
: SfxLibraryContainer_BASE( m_aMutex )
, maVBAScriptListeners( m_aMutex )
, mnRunningVBAScripts( 0 )
: mnRunningVBAScripts( 0 )
, mbVBACompat( false )
, meVBATextEncoding( RTL_TEXTENCODING_DONTKNOW )
, maModifiable( *this, m_aMutex )
, maModifiable( *this )
, maNameContainer( cppu::UnoType<XNameAccess>::get(), *this )
, mpBasMgr( nullptr )
, mbOwnBasMgr( false )
@ -351,7 +347,7 @@ SfxLibraryContainer::~SfxLibraryContainer()
void SfxLibraryContainer::enterMethod()
{
Application::GetSolarMutex().acquire();
if ( rBHelper.bInDispose || rBHelper.bDisposed )
if (m_bDisposed)
{
throw DisposedException( OUString(), *this );
}
@ -414,7 +410,7 @@ void SAL_CALL SfxLibraryContainer::storeLibrariesToStorage( const Reference< XSt
}
try
{
storeLibraries_Impl( _rxRootStorage, true );
storeLibraries_Impl(_rxRootStorage, true, o3tl::temporary(std::unique_lock(m_aMutex)));
}
catch( const Exception& )
{
@ -465,19 +461,19 @@ sal_Bool SfxLibraryContainer::isModified()
void SAL_CALL SfxLibraryContainer::setModified( sal_Bool _bModified )
{
LibraryContainerMethodGuard aGuard( *this );
maModifiable.setModified( _bModified );
maModifiable.setModified(_bModified, o3tl::temporary(std::unique_lock(m_aMutex)));
}
void SAL_CALL SfxLibraryContainer::addModifyListener( const Reference< XModifyListener >& _rxListener )
{
LibraryContainerMethodGuard aGuard( *this );
maModifiable.addModifyListener( _rxListener );
maModifiable.addModifyListener(_rxListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}
void SAL_CALL SfxLibraryContainer::removeModifyListener( const Reference< XModifyListener >& _rxListener )
{
LibraryContainerMethodGuard aGuard( *this );
maModifiable.removeModifyListener( _rxListener );
maModifiable.removeModifyListener(_rxListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}
// Methods XPersistentLibraryContainer
@ -498,7 +494,7 @@ void SAL_CALL SfxLibraryContainer::storeLibraries( )
LibraryContainerMethodGuard aGuard( *this );
try
{
storeLibraries_Impl( mxStorage, mxStorage.is() );
storeLibraries_Impl(mxStorage, mxStorage.is(), o3tl::temporary(std::unique_lock(m_aMutex)));
// we need to store *all* libraries if and only if we are based on a storage:
// in this case, storeLibraries_Impl will remove the source storage, after loading
// all libraries, so we need to force them to be stored, again
@ -551,18 +547,21 @@ void createVariableURL( OUString& rStr, std::u16string_view rLibName,
}
}
void SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::Reference< embed::XStorage >& rxInitialStorage )
void SfxLibraryContainer::init(const OUString& rInitialDocumentURL,
const uno::Reference<embed::XStorage>& rxInitialStorage,
std::unique_lock<std::mutex>& guard)
{
// this might be called from within the ctor, and the impl_init might (indirectly) create
// a UNO reference to ourself.
// Ensure that we're not destroyed while we're in here
osl_atomic_increment( &m_refCount );
init_Impl( rInitialDocumentURL, rxInitialStorage );
init_Impl(rInitialDocumentURL, rxInitialStorage, guard);
osl_atomic_decrement( &m_refCount );
}
void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
const uno::Reference< embed::XStorage >& rxInitialStorage )
const uno::Reference< embed::XStorage >& rxInitialStorage,
std::unique_lock<std::mutex>& guard )
{
uno::Reference< embed::XStorage > xStorage = rxInitialStorage;
@ -595,7 +594,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
meInitMode = LIBRARY_INIT_FILE;
uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc;
implLoadLibraryIndexFile( nullptr, aLibDesc, xDummyStor, aInitFileName );
implLoadLibraryIndexFile(nullptr, aLibDesc, xDummyStor, aInitFileName, guard);
return;
}
else
@ -804,7 +803,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( mxSFI->isFolder( aLibDirPath ) )
{
createVariableURL( rLib.aStorageURL, rLib.aName, maInfoFileName, true );
maModifiable.setModified( true );
maModifiable.setModified(true, guard);
}
else if( rLib.bLink )
{
@ -816,7 +815,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( mxSFI->isFolder( aShareLibDirPath ) )
{
createVariableURL( rLib.aStorageURL, rLib.aName, maInfoFileName, false );
maModifiable.setModified( true );
maModifiable.setModified(true, guard);
}
else
{
@ -838,12 +837,12 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( rLib.bLink )
{
Reference< XNameAccess > xLib =
createLibraryLink( aLibName, rLib.aStorageURL, rLib.bReadOnly );
createLibraryLink_Impl(aLibName, rLib.aStorageURL, rLib.bReadOnly, guard);
pImplLib = static_cast< SfxLibrary* >( xLib.get() );
}
else
{
Reference< XNameContainer > xLib = createLibrary( aLibName );
Reference<XNameContainer> xLib = createLibrary_Impl(aLibName, guard);
pImplLib = static_cast< SfxLibrary* >( xLib.get() );
pImplLib->mbLoaded = false;
pImplLib->mbReadOnly = rLib.bReadOnly;
@ -853,7 +852,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
pImplLib->maStorageURL, pImplLib->maUnexpandedStorageURL );
}
}
maModifiable.setModified( false );
maModifiable.setModified(false, guard);
// Read library info files
if( !mbOldInfoFormat )
@ -876,10 +875,10 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
}
}
// Link is already initialised in createLibraryLink()
// Link is already initialised in createLibraryLink_Impl()
if( !pImplLib->mbInitialised && (!bStorage || xLibraryStor.is()) )
{
bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, OUString() );
bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, OUString(), guard );
SAL_WARN_IF(
bLoaded && aLibName != rLib.aName, "basic",
("Different library names in library container and"
@ -899,7 +898,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
implStoreLibraryIndexFile( pImplLib, rLib, xTmpStorage );
}
implImportLibDescriptor( pImplLib, rLib );
implImportLibDescriptor(pImplLib, rLib, guard);
if( nPass == 1 )
{
@ -923,7 +922,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{
try
{
implScanExtensions();
implScanExtensions(guard);
}
catch(const uno::Exception& )
{
@ -939,7 +938,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
SfxLibrary* pImplLib = getImplLib( aName );
if( pImplLib->mbPreload )
{
loadLibrary( aName );
loadLibrary_Impl(aName, guard);
}
}
}
@ -1087,7 +1086,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
}
if( bCreateLink )
{
createLibraryLink( aLibName, pImplLib->maStorageURL, pImplLib->mbReadOnly );
createLibraryLink_Impl( aLibName, pImplLib->maStorageURL, pImplLib->mbReadOnly, guard );
}
}
else
@ -1108,21 +1107,21 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
if( aLibName == aStandardStr )
{
maNameContainer.removeByName( aLibName );
maNameContainer.removeByName(aLibName, guard);
}
// Create library
Reference< XNameContainer > xLib = createLibrary( aLibName );
Reference<XNameContainer> xLib = createLibrary_Impl(aLibName, guard);
SfxLibrary* pNewLib = static_cast< SfxLibrary* >( xLib.get() );
pNewLib->mbLoaded = false;
pNewLib->implSetModified( false );
pNewLib->implSetModified(false, guard);
checkStorageURL( aLibFolder, pNewLib->maLibInfoFileURL,
pNewLib->maStorageURL, pNewLib->maUnexpandedStorageURL );
uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc;
implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, pNewLib->maLibInfoFileURL );
implImportLibDescriptor( pNewLib, aLibDesc );
implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, pNewLib->maLibInfoFileURL, guard );
implImportLibDescriptor(pNewLib, aLibDesc, guard);
}
}
mxSFI->kill( aPrevFolder );
@ -1171,7 +1170,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
{}
}
void SfxLibraryContainer::implScanExtensions()
void SfxLibraryContainer::implScanExtensions(std::unique_lock<std::mutex>& guard)
{
#if HAVE_FEATURE_EXTENSIONS
ScriptExtensionIterator aScriptIt;
@ -1213,10 +1212,10 @@ void SfxLibraryContainer::implScanExtensions()
// Create link
const bool bReadOnly = false;
createLibraryLink( aLibName, aIndexFileURL, bReadOnly );
createLibraryLink_Impl(aLibName, aIndexFileURL, bReadOnly, guard);
}
#else
(void) this;
(void)guard;
#endif
}
@ -1292,7 +1291,8 @@ bool SfxLibraryContainer::implStorePasswordLibrary(
bool SfxLibraryContainer::implLoadPasswordLibrary(
SfxLibrary* /*pLib*/,
const OUString& /*Name*/,
bool /*bVerifyPasswordOnly*/ )
bool /*bVerifyPasswordOnly*/,
std::unique_lock<std::mutex>& /*guard*/ )
{
return true;
}
@ -1580,7 +1580,8 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
::xmlscript::LibDescriptor& rLib,
const uno::Reference< embed::XStorage >& xStorage,
const OUString& aIndexFileName )
const OUString& aIndexFileName,
std::unique_lock<std::mutex>& guard )
{
Reference< XParser > xParser = xml::sax::Parser::create(mxContext);
@ -1660,41 +1661,41 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
if( !pLib )
{
Reference< XNameContainer > xLib = createLibrary( rLib.aName );
Reference<XNameContainer> xLib = createLibrary_Impl(rLib.aName, guard);
pLib = static_cast< SfxLibrary* >( xLib.get() );
pLib->mbLoaded = false;
rLib.aStorageURL = aIndexFileName;
checkStorageURL( rLib.aStorageURL, pLib->maLibInfoFileURL, pLib->maStorageURL,
pLib->maUnexpandedStorageURL );
implImportLibDescriptor( pLib, rLib );
implImportLibDescriptor(pLib, rLib, guard);
}
return true;
}
void SfxLibraryContainer::implImportLibDescriptor( SfxLibrary* pLib,
::xmlscript::LibDescriptor const & rLib )
::xmlscript::LibDescriptor const& rLib,
std::unique_lock<std::mutex>& guard)
{
if( pLib->mbInitialised )
return;
Any aDummyElement = createEmptyLibraryElement();
for (auto& name : rLib.aElementNames)
{
pLib->maNameContainer.insertByName(name, aDummyElement);
pLib->maNameContainer.insertByName(name, aDummyElement, guard);
}
pLib->mbPasswordProtected = rLib.bPasswordProtected;
pLib->mbReadOnly = rLib.bReadOnly;
pLib->mbPreload = rLib.bPreload;
pLib->implSetModified( false );
pLib->implSetModified(false, guard);
pLib->mbInitialised = true;
}
// Methods of new XLibraryStorage interface?
void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XStorage >& i_rStorage,
bool bComplete )
bool bComplete, std::unique_lock<std::mutex>& guard )
{
const Sequence< OUString > aNames = maNameContainer.getElementNames();
@ -1890,7 +1891,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
// Maybe lib is not loaded?!
if( bComplete )
{
loadLibrary( rLib.aName );
loadLibrary_Impl(rLib.aName, guard);
}
if( pImplLib->mbPasswordProtected )
{
@ -1917,8 +1918,8 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
}
}
}
maModifiable.setModified( true );
pImplLib->implSetModified( false );
maModifiable.setModified(true, guard);
pImplLib->implSetModified(false, guard);
}
// For container info ReadOnly refers to mbReadOnlyLink
@ -1980,7 +1981,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
{
return;
}
maModifiable.setModified( false );
maModifiable.setModified(false, guard);
mbOldInfoFormat = false;
// Write library container info
@ -2095,6 +2096,12 @@ sal_Bool SfxLibraryContainer::hasByName( const OUString& aName )
Reference< XNameContainer > SAL_CALL SfxLibraryContainer::createLibrary( const OUString& Name )
{
LibraryContainerMethodGuard aGuard( *this );
return createLibrary_Impl(Name, o3tl::temporary(std::unique_lock(m_aMutex)));
}
css::uno::Reference<css::container::XNameContainer>
SfxLibraryContainer::createLibrary_Impl(const OUString& Name, std::unique_lock<std::mutex>& guard)
{
rtl::Reference<SfxLibrary> pNewLib = implCreateLibrary( Name );
pNewLib->maLibElementFileExtension = maLibElementFileExtension;
@ -2106,8 +2113,8 @@ Reference< XNameContainer > SAL_CALL SfxLibraryContainer::createLibrary( const O
Reference< XNameAccess > xNameAccess( pNewLib );
Any aElement;
aElement <<= xNameAccess;
maNameContainer.insertByName( Name, aElement );
maModifiable.setModified( true );
maNameContainer.insertByName(Name, aElement, guard);
maModifiable.setModified(true, guard);
return pNewLib;
}
@ -2115,6 +2122,13 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
( const OUString& Name, const OUString& StorageURL, sal_Bool ReadOnly )
{
LibraryContainerMethodGuard aGuard( *this );
return createLibraryLink_Impl(Name, StorageURL, ReadOnly, o3tl::temporary(std::unique_lock(m_aMutex)));
}
css::uno::Reference<css::container::XNameAccess>
SfxLibraryContainer::createLibraryLink_Impl(const OUString& Name, const OUString& StorageURL,
sal_Bool ReadOnly, std::unique_lock<std::mutex>& guard)
{
// TODO: Check other reasons to force ReadOnly status
//if( !ReadOnly )
//{
@ -2133,14 +2147,14 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
uno::Reference< embed::XStorage > xDummyStor;
::xmlscript::LibDescriptor aLibDesc;
implLoadLibraryIndexFile( pNewLib.get(), aLibDesc, xDummyStor, OUString() );
implImportLibDescriptor( pNewLib.get(), aLibDesc );
implLoadLibraryIndexFile(pNewLib.get(), aLibDesc, xDummyStor, OUString(), guard);
implImportLibDescriptor(pNewLib.get(), aLibDesc, guard);
Reference< XNameAccess > xRet( pNewLib );
Any aElement;
aElement <<= xRet;
maNameContainer.insertByName( Name, aElement );
maModifiable.setModified( true );
maNameContainer.insertByName(Name, aElement, guard);
maModifiable.setModified(true, guard);
if( StorageURL.indexOf( "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE" ) != -1 )
{
@ -2159,6 +2173,7 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
// Get and hold library before removing
rtl::Reference pImplLib(getImplLib(Name));
if( pImplLib->mbReadOnly && !pImplLib->mbLink )
@ -2166,8 +2181,8 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
throw IllegalArgumentException(u"readonly && !link"_ustr, getXWeak(), 1);
}
// Remove from container
maNameContainer.removeByName( Name );
maModifiable.setModified( true );
maNameContainer.removeByName(Name, guard);
maModifiable.setModified(true, guard);
// Delete library files, but not for linked libraries
if( pImplLib->mbLink )
@ -2180,7 +2195,7 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const OUString& Name )
if (pImplLib->hasElements())
{
for (auto& name : pImplLib->getElementNames())
pImplLib->impl_removeWithoutChecks(name);
pImplLib->impl_removeWithoutChecks(name, guard);
}
// Delete index file
@ -2230,6 +2245,12 @@ sal_Bool SAL_CALL SfxLibraryContainer::isLibraryLoaded( const OUString& Name )
void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
{
LibraryContainerMethodGuard aGuard( *this );
return loadLibrary_Impl(Name, o3tl::temporary(std::unique_lock(m_aMutex)));
}
void SfxLibraryContainer::loadLibrary_Impl(const OUString& Name,
std::unique_lock<std::mutex>& guard)
{
SfxLibrary* pImplLib = getImplLib(Name);
bool bLoaded = pImplLib->mbLoaded;
@ -2239,7 +2260,7 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
if( pImplLib->mbPasswordProtected )
{
implLoadPasswordLibrary( pImplLib, Name );
implLoadPasswordLibrary(pImplLib, Name, false, guard);
return;
}
@ -2346,15 +2367,15 @@ void SAL_CALL SfxLibraryContainer::loadLibrary( const OUString& Name )
{
if( aAny.hasValue() )
{
pImplLib->maNameContainer.replaceByName( aElementName, aAny );
pImplLib->maNameContainer.replaceByName(aElementName, aAny, guard);
}
}
else
{
pImplLib->maNameContainer.insertNoCheck(aElementName, aAny);
pImplLib->maNameContainer.insertNoCheck(aElementName, aAny, guard);
}
}
pImplLib->implSetModified( false );
pImplLib->implSetModified(false, guard);
}
// Methods XLibraryContainer2
@ -2390,14 +2411,15 @@ sal_Bool SAL_CALL SfxLibraryContainer::isLibraryReadOnly( const OUString& Name )
void SAL_CALL SfxLibraryContainer::setLibraryReadOnly( const OUString& Name, sal_Bool bReadOnly )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
SfxLibrary* pImplLib = getImplLib( Name );
if( pImplLib->mbLink )
{
if( pImplLib->mbReadOnlyLink != bool(bReadOnly) )
{
pImplLib->mbReadOnlyLink = bReadOnly;
pImplLib->implSetModified( true );
maModifiable.setModified( true );
pImplLib->implSetModified(true, guard);
maModifiable.setModified(true, guard);
}
}
else
@ -2405,7 +2427,7 @@ void SAL_CALL SfxLibraryContainer::setLibraryReadOnly( const OUString& Name, sal
if( pImplLib->mbReadOnly != bool(bReadOnly) )
{
pImplLib->mbReadOnly = bReadOnly;
pImplLib->implSetModified( true );
pImplLib->implSetModified(true, guard);
}
}
}
@ -2413,6 +2435,7 @@ void SAL_CALL SfxLibraryContainer::setLibraryReadOnly( const OUString& Name, sal
void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OUString& NewName )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
if( maNameContainer.hasByName( NewName ) )
{
throw ElementExistException();
@ -2425,7 +2448,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
{
return; // Lib with unverified password cannot be renamed
}
loadLibrary( Name );
loadLibrary_Impl(Name, guard);
// Rename library folder, but not for linked libraries
bool bMovedSuccessful = true;
@ -2439,7 +2462,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
OUString aLibDirPath = pImplLib->maStorageURL;
// tdf#151741 - fill various storage URLs for the library
// These URLs should not be empty for newly created libraries after
// the change in SfxLibraryContainer::createLibrary.
// the change in SfxLibraryContainer::createLibrary_Impl.
if (aLibDirPath.isEmpty())
{
checkStorageURL(pImplLib->maUnexpandedStorageURL, pImplLib->maLibInfoFileURL,
@ -2515,7 +2538,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
}
bMovedSuccessful = true;
pImplLib->implSetModified( true );
pImplLib->implSetModified(true, guard);
}
}
catch(const Exception& )
@ -2525,14 +2548,14 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
if( bStorage && !pImplLib->mbLink )
{
pImplLib->implSetModified( true );
pImplLib->implSetModified(true, guard);
}
if( bMovedSuccessful )
{
// Remove the old library from the container and insert it back with the new name
maNameContainer.removeByName(Name);
maNameContainer.insertByName(NewName, Any(Reference<XNameAccess>(pImplLib)));
maModifiable.setModified(true);
maNameContainer.removeByName(Name, guard);
maNameContainer.insertByName(NewName, Any(Reference<XNameAccess>(pImplLib)), guard);
maModifiable.setModified(true, guard);
}
}
@ -2541,6 +2564,7 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const OUString& Name, const OU
void SAL_CALL SfxLibraryContainer::initialize( const Sequence< Any >& _rArguments )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
sal_Int32 nArgCount = _rArguments.getLength();
if ( nArgCount != 1 )
throw IllegalArgumentException(u"too many args"_ustr, getXWeak(), -1);
@ -2549,20 +2573,21 @@ void SAL_CALL SfxLibraryContainer::initialize( const Sequence< Any >& _rArgument
Reference< XStorageBasedDocument > xDocument;
if ( _rArguments[0] >>= sInitialDocumentURL )
{
init( sInitialDocumentURL, nullptr );
init(sInitialDocumentURL, nullptr, guard);
return;
}
if ( _rArguments[0] >>= xDocument )
{
initializeFromDocument( xDocument );
initializeFromDocument(xDocument, guard);
return;
}
throw IllegalArgumentException(u"arg1 unknown type"_ustr, getXWeak(), 1);
}
void SfxLibraryContainer::initializeFromDocument( const Reference< XStorageBasedDocument >& _rxDocument )
void SfxLibraryContainer::initializeFromDocument( const Reference< XStorageBasedDocument >& _rxDocument,
std::unique_lock<std::mutex>& guard )
{
// check whether this is a valid OfficeDocument, and obtain the document's root storage
Reference< XStorage > xDocStorage;
@ -2585,7 +2610,7 @@ void SfxLibraryContainer::initializeFromDocument( const Reference< XStorageBased
{
throw IllegalArgumentException(u"no doc storage"_ustr, getXWeak(), 1);
}
init( OUString(), xDocStorage );
init(OUString(), xDocStorage, guard);
}
// OEventListenerAdapter
@ -2603,11 +2628,11 @@ void SfxLibraryContainer::_disposing( const EventObject& _rSource )
}
// OComponentHelper
void SAL_CALL SfxLibraryContainer::disposing()
void SfxLibraryContainer::disposing(std::unique_lock<std::mutex>& guard)
{
Reference< XModel > xModel = mxOwnerDocument;
EventObject aEvent( xModel );
maVBAScriptListeners.disposeAndClear( aEvent );
maVBAScriptListeners.disposeAndClear(guard, aEvent);
stopAllComponentListening();
mxOwnerDocument.clear();
}
@ -2637,14 +2662,16 @@ void SAL_CALL SfxLibraryContainer::changeLibraryPassword(const OUString&, const
void SAL_CALL SfxLibraryContainer::addContainerListener( const Reference< XContainerListener >& xListener )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
maNameContainer.setEventSource( getXWeak() );
maNameContainer.addContainerListener( xListener );
maNameContainer.addContainerListener(xListener, guard);
}
void SAL_CALL SfxLibraryContainer::removeContainerListener( const Reference< XContainerListener >& xListener )
{
LibraryContainerMethodGuard aGuard( *this );
maNameContainer.removeContainerListener( xListener );
std::unique_lock guard(m_aMutex);
maNameContainer.removeContainerListener(xListener, guard);
}
// Methods XLibraryContainerExport
@ -2652,6 +2679,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU
const Reference< XInteractionHandler >& Handler )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
SfxLibrary* pImplLib = getImplLib( Name );
Reference< XSimpleFileAccess3 > xToUseSFI;
@ -2662,7 +2690,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU
}
// Maybe lib is not loaded?!
loadLibrary( Name );
loadLibrary_Impl(Name, guard);
uno::Reference< css::embed::XStorage > xDummyStor;
if( pImplLib->mbPasswordProtected )
@ -2782,12 +2810,12 @@ sal_Int32 SAL_CALL SfxLibraryContainer::getRunningVBAScripts()
void SAL_CALL SfxLibraryContainer::addVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener )
{
maVBAScriptListeners.addInterface( rxListener );
maVBAScriptListeners.addInterface(o3tl::temporary(std::unique_lock(m_aMutex)), rxListener);
}
void SAL_CALL SfxLibraryContainer::removeVBAScriptListener( const Reference< vba::XVBAScriptListener >& rxListener )
{
maVBAScriptListeners.removeInterface( rxListener );
maVBAScriptListeners.removeInterface(o3tl::temporary(std::unique_lock(m_aMutex)), rxListener);
}
void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifier, const OUString& rModuleName )
@ -2807,7 +2835,9 @@ void SAL_CALL SfxLibraryContainer::broadcastVBAScriptEvent( sal_Int32 nIdentifie
Reference< XModel > xModel = mxOwnerDocument; // weak-ref -> ref
vba::VBAScriptEvent aEvent( Reference<XInterface>(xModel, UNO_QUERY), nIdentifier, rModuleName );
maVBAScriptListeners.notifyEach( &css::script::vba::XVBAScriptListener::notifyVBAScriptEvent, aEvent );
maVBAScriptListeners.notifyEach(o3tl::temporary(std::unique_lock(m_aMutex)),
&css::script::vba::XVBAScriptListener::notifyVBAScriptEvent,
aEvent);
}
// Methods XPropertySet
@ -2912,7 +2942,7 @@ bool SfxLibrary::isLoadedStorable()
return mbLoaded && (!mbPasswordProtected || mbPasswordVerified);
}
void SfxLibrary::implSetModified( bool _bIsModified )
void SfxLibrary::implSetModified(bool _bIsModified, std::unique_lock<std::mutex>& guard)
{
if ( mbIsModified == _bIsModified )
{
@ -2921,7 +2951,7 @@ void SfxLibrary::implSetModified( bool _bIsModified )
mbIsModified = _bIsModified;
if ( mbIsModified )
{
mrModifiable.setModified( true );
mrModifiable.setModified(true, guard);
}
}
@ -2992,8 +3022,9 @@ void SfxLibrary::replaceByName( const OUString& aName, const Any& aElement )
!isLibraryElementValid(aElement), "basic",
"SfxLibrary::replaceByName: replacing element is invalid!");
maNameContainer.replaceByName( aName, aElement );
implSetModified( true );
std::unique_lock guard(m_aMutex);
maNameContainer.replaceByName(aName, aElement, guard);
implSetModified(true, guard);
}
@ -3007,14 +3038,16 @@ void SfxLibrary::insertByName( const OUString& aName, const Any& aElement )
!isLibraryElementValid(aElement), "basic",
"SfxLibrary::insertByName: to-be-inserted element is invalid!");
maNameContainer.insertByName( aName, aElement );
implSetModified( true );
std::unique_lock guard(m_aMutex);
maNameContainer.insertByName(aName, aElement, guard);
implSetModified(true, guard);
}
void SfxLibrary::impl_removeWithoutChecks( const OUString& _rElementName )
void SfxLibrary::impl_removeWithoutChecks(const OUString& _rElementName,
std::unique_lock<std::mutex>& guard)
{
maNameContainer.removeByName( _rElementName );
implSetModified( true );
maNameContainer.removeByName(_rElementName, guard);
implSetModified(true, guard);
// Remove element file
if( maStorageURL.isEmpty() )
@ -3044,31 +3077,31 @@ void SfxLibrary::removeByName( const OUString& Name )
{
impl_checkReadOnly();
impl_checkLoaded();
impl_removeWithoutChecks( Name );
impl_removeWithoutChecks(Name, o3tl::temporary(std::unique_lock(m_aMutex)));
}
// Methods XContainer
void SAL_CALL SfxLibrary::addContainerListener( const Reference< XContainerListener >& xListener )
{
maNameContainer.setEventSource( getXWeak() );
maNameContainer.addContainerListener( xListener );
maNameContainer.addContainerListener(xListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}
void SAL_CALL SfxLibrary::removeContainerListener( const Reference< XContainerListener >& xListener )
{
maNameContainer.removeContainerListener( xListener );
maNameContainer.removeContainerListener(xListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}
// Methods XChangesNotifier
void SAL_CALL SfxLibrary::addChangesListener( const Reference< XChangesListener >& xListener )
{
maNameContainer.setEventSource( getXWeak() );
maNameContainer.addChangesListener( xListener );
maNameContainer.addChangesListener(xListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}
void SAL_CALL SfxLibrary::removeChangesListener( const Reference< XChangesListener >& xListener )
{
maNameContainer.removeChangesListener( xListener );
maNameContainer.removeChangesListener(xListener, o3tl::temporary(std::unique_lock(m_aMutex)));
}

View file

@ -38,7 +38,7 @@
// For password functionality
#include <tools/urlobj.hxx>
#include <o3tl/temporary.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <basic/basmgr.hxx>
@ -114,7 +114,7 @@ SfxScriptLibraryContainer::SfxScriptLibraryContainer()
SfxScriptLibraryContainer::SfxScriptLibraryContainer( const uno::Reference< embed::XStorage >& xStorage )
{
init( OUString(), xStorage );
init(OUString(), xStorage, o3tl::temporary(std::unique_lock(m_aMutex)));
}
// Methods to get library instances of the correct type
@ -371,6 +371,7 @@ sal_Bool SAL_CALL SfxScriptLibraryContainer::verifyLibraryPassword
( const OUString& Name, const OUString& Password )
{
LibraryContainerMethodGuard aGuard( *this );
std::unique_lock guard(m_aMutex);
SfxLibrary* pImplLib = getImplLib( Name );
if( !pImplLib->mbPasswordProtected || pImplLib->mbPasswordVerified )
{
@ -389,19 +390,19 @@ sal_Bool SAL_CALL SfxScriptLibraryContainer::verifyLibraryPassword
else
{
pImplLib->maPassword = Password;
bSuccess = implLoadPasswordLibrary( pImplLib, Name, true );
bSuccess = implLoadPasswordLibrary( pImplLib, Name, true, guard);
if( bSuccess )
{
// The library gets modified by verifying the password, because other-
// wise for saving the storage would be copied and that doesn't work
// with mtg's storages when the password is verified
pImplLib->implSetModified( true );
pImplLib->implSetModified(true, guard);
pImplLib->mbPasswordVerified = true;
// Reload library to get source
if( pImplLib->mbLoaded )
{
implLoadPasswordLibrary( pImplLib, Name );
implLoadPasswordLibrary( pImplLib, Name, false, guard);
}
}
}
@ -458,14 +459,15 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
pImplLib->mbPasswordVerified = false;
pImplLib->maPassword.clear();
maModifiable.setModified( true );
pImplLib->implSetModified( true );
std::unique_lock guard(m_aMutex);
maModifiable.setModified(true, guard);
pImplLib->implSetModified(true, guard);
if( !bStorage && !pImplLib->mbDoc50Password )
{
// Store application basic unencrypted
uno::Reference< embed::XStorage > xStorage;
storeLibraries_Impl( xStorage, false );
storeLibraries_Impl(xStorage, false, guard);
bKillCryptedFiles = true;
}
}
@ -483,14 +485,15 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString&
pSL->mbLoadedSource = true; // must store source code now!
}
maModifiable.setModified( true );
pImplLib->implSetModified( true );
std::unique_lock guard(m_aMutex);
maModifiable.setModified(true, guard);
pImplLib->implSetModified(true, guard);
if( !bStorage && !pImplLib->mbDoc50Password )
{
// Store application basic crypted
uno::Reference< embed::XStorage > xStorage;
storeLibraries_Impl( xStorage, false );
storeLibraries_Impl(xStorage, false, guard);
bKillUnencryptedFiles = true;
}
}
@ -806,7 +809,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
}
bool SfxScriptLibraryContainer::implLoadPasswordLibrary
( SfxLibrary* pLib, const OUString& Name, bool bVerifyPasswordOnly )
( SfxLibrary* pLib, const OUString& Name, bool bVerifyPasswordOnly, std::unique_lock<std::mutex>& guard )
{
bool bRet = true;
@ -950,12 +953,12 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
{
if( aAny.hasValue() )
{
pLib->maNameContainer.replaceByName( aElementName, aAny );
pLib->maNameContainer.replaceByName(aElementName, aAny, guard);
}
}
else
{
pLib->maNameContainer.insertByName( aElementName, aAny );
pLib->maNameContainer.insertByName(aElementName, aAny, guard);
}
}
}
@ -1063,12 +1066,13 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary
{
if( aAny.hasValue() )
{
pLib->maNameContainer.replaceByName( aElementName, aAny );
pLib->maNameContainer.replaceByName(aElementName, aAny,
guard);
}
}
else
{
pLib->maNameContainer.insertByName( aElementName, aAny );
pLib->maNameContainer.insertByName(aElementName, aAny, guard);
}
}
}

View file

@ -34,7 +34,7 @@ BarGeometryResources::BarGeometryResources(weld::Builder* pBuilder)
void BarGeometryResources::connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xLB_Geometry->connect_changed(rLink);
m_xLB_Geometry->connect_selection_changed(rLink);
}
void BarGeometryResources::set_visible(bool bShow)

View file

@ -71,7 +71,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
SetPageTitle(SchResId(STR_PAGE_CHARTTYPE));
m_xMainTypeList->connect_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl));
m_xMainTypeList->connect_selection_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl));
m_xSubTypeList->SetSelectHdl( LINK( this, ChartTypeTabPage, SelectSubTypeHdl ) );
m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() |

View file

@ -184,8 +184,9 @@ DataSourceTabPage::DataSourceTabPage(weld::Container* pPage, weld::DialogControl
SetPageTitle(SchResId(STR_OBJECT_DATASERIES_PLURAL));
// set handlers
m_xLB_SERIES->connect_changed(LINK(this, DataSourceTabPage, SeriesSelectionChangedHdl));
m_xLB_ROLE->connect_changed(LINK(this, DataSourceTabPage, RoleSelectionChangedHdl));
m_xLB_SERIES->connect_selection_changed(
LINK(this, DataSourceTabPage, SeriesSelectionChangedHdl));
m_xLB_ROLE->connect_selection_changed(LINK(this, DataSourceTabPage, RoleSelectionChangedHdl));
m_xIMB_RANGE_MAIN->connect_clicked(LINK(this, DataSourceTabPage, MainRangeButtonClickedHdl));
m_xIMB_RANGE_CAT->connect_clicked(LINK(this, DataSourceTabPage, CategoriesRangeButtonClickedHdl));

View file

@ -208,7 +208,7 @@ namespace comphelper
return comphelper::concatSequences(
OComponentProxyAggregationHelper::getTypes(),
// append XComponent, coming from WeakComponentImplHelperBase
Sequence { cppu::UnoType<XComponent>::get() });
std::initializer_list<Type>{ cppu::UnoType<XComponent>::get() });
}

View file

@ -42,12 +42,7 @@ OPropertyContainer::~OPropertyContainer()
Sequence< Type > OPropertyContainer::getBaseTypes()
{
// just the types from our one and only base class
::cppu::OTypeCollection aTypes(
cppu::UnoType<XPropertySet>::get(),
cppu::UnoType<XFastPropertySet>::get(),
cppu::UnoType<XMultiPropertySet>::get()
);
return aTypes.getTypes();
return cppu::OPropertySetHelper::getTypes();
}
sal_Bool OPropertyContainer::convertFastPropertyValue(

View file

@ -33,10 +33,7 @@ OPropertyContainer2::~OPropertyContainer2() {}
Sequence<Type> OPropertyContainer2::getBaseTypes()
{
// just the types from our one and only base class
::cppu::OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(),
cppu::UnoType<XFastPropertySet>::get(),
cppu::UnoType<XMultiPropertySet>::get());
return aTypes.getTypes();
return comphelper::OPropertySetHelper::getTypes();
}
bool OPropertyContainer2::convertFastPropertyValue(std::unique_lock<std::mutex>& /*rGuard*/,

View file

@ -744,7 +744,6 @@ export TMPDIR=@TEMP_DIRECTORY@
export TOUCH=@TOUCH@
export UCRTSDKDIR=@UCRTSDKDIR@
export UCRTVERSION=@UCRTVERSION@
export UCRT_REDISTDIR=@UCRT_REDISTDIR@
export UNIQ=@UNIQ@
export UNIX_DLAPI_LIBS=@UNIX_DLAPI_LIBS@
export USE_HEADLESS_CODE=@USE_HEADLESS_CODE@

View file

@ -4158,7 +4158,6 @@ cygwin*|wsl*)
SCPDEFS="$SCPDEFS -DWINDOWS_AARCH64"
WIN_HOST_ARCH="arm64"
WIN_HOST_BITS=64
with_ucrt_dir=no
;;
*)
AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
@ -8945,23 +8944,6 @@ if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
fi
AC_SUBST([JITC_PROCESSOR_TYPE])
# Misc Windows Stuff
AC_ARG_WITH(ucrt-dir,
AS_HELP_STRING([--with-ucrt-dir],
[path to the directory with the arch-specific MSU packages of the Windows Universal CRT redistributables
(MS KB 2999226) for packaging into the installsets (without those the target system needs to install
the UCRT or Visual C++ Runtimes manually). The directory must contain the following 6 files:
Windows6.1-KB2999226-x64.msu
Windows6.1-KB2999226-x86.msu
Windows8.1-KB2999226-x64.msu
Windows8.1-KB2999226-x86.msu
Windows8-RT-KB2999226-x64.msu
Windows8-RT-KB2999226-x86.msu
A zip archive including those files is available from Microsoft site:
https://www.microsoft.com/en-us/download/details.aspx?id=48234]),
,)
UCRT_REDISTDIR="$with_ucrt_dir"
if test $_os = "WINNT"; then
find_msvc_x64_dlls
MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
@ -8983,36 +8965,8 @@ if test $_os = "WINNT"; then
break
fi
done
if test "$UCRT_REDISTDIR" = "no"; then
dnl explicitly disabled
UCRT_REDISTDIR=""
else
PathFormat "$UCRT_REDISTDIR"
UCRT_REDISTDIR="$formatted_path"
UCRT_REDISTDIR_unix="$formatted_path_unix"
if ! test -f "$UCRT_REDISTDIR_unix/Windows6.1-KB2999226-x64.msu" -a \
-f "$UCRT_REDISTDIR_unix/Windows6.1-KB2999226-x86.msu" -a \
-f "$UCRT_REDISTDIR_unix/Windows8.1-KB2999226-x64.msu" -a \
-f "$UCRT_REDISTDIR_unix/Windows8.1-KB2999226-x86.msu" -a \
-f "$UCRT_REDISTDIR_unix/Windows8-RT-KB2999226-x64.msu" -a \
-f "$UCRT_REDISTDIR_unix/Windows8-RT-KB2999226-x86.msu"; then
UCRT_REDISTDIR=""
if test -n "$PKGFORMAT"; then
for i in $PKGFORMAT; do
case "$i" in
msi)
AC_MSG_WARN([--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency])
add_warning "--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency"
;;
esac
done
fi
fi
fi
fi
AC_SUBST(UCRT_REDISTDIR)
AC_SUBST(MSVC_DLL_PATH)
AC_SUBST(MSVC_DLLS)
AC_SUBST(MSM_PATH)

View file

@ -31,6 +31,12 @@ $(eval $(call gb_Library_add_cxxflags,ado,\
))
endif
ifeq ($(COM),MSC)
$(eval $(call gb_Library_add_cxxflags,ado,\
-DADO_SUPPRESS_MESSAGE \
))
endif
$(eval $(call gb_Library_use_system_win32_libs,ado,\
ole32 \
oleaut32 \

View file

@ -99,11 +99,8 @@ Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType )
css::uno::Sequence< css::uno::Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( )
{
::cppu::OTypeCollection aTypes( cppu::UnoType<css::beans::XMultiPropertySet>::get(),
cppu::UnoType<css::beans::XFastPropertySet>::get(),
cppu::UnoType<css::beans::XPropertySet>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes());
return comphelper::concatSequences(cppu::OPropertySetHelper::getTypes(),
ODatabaseMetaDataResultSet_BASE::getTypes());
}
void ODatabaseMetaDataResultSet::checkRecordSet()

View file

@ -55,7 +55,7 @@ using namespace com::sun::star::util;
IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.APreparedStatement","com.sun.star.sdbc.PreparedStatement");
OPreparedStatement::OPreparedStatement( OConnection* _pConnection, const OUString& sql)
: OStatement_Base( _pConnection )
: OPreparedStatement_BASE(_pConnection)
{
osl_atomic_increment( &m_refCount );
@ -92,24 +92,6 @@ OPreparedStatement::~OPreparedStatement()
}
}
Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType )
{
Any aRet = OStatement_Base::queryInterface(rType);
return aRet.hasValue() ? aRet : ::cppu::queryInterface( rType,
static_cast< XPreparedStatement*>(this),
static_cast< XParameters*>(this),
static_cast< XResultSetMetaDataSupplier*>(this));
}
css::uno::Sequence< css::uno::Type > SAL_CALL OPreparedStatement::getTypes( )
{
::cppu::OTypeCollection aTypes( cppu::UnoType<XPreparedStatement>::get(),
cppu::UnoType<XParameters>::get(),
cppu::UnoType<XResultSetMetaDataSupplier>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_Base::getTypes());
}
Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( )
{
if(!m_xMetaData.is() && m_RecordSet.IsValid())
@ -421,16 +403,6 @@ void SAL_CALL OPreparedStatement::clearParameters( )
}
}
void SAL_CALL OPreparedStatement::acquire() noexcept
{
OStatement_Base::acquire();
}
void SAL_CALL OPreparedStatement::release() noexcept
{
OStatement_Base::release();
}
void OPreparedStatement::replaceParameterNodeName(OSQLParseNode const * _pNode,
const OUString& _sDefaultName,
sal_Int32& _rParameterCount)

View file

@ -132,11 +132,8 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType )
css::uno::Sequence< css::uno::Type > SAL_CALL OResultSet::getTypes( )
{
::cppu::OTypeCollection aTypes( cppu::UnoType<css::beans::XMultiPropertySet>::get(),
cppu::UnoType<css::beans::XFastPropertySet>::get(),
cppu::UnoType<css::beans::XPropertySet>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
return comphelper::concatSequences(cppu::OPropertySetHelper::getTypes(),
OResultSet_BASE::getTypes());
}
sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName )
@ -263,7 +260,7 @@ sal_Int32 SAL_CALL OResultSet::getRow( )
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
PositionEnum_Param aPos;
PositionEnum aPos;
m_pRecordSet->get_AbsolutePosition(&aPos);
return (aPos > 0) ? static_cast<sal_Int32>(aPos) : m_nRowPos;
// return the rowcount from driver if the driver doesn't support this return our count

View file

@ -120,11 +120,8 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType )
css::uno::Sequence< css::uno::Type > SAL_CALL OStatement_Base::getTypes( )
{
::cppu::OTypeCollection aTypes( cppu::UnoType<css::beans::XMultiPropertySet>::get(),
cppu::UnoType<css::beans::XFastPropertySet>::get(),
cppu::UnoType<css::beans::XPropertySet>::get());
return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes());
return comphelper::concatSequences(cppu::OPropertySetHelper::getTypes(),
OStatement_BASE::getTypes());
}
@ -374,7 +371,7 @@ Sequence< sal_Int32 > SAL_CALL OStatement::executeBatch( )
{
assignRecordSet( pSet );
ADO_LONGPTR nValue;
long nValue;
if(m_RecordSet.get_RecordCount(nValue))
pArray[j] = nValue;
}
@ -426,7 +423,7 @@ sal_Int32 SAL_CALL OStatement_Base::getUpdateCount( )
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
ADO_LONGPTR nRet;
long nRet;
if(m_RecordSet.IsValid() && m_RecordSet.get_RecordCount(nRet))
return nRet;
return -1;
@ -489,7 +486,7 @@ sal_Int32 OStatement_Base::getQueryTimeOut() const
sal_Int32 OStatement_Base::getMaxRows() const
{
ADO_LONGPTR nRet=-1;
long nRet = -1;
if(!(m_RecordSet.IsValid() && m_RecordSet.get_MaxRecords(nRet)))
::dbtools::throwFunctionSequenceException(nullptr);
return nRet;

View file

@ -422,7 +422,7 @@ WpADOProperties WpADOField::get_Properties()
sal_Int32 WpADOField::GetActualSize() const
{
assert(pInterface);
ADO_LONGPTR nActualSize=0;
long nActualSize = 0;
pInterface->get_ActualSize(&nActualSize);
return nActualSize;
}
@ -445,7 +445,7 @@ sal_Int32 WpADOField::GetStatus() const
sal_Int32 WpADOField::GetDefinedSize() const
{
assert(pInterface);
ADO_LONGPTR nDefinedSize=0;
long nDefinedSize = 0;
pInterface->get_DefinedSize(&nDefinedSize);
return nDefinedSize;
}
@ -697,10 +697,10 @@ bool WpADORecordset::Supports( /* [in] */ CursorOptionEnum CursorOptions)
return bSupports == VARIANT_TRUE;
}
PositionEnum_Param WpADORecordset::get_AbsolutePosition()
PositionEnum WpADORecordset::get_AbsolutePosition()
{
assert(pInterface);
PositionEnum_Param aTemp=adPosUnknown;
PositionEnum aTemp = adPosUnknown;
pInterface->get_AbsolutePosition(&aTemp);
return aTemp;
}
@ -815,13 +815,13 @@ bool WpADORecordset::NextRecordset(OLEVariant& RecordsAffected,ADORecordset** pp
return SUCCEEDED(pInterface->NextRecordset(&RecordsAffected,ppiRset));
}
bool WpADORecordset::get_RecordCount(ADO_LONGPTR &_nRet) const
bool WpADORecordset::get_RecordCount(long& _nRet) const
{
assert(pInterface);
return SUCCEEDED(pInterface->get_RecordCount(&_nRet));
}
bool WpADORecordset::get_MaxRecords(ADO_LONGPTR &_nRet) const
bool WpADORecordset::get_MaxRecords(long& _nRet) const
{
assert(pInterface);
return SUCCEEDED(pInterface->get_MaxRecords(&_nRet));

View file

@ -61,10 +61,10 @@ Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType )
css::uno::Sequence< css::uno::Type > SAL_CALL java_sql_CallableStatement::getTypes( )
{
::cppu::OTypeCollection aTypes( cppu::UnoType<css::sdbc::XRow>::get(),
cppu::UnoType<css::sdbc::XOutParameters>::get());
css::uno::Type aTypes[] { cppu::UnoType<css::sdbc::XRow>::get(),
cppu::UnoType<css::sdbc::XOutParameters>::get() };
return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_PreparedStatement::getTypes());
return ::comphelper::concatSequences(java_sql_PreparedStatement::getTypes(), aTypes);
}
sal_Bool SAL_CALL java_sql_CallableStatement::wasNull( )

View file

@ -34,13 +34,12 @@ namespace connectivity
class OSQLParseNode;
namespace ado
{
using OPreparedStatement_BASE
= cppu::ImplInheritanceHelper<OStatement_Base, css::sdbc::XPreparedStatement,
css::sdbc::XParameters, css::sdbc::XResultSetMetaDataSupplier,
css::lang::XServiceInfo>;
class OPreparedStatement : public OStatement_Base,
public css::sdbc::XPreparedStatement,
public css::sdbc::XParameters,
public css::sdbc::XResultSetMetaDataSupplier,
public css::lang::XServiceInfo
class OPreparedStatement : public OPreparedStatement_BASE
{
/// @throws css::sdbc::SQLException
/// @throws css::uno::RuntimeException
@ -62,12 +61,6 @@ namespace connectivity
// a Constructor, that is needed for when Returning the Object is needed:
OPreparedStatement( OConnection* _pConnection, const OUString& sql);
virtual void SAL_CALL acquire() noexcept override;
virtual void SAL_CALL release() noexcept override;
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
//XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
// XPreparedStatement
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL executeQuery( ) override;
using OStatement_Base::executeQuery;

View file

@ -66,7 +66,7 @@ namespace connectivity::ado
css::uno::Reference< css::sdbc::XResultSetMetaData> m_xMetaData;
std::vector<OLEVariant> m_aBookmarks;
OLEVariant m_aValue;
ADO_LONGPTR m_nRowPos;
long m_nRowPos;
bool m_bEOF;
bool m_bOnFirstAfterOpen;

View file

@ -71,7 +71,7 @@ namespace connectivity::ado
std::vector<connectivity::OTypeInfo> m_aTypeInfo; // Hashtable containing an entry
// for each row returned by
// DatabaseMetaData.getTypeInfo.
ADO_LONGPTR m_nMaxRows;
long m_nMaxRows;
sal_Int32 m_nFetchSize;
LockTypeEnum m_eLockType;
CursorTypeEnum m_eCursorType;

View file

@ -289,7 +289,7 @@ namespace connectivity::ado
bool Cancel() const;
sal_Int32 get_State( );
bool Supports( /* [in] */ CursorOptionEnum CursorOptions);
PositionEnum_Param get_AbsolutePosition();
PositionEnum get_AbsolutePosition();
void GetDataSource(IUnknown** pIUnknown) const ;
void PutRefDataSource(IUnknown* pIUnknown);
void GetBookmark(VARIANT& var);
@ -311,8 +311,8 @@ namespace connectivity::ado
bool CancelUpdate();
WpADOProperties get_Properties() const;
bool NextRecordset(OLEVariant& RecordsAffected,ADORecordset** ppiRset);
bool get_RecordCount(ADO_LONGPTR &_nRet) const;
bool get_MaxRecords(ADO_LONGPTR &_nRet) const;
bool get_RecordCount(long& _nRet) const;
bool get_MaxRecords(long& _nRet) const;
bool put_MaxRecords(ADO_LONGPTR _nRet);
bool get_CursorType(CursorTypeEnum &_nRet) const;
bool put_CursorType(CursorTypeEnum _nRet);

View file

@ -107,13 +107,13 @@ void OComponentHelper::release() noexcept
Sequence< Type > OComponentHelper::getTypes()
{
static OTypeCollection s_aTypes(
static const Sequence s_aTypes {
cppu::UnoType<lang::XComponent>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<XAggregation>::get(),
cppu::UnoType<XWeak>::get() );
cppu::UnoType<XWeak>::get() };
return s_aTypes.getTypes();
return s_aTypes;
}
// XComponent

View file

@ -54,7 +54,7 @@ SvxMenuConfigPage::SvxMenuConfigPage(weld::Container* pPage, weld::DialogControl
rTreeView.set_vexpand(true);
rTreeView.show();
rTreeView.connect_changed(LINK(this, SvxMenuConfigPage, SelectMenuEntry));
rTreeView.connect_selection_changed(LINK(this, SvxMenuConfigPage, SelectMenuEntry));
rTreeView.connect_popup_menu(LINK(this, SvxMenuConfigPage, ContentContextMenuHdl));
m_xFunctions->get_widget().connect_popup_menu(

View file

@ -64,7 +64,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(weld::Container* pPage,
rTreeView.set_help_id(HID_SVX_CONFIG_TOOLBAR_CONTENTS);
rTreeView.show();
rTreeView.connect_changed(LINK(this, SvxToolbarConfigPage, SelectToolbarEntry));
rTreeView.connect_selection_changed(LINK(this, SvxToolbarConfigPage, SelectToolbarEntry));
rTreeView.connect_popup_menu(LINK(this, SvxToolbarConfigPage, ContentContextMenuHdl));
m_xFunctions->get_widget().connect_popup_menu(

View file

@ -892,11 +892,11 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage,
// install handler functions
m_xChangeButton->connect_clicked(LINK(this, SfxAcceleratorConfigPage, ChangeHdl));
m_xRemoveButton->connect_clicked(LINK(this, SfxAcceleratorConfigPage, RemoveHdl));
m_xEntriesBox->connect_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xEntriesBox->connect_selection_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xEntriesBox->connect_key_press(LINK(this, SfxAcceleratorConfigPage, KeyInputHdl));
m_xGroupLBox->connect_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xFunctionBox->connect_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xKeyBox->connect_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xKeyBox->connect_selection_changed(LINK(this, SfxAcceleratorConfigPage, SelectHdl));
m_xLoadButton->connect_clicked(LINK(this, SfxAcceleratorConfigPage, Load));
m_xSaveButton->connect_clicked(LINK(this, SfxAcceleratorConfigPage, Save));
m_xResetButton->connect_clicked(LINK(this, SfxAcceleratorConfigPage, Default));

View file

@ -1041,7 +1041,7 @@ SvxConfigPage::SvxConfigPage(weld::Container* pPage, weld::DialogController* pCo
m_xSearchEdit->connect_focus_out(LINK(this, SvxConfigPage, FocusOut_Impl));
rTreeView.connect_row_activated(LINK(this, SvxConfigPage, FunctionDoubleClickHdl));
rTreeView.connect_changed(LINK(this, SvxConfigPage, SelectFunctionHdl));
rTreeView.connect_selection_changed(LINK(this, SvxConfigPage, SelectFunctionHdl));
}
IMPL_LINK_NOARG(SvxConfigPage, SelectElementHdl, weld::ComboBox&, void)
@ -1838,7 +1838,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
m_xDialog->set_title(CuiResId(RID_CUISTR_MOVE_MENU));
}
m_xMenuListBox->connect_changed(LINK(this, SvxMainMenuOrganizerDialog, SelectHdl));
m_xMenuListBox->connect_selection_changed(LINK(this, SvxMainMenuOrganizerDialog, SelectHdl));
m_xMoveUpButton->connect_clicked(LINK( this, SvxMainMenuOrganizerDialog, MoveHdl));
m_xMoveDownButton->connect_clicked(LINK( this, SvxMainMenuOrganizerDialog, MoveHdl));

View file

@ -561,7 +561,7 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla
if( mpImpl->xAssignComponentPB )
mpImpl->xAssignComponentPB->connect_clicked( aLnk );
mpImpl->xEventLB->connect_row_activated( LINK(this, SvxMacroTabPage_, DoubleClickHdl_Impl ) );
mpImpl->xEventLB->connect_changed( LINK( this, SvxMacroTabPage_, SelectEvent_Impl ));
mpImpl->xEventLB->connect_selection_changed(LINK(this, SvxMacroTabPage_, SelectEvent_Impl));
std::vector<int> aWidths
{

View file

@ -25,6 +25,7 @@
#include <comphelper/documentinfo.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/file.hxx>
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/inputdlg.hxx>
@ -578,6 +579,7 @@ IMPL_LINK(ScriptContainersListBox, QueryTooltip, const weld::TreeIter&, rEntryIt
&& xModLibContainer->isLibraryLink(aLibName))
{
OUString aLinkURL = xModLibContainer->getLibraryLinkURL(aLibName);
osl::File::getSystemPathFromFileURL(aLinkURL, aLinkURL);
return aLinkURL;
}
}
@ -966,7 +968,13 @@ void MacroManagerDialog::UpdateUI()
if (xModLibContainer.is() && xModLibContainer->hasByName(aLibName)
&& xModLibContainer->isLibraryLink(aLibName))
{
sDescriptionText = xModLibContainer->getLibraryLinkURL(aLibName);
OUString aLinkURL = xModLibContainer->getLibraryLinkURL(aLibName);
OUString aSysPath;
if (osl::File::getSystemPathFromFileURL(aLinkURL, aSysPath)
== osl::FileBase::E_None)
sDescriptionText = aSysPath;
else
sDescriptionText = aLinkURL;
}
}
}

View file

@ -610,7 +610,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData )
m_xCbxPreview->connect_toggled(LINK(this, TPGalleryThemeProperties, ClickPreviewHdl));
m_xCbbFileType->connect_changed(LINK(this, TPGalleryThemeProperties, SelectFileTypeHdl));
m_xLbxFound->connect_row_activated(LINK(this, TPGalleryThemeProperties, DClickFoundHdl));
m_xLbxFound->connect_changed(LINK(this, TPGalleryThemeProperties, SelectFoundHdl));
m_xLbxFound->connect_selection_changed(LINK(this, TPGalleryThemeProperties, SelectFoundHdl));
m_xLbxFound->append_text(CuiResId(RID_CUISTR_GALLERY_NOFILES));
m_xLbxFound->show();

View file

@ -160,7 +160,7 @@ SvxListDialog::SvxListDialog(weld::Window* pParent)
m_xAddBtn->connect_clicked(LINK(this, SvxListDialog, AddHdl_Impl));
m_xRemoveBtn->connect_clicked(LINK(this, SvxListDialog, RemoveHdl_Impl));
m_xEditBtn->connect_clicked(LINK(this, SvxListDialog, EditHdl_Impl));
m_xList->connect_changed(LINK(this, SvxListDialog, SelectHdl_Impl));
m_xList->connect_selection_changed(LINK(this, SvxListDialog, SelectHdl_Impl));
m_xList->connect_row_activated(LINK(this, SvxListDialog, DblClickHdl_Impl));
SelectionChanged();

View file

@ -294,7 +294,8 @@ namespace svx
, m_xListBox(rBuilder.weld_tree_view(u"listbox"_ustr))
{
m_xValueSet->SetSelectHdl( LINK( this, SuggestionDisplay, SelectSuggestionValueSetHdl ) );
m_xListBox->connect_changed( LINK( this, SuggestionDisplay, SelectSuggestionListBoxHdl ) );
m_xListBox->connect_selection_changed(
LINK(this, SuggestionDisplay, SelectSuggestionListBoxHdl));
m_xValueSet->SetLineCount( LINE_CNT );
m_xValueSet->SetStyle( m_xValueSet->GetStyle() | WB_ITEMBORDER | WB_VSCROLL );
@ -894,7 +895,8 @@ namespace svx
m_xDictsLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
m_xDictsLB->connect_changed( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );
m_xDictsLB->connect_selection_changed(
LINK(this, HangulHanjaOptionsDialog, DictsLB_SelectHdl));
m_xOkPB->connect_clicked( LINK( this, HangulHanjaOptionsDialog, OkHdl ) );
m_xNewPB->connect_clicked( LINK( this, HangulHanjaOptionsDialog, NewDictHdl ) );

View file

@ -115,7 +115,7 @@ SvBaseLinksDlg::SvBaseLinksDlg(weld::Window * pParent, LinkManager* pMgr, bool b
aUpdateIdle.SetInvokeHandler( LINK( this, SvBaseLinksDlg, UpdateWaitingHdl ) );
aUpdateIdle.SetPriority( TaskPriority::LOWEST );
m_xTbLinks->connect_changed( LINK( this, SvBaseLinksDlg, LinksSelectHdl ) );
m_xTbLinks->connect_selection_changed(LINK(this, SvBaseLinksDlg, LinksSelectHdl));
m_xTbLinks->connect_row_activated( LINK( this, SvBaseLinksDlg, LinksDoubleClickHdl ) );
m_xRbAutomatic->connect_toggled( LINK( this, SvBaseLinksDlg, ToggleHdl ) );
m_xRbManual->connect_toggled( LINK( this, SvBaseLinksDlg, ToggleHdl ) );

View file

@ -196,7 +196,7 @@ SvxMultiPathDialog::SvxMultiPathDialog(weld::Window* pParent)
m_xRadioLB->get_text_height() * 10);
m_xRadioLB->enable_toggle_buttons(weld::ColumnToggleType::Radio);
m_xRadioLB->connect_toggled(LINK(this, SvxMultiPathDialog, CheckHdl_Impl));
m_xRadioLB->connect_changed(LINK(this, SvxMultiPathDialog, SelectHdl_Impl));
m_xRadioLB->connect_selection_changed(LINK(this, SvxMultiPathDialog, SelectHdl_Impl));
m_xAddBtn->connect_clicked(LINK(this, SvxMultiPathDialog, AddHdl_Impl));
m_xDelBtn->connect_clicked(LINK(this, SvxMultiPathDialog, DelHdl_Impl));
@ -213,7 +213,7 @@ SvxPathSelectDialog::SvxPathSelectDialog(weld::Window* pParent)
m_xPathLB->set_size_request(m_xPathLB->get_approximate_digit_width() * 60,
m_xPathLB->get_text_height() * 10);
m_xPathLB->connect_changed(LINK(this, SvxPathSelectDialog, SelectHdl_Impl));
m_xPathLB->connect_selection_changed(LINK(this, SvxPathSelectDialog, SelectHdl_Impl));
m_xAddBtn->connect_clicked(LINK(this, SvxPathSelectDialog, AddHdl_Impl));
m_xDelBtn->connect_clicked(LINK(this, SvxPathSelectDialog, DelHdl_Impl));

View file

@ -39,7 +39,7 @@ SvPasteObjectDialog::SvPasteObjectDialog(weld::Window* pParent)
m_xLbInsertList->get_height_rows(6));
m_xOKButton->set_sensitive(false);
ObjectLB().connect_changed(LINK(this, SvPasteObjectDialog, SelectHdl));
ObjectLB().connect_selection_changed(LINK(this, SvPasteObjectDialog, SelectHdl));
ObjectLB().connect_row_activated(LINK( this, SvPasteObjectDialog, DoubleClickHdl));
}

View file

@ -399,7 +399,7 @@ SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, OUString language)
m_xScriptsBox->set_size_request(m_xScriptsBox->get_approximate_digit_width() * 45,
m_xScriptsBox->get_height_rows(12));
m_xScriptsBox->connect_changed( LINK( this, SvxScriptOrgDialog, ScriptSelectHdl ) );
m_xScriptsBox->connect_selection_changed(LINK(this, SvxScriptOrgDialog, ScriptSelectHdl));
m_xScriptsBox->connect_expanding(LINK( this, SvxScriptOrgDialog, ExpandingHdl ) );
m_xRunButton->connect_clicked( LINK( this, SvxScriptOrgDialog, ButtonHdl ) );
m_xCloseButton->connect_clicked( LINK( this, SvxScriptOrgDialog, ButtonHdl ) );

View file

@ -259,7 +259,8 @@ SvxThesaurusDialog::SvxThesaurusDialog(
m_xWordCB->set_entry_completion(false);
m_xWordCB->connect_changed( LINK( this, SvxThesaurusDialog, WordSelectHdl_Impl ) );
m_xLangLB->connect_changed( LINK( this, SvxThesaurusDialog, LanguageHdl_Impl ) );
m_xAlternativesCT->connect_changed( LINK( this, SvxThesaurusDialog, AlternativesSelectHdl_Impl ));
m_xAlternativesCT->connect_selection_changed(
LINK(this, SvxThesaurusDialog, AlternativesSelectHdl_Impl));
m_xAlternativesCT->connect_row_activated( LINK( this, SvxThesaurusDialog, AlternativesDoubleClickHdl_Impl ));
m_xAlternativesCT->connect_key_press(LINK(this, SvxThesaurusDialog, KeyInputHdl));

View file

@ -71,7 +71,7 @@ public:
void connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xTreeView->connect_changed(rLink);
m_xTreeView->connect_selection_changed(rLink);
}
void connect_popup_menu(const Link<const CommandEvent&, bool>& rLink)
{
@ -149,7 +149,7 @@ public:
void connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xTreeView->connect_changed(rLink);
m_xTreeView->connect_selection_changed(rLink);
}
weld::TreeView& get_widget() { return *m_xTreeView; }
void ClearAll();

View file

@ -116,7 +116,10 @@ class CuiConfigFunctionListBox
public:
CuiConfigFunctionListBox(std::unique_ptr<weld::TreeView> xTreeView);
void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); }
void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xTreeView->connect_changed(rLink); }
void connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xTreeView->connect_selection_changed(rLink);
}
void connect_popup_menu(const Link<const CommandEvent&, bool>& rLink) { m_xTreeView->connect_popup_menu(rLink); }
void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xTreeView->connect_row_activated(rLink); }
void freeze() { m_xTreeView->freeze(); }
@ -210,7 +213,10 @@ class CuiConfigGroupListBox
public:
CuiConfigGroupListBox(std::unique_ptr<weld::TreeView> xTreeView);
void set_sensitive(bool bSensitive) { m_xTreeView->set_sensitive(bSensitive); }
void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xTreeView->connect_changed(rLink); }
void connect_changed(const Link<weld::TreeView&, void>& rLink)
{
m_xTreeView->connect_selection_changed(rLink);
}
void set_size_request(int nWidth, int nHeight) { m_xTreeView->set_size_request(nWidth, nHeight); }
weld::TreeView& get_widget() { return *m_xTreeView; }
~CuiConfigGroupListBox();

View file

@ -551,6 +551,8 @@ private:
void CalculateBitmapPresetSize();
sal_Int32 SearchBitmapList(std::u16string_view rBitmapName);
sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
tools::Long AddBitmap(const GraphicObject& rGraphicObject, const OUString& rName,
bool bOnlyForThisDocument = false);
public:
SvxBitmapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);

View file

@ -79,7 +79,8 @@ namespace offapp
m_xEnablePooling->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) );
m_xDriverPoolingEnabled->connect_toggled( LINK(this, ConnectionPoolOptionsPage, OnEnabledDisabled) );
m_xDriverList->connect_changed(LINK(this, ConnectionPoolOptionsPage, OnDriverRowChanged));
m_xDriverList->connect_selection_changed(
LINK(this, ConnectionPoolOptionsPage, OnDriverRowChanged));
m_xTimeout->connect_value_changed(LINK(this, ConnectionPoolOptionsPage, OnSpinValueChanged));
}

View file

@ -112,7 +112,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage(weld::Container* pPage, wel
m_xPathBox->make_sorted();
m_xPathBox->connect_row_activated( LINK( this, DbRegistrationOptionsPage, PathBoxDoubleClickHdl ) );
m_xPathBox->connect_changed( LINK( this, DbRegistrationOptionsPage, PathSelect_Impl ) );
m_xPathBox->connect_selection_changed(LINK(this, DbRegistrationOptionsPage, PathSelect_Impl));
m_xPathBox->set_help_id(HID_DBPATH_CTL_PATH);
}

View file

@ -72,7 +72,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage(weld::Container* pPage, weld::DialogCon
Link<weld::ComboBox&,void> aLink2(LINK(this, SvxFontSubstTabPage, SelectComboBoxHdl));
Link<weld::Button&,void> aClickLink(LINK(this, SvxFontSubstTabPage, ClickHdl));
m_xCheckLB->connect_changed(LINK(this, SvxFontSubstTabPage, TreeListBoxSelectHdl));
m_xCheckLB->connect_selection_changed(LINK(this, SvxFontSubstTabPage, TreeListBoxSelectHdl));
m_xCheckLB->connect_column_clicked(LINK(this, SvxFontSubstTabPage, HeaderBarClick));
m_xUseTableCB->connect_toggled(LINK(this, SvxFontSubstTabPage, ToggleHdl));
m_xFont1CB->connect_changed(aLink2);

View file

@ -243,8 +243,8 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(weld::Window* pParent, std::u16
if (LinguMgr::GetDictionaryList().is())
aDics = LinguMgr::GetDictionaryList()->getDictionaries();
m_xSingleColumnLB->connect_changed(LINK(this, SvxEditDictionaryDialog, SelectHdl));
m_xDoubleColumnLB->connect_changed(LINK(this, SvxEditDictionaryDialog, SelectHdl));
m_xSingleColumnLB->connect_selection_changed(LINK(this, SvxEditDictionaryDialog, SelectHdl));
m_xDoubleColumnLB->connect_selection_changed(LINK(this, SvxEditDictionaryDialog, SelectHdl));
std::vector<int> aWidths
{

View file

@ -89,7 +89,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage(weld::Container* pPage, weld::DialogContr
m_xJavaList->enable_toggle_buttons(weld::ColumnToggleType::Radio);
m_xJavaList->connect_toggled( LINK( this, SvxJavaOptionsPage, CheckHdl_Impl ) );
m_xJavaList->connect_changed( LINK( this, SvxJavaOptionsPage, SelectHdl_Impl ) );
m_xJavaList->connect_selection_changed(LINK(this, SvxJavaOptionsPage, SelectHdl_Impl));
std::vector<int> aWidths
{
@ -653,7 +653,7 @@ SvxJavaParameterDlg::SvxJavaParameterDlg(weld::Window* pParent)
m_xAssignBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, AssignHdl_Impl ) );
m_xRemoveBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, RemoveHdl_Impl ) );
m_xEditBtn->connect_clicked( LINK( this, SvxJavaParameterDlg, EditHdl_Impl ) );
m_xAssignedList->connect_changed( LINK( this, SvxJavaParameterDlg, SelectHdl_Impl ) );
m_xAssignedList->connect_selection_changed(LINK(this, SvxJavaParameterDlg, SelectHdl_Impl));
m_xAssignedList->connect_row_activated( LINK( this, SvxJavaParameterDlg, DblClickHdl_Impl ) );
ModifyHdl_Impl(*m_xParameterEdit);
@ -814,7 +814,7 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg(weld::Window* pParent)
m_xAddArchiveBtn->connect_clicked( LINK( this, SvxJavaClassPathDlg, AddArchiveHdl_Impl ) );
m_xAddPathBtn->connect_clicked( LINK( this, SvxJavaClassPathDlg, AddPathHdl_Impl ) );
m_xRemoveBtn->connect_clicked( LINK( this, SvxJavaClassPathDlg, RemoveHdl_Impl ) );
m_xPathList->connect_changed( LINK( this, SvxJavaClassPathDlg, SelectHdl_Impl ) );
m_xPathList->connect_selection_changed(LINK(this, SvxJavaClassPathDlg, SelectHdl_Impl));
// set initial focus to path list
m_xPathList->grab_focus();

View file

@ -815,21 +815,21 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController*
m_xLinguDicsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
m_xLinguOptionsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
m_xLinguModulesCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_xLinguModulesCLB->connect_selection_changed(LINK(this, SvxLinguTabPage, SelectHdl_Impl));
m_xLinguModulesCLB->connect_row_activated(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
m_xLinguModulesCLB->connect_toggled(LINK(this, SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl));
m_xLinguModulesEditPB->connect_clicked( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_xLinguOptionsEditPB->connect_clicked( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_xLinguDicsCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_xLinguDicsCLB->connect_selection_changed(LINK(this, SvxLinguTabPage, SelectHdl_Impl));
m_xLinguDicsCLB->connect_toggled(LINK(this, SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl));
m_xLinguDicsNewPB->connect_clicked( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_xLinguDicsEditPB->connect_clicked( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_xLinguDicsDelPB->connect_clicked( LINK( this, SvxLinguTabPage, ClickHdl_Impl ));
m_xLinguOptionsCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_xLinguOptionsCLB->connect_selection_changed(LINK(this, SvxLinguTabPage, SelectHdl_Impl));
m_xLinguOptionsCLB->connect_row_activated(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
m_xMoreDictsLink->connect_activate_link(LINK(this, SvxLinguTabPage, OnLinkClick));
@ -1579,7 +1579,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& r
pDefaultLinguData.reset( new SvxLinguData_Impl( rLinguData ) );
m_xModulesCLB->connect_changed( LINK( this, SvxEditModulesDlg, SelectHdl_Impl ));
m_xModulesCLB->connect_selection_changed(LINK(this, SvxEditModulesDlg, SelectHdl_Impl));
m_xModulesCLB->connect_toggled(LINK(this, SvxEditModulesDlg, BoxCheckButtonHdl_Impl));
m_xClosePB->connect_clicked( LINK( this, SvxEditModulesDlg, ClickHdl_Impl ));

View file

@ -192,7 +192,7 @@ SvxPathTabPage::SvxPathTabPage(weld::Container* pPage, weld::DialogController* p
m_xPathBox->connect_row_activated( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
m_xPathBox->connect_column_clicked(LINK(this, SvxPathTabPage, HeaderBarClick));
m_xPathBox->connect_changed( LINK( this, SvxPathTabPage, PathSelect_Impl ) );
m_xPathBox->connect_selection_changed(LINK(this, SvxPathTabPage, PathSelect_Impl));
m_xPathBox->set_selection_mode(SelectionMode::Multiple);
xDialogListener->SetDialogClosedLink( LINK( this, SvxPathTabPage, DialogClosedHdl ) );

View file

@ -481,7 +481,7 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, bool fromExten
// Init tree and handler
xTreeLB->set_help_id(HID_OFADLG_TREELISTBOX);
xTreeLB->connect_changed(LINK(this, OfaTreeOptionsDialog, ShowPageHdl_Impl));
xTreeLB->connect_selection_changed(LINK(this, OfaTreeOptionsDialog, ShowPageHdl_Impl));
xBackPB->connect_clicked(LINK(this, OfaTreeOptionsDialog, BackHdl_Impl));
xApplyPB->connect_clicked(LINK(this, OfaTreeOptionsDialog, ApplyHdl_Impl));
xOkPB->connect_clicked(LINK(this, OfaTreeOptionsDialog, ApplyHdl_Impl));

View file

@ -31,7 +31,7 @@ TSAURLsDialog::TSAURLsDialog(weld::Window* pParent)
m_xAddBtn->connect_clicked(LINK(this, TSAURLsDialog, AddHdl_Impl));
m_xDeleteBtn->connect_clicked(LINK(this, TSAURLsDialog, DeleteHdl_Impl));
m_xOKBtn->connect_clicked(LINK(this, TSAURLsDialog, OKHdl_Impl));
m_xURLListBox->connect_changed(LINK(this, TSAURLsDialog, SelectHdl));
m_xURLListBox->connect_selection_changed(LINK(this, TSAURLsDialog, SelectHdl));
try
{

View file

@ -57,7 +57,8 @@ WebConnectionInfoDialog::WebConnectionInfoDialog(weld::Window* pParent)
m_xRemoveBtn->connect_clicked( LINK( this, WebConnectionInfoDialog, RemovePasswordHdl ) );
m_xRemoveAllBtn->connect_clicked( LINK( this, WebConnectionInfoDialog, RemoveAllPasswordsHdl ) );
m_xChangeBtn->connect_clicked( LINK( this, WebConnectionInfoDialog, ChangePasswordHdl ) );
m_xPasswordsLB->connect_changed( LINK( this, WebConnectionInfoDialog, EntrySelectedHdl ) );
m_xPasswordsLB->connect_selection_changed(
LINK(this, WebConnectionInfoDialog, EntrySelectedHdl));
m_xRemoveBtn->set_sensitive( false );
m_xChangeBtn->set_sensitive( false );

View file

@ -382,7 +382,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOptionsPage(weld::Container* pPage, weld::D
, m_xCheckLB(m_xBuilder->weld_tree_view(u"list"_ustr))
, m_xEditPB(m_xBuilder->weld_button(u"edit"_ustr))
{
m_xCheckLB->connect_changed(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl));
m_xCheckLB->connect_selection_changed(LINK(this, OfaSwAutoFmtOptionsPage, SelectHdl));
m_xCheckLB->connect_row_activated(LINK(this, OfaSwAutoFmtOptionsPage, DoubleClickEditHdl));
std::vector<int> aWidths
@ -728,7 +728,7 @@ OfaAutocorrReplacePage::OfaAutocorrReplacePage(weld::Container* pPage, weld::Dia
m_aReplaceFixedWidths.push_back(nColWidth);
m_aReplaceFixedWidths.push_back(nColWidth);
m_xReplaceTLB->connect_changed( LINK(this, OfaAutocorrReplacePage, SelectHdl) );
m_xReplaceTLB->connect_selection_changed(LINK(this, OfaAutocorrReplacePage, SelectHdl));
m_xNewReplacePB->connect_clicked( LINK(this, OfaAutocorrReplacePage, NewDelButtonHdl) );
m_xDeleteReplacePB->connect_clicked( LINK(this, OfaAutocorrReplacePage, NewDelButtonHdl) );
m_xShortED->connect_changed( LINK(this, OfaAutocorrReplacePage, ModifyHdl) );
@ -1241,8 +1241,8 @@ OfaAutocorrExceptPage::OfaAutocorrExceptPage(weld::Container* pPage, weld::Dialo
m_xNewDoublePB->connect_clicked(LINK(this, OfaAutocorrExceptPage, NewDelButtonHdl));
m_xDelDoublePB->connect_clicked(LINK(this, OfaAutocorrExceptPage, NewDelButtonHdl));
m_xAbbrevLB->connect_changed(LINK(this, OfaAutocorrExceptPage, SelectHdl));
m_xDoubleCapsLB->connect_changed(LINK(this, OfaAutocorrExceptPage, SelectHdl));
m_xAbbrevLB->connect_selection_changed(LINK(this, OfaAutocorrExceptPage, SelectHdl));
m_xDoubleCapsLB->connect_selection_changed(LINK(this, OfaAutocorrExceptPage, SelectHdl));
m_xAbbrevED->connect_changed(LINK(this, OfaAutocorrExceptPage, ModifyHdl));
m_xDoubleCapsED->connect_changed(LINK(this, OfaAutocorrExceptPage, ModifyHdl));
@ -2180,7 +2180,7 @@ OfaSmartTagOptionsTabPage::OfaSmartTagOptionsTabPage(weld::Container* pPage, wel
// set the handlers:
m_xMainCB->connect_toggled(LINK(this, OfaSmartTagOptionsTabPage, CheckHdl));
m_xPropertiesPB->connect_clicked(LINK(this, OfaSmartTagOptionsTabPage, ClickHdl));
m_xSmartTagTypesLB->connect_changed(LINK(this, OfaSmartTagOptionsTabPage, SelectHdl));
m_xSmartTagTypesLB->connect_selection_changed(LINK(this, OfaSmartTagOptionsTabPage, SelectHdl));
}
OfaSmartTagOptionsTabPage::~OfaSmartTagOptionsTabPage()

View file

@ -3078,8 +3078,8 @@ void SvxCharTwoLinesPage::Initialize()
m_xTwoLinesBtn->connect_toggled(LINK(this, SvxCharTwoLinesPage, TwoLinesHdl_Impl));
Link<weld::TreeView&,void> aLink = LINK(this, SvxCharTwoLinesPage, CharacterMapHdl_Impl);
m_xStartBracketLB->connect_changed(aLink);
m_xEndBracketLB->connect_changed(aLink);
m_xStartBracketLB->connect_selection_changed(aLink);
m_xEndBracketLB->connect_selection_changed(aLink);
SvxFont& rFont = GetPreviewFont();
SvxFont& rCJKFont = GetPreviewCJKFont();

View file

@ -332,7 +332,7 @@ void SfxMacroTabPage::InitAndSetHandler()
mpImpl->m_xAssignPB->connect_clicked(LINK(this, SfxMacroTabPage, AssignDeleteClickHdl_Impl));
rListBox.connect_row_activated(aLnk);
rListBox.connect_changed(LINK(this, SfxMacroTabPage, SelectEvent_Impl));
rListBox.connect_selection_changed(LINK(this, SfxMacroTabPage, SelectEvent_Impl));
mpImpl->m_xGroupLB->connect_changed(LINK(this, SfxMacroTabPage, SelectGroup_Impl));
mpImpl->m_xMacroLB->connect_changed(LINK(this, SfxMacroTabPage, SelectMacro_Impl));

View file

@ -275,9 +275,9 @@ void SvxNumberFormatTabPage::Init_Impl()
Link<weld::TreeView&,void> aLink2 = LINK(this, SvxNumberFormatTabPage, SelFormatTreeListBoxHdl_Impl);
Link<weld::ComboBox&,void> aLink3 = LINK(this, SvxNumberFormatTabPage, SelFormatListBoxHdl_Impl);
m_xLbCategory->connect_changed(aLink2);
m_xLbCategory->connect_selection_changed(aLink2);
m_xLbCategory->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
m_xLbFormat->connect_changed(aLink2);
m_xLbFormat->connect_selection_changed(aLink2);
m_xLbFormat->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));
m_xLbLanguage->connect_changed(aLink3);
m_xLbLanguage->connect_focus_in(LINK(this, SvxNumberFormatTabPage, LostFocusHdl_Impl));

View file

@ -1170,7 +1170,7 @@ SvxNumOptionsTabPage::SvxNumOptionsTabPage(weld::Container* pPage, weld::DialogC
m_xBitmapMB->connect_selected(LINK(this, SvxNumOptionsTabPage, GraphicHdl_Impl));
m_xBitmapMB->connect_toggled(LINK(this, SvxNumOptionsTabPage, PopupActivateHdl_Impl));
m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
m_xLevelLB->connect_changed(LINK(this, SvxNumOptionsTabPage, LevelHdl_Impl));
m_xLevelLB->connect_selection_changed(LINK(this, SvxNumOptionsTabPage, LevelHdl_Impl));
m_xCharFmtLB->connect_changed(LINK(this, SvxNumOptionsTabPage, CharFmtHdl_Impl));
m_xWidthMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl));
m_xHeightMF->connect_value_changed(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl));
@ -2328,7 +2328,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(weld::Container* pPage, weld::Dialo
m_xIndentAtMF->connect_value_changed(LINK(this, SvxNumPositionTabPage, IndentAtHdl_Impl));
m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
m_xLevelLB->connect_changed(LINK(this, SvxNumPositionTabPage, LevelHdl_Impl));
m_xLevelLB->connect_selection_changed(LINK(this, SvxNumPositionTabPage, LevelHdl_Impl));
m_xRelativeCB->connect_toggled(LINK(this, SvxNumPositionTabPage, RelativeHdl_Impl));
m_xStandardPB->connect_clicked(LINK(this, SvxNumPositionTabPage, StandardHdl_Impl));

View file

@ -37,8 +37,10 @@
#include <dialmgr.hxx>
#include <svx/dlgutil.hxx>
#include <svl/intitem.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/opengrf.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/image.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@ -167,9 +169,13 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet )
sal_Int32 nPos( 0 );
if ( !aItem.isPattern() )
{
nPos = SearchBitmapList( aItem.GetGraphicObject() );
if (nPos == -1)
const GraphicObject& aGraphicObj = aItem.GetGraphicObject();
if (aGraphicObj.GetType() != GraphicType::Bitmap)
return;
nPos = SearchBitmapList(aGraphicObj);
if (nPos == -1)
nPos = AddBitmap(aGraphicObj, aItem.GetName(), /*OnlyForThisDocument=*/true);
}
else
{
@ -781,18 +787,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
pDlg.disposeAndClear();
if( !nError )
{
m_pBitmapList->Insert(std::make_unique<XBitmapEntry>(aGraphic, aName), nCount);
sal_Int32 nId = m_xBitmapLB->GetItemId( nCount - 1 );
BitmapEx aBitmap = m_pBitmapList->GetBitmapForPreview( nCount, m_xBitmapLB->GetIconSize() );
m_xBitmapLB->InsertItem( nId + 1, Image(aBitmap), aName );
m_xBitmapLB->SelectItem( nId + 1 );
m_nBitmapListState |= ChangeType::MODIFIED;
ModifyBitmapHdl(m_xBitmapLB.get());
}
AddBitmap(aGraphic, aName);
}
else
{
@ -836,4 +831,31 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(std::u16string_view rBitmapName)
return nPos;
}
tools::Long SvxBitmapTabPage::AddBitmap(const GraphicObject& rGraphicObject, const OUString& rName,
bool bOnlyForThisDocument)
{
const tools::Long nLastPos = m_pBitmapList->Count();
auto xBitmapEntry = std::make_unique<XBitmapEntry>(rGraphicObject, rName);
if (bOnlyForThisDocument)
xBitmapEntry->SetSavingAllowed(false);
m_pBitmapList->Insert(std::move(xBitmapEntry), nLastPos);
BitmapEx aBitmap = m_pBitmapList->GetBitmapForPreview(nLastPos, m_xBitmapLB->GetIconSize());
const sal_uInt16 nHighestId = m_xBitmapLB->GetItemId(nLastPos - 1);
m_xBitmapLB->InsertItem(nHighestId + 1, Image(aBitmap), rName);
m_xBitmapLB->SelectItem(nHighestId + 1);
m_nBitmapListState |= ChangeType::MODIFIED;
ModifyBitmapHdl(m_xBitmapLB.get());
// inform sidebar, etc. that the list of images has changed.
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
if (pViewFrame)
pViewFrame->GetBindings().Invalidate(SID_ATTR_PAGE_BITMAP, /*ClearCacheStatus=*/true);
return nLastPos;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Some files were not shown because too many files have changed in this diff Show more