CWS changehid: resync to m89
This commit is contained in:
commit
9570f4dfff
@ -3,3 +3,4 @@
|
||||
..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl
|
||||
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
|
||||
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
|
||||
..\%__SRC%\misc\ctl.component %_DEST%\xml%_EXT%\ctl.component
|
||||
|
@ -92,59 +92,6 @@ using namespace ::com::sun::star::registry ;
|
||||
return Reference< XInterface >( *(OWeakObject*)(new CLASS( rServiceManager )) ); \
|
||||
}
|
||||
|
||||
//******************************************************************************************************************************
|
||||
#define COMPONENT_INFO(CLASS) \
|
||||
\
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[start]\n" ) \
|
||||
try \
|
||||
{ \
|
||||
/* Set default result of follow operations !!! */ \
|
||||
bReturn = sal_False ; \
|
||||
\
|
||||
/* Do the follow only, if given key is valid ! */ \
|
||||
if ( xKey.is () ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txkey is valid ...\n" ) \
|
||||
/* Build new keyname */ \
|
||||
sKeyName = OUString::createFromAscii( "/" ) ; \
|
||||
sKeyName += CLASS::impl_getStaticImplementationName() ; \
|
||||
sKeyName += OUString::createFromAscii( "/UNO/SERVICES" ); \
|
||||
\
|
||||
/* Create new key with new name. */ \
|
||||
xNewKey = xKey->createKey( sKeyName ); \
|
||||
\
|
||||
/* If this new key valid ... */ \
|
||||
if ( xNewKey.is () ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\txNewkey is valid ...\n" ) \
|
||||
/* Get information about supported services. */ \
|
||||
seqServiceNames = CLASS::impl_getStaticSupportedServiceNames() ; \
|
||||
pArray = seqServiceNames.getArray() ; \
|
||||
nLength = seqServiceNames.getLength() ; \
|
||||
nCounter = 0 ; \
|
||||
\
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tloop ..." ) \
|
||||
/* Then set this information on this key. */ \
|
||||
for ( nCounter = 0; nCounter < nLength; ++nCounter ) \
|
||||
{ \
|
||||
xNewKey->createKey( pArray [nCounter] ); \
|
||||
} \
|
||||
AS_DBG_OUT ( " OK\n" ) \
|
||||
\
|
||||
/* Result of this operations = OK. */ \
|
||||
bReturn = sal_True ; \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xNewKey\n" ) \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\t... leave xKey\n" ) \
|
||||
} \
|
||||
catch( InvalidRegistryException& ) \
|
||||
{ \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t\tInvalidRegistryException detected!!!\n" ) \
|
||||
bReturn = sal_False ; \
|
||||
} \
|
||||
AS_DBG_OUT ( "\tCOMPONENT_INFO():\t[end]\n" )
|
||||
|
||||
//******************************************************************************************************************************
|
||||
#define CREATEFACTORY_ONEINSTANCE(CLASS) \
|
||||
\
|
||||
@ -217,53 +164,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_
|
||||
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________________________________________
|
||||
// write component info to registry
|
||||
//______________________________________________________________________________________________________________
|
||||
|
||||
extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/ ,
|
||||
void* pRegistryKey )
|
||||
{
|
||||
AS_DBG_OUT ( "component_writeInfo():\t[start]\n" )
|
||||
|
||||
// Set default return value for this operation - if it failed.
|
||||
sal_Bool bReturn = sal_False ;
|
||||
|
||||
if ( pRegistryKey != NULL )
|
||||
{
|
||||
AS_DBG_OUT ( "component_writeInfo():\t\tpRegistryKey is valid ... enter scope\n" )
|
||||
|
||||
// Define variables for following macros!
|
||||
// bReturn is set automaticly.
|
||||
Reference< XRegistryKey > xKey( reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
|
||||
Reference< XRegistryKey > xNewKey ;
|
||||
Sequence< OUString > seqServiceNames ;
|
||||
const OUString* pArray ;
|
||||
sal_Int32 nLength ;
|
||||
sal_Int32 nCounter ;
|
||||
OUString sKeyName ;
|
||||
|
||||
//=============================================================================
|
||||
// Add new macro line to register new services.
|
||||
//
|
||||
// !!! ATTENTION !!!
|
||||
// Write no ";" at end of line! (see macro)
|
||||
//=============================================================================
|
||||
COMPONENT_INFO ( FrameControl )
|
||||
COMPONENT_INFO ( ProgressBar )
|
||||
COMPONENT_INFO ( ProgressMonitor )
|
||||
COMPONENT_INFO ( StatusIndicator )
|
||||
//=============================================================================
|
||||
|
||||
AS_DBG_OUT ( "component_writeInfo():\t\t... leave pRegistryKey scope\n" )
|
||||
}
|
||||
|
||||
AS_DBG_OUT ( "component_writeInfo():\t[end]\n" )
|
||||
|
||||
// Return with result of this operation.
|
||||
return bReturn ;
|
||||
}
|
||||
|
||||
//______________________________________________________________________________________________________________
|
||||
// create right component factory
|
||||
//______________________________________________________________________________________________________________
|
||||
|
43
UnoControls/util/ctl.component
Normal file
43
UnoControls/util/ctl.component
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="stardiv.UnoControls.FrameControl">
|
||||
<service name="com.sun.star.frame.FrameControl"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.ProgressBar">
|
||||
<service name="com.sun.star.awt.XProgressBar"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.ProgressMonitor">
|
||||
<service name="com.sun.star.awt.XProgressMonitor"/>
|
||||
</implementation>
|
||||
<implementation name="stardiv.UnoControls.StatusIndicator">
|
||||
<service name="com.sun.star.task.XStatusIndicator"/>
|
||||
</implementation>
|
||||
</component>
|
@ -59,3 +59,11 @@ SHL1LIBS= $(LIB1TARGET)
|
||||
|
||||
# --- Targets ------------------------------------------------------
|
||||
.INCLUDE : target.mk
|
||||
|
||||
ALLTAR : $(MISC)/ctl.component
|
||||
|
||||
$(MISC)/ctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
ctl.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt ctl.component
|
||||
|
@ -142,11 +142,6 @@ public class AccessBridge {
|
||||
return xSingleServiceFactory;
|
||||
}
|
||||
|
||||
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
|
||||
return FactoryHelper.writeRegistryServiceInfo(AccessBridge.class.getName(),
|
||||
_AccessBridge._serviceName, regKey);
|
||||
}
|
||||
|
||||
static public class _AccessBridge implements XTopWindowListener,
|
||||
XInitialization, XComponent {
|
||||
static final String _serviceName = "com.sun.star.accessibility.AccessBridge";
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.Java2"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="org.openoffice.accessibility.AccessBridge">
|
||||
<service name="com.sun.star.accessibility.AccessBridge"/>
|
||||
</implementation>
|
||||
</component>
|
@ -53,3 +53,10 @@ CUSTOMMANIFESTFILE = manifest
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
||||
ALLTAR : $(MISC)/java_uno_accessbridge.component
|
||||
|
||||
$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \
|
||||
$(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component
|
||||
|
@ -5,4 +5,4 @@
|
||||
..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
|
||||
..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
|
||||
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
|
||||
|
||||
..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component
|
||||
|
@ -1989,10 +1989,14 @@ void Document::handleParagraphNotifications()
|
||||
determineVisibleRange();
|
||||
notifyVisibleRangeChanges(aOldVisibleBegin, aOldVisibleEnd,
|
||||
m_xParagraphs->end());
|
||||
Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
|
||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
|
||||
if (xParagraph.is())
|
||||
xParagraph->textChanged();
|
||||
|
||||
if (n < m_xParagraphs->size())
|
||||
{
|
||||
Paragraphs::iterator aIt(m_xParagraphs->begin() + n);
|
||||
::rtl::Reference< ParagraphImpl > xParagraph(getParagraph(aIt));
|
||||
if (xParagraph.is())
|
||||
xParagraph->textChanged();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -1,335 +0,0 @@
|
||||
/*************************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_accessibility.hxx"
|
||||
#include <accessibility/standard/vclxaccessiblelistboxlist.hxx>
|
||||
#include <accessibility/standard/vclxaccessiblelistitem.hxx>
|
||||
#include <accessibility/helper/listboxhelper.hxx>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <tools/debug.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <vcl/lstbox.hxx>
|
||||
#include <vcl/unohelp.hxx>
|
||||
|
||||
#include <toolkit/awt/vclxwindow.hxx>
|
||||
#include <toolkit/helper/convert.hxx>
|
||||
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
#include <unotools/accessiblestatesethelper.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::accessibility;
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
void checkSelection_Impl( sal_Int32 _nIndex, const ListBox& _rListBox, sal_Bool bSelected )
|
||||
throw (::com::sun::star::lang::IndexOutOfBoundsException)
|
||||
{
|
||||
sal_Int32 nCount = bSelected ? (sal_Int32)_rListBox.GetSelectEntryCount()
|
||||
: (sal_Int32)_rListBox.GetEntryCount();
|
||||
if ( _nIndex < 0 || _nIndex >= nCount )
|
||||
throw ::com::sun::star::lang::IndexOutOfBoundsException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VCLXAccessibleListBoxList::VCLXAccessibleListBoxList (VCLXWindow* pVCLWindow,
|
||||
BoxType aBoxType,const Reference< XAccessible >& _xParent)
|
||||
: VCLXAccessibleList (pVCLWindow, aBoxType, _xParent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
VCLXAccessibleListBoxList::~VCLXAccessibleListBoxList (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void VCLXAccessibleListBoxList::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
|
||||
{
|
||||
switch ( rVclWindowEvent.GetId() )
|
||||
{
|
||||
case VCLEVENT_LISTBOX_SCROLLED:
|
||||
UpdateEntryRange_Impl();
|
||||
break;
|
||||
|
||||
case VCLEVENT_LISTBOX_SELECT:
|
||||
if ( !m_bDisableProcessEvent )
|
||||
UpdateSelection_Impl();
|
||||
break;
|
||||
|
||||
default:
|
||||
VCLXAccessibleList::ProcessWindowEvent (rVclWindowEvent);
|
||||
}
|
||||
}
|
||||
|
||||
IMPLEMENT_FORWARD_XINTERFACE2(VCLXAccessibleListBoxList, VCLXAccessibleList, VCLXAccessibleListBoxList_BASE)
|
||||
IMPLEMENT_FORWARD_XTYPEPROVIDER2(VCLXAccessibleListBoxList, VCLXAccessibleList, VCLXAccessibleListBoxList_BASE)
|
||||
|
||||
|
||||
|
||||
//===== XServiceInfo ========================================================
|
||||
|
||||
::rtl::OUString VCLXAccessibleListBoxList::getImplementationName (void)
|
||||
throw (RuntimeException)
|
||||
{
|
||||
return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleListBoxList");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Sequence< ::rtl::OUString > VCLXAccessibleListBoxList::getSupportedServiceNames (void)
|
||||
throw (RuntimeException)
|
||||
{
|
||||
Sequence< ::rtl::OUString > aNames = VCLXAccessibleList::getSupportedServiceNames();
|
||||
sal_Int32 nLength = aNames.getLength();
|
||||
aNames.realloc( nLength + 1 );
|
||||
aNames[nLength] = ::rtl::OUString::createFromAscii(
|
||||
"com.sun.star.accessibility.AccessibleListBoxList");
|
||||
return aNames;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void VCLXAccessibleListBoxList::UpdateSelection_Impl()
|
||||
{
|
||||
uno::Any aOldValue, aNewValue;
|
||||
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
Reference< XAccessible > xNewAcc;
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
USHORT nPos = 0;
|
||||
ListItems::iterator aEnd = m_aAccessibleChildren.end();
|
||||
for ( ListItems::iterator aIter = m_aAccessibleChildren.begin();
|
||||
aIter != aEnd; ++aIter,++nPos)
|
||||
{
|
||||
if ( aIter->is() )
|
||||
{
|
||||
VCLXAccessibleListItem* pItem = static_cast< VCLXAccessibleListItem* >( aIter->get() );
|
||||
// Retrieve the item's index from the list entry.
|
||||
BOOL bNowSelected = pListBox->IsEntryPosSelected (nPos);
|
||||
|
||||
if ( bNowSelected && !pItem->IsSelected() )
|
||||
{
|
||||
xNewAcc = *aIter;
|
||||
aNewValue <<= xNewAcc;
|
||||
m_nLastSelectedPos = nPos;
|
||||
}
|
||||
|
||||
pItem->SetSelected( bNowSelected );
|
||||
}
|
||||
else
|
||||
{ // it could happen that a child was not created before
|
||||
checkEntrySelected(pListBox,nPos,aNewValue,xNewAcc);
|
||||
}
|
||||
}
|
||||
|
||||
USHORT nCount = pListBox->GetEntryCount();
|
||||
if ( nPos < nCount ) // here we have to check the if any other listbox entry is selected
|
||||
{
|
||||
for (; nPos < nCount && !checkEntrySelected(pListBox,nPos,aNewValue,xNewAcc) ;++nPos )
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if ( xNewAcc.is() && pListBox->HasFocus() )
|
||||
{
|
||||
if ( m_nLastSelectedPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
aOldValue <<= getAccessibleChild( (sal_Int32)m_nLastSelectedPos );
|
||||
aNewValue <<= xNewAcc;
|
||||
}
|
||||
}
|
||||
|
||||
if ( aNewValue.hasValue() || aOldValue.hasValue() )
|
||||
NotifyAccessibleEvent(
|
||||
AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
|
||||
aOldValue,
|
||||
aNewValue );
|
||||
|
||||
NotifyAccessibleEvent( AccessibleEventId::SELECTION_CHANGED, Any(), Any() );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// XAccessibleSelection
|
||||
// -----------------------------------------------------------------------------
|
||||
void SAL_CALL VCLXAccessibleListBoxList::selectAccessibleChild( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
sal_Bool bNotify = sal_False;
|
||||
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
checkSelection_Impl( nChildIndex, *pListBox, sal_False );
|
||||
pListBox->SelectEntryPos( (USHORT)nChildIndex, TRUE );
|
||||
// call the select handler, don't handle events in this time
|
||||
m_bDisableProcessEvent = true;
|
||||
pListBox->Select();
|
||||
m_bDisableProcessEvent = false;
|
||||
bNotify = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNotify )
|
||||
UpdateSelection_Impl();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
sal_Bool SAL_CALL VCLXAccessibleListBoxList::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
sal_Bool bRet = sal_False;
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
checkSelection_Impl( nChildIndex, *pListBox, sal_False );
|
||||
bRet = pListBox->IsEntryPosSelected( (USHORT)nChildIndex );
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void SAL_CALL VCLXAccessibleListBoxList::clearAccessibleSelection( ) throw (RuntimeException)
|
||||
{
|
||||
sal_Bool bNotify = sal_False;
|
||||
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
pListBox->SetNoSelection();
|
||||
bNotify = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNotify )
|
||||
UpdateSelection_Impl();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void SAL_CALL VCLXAccessibleListBoxList::selectAllAccessibleChildren( ) throw (RuntimeException)
|
||||
{
|
||||
sal_Bool bNotify = sal_False;
|
||||
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
USHORT nCount = pListBox->GetEntryCount();
|
||||
for ( USHORT i = 0; i < nCount; ++i )
|
||||
pListBox->SelectEntryPos( i, TRUE );
|
||||
// call the select handler, don't handle events in this time
|
||||
m_bDisableProcessEvent = true;
|
||||
pListBox->Select();
|
||||
m_bDisableProcessEvent = false;
|
||||
bNotify = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNotify )
|
||||
UpdateSelection_Impl();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
sal_Int32 SAL_CALL VCLXAccessibleListBoxList::getSelectedAccessibleChildCount( ) throw (RuntimeException)
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
sal_Int32 nCount = 0;
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
nCount = pListBox->GetSelectEntryCount();
|
||||
return nCount;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
Reference< XAccessible > SAL_CALL VCLXAccessibleListBoxList::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
checkSelection_Impl( nSelectedChildIndex, *pListBox, sal_True );
|
||||
return getAccessibleChild( (sal_Int32)pListBox->GetSelectEntryPos( (USHORT)nSelectedChildIndex ) );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void SAL_CALL VCLXAccessibleListBoxList::deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||
{
|
||||
sal_Bool bNotify = sal_False;
|
||||
|
||||
{
|
||||
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
|
||||
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
|
||||
|
||||
ListBox* pListBox = static_cast< ListBox* >( GetWindow() );
|
||||
if ( pListBox )
|
||||
{
|
||||
checkSelection_Impl( nSelectedChildIndex, *pListBox, sal_False );
|
||||
pListBox->SelectEntryPos( (USHORT)nSelectedChildIndex, FALSE );
|
||||
// call the select handler, don't handle events in this time
|
||||
m_bDisableProcessEvent = true;
|
||||
pListBox->Select();
|
||||
m_bDisableProcessEvent = false;
|
||||
bNotify = sal_True;
|
||||
}
|
||||
}
|
||||
|
||||
if ( bNotify )
|
||||
UpdateSelection_Impl();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -76,10 +76,10 @@ public:
|
||||
CommunicationManagerClient( BOOL bUseMultiChannel = FALSE );
|
||||
};
|
||||
|
||||
class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public NAMESPACE_VOS(OThread)
|
||||
class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public vos::OThread
|
||||
{
|
||||
public:
|
||||
CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
|
||||
virtual ~CommunicationLinkViaSocket();
|
||||
|
||||
virtual BOOL IsCommunicationError();
|
||||
@ -101,8 +101,8 @@ protected:
|
||||
virtual BOOL ShutdownCommunication();
|
||||
ULONG nConnectionClosedEventId;
|
||||
ULONG nDataReceivedEventId;
|
||||
NAMESPACE_VOS(OMutex) aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
NAMESPACE_VOS(OMutex) aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMConnectionClosed; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMDataReceived; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
virtual void WaitForShutdown();
|
||||
|
||||
DECL_LINK( ShutdownLink, void* );
|
||||
@ -133,7 +133,7 @@ private:
|
||||
void AddConnection( CommunicationLink *pNewConnection );
|
||||
};
|
||||
|
||||
class CommunicationManagerServerAcceptThread: public NAMESPACE_VOS(OThread)
|
||||
class CommunicationManagerServerAcceptThread: public vos::OThread
|
||||
{
|
||||
public:
|
||||
CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS );
|
||||
@ -145,11 +145,11 @@ protected:
|
||||
|
||||
private:
|
||||
CommunicationManagerServerViaSocket* pMyServer;
|
||||
NAMESPACE_VOS(OAcceptorSocket) *pAcceptorSocket;
|
||||
vos::OAcceptorSocket *pAcceptorSocket;
|
||||
ULONG nPortToListen;
|
||||
USHORT nMaxConnections;
|
||||
ULONG nAddConnectionEventId;
|
||||
NAMESPACE_VOS(OMutex) aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
vos::OMutex aMAddConnection; // Notwendig, da Event verarbeitet werden kann bevor Variable gesetzt ist
|
||||
void CallInfoMsg( InfoString aMsg ){ pMyServer->CallInfoMsg( aMsg ); }
|
||||
CM_InfoType GetInfoType(){ return pMyServer->GetInfoType(); }
|
||||
|
||||
@ -174,7 +174,7 @@ private:
|
||||
ByteString aHostToTalk;
|
||||
ULONG nPortToTalk;
|
||||
protected:
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new CommunicationLinkViaSocket( pCM, pCS ); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -337,14 +337,14 @@ private:
|
||||
ByteString aMyName;
|
||||
|
||||
TCPIO* pTCPIO;
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
|
||||
vos::OStreamSocket *pStreamSocket;
|
||||
|
||||
protected:
|
||||
SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
|
||||
virtual ~SimpleCommunicationLinkViaSocket();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket)* GetStreamSocket() { return pStreamSocket; }
|
||||
void SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket );
|
||||
vos::OStreamSocket* GetStreamSocket() { return pStreamSocket; }
|
||||
void SetStreamSocket( vos::OStreamSocket* pSocket );
|
||||
|
||||
SvStream *pReceiveStream;
|
||||
BOOL DoReceiveDataStream(); /// Recieve DataPacket from Socket
|
||||
@ -358,7 +358,7 @@ protected:
|
||||
class SimpleCommunicationLinkViaSocketWithReceiveCallbacks : public SimpleCommunicationLinkViaSocket
|
||||
{
|
||||
public:
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket );
|
||||
~SimpleCommunicationLinkViaSocketWithReceiveCallbacks();
|
||||
virtual BOOL ReceiveDataStream();
|
||||
protected:
|
||||
@ -371,7 +371,7 @@ class CommonSocketFunctions
|
||||
public:
|
||||
BOOL DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort );
|
||||
protected:
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS )=0;
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS )=0;
|
||||
};
|
||||
|
||||
class SingleCommunicationManagerClientViaSocket : public SingleCommunicationManager, public ICommunicationManagerClient, CommonSocketFunctions
|
||||
@ -387,7 +387,7 @@ private:
|
||||
ByteString aHostToTalk;
|
||||
ULONG nPortToTalk;
|
||||
protected:
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, NAMESPACE_VOS(OConnectorSocket) *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
|
||||
virtual CommunicationLink *CreateCommunicationLink( CommunicationManager *pCM, vos::OConnectorSocket *pCS ){ return new SimpleCommunicationLinkViaSocketWithReceiveCallbacks( pCM, pCS ); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -66,9 +66,9 @@ _SV_SEEK_PTR( nm, AE )
|
||||
|
||||
SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* );
|
||||
|
||||
NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
|
||||
vos::OMutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest
|
||||
|
||||
CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
|
||||
, nConnectionClosedEventId( 0 )
|
||||
, nDataReceivedEventId( 0 )
|
||||
@ -77,7 +77,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM
|
||||
{
|
||||
SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl ));
|
||||
if ( !pMPostUserEvent )
|
||||
pMPostUserEvent = new NAMESPACE_VOS(OMutex);
|
||||
pMPostUserEvent = new vos::OMutex;
|
||||
// this is necassary to prevent the running thread from sending the close event
|
||||
// before the open event has been sent.
|
||||
StartCallback();
|
||||
@ -92,7 +92,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
|
||||
while ( nConnectionClosedEventId || nDataReceivedEventId )
|
||||
GetpApp()->Yield();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
if ( nConnectionClosedEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nConnectionClosedEventId );
|
||||
@ -103,7 +103,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket()
|
||||
}
|
||||
}
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
if ( nDataReceivedEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nDataReceivedEventId );
|
||||
@ -132,7 +132,7 @@ BOOL CommunicationLinkViaSocket::ShutdownCommunication()
|
||||
|
||||
join();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
|
||||
vos::OStreamSocket *pTempSocket = GetStreamSocket();
|
||||
SetStreamSocket( NULL );
|
||||
delete pTempSocket;
|
||||
|
||||
@ -209,8 +209,8 @@ void CommunicationLinkViaSocket::run()
|
||||
SetNewPacketAsCurrent();
|
||||
StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
mlPutDataReceived.Call(this);
|
||||
}
|
||||
}
|
||||
@ -220,8 +220,8 @@ void CommunicationLinkViaSocket::run()
|
||||
|
||||
StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) );
|
||||
}
|
||||
}
|
||||
@ -238,7 +238,7 @@ BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CM
|
||||
long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed );
|
||||
vos::OGuard aGuard( aMConnectionClosed );
|
||||
nConnectionClosedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
|
||||
}
|
||||
ShutdownCommunication();
|
||||
@ -249,7 +249,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG )
|
||||
long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMDataReceived );
|
||||
vos::OGuard aGuard( aMDataReceived );
|
||||
nDataReceivedEventId = 0; // Achtung!! alles andere muß oben gemacht werden.
|
||||
}
|
||||
return CommunicationLink::DataReceived( );
|
||||
@ -453,7 +453,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread(
|
||||
, xmNewConnection( NULL )
|
||||
{
|
||||
if ( !pMPostUserEvent )
|
||||
pMPostUserEvent = new NAMESPACE_VOS(OMutex);
|
||||
pMPostUserEvent = new vos::OMutex;
|
||||
create();
|
||||
}
|
||||
|
||||
@ -480,7 +480,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread(
|
||||
DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread Übersprungen!!!! (wegen Solaris BUG)\n");
|
||||
#endif
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
if ( nAddConnectionEventId )
|
||||
{
|
||||
GetpApp()->RemoveUserEvent( nAddConnectionEventId );
|
||||
@ -500,8 +500,8 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
if ( !nPortToListen )
|
||||
return;
|
||||
|
||||
pAcceptorSocket = new NAMESPACE_VOS(OAcceptorSocket)();
|
||||
NAMESPACE_VOS(OInetSocketAddr) Addr;
|
||||
pAcceptorSocket = new vos::OAcceptorSocket();
|
||||
vos::OInetSocketAddr Addr;
|
||||
Addr.setPort( nPortToListen );
|
||||
pAcceptorSocket->setReuseAddr( 1 );
|
||||
if ( !pAcceptorSocket->bind( Addr ) )
|
||||
@ -514,14 +514,14 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
}
|
||||
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket = NULL;
|
||||
vos::OStreamSocket *pStreamSocket = NULL;
|
||||
|
||||
while ( schedule() )
|
||||
{
|
||||
pStreamSocket = new NAMESPACE_VOS(OStreamSocket);
|
||||
pStreamSocket = new vos::OStreamSocket;
|
||||
switch ( pAcceptorSocket->acceptConnection( *pStreamSocket ) )
|
||||
{
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Ok):
|
||||
case vos::ISocketTypes::TResult_Ok:
|
||||
{
|
||||
pStreamSocket->setTcpNoDelay( 1 );
|
||||
|
||||
@ -531,23 +531,23 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket );
|
||||
xmNewConnection->StartCallback();
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard2( *pMPostUserEvent );
|
||||
nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_TimedOut):
|
||||
case vos::ISocketTypes::TResult_TimedOut:
|
||||
delete pStreamSocket;
|
||||
pStreamSocket = NULL;
|
||||
break;
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Error):
|
||||
case vos::ISocketTypes::TResult_Error:
|
||||
delete pStreamSocket;
|
||||
pStreamSocket = NULL;
|
||||
break;
|
||||
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_Interrupted):
|
||||
case NAMESPACE_VOS(ISocketTypes::TResult_InProgress):
|
||||
case vos::ISocketTypes::TResult_Interrupted:
|
||||
case vos::ISocketTypes::TResult_InProgress:
|
||||
break; // -Wall not handled...
|
||||
}
|
||||
}
|
||||
@ -557,7 +557,7 @@ void CommunicationManagerServerAcceptThread::run()
|
||||
IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG )
|
||||
{
|
||||
{
|
||||
NAMESPACE_VOS(OGuard) aGuard( aMAddConnection );
|
||||
vos::OGuard aGuard( aMAddConnection );
|
||||
nAddConnectionEventId = 0;
|
||||
}
|
||||
pMyServer->AddConnection( xmNewConnection );
|
||||
|
@ -3046,13 +3046,6 @@ BOOL StatementCommand::Execute()
|
||||
nDirFlags = nFlags = Sb_ATTR_HIDDEN | Sb_ATTR_SYSTEM | Sb_ATTR_DIRECTORY;
|
||||
|
||||
// Nur diese Bitmaske ist unter Windows erlaubt
|
||||
#ifdef WIN
|
||||
if( nFlags & ~0x1E )
|
||||
{
|
||||
nDirFlags = 0;
|
||||
StarBASIC::Error( SbERR_BAD_ARGUMENT );
|
||||
}
|
||||
#endif
|
||||
// Sb_ATTR_VOLUME wird getrennt gehandelt
|
||||
if( nDirFlags & Sb_ATTR_VOLUME )
|
||||
aPath = aEntry.GetVolume();
|
||||
@ -3084,31 +3077,7 @@ BOOL StatementCommand::Execute()
|
||||
}
|
||||
DirEntry aNextEntry=(*(pDir))[nDirPos++];
|
||||
aPath = aNextEntry.GetName(); //Full();
|
||||
#ifdef WIN
|
||||
aNextEntry.ToAbs();
|
||||
String sFull(aNextEntry.GetFull());
|
||||
unsigned nFlags;
|
||||
|
||||
if (_dos_getfileattr( sFull.GetStr(), &nFlags ))
|
||||
nErrorcode = FSYS_ERR_NOTEXISTS;
|
||||
else
|
||||
{
|
||||
INT16 nCurFlags = nDirFlags;
|
||||
if( (nCurFlags == Sb_ATTR_NORMAL)
|
||||
&& !(nFlags & ( _A_HIDDEN | _A_SYSTEM | _A_VOLID | _A_SUBDIR ) ) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_HIDDEN) && (nFlags & _A_HIDDEN) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_SYSTEM) && (nFlags & _A_SYSTEM) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_VOLUME) && (nFlags & _A_VOLID) )
|
||||
break;
|
||||
else if( (nCurFlags & Sb_ATTR_DIRECTORY) && (nFlags & _A_SUBDIR) )
|
||||
break;
|
||||
}
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if ( !nErrorcode )
|
||||
|
@ -136,7 +136,7 @@ void CommunicationLink::SetApplication( const ByteString& aApp )
|
||||
}
|
||||
|
||||
|
||||
SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
SimpleCommunicationLinkViaSocket::SimpleCommunicationLinkViaSocket( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: CommunicationLink( pMan )
|
||||
, aCommunicationPartner()
|
||||
, aMyName()
|
||||
@ -158,7 +158,7 @@ SimpleCommunicationLinkViaSocket::~SimpleCommunicationLinkViaSocket()
|
||||
pStreamSocket = NULL;
|
||||
}
|
||||
|
||||
void SimpleCommunicationLinkViaSocket::SetStreamSocket( NAMESPACE_VOS(OStreamSocket)* pSocket )
|
||||
void SimpleCommunicationLinkViaSocket::SetStreamSocket( vos::OStreamSocket* pSocket )
|
||||
{
|
||||
if ( pTCPIO )
|
||||
pTCPIO->SetStreamSocket( pSocket );
|
||||
@ -202,9 +202,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetCommunicationPartner( CM_NameTyp
|
||||
case CM_DOTTED:
|
||||
{
|
||||
rtl::OUString aDotted;
|
||||
NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
|
||||
vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
|
||||
pStreamSocket->getPeerAddr( *pPeerAdr );
|
||||
((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
|
||||
((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
|
||||
delete pPeerAdr;
|
||||
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
@ -234,9 +234,9 @@ ByteString SimpleCommunicationLinkViaSocket::GetMyName( CM_NameType eType )
|
||||
case CM_DOTTED:
|
||||
{
|
||||
rtl::OUString aDotted;
|
||||
NAMESPACE_VOS(OSocketAddr) *pPeerAdr = new NAMESPACE_VOS(OSocketAddr);
|
||||
vos::OSocketAddr *pPeerAdr = new vos::OSocketAddr;
|
||||
pStreamSocket->getLocalAddr( *pPeerAdr );
|
||||
((NAMESPACE_VOS(OInetSocketAddr*))pPeerAdr)->getDottedAddr( aDotted );
|
||||
((vos::OInetSocketAddr*)pPeerAdr)->getDottedAddr( aDotted );
|
||||
delete pPeerAdr;
|
||||
return ByteString( UniString(aDotted), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
@ -352,7 +352,7 @@ BOOL SimpleCommunicationLinkViaSocket::SendHandshake( HandshakeType aHandshakeTy
|
||||
return !bWasError;
|
||||
}
|
||||
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
SimpleCommunicationLinkViaSocketWithReceiveCallbacks::SimpleCommunicationLinkViaSocketWithReceiveCallbacks( CommunicationManager *pMan, vos::OStreamSocket *pSocket )
|
||||
: SimpleCommunicationLinkViaSocket( pMan, pSocket )
|
||||
{
|
||||
}
|
||||
@ -396,7 +396,7 @@ BOOL SimpleCommunicationLinkViaSocketWithReceiveCallbacks::ShutdownCommunication
|
||||
if ( GetStreamSocket() )
|
||||
GetStreamSocket()->close();
|
||||
|
||||
NAMESPACE_VOS(OStreamSocket) *pTempSocket = GetStreamSocket();
|
||||
vos::OStreamSocket *pTempSocket = GetStreamSocket();
|
||||
SetStreamSocket( NULL );
|
||||
delete pTempSocket;
|
||||
|
||||
@ -437,7 +437,7 @@ BOOL CommunicationManager::StartCommunication( ByteString aHost, ULONG nPort )
|
||||
ByteString CommunicationManager::GetMyName( CM_NameType )
|
||||
{
|
||||
rtl::OUString aHostname;
|
||||
NAMESPACE_VOS(OSocketAddr)::getLocalHostname( aHostname );
|
||||
vos::OSocketAddr::getLocalHostname( aHostname );
|
||||
return ByteString( UniString(aHostname), RTL_TEXTENCODING_UTF8 );
|
||||
}
|
||||
|
||||
@ -672,8 +672,8 @@ SingleCommunicationManagerClientViaSocket::SingleCommunicationManagerClientViaSo
|
||||
|
||||
BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICommunicationManagerClient *pCMC, ByteString aHost, ULONG nPort )
|
||||
{
|
||||
NAMESPACE_VOS(OInetSocketAddr) Addr;
|
||||
NAMESPACE_VOS(OConnectorSocket) *pConnSocket;
|
||||
vos::OInetSocketAddr Addr;
|
||||
vos::OConnectorSocket *pConnSocket;
|
||||
|
||||
Addr.setAddr( rtl::OUString( UniString( aHost, RTL_TEXTENCODING_UTF8 ) ) );
|
||||
Addr.setPort( nPort );
|
||||
@ -683,9 +683,9 @@ BOOL CommonSocketFunctions::DoStartCommunication( CommunicationManager *pCM, ICo
|
||||
aTV.Nanosec = 0;
|
||||
do
|
||||
{
|
||||
pConnSocket = new NAMESPACE_VOS(OConnectorSocket)();
|
||||
pConnSocket = new vos::OConnectorSocket();
|
||||
pConnSocket->setTcpNoDelay( 1 );
|
||||
if ( pConnSocket->connect( Addr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
|
||||
if ( pConnSocket->connect( Addr, &aTV ) == vos::ISocketTypes::TResult_Ok )
|
||||
{
|
||||
pConnSocket->setTcpNoDelay( 1 );
|
||||
|
||||
|
@ -63,7 +63,7 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen )
|
||||
|
||||
|
||||
// helper
|
||||
void TCPIO::SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket )
|
||||
void TCPIO::SetStreamSocket( vos::OStreamSocket *pSocket )
|
||||
{
|
||||
vos::OGuard aRGuard( aMSocketReadAccess );
|
||||
vos::OGuard aWGuard( aMSocketWriteAccess );
|
||||
|
@ -36,14 +36,14 @@
|
||||
class TCPIO : public ITransmiter, public IReceiver
|
||||
{
|
||||
private:
|
||||
NAMESPACE_VOS(OStreamSocket) *pStreamSocket;
|
||||
vos::OStreamSocket *pStreamSocket;
|
||||
vos::OMutex aMSocketReadAccess;
|
||||
vos::OMutex aMSocketWriteAccess;
|
||||
|
||||
public:
|
||||
|
||||
///
|
||||
TCPIO( NAMESPACE_VOS(OStreamSocket) *pSocket ):pStreamSocket( pSocket ){}
|
||||
TCPIO( vos::OStreamSocket *pSocket ):pStreamSocket( pSocket ){}
|
||||
virtual ~TCPIO(){}
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
virtual comm_USHORT ReceiveBytes( void* pBuffer, comm_UINT32 nLen );
|
||||
|
||||
// helper
|
||||
void SetStreamSocket( NAMESPACE_VOS(OStreamSocket) *pSocket );
|
||||
void SetStreamSocket( vos::OStreamSocket *pSocket );
|
||||
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@ BOOL HttpRequest::Execute()
|
||||
Init();
|
||||
|
||||
// Open channel to standard redir host
|
||||
NAMESPACE_VOS(OInetSocketAddr) aConnectAddr;
|
||||
vos::OInetSocketAddr aConnectAddr;
|
||||
|
||||
if ( aProxyHost.Len() )
|
||||
{
|
||||
@ -95,8 +95,8 @@ BOOL HttpRequest::Execute()
|
||||
aTV.Seconds = 10; // Warte 10 Sekunden
|
||||
aTV.Nanosec = 0;
|
||||
|
||||
pOutSocket = new NAMESPACE_VOS(OConnectorSocket)();
|
||||
if ( pOutSocket->connect( aConnectAddr, &aTV ) == NAMESPACE_VOS(ISocketTypes::TResult_Ok) )
|
||||
pOutSocket = new vos::OConnectorSocket();
|
||||
if ( pOutSocket->connect( aConnectAddr, &aTV ) == vos::ISocketTypes::TResult_Ok )
|
||||
{
|
||||
// pOutSocket->setTcpNoDelay( 1 );
|
||||
}
|
||||
|
@ -21,3 +21,4 @@ mkdir: %_DEST%\inc%_EXT%\basctl
|
||||
..\uiconfig\basicide\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\menubar\*.xml
|
||||
..\uiconfig\basicide\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\toolbar\*.xml
|
||||
..\uiconfig\basicide\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\BasicIDE\statusbar\*.xml
|
||||
..\%__SRC%\misc\basctl.component %_DEST%\xml%_EXT%\basctl.component
|
||||
|
@ -365,7 +365,7 @@ BOOL ModulWindow::BasicExecute()
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if ( !pMethod || ( nStart < nCurMethodStart ) )
|
||||
else if ( !pMethod || ( nStart < nCurMethodStart && !pM->IsHidden() ) )
|
||||
{
|
||||
pMethod = pM;
|
||||
nCurMethodStart = nStart;
|
||||
|
@ -91,9 +91,7 @@ using namespace ::com::sun::star::io;
|
||||
using namespace ::com::sun::star::resource;
|
||||
using namespace ::com::sun::star::ui::dialogs;
|
||||
|
||||
#if defined(MAC)
|
||||
#define FILTERMASK_ALL "****"
|
||||
#elif defined(OW) || defined(MTF)
|
||||
#if defined(UNX)
|
||||
#define FILTERMASK_ALL "*"
|
||||
#elif defined(PM2)
|
||||
#define FILTERMASK_ALL ""
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include <tools/diagnose_ex.h>
|
||||
#include <sfx2/sfxdefs.hxx>
|
||||
#include <sfx2/signaturestate.hxx>
|
||||
#include <com/sun/star/script/XVBAModuleInfo.hpp>
|
||||
#include <com/sun/star/container/XNameContainer.hpp>
|
||||
#include <com/sun/star/container/XNamed.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
|
||||
TYPEINIT1( BasicIDEShell, SfxViewShell );
|
||||
|
||||
SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) )
|
||||
SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" )
|
||||
{
|
||||
SFX_VIEW_REGISTRATION( BasicDocShell );
|
||||
}
|
||||
|
@ -364,13 +364,23 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
|
||||
SbModuleRef xModule = new SbModule( rModName );
|
||||
xModule->SetSource32( aOUSource );
|
||||
USHORT nCount = xModule->GetMethods()->Count();
|
||||
aSeqMethods.realloc( nCount );
|
||||
|
||||
USHORT nRealCount = nCount;
|
||||
for ( USHORT i = 0; i < nCount; i++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
|
||||
if( pMethod->IsHidden() )
|
||||
--nRealCount;
|
||||
}
|
||||
aSeqMethods.realloc( nRealCount );
|
||||
|
||||
USHORT iTarget = 0;
|
||||
for ( USHORT i = 0 ; i < nCount; ++i )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)xModule->GetMethods()->Get( i );
|
||||
if( pMethod->IsHidden() )
|
||||
continue;
|
||||
DBG_ASSERT( pMethod, "Method not found! (NULL)" );
|
||||
aSeqMethods.getArray()[ i ] = pMethod->GetName();
|
||||
aSeqMethods.getArray()[ iTarget++ ] = pMethod->GetName();
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,7 +402,7 @@ BOOL HasMethod( const ScriptDocument& rDocument, const String& rLibName, const S
|
||||
if ( pMethods )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pMethods->Find( rMethName, SbxCLASS_METHOD );
|
||||
if ( pMethod )
|
||||
if ( pMethod && !pMethod->IsHidden() )
|
||||
bHasMethod = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -52,9 +52,8 @@
|
||||
#include <comphelper/componentcontext.hxx>
|
||||
#include <map>
|
||||
#include <com/sun/star/script/ModuleType.hpp>
|
||||
#include <com/sun/star/script/XVBAModuleInfo.hpp>
|
||||
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
|
||||
#include <com/sun/star/container/XNameContainer.hpp>
|
||||
#include <com/sun/star/script/XVBAModuleInfo.hpp>
|
||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/container/XNamed.hpp>
|
||||
|
||||
@ -65,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
||||
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
||||
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) )
|
||||
{
|
||||
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
|
||||
@ -86,8 +85,8 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
|
||||
|
||||
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const String& rModName )
|
||||
{
|
||||
sal_Int32 nType = com::sun::star::script::ModuleType::NORMAL;
|
||||
uno::Reference< script::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
||||
sal_Int32 nType = script::ModuleType::NORMAL;
|
||||
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
|
||||
if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( rModName ) )
|
||||
{
|
||||
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
|
||||
|
@ -554,11 +554,15 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
|
||||
// Die Macros sollen in der Reihenfolge angezeigt werden,
|
||||
// wie sie im Modul stehen.
|
||||
MacroList aMacros;
|
||||
USHORT nMacros = pModule->GetMethods()->Count();
|
||||
USHORT nMethod;
|
||||
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
|
||||
USHORT nMacroCount = pModule->GetMethods()->Count();
|
||||
USHORT nRealMacroCount = 0;
|
||||
USHORT iMeth;
|
||||
for ( iMeth = 0; iMeth < nMacroCount; iMeth++ )
|
||||
{
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( nMethod );
|
||||
SbMethod* pMethod = (SbMethod*)pModule->GetMethods()->Get( iMeth );
|
||||
if( pMethod->IsHidden() )
|
||||
continue;
|
||||
++nRealMacroCount;
|
||||
DBG_ASSERT( pMethod, "Methode nicht gefunden! (NULL)" );
|
||||
ULONG nPos = LIST_APPEND;
|
||||
// Eventuell weiter vorne ?
|
||||
@ -580,8 +584,8 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
|
||||
}
|
||||
|
||||
aMacroBox.SetUpdateMode( FALSE );
|
||||
for ( nMethod = 0; nMethod < nMacros; nMethod++ )
|
||||
aMacroBox.InsertEntry( aMacros.GetObject( nMethod )->GetName() );
|
||||
for ( iMeth = 0; iMeth < nRealMacroCount; iMeth++ )
|
||||
aMacroBox.InsertEntry( aMacros.GetObject( iMeth )->GetName() );
|
||||
aMacroBox.SetUpdateMode( TRUE );
|
||||
|
||||
if ( aMacroBox.GetEntryCount() )
|
||||
|
@ -52,28 +52,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
|
||||
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
|
||||
}
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT
|
||||
sal_Bool SAL_CALL component_writeInfo( void* pServiceManager ,
|
||||
void* pRegistryKey )
|
||||
{
|
||||
(void)pServiceManager;
|
||||
|
||||
Reference< ::registry::XRegistryKey >
|
||||
xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
|
||||
|
||||
OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
|
||||
OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
|
||||
|
||||
sal_Int32 i;
|
||||
Reference< ::registry::XRegistryKey > xNewKey;
|
||||
xNewKey = xKey->createKey( aDelimiter + SIDEModel::getImplementationName_Static() + aUnoServices );
|
||||
Sequence< OUString > aServices = SIDEModel::getSupportedServiceNames_Static();
|
||||
for(i = 0; i < aServices.getLength(); i++ )
|
||||
xNewKey->createKey( aServices.getConstArray()[i] );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT
|
||||
void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
|
||||
void* pServiceManager,
|
||||
|
@ -53,8 +53,8 @@
|
||||
#include <com/sun/star/frame/XModel2.hpp>
|
||||
#include <com/sun/star/awt/XWindow2.hpp>
|
||||
#include <com/sun/star/document/XEmbeddedScripts.hpp>
|
||||
#include <com/sun/star/script/XVBAModuleInfo.hpp>
|
||||
#include <com/sun/star/script/XVBACompat.hpp>
|
||||
#include <com/sun/star/script/vba/XVBACompatibility.hpp>
|
||||
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
|
||||
/** === end UNO includes === **/
|
||||
|
||||
#include <sfx2/objsh.hxx>
|
||||
@ -142,8 +142,8 @@ namespace basctl
|
||||
using ::com::sun::star::document::XEventBroadcaster;
|
||||
using ::com::sun::star::document::XEmbeddedScripts;
|
||||
using ::com::sun::star::script::ModuleInfo;
|
||||
using ::com::sun::star::script::XVBAModuleInfo;
|
||||
using ::com::sun::star::script::XVBACompat;
|
||||
using ::com::sun::star::script::vba::XVBACompatibility;
|
||||
using ::com::sun::star::script::vba::XVBAModuleInfo;
|
||||
/** === end UNO using === **/
|
||||
namespace MacroExecMode = ::com::sun::star::document::MacroExecMode;
|
||||
namespace FrameSearchFlag = ::com::sun::star::frame::FrameSearchFlag;
|
||||
@ -456,9 +456,9 @@ namespace basctl
|
||||
#ifdef FUTURE_VBA_CWS
|
||||
if ( !isApplication() )
|
||||
{
|
||||
Reference< XVBACompat > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
|
||||
Reference< XVBACompatibility > xVBACompat( getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
|
||||
if ( xVBACompat.is() )
|
||||
bResult = xVBACompat->getVBACompatModeOn();
|
||||
bResult = xVBACompat->getVBACompatibilityMode();
|
||||
}
|
||||
#endif
|
||||
return bResult;
|
||||
|
34
basctl/util/basctl.component
Normal file
34
basctl/util/basctl.component
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.basic.BasicIDE">
|
||||
<service name="com.sun.star.script.BasicIDE"/>
|
||||
</implementation>
|
||||
</component>
|
@ -4,7 +4,6 @@ UDK_3_0_0 {
|
||||
basicide_macro_organizer;
|
||||
basicide_handle_basic_error;
|
||||
component_getImplementationEnvironment;
|
||||
component_writeInfo;
|
||||
component_getFactory;
|
||||
local:
|
||||
*;
|
||||
|
@ -103,3 +103,11 @@ RESLIB1SRSFILES= $(SRSFILELIST)
|
||||
|
||||
.ENDIF # "$(header)" == ""
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/basctl.component
|
||||
|
||||
$(MISC)/basctl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
basctl.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt basctl.component
|
||||
|
@ -129,12 +129,12 @@ static string trim_string( const string& rString )
|
||||
{
|
||||
string temp = rString;
|
||||
|
||||
while ( temp.length() && temp[0] == ' ' || temp[0] == '\t' )
|
||||
while ( temp.length() && (temp[0] == ' ' || temp[0] == '\t') )
|
||||
temp.erase( 0, 1 );
|
||||
|
||||
string::size_type len = temp.length();
|
||||
|
||||
while ( len && temp[len-1] == ' ' || temp[len-1] == '\t' )
|
||||
while ( len && (temp[len-1] == ' ' || temp[len-1] == '\t') )
|
||||
{
|
||||
temp.erase( len - 1, 1 );
|
||||
len = temp.length();
|
||||
|
@ -1366,133 +1366,6 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*, EMPTYARG
|
||||
return 0;
|
||||
}
|
||||
|
||||
::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL )
|
||||
{
|
||||
::rtl::OUString aLabel;
|
||||
if ( aCmdURL.getLength() )
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
|
||||
if ( xNameAccess.is() )
|
||||
{
|
||||
uno::Reference< container::XNameAccess > xUICommandLabels;
|
||||
const ::rtl::OUString aModule( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) );
|
||||
uno::Any a = xNameAccess->getByName( aModule );
|
||||
uno::Reference< container::XNameAccess > xUICommands;
|
||||
a >>= xUICommandLabels;
|
||||
rtl::OUString aStr;
|
||||
uno::Sequence< beans::PropertyValue > aPropSeq;
|
||||
a = xUICommandLabels->getByName( aCmdURL );
|
||||
if ( a >>= aPropSeq )
|
||||
{
|
||||
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
|
||||
{
|
||||
if ( aPropSeq[i].Name.equalsAscii( "Name" ))
|
||||
{
|
||||
aPropSeq[i].Value >>= aStr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
aLabel = aStr;
|
||||
}
|
||||
}
|
||||
catch ( uno::Exception& )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
return aLabel;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
String SfxAcceleratorConfigPage::GetFunctionName(KeyFuncType eType) const
|
||||
{
|
||||
::rtl::OUStringBuffer sName(256);
|
||||
sName.appendAscii("\"");
|
||||
switch(eType)
|
||||
{
|
||||
case KEYFUNC_NEW :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:NewDoc") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_OPEN :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Open") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_SAVE :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Save") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_SAVEAS :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SaveAs") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_PRINT :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Print") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_CLOSE :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Close") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_QUIT :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Quit") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_CUT :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Cut") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_COPY :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Copy") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_PASTE :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Paste") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_UNDO :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Undo") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_REDO :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Redo") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_DELETE :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Delete") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_REPEAT :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Repeat") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_FIND :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Search") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_FINDBACKWARD :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:SearchBackwards") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_PROPERTIES :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Options") ) );
|
||||
break;
|
||||
|
||||
case KEYFUNC_FRONT :
|
||||
sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:ToFront") ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sName.appendAscii("\"");
|
||||
return String(sName.makeStringAndClear());
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const String& rTitle )
|
||||
{
|
||||
@ -1573,37 +1446,6 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet& rSet )
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
void SfxAcceleratorConfigPage::SelectMacro(const SfxMacroInfoItem *pItem)
|
||||
{
|
||||
m_pMacroInfoItem = pItem;
|
||||
pGroupLBox->SelectMacro( pItem );
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
void SfxAcceleratorConfigPage::CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr,
|
||||
const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr)
|
||||
{
|
||||
const css::uno::Sequence< css::awt::KeyEvent > lKeys = xSourceAccMgr->getAllKeyEvents();
|
||||
sal_Int32 c = lKeys.getLength();
|
||||
sal_Int32 i = 0;
|
||||
for (i=0; i<c; ++i)
|
||||
{
|
||||
const css::awt::KeyEvent& rKey = lKeys[i];
|
||||
::rtl::OUString sCommand = xSourceAccMgr->getCommandByKeyEvent(rKey);
|
||||
xTargetAccMgr->setKeyEvent(rKey, sCommand);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
KeyCode SfxAcceleratorConfigPage::MapPosToKeyCode(USHORT nPos) const
|
||||
{
|
||||
TAccInfo* pEntry = (TAccInfo*)aEntriesBox.GetEntry(0, nPos)->GetUserData();
|
||||
KeyCode aCode(KEYCODE_ARRAY[pEntry->m_nKeyPos] & 0xFFF ,
|
||||
KEYCODE_ARRAY[pEntry->m_nKeyPos] & (KEY_SHIFT | KEY_MOD2));
|
||||
return aCode;
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
USHORT SfxAcceleratorConfigPage::MapKeyCodeToPos(const KeyCode& aKey) const
|
||||
{
|
||||
|
@ -143,6 +143,8 @@ namespace container = com::sun::star::container;
|
||||
namespace beans = com::sun::star::beans;
|
||||
namespace graphic = com::sun::star::graphic;
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
|
||||
void printPropertySet(
|
||||
const OUString& prefix,
|
||||
const uno::Reference< beans::XPropertySet >& xPropSet )
|
||||
@ -207,6 +209,8 @@ void printEntries(SvxEntries* entries)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
OUString
|
||||
stripHotKey( const OUString& str )
|
||||
{
|
||||
@ -895,11 +899,6 @@ void SvxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
|
||||
}
|
||||
}
|
||||
|
||||
void SvxConfigDialog::ActivateTabPage( USHORT nSlotId )
|
||||
{
|
||||
(void)nSlotId;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* The SaveInData class is used to hold data for entries in the Save In
|
||||
@ -1154,7 +1153,11 @@ bool MenuSaveInData::LoadSubMenus(
|
||||
const OUString& rBaseTitle,
|
||||
SvxConfigEntry* pParentData )
|
||||
{
|
||||
SvxEntries* pEntries = pParentData->GetEntries();
|
||||
SvxEntries* pEntries = pParentData->GetEntries();
|
||||
|
||||
// Don't access non existing menu configuration!
|
||||
if ( !xMenuSettings.is() )
|
||||
return true;
|
||||
|
||||
for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ )
|
||||
{
|
||||
@ -2567,17 +2570,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
|
||||
SvxConfigEntry* pMenuData = GetTopLevelSelection();
|
||||
|
||||
PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu();
|
||||
pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
|
||||
pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
|
||||
pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
|
||||
|
||||
SvxEntries* pEntries = pMenuData->GetEntries();
|
||||
SvxEntries::const_iterator iter = pEntries->begin();
|
||||
|
||||
for ( ; iter != pEntries->end(); iter++ )
|
||||
if ( pMenuData )
|
||||
{
|
||||
SvxConfigEntry* pEntry = *iter;
|
||||
InsertEntryIntoUI( pEntry );
|
||||
pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
|
||||
pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
|
||||
pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
|
||||
|
||||
SvxEntries* pEntries = pMenuData->GetEntries();
|
||||
SvxEntries::const_iterator iter = pEntries->begin();
|
||||
|
||||
for ( ; iter != pEntries->end(); iter++ )
|
||||
{
|
||||
SvxConfigEntry* pEntry = *iter;
|
||||
InsertEntryIntoUI( pEntry );
|
||||
}
|
||||
}
|
||||
|
||||
UpdateButtonStates();
|
||||
@ -3028,70 +3034,6 @@ SvxConfigEntry* SvxMainMenuOrganizerDialog::GetSelectedEntry()
|
||||
return (SvxConfigEntry*)aMenuListBox.FirstSelected()->GetUserData();
|
||||
}
|
||||
|
||||
SvxConfigEntry::SvxConfigEntry(
|
||||
const uno::Sequence< beans::PropertyValue >& rProperties,
|
||||
const uno::Reference< container::XNameAccess >& rCommandToLabelMap )
|
||||
:
|
||||
nId( 1 ),
|
||||
bPopUp( FALSE ),
|
||||
bStrEdited( FALSE ),
|
||||
bIsUserDefined( FALSE ),
|
||||
bIsMain( FALSE ),
|
||||
bIsParentData( FALSE ),
|
||||
bIsVisible( TRUE ),
|
||||
nStyle( 0 ),
|
||||
pEntries( 0 )
|
||||
{
|
||||
sal_uInt16 nType( css::ui::ItemType::DEFAULT );
|
||||
|
||||
for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ )
|
||||
{
|
||||
if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL ))
|
||||
{
|
||||
rProperties[i].Value >>= aCommand;
|
||||
}
|
||||
else if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ))
|
||||
{
|
||||
rProperties[i].Value >>= aLabel;
|
||||
}
|
||||
else if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE ))
|
||||
{
|
||||
rProperties[i].Value >>= nType;
|
||||
}
|
||||
}
|
||||
|
||||
if ( nType == css::ui::ItemType::DEFAULT )
|
||||
{
|
||||
uno::Any a;
|
||||
try
|
||||
{
|
||||
a = rCommandToLabelMap->getByName( aCommand );
|
||||
bIsUserDefined = FALSE;
|
||||
}
|
||||
catch ( container::NoSuchElementException& )
|
||||
{
|
||||
bIsUserDefined = TRUE;
|
||||
}
|
||||
|
||||
// If custom label not set retrieve it from the command to info service
|
||||
if ( aLabel.equals( OUString() ) )
|
||||
{
|
||||
uno::Sequence< beans::PropertyValue > aPropSeq;
|
||||
if ( a >>= aPropSeq )
|
||||
{
|
||||
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
|
||||
{
|
||||
if ( aPropSeq[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL ) )
|
||||
{
|
||||
aPropSeq[i].Value >>= aLabel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const OUString&
|
||||
SvxConfigEntry::GetHelpText()
|
||||
{
|
||||
@ -3106,127 +3048,6 @@ SvxConfigEntry::GetHelpText()
|
||||
return aHelpText;
|
||||
}
|
||||
|
||||
uno::Sequence< beans::PropertyValue >
|
||||
SvxConfigEntry::GetProperties(
|
||||
const uno::Reference< container::XNameAccess >& rCommandToLabelMap )
|
||||
{
|
||||
if ( IsSeparator() )
|
||||
{
|
||||
uno::Sequence< beans::PropertyValue > aPropSeq( 1 );
|
||||
|
||||
aPropSeq[0].Name = OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ) );
|
||||
aPropSeq[0].Value <<= css::ui::ItemType::SEPARATOR_LINE;
|
||||
|
||||
return aPropSeq;
|
||||
}
|
||||
|
||||
static const OUString aDescriptorCommandURL (
|
||||
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ) );
|
||||
|
||||
static const OUString aDescriptorType(
|
||||
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ) );
|
||||
|
||||
static const OUString aDescriptorLabel(
|
||||
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL ) );
|
||||
|
||||
uno::Sequence< beans::PropertyValue > aPropSeq( 3 );
|
||||
|
||||
aPropSeq[0].Name = aDescriptorCommandURL;
|
||||
aPropSeq[0].Value <<= rtl::OUString( GetCommand() );
|
||||
|
||||
aPropSeq[1].Name = aDescriptorType;
|
||||
aPropSeq[1].Value <<= css::ui::ItemType::DEFAULT;
|
||||
|
||||
// If the name has not been changed and the name is the same as
|
||||
// in the default command to label map then the label can be stored
|
||||
// as an empty string.
|
||||
// It will be initialised again later using the command to label map.
|
||||
aPropSeq[2].Name = aDescriptorLabel;
|
||||
if ( HasChangedName() == FALSE && GetCommand().getLength() )
|
||||
{
|
||||
BOOL isDefaultName = FALSE;
|
||||
try
|
||||
{
|
||||
uno::Any a( rCommandToLabelMap->getByName( GetCommand() ) );
|
||||
uno::Sequence< beans::PropertyValue > tmpPropSeq;
|
||||
if ( a >>= tmpPropSeq )
|
||||
{
|
||||
for ( sal_Int32 i = 0; i < tmpPropSeq.getLength(); i++ )
|
||||
{
|
||||
if ( tmpPropSeq[i].Name.equals( aDescriptorLabel ) )
|
||||
{
|
||||
OUString tmpLabel;
|
||||
tmpPropSeq[i].Value >>= tmpLabel;
|
||||
|
||||
if ( tmpLabel.equals( GetName() ) )
|
||||
{
|
||||
isDefaultName = TRUE;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( container::NoSuchElementException& )
|
||||
{
|
||||
// isDefaultName is left as FALSE
|
||||
}
|
||||
|
||||
if ( isDefaultName )
|
||||
{
|
||||
aPropSeq[2].Value <<= rtl::OUString();
|
||||
}
|
||||
else
|
||||
{
|
||||
aPropSeq[2].Value <<= rtl::OUString( GetName() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aPropSeq[2].Value <<= rtl::OUString( GetName() );
|
||||
}
|
||||
|
||||
return aPropSeq;
|
||||
}
|
||||
|
||||
/*
|
||||
SvxMenuConfigEntry::SvxMenuConfigEntry(
|
||||
const uno::Sequence< beans::PropertyValue >& rProperties,
|
||||
const uno::Reference< container::XNameAccess >& rCommandToLabelMap )
|
||||
:
|
||||
SvxConfigEntry( rProperties, rCommandToLabelMap )
|
||||
{
|
||||
uno::Reference< container::XIndexAccess > aChildren;
|
||||
|
||||
for ( sal_Int32 i = 0; i < rProperties.getLength(); i++ )
|
||||
{
|
||||
if ( rProperties[i].Name.equalsAscii( ITEM_DESCRIPTOR_CONTAINER ))
|
||||
{
|
||||
rProperties[i].Value >>= aChildren;
|
||||
}
|
||||
}
|
||||
|
||||
if ( aChildren.is() )
|
||||
{
|
||||
SetPopup( TRUE );
|
||||
SetEntries( new SvxEntries() );
|
||||
|
||||
uno::Sequence< beans::PropertyValue > aProps;
|
||||
for ( sal_Int32 i = 0; i < aChildren->getCount(); i++ )
|
||||
{
|
||||
if ( aChildren->getByIndex( i ) >>= aProps )
|
||||
{
|
||||
SvxConfigEntry* pEntry =
|
||||
new SvxMenuConfigEntry( aProps, rCommandToLabelMap );
|
||||
GetEntries()->push_back( pEntry );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName,
|
||||
const OUString& rCommandURL, bool bPopup, bool bParentData )
|
||||
: nId( 1 )
|
||||
@ -4645,51 +4466,6 @@ void ToolbarSaveInData::RestoreToolbar( SvxConfigEntry* pToolbar )
|
||||
}
|
||||
}
|
||||
|
||||
void ToolbarSaveInData::ReloadToolbar( const OUString& rResourceURL )
|
||||
{
|
||||
SvxEntries::const_iterator iter = GetEntries()->begin();
|
||||
SvxConfigEntry* pToolbar = NULL;
|
||||
|
||||
for ( ; iter != GetEntries()->end(); iter++ )
|
||||
{
|
||||
SvxConfigEntry* pEntry = *iter;
|
||||
|
||||
if ( pEntry->GetCommand().equals( rResourceURL ) )
|
||||
{
|
||||
pToolbar = pEntry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pToolbar != NULL )
|
||||
{
|
||||
delete pToolbar->GetEntries();
|
||||
|
||||
try
|
||||
{
|
||||
uno::Reference< container::XIndexAccess > xToolbarSettings;
|
||||
|
||||
if ( pToolbar->IsParentData() )
|
||||
{
|
||||
xToolbarSettings = GetParentConfigManager()->getSettings(
|
||||
pToolbar->GetCommand(), sal_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
xToolbarSettings = GetConfigManager()->getSettings(
|
||||
pToolbar->GetCommand(), sal_False);
|
||||
}
|
||||
|
||||
LoadToolbar( xToolbarSettings, pToolbar );
|
||||
}
|
||||
catch ( container::NoSuchElementException& )
|
||||
{
|
||||
// toolbar not found for some reason
|
||||
// it will not appear in the toolbar list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ToolbarSaveInData::LoadToolbar(
|
||||
const uno::Reference< container::XIndexAccess >& xToolbarSettings,
|
||||
SvxConfigEntry* pParentData )
|
||||
|
@ -376,40 +376,6 @@ void SfxConfigFunctionListBox_Impl::ClearAll()
|
||||
Clear();
|
||||
}
|
||||
|
||||
SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName )
|
||||
/* Beschreibung
|
||||
Ermittelt den SvLBoxEntry zu einem "ubergebenen String. Das setzt voraus, da\s
|
||||
die Namen eindeutig sind.
|
||||
*/
|
||||
{
|
||||
SvLBoxEntry *pEntry = First();
|
||||
while ( pEntry )
|
||||
{
|
||||
if ( GetEntryText( pEntry ) == rName )
|
||||
return pEntry;
|
||||
pEntry = Next( pEntry );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId )
|
||||
/* Beschreibung
|
||||
Ermittelt den SvLBoxEntry zu einer "ubergebenen Id.
|
||||
*/
|
||||
{
|
||||
SvLBoxEntry *pEntry = First();
|
||||
while ( pEntry )
|
||||
{
|
||||
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
|
||||
if ( pData && pData->nOrd == nId )
|
||||
return pEntry;
|
||||
pEntry = Next( pEntry );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo()
|
||||
/* Beschreibung
|
||||
Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ).
|
||||
@ -451,60 +417,6 @@ String SfxConfigFunctionListBox_Impl::GetCurLabel()
|
||||
return pData->sCommand;
|
||||
}
|
||||
|
||||
USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry )
|
||||
/* Beschreibung
|
||||
Gibt die Ordnungsnummer ( SlotId oder Macro-Nummer ) des Eintrags zur"uck.
|
||||
*/
|
||||
{
|
||||
SfxGroupInfo_Impl *pData = pEntry ?
|
||||
(SfxGroupInfo_Impl*) pEntry->GetUserData() : 0;
|
||||
if ( pData )
|
||||
return pData->nOrd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry )
|
||||
{
|
||||
// Information zum selektierten Entry aus den Userdaten holen
|
||||
SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0;
|
||||
if ( pInfo )
|
||||
{
|
||||
switch ( pInfo->nKind )
|
||||
{
|
||||
case SFX_CFGGROUP_FUNCTION :
|
||||
case SFX_CFGFUNCTION_SLOT :
|
||||
{
|
||||
// Eintrag ist eine Funktion, Hilfe aus der Office-Hilfe
|
||||
USHORT nId = pInfo->nOrd;
|
||||
String aText = Application::GetHelp()->GetHelpText( nId, this );
|
||||
|
||||
if ( !aText.Len() )
|
||||
aText = SFX_SLOTPOOL().GetSlotHelpText_Impl( nId );
|
||||
return aText;
|
||||
}
|
||||
|
||||
case SFX_CFGGROUP_SCRIPTCONTAINER :
|
||||
case SFX_CFGFUNCTION_SCRIPT :
|
||||
case SFX_CFGGROUP_BASICMGR :
|
||||
case SFX_CFGGROUP_DOCBASICMGR :
|
||||
case SFX_CFGGROUP_BASICLIB :
|
||||
case SFX_CFGGROUP_BASICMOD :
|
||||
case SFX_CFGFUNCTION_MACRO :
|
||||
{
|
||||
// Eintrag ist ein Macro, Hilfe aus der MacroInfo
|
||||
SfxMacroInfo *pMacInfo = (SfxMacroInfo*) pInfo->pObject;
|
||||
return pMacInfo->GetHelpText();
|
||||
}
|
||||
|
||||
case SFX_CFGGROUP_STYLES :
|
||||
return String();
|
||||
}
|
||||
}
|
||||
|
||||
return String();
|
||||
}*/
|
||||
|
||||
void SfxConfigFunctionListBox_Impl::FunctionSelected()
|
||||
/* Beschreibung
|
||||
Setzt die Balloonhelp zur"uck, da diese immer den Helptext des selektierten
|
||||
@ -1247,25 +1159,6 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >& xC
|
||||
return xModel;
|
||||
}
|
||||
|
||||
::rtl::OUString SfxConfigGroupListBox_Impl::parseLocationName( const ::rtl::OUString& location )
|
||||
{
|
||||
// strip out the last leaf of location name
|
||||
// e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw
|
||||
::rtl::OUString temp = location;
|
||||
sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString::createFromAscii( "/" ) );
|
||||
|
||||
if ( ( lastSlashIndex + 1 ) < temp.getLength() )
|
||||
{
|
||||
temp = temp.copy( lastSlashIndex + 1 );
|
||||
}
|
||||
// maybe we should throw here!!!
|
||||
else
|
||||
{
|
||||
OSL_TRACE("Something wrong with name, perhaps we should throw an exception");
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
::rtl::OUString SfxConfigGroupListBox_Impl::MapCommand2UIName(const ::rtl::OUString& sCommand)
|
||||
{
|
||||
|
@ -154,42 +154,6 @@ void SvxConfigFunctionListBox_Impl::ClearAll()
|
||||
Clear();
|
||||
}
|
||||
|
||||
SvLBoxEntry* SvxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName )
|
||||
{
|
||||
SvLBoxEntry *pEntry = First();
|
||||
while ( pEntry )
|
||||
{
|
||||
if ( GetEntryText( pEntry ) == rName )
|
||||
return pEntry;
|
||||
pEntry = Next( pEntry );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SvLBoxEntry* SvxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId )
|
||||
{
|
||||
SvLBoxEntry *pEntry = First();
|
||||
while ( pEntry )
|
||||
{
|
||||
SvxGroupInfo_Impl *pData = (SvxGroupInfo_Impl*) pEntry->GetUserData();
|
||||
if ( pData && pData->nOrd == nId )
|
||||
return pEntry;
|
||||
pEntry = Next( pEntry );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
USHORT SvxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry )
|
||||
{
|
||||
SvxGroupInfo_Impl *pData = pEntry ?
|
||||
(SvxGroupInfo_Impl*) pEntry->GetUserData() : 0;
|
||||
if ( pData )
|
||||
return pData->nOrd;
|
||||
return 0;
|
||||
}
|
||||
|
||||
String SvxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry )
|
||||
{
|
||||
// Information zum selektierten Entry aus den Userdaten holen
|
||||
@ -1214,12 +1178,6 @@ SvxScriptSelectorDialog::SetDialogDescription( const String& rDescription )
|
||||
aDialogDescription.SetText( rDescription );
|
||||
}
|
||||
|
||||
USHORT
|
||||
SvxScriptSelectorDialog::GetSelectedId()
|
||||
{
|
||||
return aCommands.GetId( aCommands.GetLastSelectedEntry() );
|
||||
}
|
||||
|
||||
String
|
||||
SvxScriptSelectorDialog::GetScriptURL() const
|
||||
{
|
||||
|
105
cui/source/dialogs/SpellDialog.cxx
Normal file → Executable file
105
cui/source/dialogs/SpellDialog.cxx
Normal file → Executable file
@ -76,6 +76,8 @@ using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::linguistic2;
|
||||
|
||||
using ::rtl::OUString;
|
||||
|
||||
#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar)
|
||||
// struct SpellDialog_Impl ---------------------------------------------
|
||||
|
||||
@ -930,7 +932,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
|
||||
-----------------------------------------------------------------------*/
|
||||
void SpellDialog::InitUserDicts()
|
||||
{
|
||||
sal_uInt16 nLang = aLanguageLB.GetSelectLanguage();
|
||||
const LanguageType nLang = aLanguageLB.GetSelectLanguage();
|
||||
|
||||
const Reference< XDictionary > *pDic = 0;
|
||||
|
||||
@ -948,51 +950,50 @@ void SpellDialog::InitUserDicts()
|
||||
pImpl->aDics = xDicList->getDictionaries();
|
||||
}
|
||||
|
||||
// Benutzerbuecher anzeigen
|
||||
SvtLinguConfig aCfg;
|
||||
const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
|
||||
|
||||
// list suitable dictionaries
|
||||
bool bEnable = false;
|
||||
const sal_Int32 nSize = pImpl->aDics.getLength();
|
||||
pDic = pImpl->aDics.getConstArray();
|
||||
sal_Int32 i;
|
||||
delete aAddToDictMB.GetPopupMenu();
|
||||
PopupMenu* pMenu = new PopupMenu;
|
||||
for (i = 0; i < nSize; ++i )
|
||||
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
|
||||
USHORT nItemId = 1; // menu items should be enumerated from 1 and not 0
|
||||
for (sal_Int32 i = 0; i < nSize; ++i)
|
||||
{
|
||||
Reference< XDictionary > xDic( pDic[i], UNO_QUERY );
|
||||
if (!xDic.is() || SvxGetIgnoreAllList() == xDic)
|
||||
uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
|
||||
if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
|
||||
continue;
|
||||
|
||||
// add only active and not read-only dictionaries to list
|
||||
// from which to choose from
|
||||
Reference< frame::XStorable > xStor( xDic, UNO_QUERY );
|
||||
if ( xDic->isActive() && (!xStor.is() || !xStor->isReadonly()) )
|
||||
uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
|
||||
LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
|
||||
if( xDicTmp->isActive()
|
||||
&& xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
|
||||
&& (nLang == nActLanguage || LANGUAGE_NONE == nActLanguage )
|
||||
&& (!xStor.is() || !xStor->isReadonly()) )
|
||||
{
|
||||
sal_Bool bNegativ = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
pMenu->InsertItem( (USHORT)i + 1, ::GetDicInfoStr( xDic->getName(),
|
||||
SvxLocaleToLanguage( xDic->getLocale() ), bNegativ ) );
|
||||
pMenu->InsertItem( nItemId, xDicTmp->getName() );
|
||||
bEnable = sal_True;
|
||||
|
||||
uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
|
||||
if (xSvcInfo.is())
|
||||
{
|
||||
OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
|
||||
xSvcInfo->getImplementationName(), bHC) );
|
||||
if (aDictionaryImageUrl.getLength() > 0)
|
||||
{
|
||||
Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
|
||||
pMenu->SetItemImage( nItemId, aImage );
|
||||
}
|
||||
}
|
||||
|
||||
++nItemId;
|
||||
}
|
||||
}
|
||||
aAddToDictMB.SetPopupMenu(pMenu);
|
||||
|
||||
aAddToDictMB.Disable();
|
||||
|
||||
sal_uInt16 k;
|
||||
for ( k = 0; k < pMenu->GetItemCount(); ++k )
|
||||
{
|
||||
sal_uInt16 nId = pMenu->GetItemId(k) - 1;
|
||||
sal_Bool bFound = sal_False;
|
||||
|
||||
const sal_uInt16 nDicLang = SvxLocaleToLanguage( pDic[nId]->getLocale() );
|
||||
const sal_Bool bDicNegativ =
|
||||
pDic[nId]->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
// Stimmt die Sprache "uberein, dann enable
|
||||
if ((nDicLang == nLang || nDicLang == LANGUAGE_NONE) && !bDicNegativ)
|
||||
bFound = sal_True;
|
||||
|
||||
if (bFound)
|
||||
{
|
||||
aAddToDictMB.Enable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
aAddToDictMB.Enable( bEnable );
|
||||
}
|
||||
/*-- 20.10.2003 15:31:06---------------------------------------------------
|
||||
|
||||
@ -1000,31 +1001,39 @@ void SpellDialog::InitUserDicts()
|
||||
IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
|
||||
{
|
||||
aSentenceED.UndoActionStart( SPELLUNDO_CHANGE_GROUP );
|
||||
USHORT nItem = pButton->GetCurItemId();
|
||||
|
||||
//GetErrorText() returns the current error even if the text is already
|
||||
//manually changed
|
||||
String sNewWord= aSentenceED.GetErrorText();
|
||||
const String aNewWord= aSentenceED.GetErrorText();
|
||||
|
||||
USHORT nItemId = pButton->GetCurItemId();
|
||||
PopupMenu *pMenu = pButton->GetPopupMenu();
|
||||
String aDicName ( pMenu->GetItemText( nItemId ) );
|
||||
|
||||
uno::Reference< linguistic2::XDictionary > xDic;
|
||||
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
|
||||
if (xDicList.is())
|
||||
xDic = xDicList->getDictionaryByName( aDicName );
|
||||
|
||||
Reference< XDictionary > xDic( pImpl->aDics.getConstArray()[ nItem - 1 ], UNO_QUERY );
|
||||
sal_Int16 nAddRes = DIC_ERR_UNKNOWN;
|
||||
if (xDic.is())
|
||||
{
|
||||
String sTmpTxt( sNewWord );
|
||||
sal_Bool bNegEntry = xDic->getDictionaryType() == DictionaryType_NEGATIVE;
|
||||
nAddRes = linguistic::AddEntryToDic( xDic, sTmpTxt, bNegEntry,
|
||||
::rtl::OUString(), LANGUAGE_NONE );
|
||||
nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, FALSE, OUString(), LANGUAGE_NONE );
|
||||
// save modified user-dictionary if it is persistent
|
||||
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
|
||||
if (xSavDic.is())
|
||||
xSavDic->store();
|
||||
|
||||
if(nAddRes == DIC_ERR_NONE)
|
||||
if (nAddRes == DIC_ERR_NONE)
|
||||
{
|
||||
SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
|
||||
SPELLUNDO_CHANGE_ADD_TO_DICTIONARY, aDialogUndoLink);
|
||||
pAction->SetDictionary(xDic);
|
||||
pAction->SetAddedWord(sTmpTxt);
|
||||
aSentenceED.AddUndoAction(pAction);
|
||||
pAction->SetDictionary( xDic );
|
||||
pAction->SetAddedWord( aNewWord );
|
||||
aSentenceED.AddUndoAction( pAction );
|
||||
}
|
||||
// failed because there is already an entry?
|
||||
if (DIC_ERR_NONE != nAddRes && xDic->getEntry( sTmpTxt ).is())
|
||||
if (DIC_ERR_NONE != nAddRes && xDic->getEntry( aNewWord ).is())
|
||||
nAddRes = DIC_ERR_NONE;
|
||||
}
|
||||
if (DIC_ERR_NONE != nAddRes)
|
||||
@ -1032,8 +1041,6 @@ IMPL_LINK(SpellDialog, AddToDictionaryHdl, MenuButton*, pButton )
|
||||
SvxDicError( this, nAddRes );
|
||||
return 0; // Nicht weitermachen
|
||||
}
|
||||
// nach dem Aufnehmen ggf. '='-Zeichen entfernen
|
||||
sNewWord.EraseAllChars( sal_Unicode( '=' ) );
|
||||
|
||||
// go on
|
||||
SpellContinue_Impl();
|
||||
|
@ -183,52 +183,6 @@ void SvxCommonLinguisticControl::InsertControlGroup( Window& _rFirstGroupWindow,
|
||||
// (FirstWindow, LastWindow) was no valid control group
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
String SvxCommonLinguisticControl::GetNewEditWord()
|
||||
{
|
||||
return aNewWordED.GetText();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
void SvxCommonLinguisticControl::SetNewEditWord( const String& _rNew )
|
||||
{
|
||||
aNewWordED.SetText( _rNew );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void SvxCommonLinguisticControl::UpdateIgnoreHelp( )
|
||||
{
|
||||
|
||||
String aInfoStr( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
|
||||
aInfoStr.Append( GetCurrentText() );
|
||||
|
||||
String aString = GetNonMnemonicString( aIgnoreAllBtn.GetText() );
|
||||
aString.Append( aInfoStr );
|
||||
aIgnoreAllBtn.SetQuickHelpText( aString );
|
||||
|
||||
aString = GetNonMnemonicString( aIgnoreBtn.GetText() );
|
||||
aString.Append( aInfoStr );
|
||||
aIgnoreBtn.SetQuickHelpText( aString );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void SvxCommonLinguisticControl::UpdateChangesHelp( const String& _rNewText )
|
||||
{
|
||||
String aInfoStr( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
|
||||
aInfoStr.Append( GetCurrentText() );
|
||||
aInfoStr.Append( String( RTL_CONSTASCII_USTRINGPARAM( " -> " ) ) );
|
||||
aInfoStr.Append( _rNewText );
|
||||
// TODO: shouldn't this be part of the resources, for proper localization?
|
||||
|
||||
String aString = GetNonMnemonicString( aChangeAllBtn.GetText() );
|
||||
aString.Append( aInfoStr );
|
||||
aChangeAllBtn.SetQuickHelpText( aString );
|
||||
|
||||
aString = GetNonMnemonicString( aChangeBtn.GetText() );
|
||||
aString.Append( aInfoStr );
|
||||
aChangeBtn.SetQuickHelpText( aString );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void SvxCommonLinguisticControl::Paint( const Rectangle& rRect )
|
||||
{
|
||||
|
@ -152,18 +152,6 @@ public:
|
||||
|
||||
// returns the location (upper-left corner) of the group of action buttons
|
||||
inline Point GetActionButtonsLocation( ) const { return aIgnoreBtn.GetPosPixel(); }
|
||||
|
||||
// updates the help texts for the "change" and "change all" buttons according to the currently
|
||||
// entered texts
|
||||
void UpdateChangesHelp( const String& _rNewText );
|
||||
inline void UpdateChangesHelp( ) { UpdateChangesHelp( GetWordInputControl().GetText() ); }
|
||||
|
||||
// updates the help texts for the "ignore" and "always ignore" buttons according to the currently
|
||||
// entered texts
|
||||
void UpdateIgnoreHelp( );
|
||||
|
||||
String GetNewEditWord();
|
||||
void SetNewEditWord( const String& _rNew );
|
||||
};
|
||||
|
||||
|
||||
|
@ -958,7 +958,7 @@ void TPGalleryThemeProperties::FillFilterList()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(WIN) || defined(WNT)
|
||||
#if defined(WNT)
|
||||
if ( aExtensions.Len() > 240 )
|
||||
aExtensions = DEFINE_CONST_UNICODE( "*.*" );
|
||||
#endif
|
||||
|
@ -136,9 +136,6 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
|
||||
pEntry = AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, aImage, aImageHC, SvxHyperlinkNewDocTp::Create );
|
||||
pEntry->SetQuickHelpText( CUI_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCNTP_HELP ) );
|
||||
|
||||
// all tab pages set -> create mnemonics
|
||||
// CreateIconTextAutoMnemonics(); #99671# not useful, because this is not what user expects when using mnemonics on the pages
|
||||
|
||||
// create itemset for tabpages
|
||||
mpItemSet = new SfxItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
|
||||
SID_HYPERLINK_SETLINK );
|
||||
|
@ -689,12 +689,6 @@ namespace svx
|
||||
m_pPlayground->SetButtonHandler( SvxCommonLinguisticControl::eChangeAll, _rHdl );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void HangulHanjaConversionDialog::SetOptionsHdl( const Link& _rHdl )
|
||||
{
|
||||
m_pPlayground->SetButtonHandler( SvxCommonLinguisticControl::eOptions, _rHdl );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
void HangulHanjaConversionDialog::SetFindHdl( const Link& _rHdl )
|
||||
{
|
||||
@ -865,11 +859,6 @@ namespace svx
|
||||
m_aSuggestions.DisplayListBox( !_bByCharacter );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
sal_Bool HangulHanjaConversionDialog::GetByCharacter( ) const
|
||||
{
|
||||
return m_aReplaceByChar.IsChecked();
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
void HangulHanjaConversionDialog::SetConversionDirectionState(
|
||||
sal_Bool _bTryBothDirections,
|
||||
|
@ -173,37 +173,6 @@ void SvxHyperlinkNewDocTp::FillDlgFields ( String& /*aStrURL*/ )
|
||||
#define INTERNETSHORTCUT_URL_TAG "URL"
|
||||
#define INTERNETSHORTCUT_ICONID_TAG "IconIndex"
|
||||
|
||||
void SvxHyperlinkNewDocTp::ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder )
|
||||
{
|
||||
// Open file
|
||||
Config aCfg( rFile );
|
||||
aCfg.SetGroup( INTERNETSHORTCUT_ID_TAG );
|
||||
|
||||
// read URL
|
||||
rURL = aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_URL_TAG) ), RTL_TEXTENCODING_ASCII_US );
|
||||
SvtPathOptions aPathOpt;
|
||||
rURL = aPathOpt.SubstituteVariable( rURL );
|
||||
|
||||
// read target
|
||||
if ( pShowAsFolder )
|
||||
{
|
||||
String aTemp( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_TARGET_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
|
||||
*pShowAsFolder = aTemp == String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_FOLDER_TAG ) );
|
||||
}
|
||||
|
||||
// read image-ID
|
||||
String aStrIconId( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_ICONID_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
|
||||
rIconId = aStrIconId.ToInt32();
|
||||
|
||||
// read title
|
||||
String aLangStr = aPathOpt.SubstituteVariable( DEFINE_CONST_UNICODE("$(vlang)") );
|
||||
ByteString aLang( aLangStr, RTL_TEXTENCODING_UTF8 );
|
||||
ByteString aGroup = INTERNETSHORTCUT_ID_TAG;
|
||||
( ( aGroup += '-' ) += aLang ) += ".W";
|
||||
aCfg.SetGroup( aGroup );
|
||||
rTitle = String( aCfg.ReadKey( INTERNETSHORTCUT_TITLE_TAG ), RTL_TEXTENCODING_UTF7 );
|
||||
}
|
||||
|
||||
void SvxHyperlinkNewDocTp::FillDocumentList ()
|
||||
{
|
||||
EnterWait();
|
||||
|
@ -147,56 +147,6 @@ sal_Bool IconChoicePage::QueryClose()
|
||||
return sal_True;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
||||
| handling itemsets
|
||||
|
|
||||
\**********************************************************************/
|
||||
|
||||
const SfxPoolItem* IconChoicePage::GetItem( const SfxItemSet& rSet,
|
||||
USHORT nSlot )
|
||||
{
|
||||
const SfxItemPool* pPool = rSet.GetPool();
|
||||
USHORT nWh = pPool->GetWhich( nSlot );
|
||||
const SfxPoolItem* pItem = 0;
|
||||
rSet.GetItemState( nWh, TRUE, &pItem );
|
||||
|
||||
if ( !pItem && nWh != nSlot )
|
||||
pItem = &pPool->GetDefaultItem( nWh );
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
const SfxPoolItem* IconChoicePage::GetOldItem( const SfxItemSet& rSet,
|
||||
USHORT nSlot )
|
||||
{
|
||||
const SfxItemSet& rOldSet = GetItemSet();
|
||||
USHORT nWh = GetWhich( nSlot );
|
||||
const SfxPoolItem* pItem = 0;
|
||||
|
||||
if ( bStandard && rOldSet.GetParent() )
|
||||
pItem = GetItem( *rOldSet.GetParent(), nSlot );
|
||||
else if ( rSet.GetParent() && SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) )
|
||||
pItem = GetItem( *rSet.GetParent(), nSlot );
|
||||
else
|
||||
pItem = GetItem( rOldSet, nSlot );
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
const SfxPoolItem* IconChoicePage::GetExchangeItem( const SfxItemSet& rSet,
|
||||
USHORT nSlot )
|
||||
{
|
||||
if ( pDialog && !pDialog->IsInOK() && pDialog->GetExampleSet() )
|
||||
return GetItem( *pDialog->GetExampleSet(), nSlot );
|
||||
else
|
||||
return GetOldItem( rSet, nSlot );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
||||
| window-methods
|
||||
@ -380,18 +330,6 @@ IconChoiceDialog ::~IconChoiceDialog ()
|
||||
delete pData;
|
||||
}
|
||||
|
||||
// remove Pagelist
|
||||
/* for ( i=0; i<maPageList.Count(); i++ )
|
||||
{
|
||||
IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i );
|
||||
|
||||
if ( pData->bOnDemand )
|
||||
delete ( SfxItemSet * )&( pData->pPage->GetItemSet() );
|
||||
|
||||
delete pData->pPage;
|
||||
delete pData;
|
||||
}*/
|
||||
|
||||
// remove Userdata from Icons
|
||||
for ( i=0; i<maIconCtrl.GetEntryCount(); i++)
|
||||
{
|
||||
@ -413,26 +351,6 @@ IconChoiceDialog ::~IconChoiceDialog ()
|
||||
|
|
||||
\**********************************************************************/
|
||||
|
||||
SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText,
|
||||
const Image& rChoiceIcon,
|
||||
CreatePage pCreateFunc /* != 0 */,
|
||||
GetPageRanges pRangesFunc /* darf 0 sein */,
|
||||
BOOL bItemsOnDemand, ULONG /*nPos*/ )
|
||||
{
|
||||
IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc,
|
||||
pRangesFunc,
|
||||
bItemsOnDemand );
|
||||
maPageList.Insert ( pData, LIST_APPEND );
|
||||
|
||||
pData->fnGetRanges = pRangesFunc;
|
||||
pData->bOnDemand = bItemsOnDemand;
|
||||
|
||||
USHORT *pId = new USHORT ( nId );
|
||||
SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.InsertEntry( rIconText, rChoiceIcon );
|
||||
pEntry->SetUserData ( (void*) pId );
|
||||
return pEntry;
|
||||
}
|
||||
|
||||
SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText,
|
||||
const Image& rChoiceIcon,
|
||||
const Image& rChoiceIconHC,
|
||||
@ -454,65 +372,6 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage( USHORT nId, const String&
|
||||
return pEntry;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
||||
| remove page
|
||||
|
|
||||
\**********************************************************************/
|
||||
|
||||
void IconChoiceDialog::RemoveTabPage( USHORT nId )
|
||||
{
|
||||
IconChoicePageData* pData = GetPageData ( nId );
|
||||
|
||||
// remove page from list
|
||||
if ( pData )
|
||||
{
|
||||
maPageList.Remove ( pData );
|
||||
|
||||
// save settings
|
||||
if ( pData->pPage )
|
||||
{
|
||||
pData->pPage->FillUserData();
|
||||
String aPageData(pData->pPage->GetUserData());
|
||||
if ( aPageData.Len() )
|
||||
{
|
||||
SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pData->nId ) );
|
||||
|
||||
SetViewOptUserItem( aTabPageOpt, aPageData );
|
||||
}
|
||||
}
|
||||
|
||||
if ( pData->bOnDemand )
|
||||
delete ( SfxItemSet * )&( pData->pPage->GetItemSet() );
|
||||
|
||||
delete pData->pPage;
|
||||
delete pData;
|
||||
}
|
||||
|
||||
// remove Icon
|
||||
BOOL bFound=FALSE;
|
||||
for ( ULONG i=0; i<maIconCtrl.GetEntryCount() && !bFound; i++)
|
||||
{
|
||||
SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i );
|
||||
USHORT* pUserData = (USHORT*) pEntry->GetUserData();
|
||||
|
||||
if ( *pUserData == nId )
|
||||
{
|
||||
delete pUserData;
|
||||
maIconCtrl.RemoveEntry ( pEntry );
|
||||
bFound = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// was it the current page ?
|
||||
if ( nId == mnCurrentPageId )
|
||||
{
|
||||
mnCurrentPageId = maPageList.First()->nId;
|
||||
}
|
||||
|
||||
Invalidate ();
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
||||
| Paint-method
|
||||
@ -572,13 +431,6 @@ EIconChoicePos IconChoiceDialog::SetCtrlPos( const EIconChoicePos& rPos )
|
||||
return eOldPos;
|
||||
}
|
||||
|
||||
void IconChoiceDialog::SetCtrlColor ( const Color& rColor )
|
||||
{
|
||||
Wallpaper aWallpaper ( rColor );
|
||||
maIconCtrl.SetBackground( aWallpaper );
|
||||
maIconCtrl.SetFontColorToBackground ();
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
|
||||
| Show / Hide page or button
|
||||
@ -601,14 +453,6 @@ void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void IconChoiceDialog::RemoveResetButton()
|
||||
{
|
||||
aResetBtn.Hide();
|
||||
bHideResetBtn = TRUE;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void IconChoiceDialog::ShowPage( USHORT nId )
|
||||
{
|
||||
bool bInvalidate = GetCurPageId() != nId;
|
||||
@ -1144,40 +988,6 @@ void IconChoiceDialog::SetInputSet( const SfxItemSet* pInSet )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// Liefert die Pages, die ihre Sets onDemand liefern, das OutputItemSet.
|
||||
const SfxItemSet* IconChoiceDialog::GetOutputItemSet ( USHORT nId )
|
||||
{
|
||||
IconChoicePageData * pData = GetPageData ( nId );
|
||||
DBG_ASSERT( pData, "TabPage nicht gefunden" );
|
||||
|
||||
if ( pData )
|
||||
{
|
||||
if ( !pData->pPage )
|
||||
return NULL;
|
||||
|
||||
if ( pData->bOnDemand )
|
||||
return &pData->pPage->GetItemSet();
|
||||
|
||||
return pOutSet;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
int IconChoiceDialog::FillOutputItemSet()
|
||||
{
|
||||
int nRet = IconChoicePage::LEAVE_PAGE;
|
||||
if ( OK_Impl() )
|
||||
Ok();
|
||||
else
|
||||
nRet = IconChoicePage::KEEP_PAGE;
|
||||
return nRet;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void IconChoiceDialog::PageCreated( USHORT /*nId*/, IconChoicePage& /*rPage*/ )
|
||||
{
|
||||
// not interested in
|
||||
@ -1404,13 +1214,6 @@ short IconChoiceDialog::Ok()
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
BOOL IconChoiceDialog::IsInOK() const
|
||||
{
|
||||
return bInOK;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void IconChoiceDialog::FocusOnIcon( USHORT nId )
|
||||
{
|
||||
// set focus to icon for the current visible page
|
||||
@ -1426,10 +1229,3 @@ void IconChoiceDialog::FocusOnIcon( USHORT nId )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void IconChoiceDialog::CreateIconTextAutoMnemonics( void )
|
||||
{
|
||||
maIconCtrl.CreateAutoMnemonics();
|
||||
}
|
||||
|
@ -196,11 +196,6 @@ void SvInsertOleDlg::SelectDefault()
|
||||
aLbObjecttype.SelectEntryPos( 0 );
|
||||
}
|
||||
|
||||
void SvInsertOleDlg::FillObjectServerList( SvObjectServerList* pList )
|
||||
{
|
||||
pList->FillInsertObjects();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
SvInsertOleDlg::SvInsertOleDlg
|
||||
(
|
||||
|
@ -367,15 +367,6 @@ void SFTreeListBox:: RequestSubEntries( SvLBoxEntry* pRootEntry, Reference< ::co
|
||||
}
|
||||
}
|
||||
|
||||
void SFTreeListBox::UpdateEntries()
|
||||
{
|
||||
}
|
||||
|
||||
SvLBoxEntry* SFTreeListBox::FindEntry( SvLBoxEntry* , const String& , BYTE )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
long SFTreeListBox::ExpandingHdl()
|
||||
{
|
||||
return TRUE;
|
||||
@ -626,10 +617,6 @@ short SvxScriptOrgDialog::Execute()
|
||||
return nRet;
|
||||
}
|
||||
|
||||
void SvxScriptOrgDialog::EnableButton( Button& , BOOL )
|
||||
{
|
||||
}
|
||||
|
||||
void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node )
|
||||
{
|
||||
if ( node.is() )
|
||||
@ -921,38 +908,6 @@ Reference< XModel > SvxScriptOrgDialog::getModel( SvLBoxEntry* pEntry )
|
||||
return model;
|
||||
}
|
||||
|
||||
Reference< XInterface >
|
||||
SvxScriptOrgDialog::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OUString& docName )
|
||||
{
|
||||
Reference< XInterface > xModel;
|
||||
Reference< lang::XMultiComponentFactory > mcf =
|
||||
xCtx->getServiceManager();
|
||||
Reference< frame::XDesktop > desktop (
|
||||
mcf->createInstanceWithContext(
|
||||
::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx ),
|
||||
UNO_QUERY );
|
||||
|
||||
Reference< container::XEnumerationAccess > componentsAccess =
|
||||
desktop->getComponents();
|
||||
Reference< container::XEnumeration > components =
|
||||
componentsAccess->createEnumeration();
|
||||
while (components->hasMoreElements())
|
||||
{
|
||||
Reference< frame::XModel > model(
|
||||
components->nextElement(), UNO_QUERY );
|
||||
if ( model.is() )
|
||||
{
|
||||
::rtl::OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle( model );
|
||||
if( sTdocUrl.equals( docName ) )
|
||||
{
|
||||
xModel = model;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return xModel;
|
||||
}
|
||||
|
||||
void SvxScriptOrgDialog::createEntry( SvLBoxEntry* pEntry )
|
||||
{
|
||||
|
||||
@ -1371,28 +1326,6 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
|
||||
aScriptsBox.SetCurEntry( pEntry );
|
||||
}
|
||||
|
||||
BOOL SFTreeListBox::dialogSort1( Reference< browse::XBrowseNode > node1,
|
||||
Reference< browse::XBrowseNode > node2 )
|
||||
{
|
||||
::rtl::OUString userStr = ::rtl::OUString::createFromAscii("user");
|
||||
::rtl::OUString shareStr = ::rtl::OUString::createFromAscii("share");
|
||||
if( node1->getName().equals( userStr ) )
|
||||
return true;
|
||||
if( node2->getName().equals( userStr ) )
|
||||
return false;
|
||||
if( node1->getName().equals( shareStr ) )
|
||||
return true;
|
||||
if( node2->getName().equals( shareStr ) )
|
||||
return false;
|
||||
return dialogSort2( node1, node2 );
|
||||
}
|
||||
|
||||
BOOL SFTreeListBox::dialogSort2( Reference< browse::XBrowseNode > node1,
|
||||
Reference< browse::XBrowseNode > node2 )
|
||||
{
|
||||
return ( node1->getName().compareTo( node2->getName() ) < 0 );
|
||||
}
|
||||
|
||||
::rtl::OUString ReplaceString(
|
||||
const ::rtl::OUString& source,
|
||||
const ::rtl::OUString& token,
|
||||
|
101
cui/source/dialogs/thesdlg.cxx
Normal file → Executable file
101
cui/source/dialogs/thesdlg.cxx
Normal file → Executable file
@ -57,6 +57,7 @@
|
||||
#include <i18npool/mslangid.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <osl/file.hxx>
|
||||
#include <svl/lngmisc.hxx>
|
||||
|
||||
|
||||
#include <stack>
|
||||
@ -73,36 +74,6 @@ using ::rtl::OUString;
|
||||
#define A2S(x) String::CreateFromAscii( x )
|
||||
|
||||
|
||||
|
||||
// GetReplaceEditString -------------------------------
|
||||
|
||||
static void GetReplaceEditString( String &rText )
|
||||
{
|
||||
// The strings returned by the thesaurus saometimes have some
|
||||
// explanation text put in between '(' and ')' or a trailing '*'.
|
||||
// These parts should not be put in the ReplaceEdit Text that may get
|
||||
// inserted into the document. Thus we strip them from the text.
|
||||
|
||||
xub_StrLen nPos = rText.Search( sal_Unicode('(') );
|
||||
while (STRING_NOTFOUND != nPos)
|
||||
{
|
||||
xub_StrLen nEnd = rText.Search( sal_Unicode(')'), nPos );
|
||||
if (STRING_NOTFOUND != nEnd)
|
||||
rText.Erase( nPos, nEnd-nPos+1 );
|
||||
else
|
||||
break;
|
||||
nPos = rText.Search( sal_Unicode('(') );
|
||||
}
|
||||
|
||||
nPos = rText.Search( sal_Unicode('*') );
|
||||
if (STRING_NOTFOUND != nPos)
|
||||
rText.Erase( nPos );
|
||||
|
||||
// remove any possible remaining ' ' that may confuse the thesaurus
|
||||
// when it gets called with the text
|
||||
rText.EraseLeadingAndTrailingChars( sal_Unicode(' ') );
|
||||
}
|
||||
|
||||
// class LookUpComboBox_Impl --------------------------------------------------
|
||||
|
||||
LookUpComboBox_Impl::LookUpComboBox_Impl(
|
||||
@ -172,12 +143,21 @@ void ReplaceEdit_Impl::SetText( const XubString& rStr, const Selection& rNewSele
|
||||
|
||||
// class ThesaurusAlternativesCtrl_Impl ----------------------------------
|
||||
|
||||
AlternativesString_Impl::AlternativesString_Impl(
|
||||
ThesaurusAlternativesCtrl_Impl &rControl,
|
||||
SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr ) :
|
||||
//
|
||||
SvLBoxString( pEntry, nFlags, rStr ),
|
||||
m_rControlImpl( rControl )
|
||||
{
|
||||
}
|
||||
|
||||
void AlternativesString_Impl::Paint(
|
||||
const Point& rPos,
|
||||
SvLBox& rDev, USHORT,
|
||||
SvLBoxEntry* pEntry )
|
||||
{
|
||||
AlternativesUserData_Impl* pData = (AlternativesUserData_Impl*)pEntry->GetUserData();
|
||||
AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry );
|
||||
Point aPos( rPos );
|
||||
Font aOldFont( rDev.GetFont());
|
||||
if (pData && pData->IsHeader())
|
||||
@ -207,14 +187,40 @@ ThesaurusAlternativesCtrl_Impl::ThesaurusAlternativesCtrl_Impl(
|
||||
|
||||
ThesaurusAlternativesCtrl_Impl::~ThesaurusAlternativesCtrl_Impl()
|
||||
{
|
||||
ClearUserData();
|
||||
ClearExtraData();
|
||||
}
|
||||
|
||||
|
||||
void ThesaurusAlternativesCtrl_Impl::ClearUserData()
|
||||
void ThesaurusAlternativesCtrl_Impl::ClearExtraData()
|
||||
{
|
||||
for (USHORT i = 0; i < GetEntryCount(); ++i)
|
||||
delete (AlternativesUserData_Impl*)GetEntry(i)->GetUserData();
|
||||
UserDataMap_t aEmpty;
|
||||
m_aUserData.swap( aEmpty );
|
||||
}
|
||||
|
||||
|
||||
void ThesaurusAlternativesCtrl_Impl::SetExtraData(
|
||||
const SvLBoxEntry *pEntry,
|
||||
const AlternativesExtraData &rData )
|
||||
{
|
||||
if (!pEntry)
|
||||
return;
|
||||
|
||||
UserDataMap_t::iterator aIt( m_aUserData.find( pEntry ) );
|
||||
if (aIt != m_aUserData.end())
|
||||
aIt->second = rData;
|
||||
else
|
||||
m_aUserData[ pEntry ] = rData;
|
||||
}
|
||||
|
||||
|
||||
AlternativesExtraData * ThesaurusAlternativesCtrl_Impl::GetExtraData(
|
||||
const SvLBoxEntry *pEntry )
|
||||
{
|
||||
AlternativesExtraData *pRes = NULL;
|
||||
UserDataMap_t::iterator aIt( m_aUserData.find( pEntry ) );
|
||||
if (aIt != m_aUserData.end())
|
||||
pRes = &aIt->second;
|
||||
return pRes;
|
||||
}
|
||||
|
||||
|
||||
@ -230,10 +236,9 @@ SvLBoxEntry * ThesaurusAlternativesCtrl_Impl::AddEntry( sal_Int32 nVal, const St
|
||||
pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); // add empty column
|
||||
aText += rText;
|
||||
pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0 ) ); // otherwise crash
|
||||
pEntry->AddItem( new AlternativesString_Impl( pEntry, 0, aText ) );
|
||||
pEntry->AddItem( new AlternativesString_Impl( *this, pEntry, 0, aText ) );
|
||||
|
||||
AlternativesUserData_Impl* pUserData = new AlternativesUserData_Impl( rText, bIsHeader );
|
||||
pEntry->SetUserData( pUserData );
|
||||
SetExtraData( pEntry, AlternativesExtraData( rText, bIsHeader ) );
|
||||
GetModel()->Insert( pEntry );
|
||||
|
||||
if (bIsHeader)
|
||||
@ -365,7 +370,7 @@ bool SvxThesaurusDialog_Impl::UpdateAlternativesBox_Impl()
|
||||
m_pAlternativesCT->SetUpdateMode( FALSE );
|
||||
|
||||
// clear old user data of control before creating new ones via AddEntry below
|
||||
m_pAlternativesCT->ClearUserData();
|
||||
m_pAlternativesCT->ClearExtraData();
|
||||
|
||||
m_pAlternativesCT->Clear();
|
||||
for (sal_Int32 i = 0; i < nMeanings; ++i)
|
||||
@ -454,7 +459,7 @@ IMPL_LINK( SvxThesaurusDialog_Impl, WordSelectHdl_Impl, ComboBox *, pBox )
|
||||
{
|
||||
USHORT nPos = pBox->GetSelectEntryPos();
|
||||
String aStr( pBox->GetEntry( nPos ) );
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
aWordCB.SetText( aStr );
|
||||
LookUp_Impl();
|
||||
}
|
||||
@ -468,12 +473,12 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesSelectHdl_Impl, SvxCheckListBox
|
||||
SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL;
|
||||
if (pEntry)
|
||||
{
|
||||
AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData();
|
||||
AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry );
|
||||
String aStr;
|
||||
if (!pData->IsHeader())
|
||||
if (pData && !pData->IsHeader())
|
||||
{
|
||||
aStr = pData->GetText();
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
}
|
||||
aReplaceEdit.SetText( aStr );
|
||||
}
|
||||
@ -486,12 +491,12 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis
|
||||
SvLBoxEntry *pEntry = pBox ? pBox->GetCurEntry() : NULL;
|
||||
if (pEntry)
|
||||
{
|
||||
AlternativesUserData_Impl * pData = (AlternativesUserData_Impl *) pEntry->GetUserData();
|
||||
AlternativesExtraData * pData = m_pAlternativesCT->GetExtraData( pEntry );
|
||||
String aStr;
|
||||
if (!pData->IsHeader())
|
||||
if (pData && !pData->IsHeader())
|
||||
{
|
||||
aStr = pData->GetText();
|
||||
GetReplaceEditString( aStr );
|
||||
aStr = linguistic::GetThesaurusReplaceText( aStr );
|
||||
}
|
||||
|
||||
aWordCB.SetText( aStr );
|
||||
@ -509,8 +514,8 @@ IMPL_LINK( SvxThesaurusDialog_Impl, AlternativesDoubleClickHdl_Impl, SvxCheckLis
|
||||
IMPL_STATIC_LINK( SvxThesaurusDialog_Impl, SelectFirstHdl_Impl, SvxCheckListBox *, pBox )
|
||||
{
|
||||
(void) pThis;
|
||||
if (pBox && pBox->GetEntryCount() > 0)
|
||||
pBox->SelectEntryPos( 0 );
|
||||
if (pBox && pBox->GetEntryCount() >= 2)
|
||||
pBox->SelectEntryPos( 1 ); // pos 0 is a 'header' that is not selectable
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
6
cui/source/dialogs/thesdlg.src
Normal file → Executable file
6
cui/source/dialogs/thesdlg.src
Normal file → Executable file
@ -59,7 +59,7 @@ ModalDialog RID_SVXDLG_THESAURUS
|
||||
{
|
||||
Pos = MAP_APPFONT ( 24 , 5 ) ;
|
||||
Size = MAP_APPFONT ( 143 , 8 ) ;
|
||||
Text [ en-US ] = "Current ~word" ;
|
||||
Text [ en-US ] = "~Current word" ;
|
||||
LEFT = TRUE ;
|
||||
};
|
||||
ComboBox CB_WORD
|
||||
@ -95,7 +95,7 @@ ModalDialog RID_SVXDLG_THESAURUS
|
||||
{
|
||||
Pos = MAP_APPFONT ( 5 , 173 ) ;
|
||||
Size = MAP_APPFONT ( 255 , 8 ) ;
|
||||
Text [ en-US ] = "Replace ~with" ;
|
||||
Text [ en-US ] = "~Replace with" ;
|
||||
LEFT = TRUE ;
|
||||
};
|
||||
Edit ED_REPL
|
||||
@ -120,7 +120,7 @@ ModalDialog RID_SVXDLG_THESAURUS
|
||||
{
|
||||
Pos = MAP_APPFONT ( 105 , 210 ) ;
|
||||
Size = MAP_APPFONT ( 60 , 14 ) ;
|
||||
Text [ en-US ] = "~Replace" ;
|
||||
Text [ en-US ] = "Replace" ;
|
||||
DefButton = TRUE ;
|
||||
};
|
||||
CancelButton BTN_THES_CANCEL
|
||||
|
27
cui/source/dialogs/thesdlg_impl.hxx
Normal file → Executable file
27
cui/source/dialogs/thesdlg_impl.hxx
Normal file → Executable file
@ -51,11 +51,16 @@
|
||||
#include <com/sun/star/linguistic2/XMeaning.hpp>
|
||||
|
||||
#include <stack>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using ::rtl::OUString;
|
||||
|
||||
class SvLBoxEntry;
|
||||
class ThesaurusAlternativesCtrl_Impl;
|
||||
|
||||
|
||||
// class LookUpComboBox_Impl --------------------------------------------------
|
||||
|
||||
class LookUpComboBox_Impl : public ComboBox
|
||||
@ -105,17 +110,14 @@ public:
|
||||
|
||||
// class ThesaurusAlternativesCtrl_Impl ----------------------------------
|
||||
|
||||
class AlternativesUserData_Impl
|
||||
class AlternativesExtraData
|
||||
{
|
||||
String sText;
|
||||
bool bHeader;
|
||||
|
||||
// disable copy c-tor and assignment operator
|
||||
AlternativesUserData_Impl( const AlternativesUserData_Impl & );
|
||||
AlternativesUserData_Impl & operator = ( const AlternativesUserData_Impl & );
|
||||
|
||||
public:
|
||||
AlternativesUserData_Impl( const String &rText, bool bIsHeader ) :
|
||||
AlternativesExtraData() : bHeader( false ) {}
|
||||
AlternativesExtraData( const String &rText, bool bIsHeader ) :
|
||||
sText(rText),
|
||||
bHeader(bIsHeader)
|
||||
{
|
||||
@ -128,10 +130,11 @@ public:
|
||||
|
||||
class AlternativesString_Impl : public SvLBoxString
|
||||
{
|
||||
ThesaurusAlternativesCtrl_Impl & m_rControlImpl;
|
||||
public:
|
||||
|
||||
AlternativesString_Impl( SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr )
|
||||
: SvLBoxString( pEntry, nFlags, rStr ) {}
|
||||
AlternativesString_Impl( ThesaurusAlternativesCtrl_Impl &rControl,
|
||||
SvLBoxEntry* pEntry, USHORT nFlags, const String& rStr );
|
||||
|
||||
virtual void Paint( const Point& rPos, SvLBox& rDev, USHORT nFlags, SvLBoxEntry* pEntry);
|
||||
};
|
||||
@ -142,6 +145,9 @@ class ThesaurusAlternativesCtrl_Impl :
|
||||
{
|
||||
SvxThesaurusDialog_Impl & m_rDialogImpl;
|
||||
|
||||
typedef std::map< const SvLBoxEntry *, AlternativesExtraData > UserDataMap_t;
|
||||
UserDataMap_t m_aUserData;
|
||||
|
||||
// disable copy c-tor and assignment operator
|
||||
ThesaurusAlternativesCtrl_Impl( const ThesaurusAlternativesCtrl_Impl & );
|
||||
ThesaurusAlternativesCtrl_Impl & operator = ( const ThesaurusAlternativesCtrl_Impl & );
|
||||
@ -152,7 +158,10 @@ public:
|
||||
|
||||
|
||||
SvLBoxEntry * AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader );
|
||||
void ClearUserData();
|
||||
|
||||
void ClearExtraData();
|
||||
void SetExtraData( const SvLBoxEntry *pEntry, const AlternativesExtraData &rData );
|
||||
AlternativesExtraData * GetExtraData( const SvLBoxEntry *pEntry );
|
||||
|
||||
virtual void KeyInput( const KeyEvent& rKEvt );
|
||||
virtual void Paint( const Rectangle& rRect );
|
||||
|
@ -58,13 +58,6 @@
|
||||
|
||||
// static ----------------------------------------------------------------
|
||||
|
||||
static USHORT pRanges[] =
|
||||
{
|
||||
SID_ATTR_ZOOM,
|
||||
SID_ATTR_ZOOM,
|
||||
0
|
||||
};
|
||||
|
||||
#define SPECIAL_FACTOR ((USHORT)0xFFFF)
|
||||
|
||||
// class SvxZoomDialog ---------------------------------------------------
|
||||
@ -124,29 +117,6 @@ void SvxZoomDialog::SetFactor( USHORT nNewFactor, USHORT nBtnId )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void SvxZoomDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt )
|
||||
{
|
||||
switch ( nBtnId )
|
||||
{
|
||||
case ZOOMBTN_OPTIMAL: // Optimal-Button
|
||||
aOptimalBtn.SetText( rNewTxt );
|
||||
break;
|
||||
|
||||
case ZOOMBTN_PAGEWIDTH: // Seitenbreite-Button
|
||||
aPageWidthBtn.SetText( rNewTxt );
|
||||
break;
|
||||
|
||||
case ZOOMBTN_WHOLEPAGE: // Ganze Seite-Button
|
||||
aWholePageBtn.SetText( rNewTxt );
|
||||
break;
|
||||
|
||||
default:
|
||||
DBG_ERROR( "wrong button number" );
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void SvxZoomDialog::HideButton( USHORT nBtnId )
|
||||
{
|
||||
switch ( nBtnId )
|
||||
@ -181,13 +151,6 @@ void SvxZoomDialog::SetLimits( USHORT nMin, USHORT nMax )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void SvxZoomDialog::SetSpinSize( USHORT nNewSpin )
|
||||
{
|
||||
aUserEdit.SetSpinSize( nNewSpin );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
SvxZoomDialog::SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet ) :
|
||||
|
||||
SfxModalDialog( pParent, CUI_RES( RID_SVXDLG_ZOOM ) ),
|
||||
@ -370,13 +333,6 @@ SvxZoomDialog::~SvxZoomDialog()
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
USHORT* SvxZoomDialog::GetRanges()
|
||||
{
|
||||
return pRanges;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
IMPL_LINK( SvxZoomDialog, UserHdl, RadioButton *, pBtn )
|
||||
{
|
||||
bModified |= TRUE;
|
||||
|
18
cui/source/factory/dlgfact.hxx
Executable file → Normal file
18
cui/source/factory/dlgfact.hxx
Executable file → Normal file
@ -235,24 +235,6 @@ class AbstractSpellDialog_Impl : public AbstractSpellDialog
|
||||
virtual SfxBindings& GetBindings();
|
||||
};
|
||||
|
||||
//for SvxSpellCheckDialog begin
|
||||
//STRIP001 class AbstractSvxSpellCheckDialog_Impl : public AbstractSvxSpellCheckDialog //add for FmShowColsDialog
|
||||
//STRIP001 {
|
||||
//STRIP001 SvxSpellCheckDialog * pDlg;
|
||||
//STRIP001 public
|
||||
//STRIP001 AbstractSvxSpellCheckDialog_Impl ( SvxSpellCheckDialog* p)
|
||||
//STRIP001 : pDlg(p)
|
||||
//STRIP001 {}
|
||||
//STRIP001 virtual USHORT Execute() ;
|
||||
//STRIP001 virtual void SetNewEditWord( const String& _rNew ) ;
|
||||
//STRIP001 virtual void SetLanguage( sal_uInt16 nLang ) ;
|
||||
//STRIP001 virtual void HideAutoCorrect() ;
|
||||
//STRIP001 virtual String GetNewEditWord();
|
||||
//STRIP001 virtual void SetNewEditWord( const String& _rNew );
|
||||
//STRIP001 }
|
||||
//for SvxSpellCheckDialog end
|
||||
|
||||
|
||||
//for SearchProgress begin
|
||||
class SearchProgress;
|
||||
class AbstractSearchProgress_Impl : public AbstractSearchProgress
|
||||
|
@ -184,9 +184,7 @@ private:
|
||||
|
||||
String GetLabel4Command(const String& sCommand);
|
||||
void InitAccCfg();
|
||||
KeyCode MapPosToKeyCode( USHORT nPos ) const;
|
||||
USHORT MapKeyCodeToPos( const KeyCode &rCode ) const;
|
||||
String GetFunctionName( KeyFuncType eType ) const;
|
||||
css::uno::Reference< css::frame::XModel > SearchForAlreadyLoadedDoc(const String& sName);
|
||||
void StartFileDialog( WinBits nBits, const String& rTitle );
|
||||
|
||||
@ -202,10 +200,7 @@ public:
|
||||
virtual BOOL FillItemSet( SfxItemSet& );
|
||||
virtual void Reset( const SfxItemSet& );
|
||||
|
||||
void SelectMacro(const SfxMacroInfoItem*);
|
||||
void Apply(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& pAccMgr);
|
||||
void CopySource2Target(const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xSourceAccMgr,
|
||||
const css::uno::Reference< css::ui::XAcceleratorConfiguration >& xTargetAccMgr);
|
||||
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
|
||||
};
|
||||
|
||||
@ -223,50 +218,6 @@ public:
|
||||
void ExpandEntry ( USHORT nPos, const String &rStr );
|
||||
};
|
||||
|
||||
/*
|
||||
// class USHORTArr **********************************************************
|
||||
|
||||
DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10)
|
||||
|
||||
// class SfxAcceleratorConfigDialog **************************************************
|
||||
|
||||
class SfxAcceleratorConfigDialog : public ModalDialog
|
||||
{
|
||||
OKButton aOKButton;
|
||||
CancelButton aCancelButton;
|
||||
PushButton aChangeButton;
|
||||
PushButton aRemoveButton;
|
||||
SfxAcceleratorConfigListBox aEntriesBox;
|
||||
FixedText aDescriptionTextText;
|
||||
FixedText aDescriptionInfoText;
|
||||
FixedLine aKeyboardGroup;
|
||||
FixedText aGroupText;
|
||||
ListBox aGroupLBox;
|
||||
FixedText aFunctionText;
|
||||
ListBox aFunctionBox;
|
||||
FixedText aKeyText;
|
||||
ListBox aKeyBox;
|
||||
FixedLine aFunctionsGroup;
|
||||
|
||||
USHORTArr aAccelArr;
|
||||
USHORTArr aFunctionArr;
|
||||
USHORTArr aKeyArr;
|
||||
|
||||
void OKHdl ( Button * );
|
||||
void ChangeHdl( Button * );
|
||||
void RemoveHdl( Button * );
|
||||
void SelectHdl( ListBox *pListBox );
|
||||
|
||||
KeyCode PosToKeyCode ( USHORT nPos ) const;
|
||||
USHORT KeyCodeToPos ( const KeyCode &rCode ) const;
|
||||
String GetFunctionName( KeyFuncType eType ) const;
|
||||
|
||||
public:
|
||||
|
||||
SfxAcceleratorConfigDialog( Window *pParent );
|
||||
};
|
||||
*/
|
||||
|
||||
class SvxShortcutAssignDlg : public SfxSingleTabDialog
|
||||
{
|
||||
public:
|
||||
|
@ -75,8 +75,6 @@ public:
|
||||
SvxConfigDialog( Window*, const SfxItemSet* );
|
||||
~SvxConfigDialog();
|
||||
|
||||
void ActivateTabPage( USHORT );
|
||||
|
||||
virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
|
||||
virtual short Ok();
|
||||
|
||||
@ -258,12 +256,6 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
SvxConfigEntry(
|
||||
const ::com::sun::star::uno::Sequence<
|
||||
::com::sun::star::beans::PropertyValue >& rProperties,
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::container::XNameAccess >& rCommandToLabelMap );
|
||||
|
||||
SvxConfigEntry( const ::rtl::OUString& rDisplayName,
|
||||
const ::rtl::OUString& rCommandURL,
|
||||
bool bPopup = FALSE,
|
||||
@ -337,11 +329,6 @@ public:
|
||||
|
||||
sal_Int32 GetStyle() { return nStyle; }
|
||||
void SetStyle( sal_Int32 style ) { nStyle = style; }
|
||||
|
||||
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
|
||||
GetProperties(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::container::XNameAccess >& rCommandToLabelMap );
|
||||
};
|
||||
|
||||
class SvxMenuEntriesListBox : public SvTreeListBox
|
||||
@ -694,7 +681,6 @@ public:
|
||||
void RestoreToolbar( SvxConfigEntry* pToolbar );
|
||||
void RemoveToolbar( SvxConfigEntry* pToolbar );
|
||||
void ApplyToolbar( SvxConfigEntry* pToolbar );
|
||||
void ReloadToolbar( const rtl::OUString& rURL );
|
||||
|
||||
rtl::OUString GetSystemUIName( const rtl::OUString& rResourceURL );
|
||||
|
||||
|
@ -139,12 +139,8 @@ public:
|
||||
~SfxConfigFunctionListBox_Impl();
|
||||
|
||||
void ClearAll();
|
||||
SvLBoxEntry* GetEntry_Impl( USHORT nId );
|
||||
SvLBoxEntry* GetEntry_Impl( const String& );
|
||||
USHORT GetId( SvLBoxEntry *pEntry );
|
||||
using Window::GetHelpText;
|
||||
String GetHelpText( SvLBoxEntry *pEntry );
|
||||
USHORT GetCurId() { return GetId( FirstSelected() ); }
|
||||
String GetCurCommand();
|
||||
String GetCurLabel();
|
||||
SfxMacroInfo* GetMacroInfo();
|
||||
@ -173,7 +169,6 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox
|
||||
Image GetImage( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode > node, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx, bool bIsRootNode, bool bHighContrast );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName );
|
||||
::rtl::OUString parseLocationName( const ::rtl::OUString& location );
|
||||
|
||||
void InitModule();
|
||||
void InitBasic();
|
||||
|
@ -155,7 +155,6 @@ private:
|
||||
void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp );
|
||||
BOOL FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp );
|
||||
void ResetColor_Impl( const SfxItemSet& rSet );
|
||||
BOOL FillItemSetColor_Impl( SfxItemSet& rSet );
|
||||
|
||||
DECL_LINK( UpdateHdl_Impl, Timer* );
|
||||
DECL_LINK( FontModifyHdl_Impl, void* );
|
||||
|
@ -67,7 +67,6 @@ public:
|
||||
virtual void Activate();
|
||||
|
||||
INT32 GetTransliterationFlags() const;
|
||||
void SetTransliterationFlags( INT32 nSettings );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -95,13 +95,6 @@ namespace svx
|
||||
*/
|
||||
void openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvLBoxEntry* _pEntry = NULL);
|
||||
|
||||
/** opens a file pciker to select a database file
|
||||
@param _sLocation
|
||||
If set, the file picker use it as default directory
|
||||
@return
|
||||
the location of the database file
|
||||
*/
|
||||
String getFileLocation(const String& _sLocation);
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
@ -152,7 +152,6 @@ namespace svx
|
||||
void SetIgnoreAllHdl( const Link& _rHdl );
|
||||
void SetChangeHdl( const Link& _rHdl );
|
||||
void SetChangeAllHdl( const Link& _rHdl );
|
||||
void SetOptionsHdl( const Link& _rHdl );
|
||||
|
||||
void SetClickByCharacterHdl( const Link& _rHdl );
|
||||
void SetConversionFormatChangedHdl( const Link& _rHdl );
|
||||
@ -174,8 +173,6 @@ namespace svx
|
||||
editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const;
|
||||
|
||||
void SetByCharacter( sal_Bool _bByCharacter );
|
||||
sal_Bool GetByCharacter( ) const;
|
||||
|
||||
void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
|
||||
|
||||
// should text which does not match the primary conversion direction be ignored?
|
||||
|
@ -53,8 +53,6 @@ private:
|
||||
DECL_LINK (ClickNewHdl_Impl , void * ); // Button : New
|
||||
|
||||
Image GetImage( USHORT nId );
|
||||
void ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder);//, String* pFrame, String* pOpenAs, String* pDefTempl, String* pDefURL );
|
||||
//String ReadURL_Impl( Config& rURLFile, const DirEntry& rFile );
|
||||
|
||||
protected:
|
||||
void FillDlgFields ( String& aStrURL );
|
||||
|
@ -116,8 +116,6 @@ protected :
|
||||
|
||||
USHORT GetSlot( USHORT nWhich ) const { return pSet->GetPool()->GetSlotId( nWhich ); }
|
||||
USHORT GetWhich( USHORT nSlot ) const { return pSet->GetPool()->GetWhich( nSlot ); }
|
||||
const SfxPoolItem* GetOldItem( const SfxItemSet& rSet, USHORT nSlot );
|
||||
const SfxPoolItem* GetExchangeItem( const SfxItemSet& rSet, USHORT nSlot );
|
||||
|
||||
public :
|
||||
virtual ~IconChoicePage();
|
||||
@ -148,8 +146,6 @@ public :
|
||||
virtual BOOL IsReadOnly() const;
|
||||
virtual sal_Bool QueryClose();
|
||||
|
||||
static const SfxPoolItem* GetItem( const SfxItemSet& rSet, USHORT nSlot );
|
||||
|
||||
void StateChanged( StateChangedType nType );
|
||||
void DataChanged( const DataChangedEvent& rDCEvt );
|
||||
};
|
||||
@ -221,7 +217,6 @@ protected :
|
||||
void ResetPageImpl ();
|
||||
|
||||
short Ok();
|
||||
BOOL IsInOK() const;
|
||||
|
||||
public :
|
||||
|
||||
@ -241,18 +236,11 @@ public :
|
||||
// Schnittstelle
|
||||
//
|
||||
|
||||
SvxIconChoiceCtrlEntry* AddTabPage(
|
||||
USHORT nId, const String& rIconText, const Image& rChoiceIcon,
|
||||
CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/,
|
||||
BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND );
|
||||
|
||||
SvxIconChoiceCtrlEntry* AddTabPage(
|
||||
USHORT nId, const String& rIconText, const Image& rChoiceIcon, const Image& rChoiceIconHC,
|
||||
CreatePage pCreateFunc /* != NULL */, GetPageRanges pRangesFunc = NULL /* NULL allowed*/,
|
||||
BOOL bItemsOnDemand = FALSE, ULONG nPos = LIST_APPEND );
|
||||
|
||||
void RemoveTabPage( USHORT nId );
|
||||
|
||||
void SetCurPageId( USHORT nId ) { mnCurrentPageId = nId; FocusOnIcon( nId ); }
|
||||
USHORT GetCurPageId() const { return mnCurrentPageId; }
|
||||
void ShowPage( USHORT nId );
|
||||
@ -261,8 +249,6 @@ public :
|
||||
const USHORT* GetInputRanges( const SfxItemPool& );
|
||||
void SetInputSet( const SfxItemSet* pInSet );
|
||||
const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
|
||||
const SfxItemSet* GetOutputItemSet( USHORT nId );
|
||||
int FillOutputItemSet();
|
||||
|
||||
const OKButton& GetOKButton() const { return aOKBtn; }
|
||||
OKButton& GetOKButton() { return aOKBtn; }
|
||||
@ -271,18 +257,13 @@ public :
|
||||
const HelpButton& GetHelpButton() const { return aHelpBtn; }
|
||||
HelpButton& GetHelpButton() { return aHelpBtn; }
|
||||
|
||||
void RemoveResetButton();
|
||||
|
||||
short Execute();
|
||||
void Start( BOOL bShow = TRUE );
|
||||
sal_Bool QueryClose();
|
||||
|
||||
const SfxItemSet* GetExampleSet() const { return pExampleSet; }
|
||||
|
||||
void SetCtrlColor ( const Color& rColor );
|
||||
EIconChoicePos SetCtrlPos ( const EIconChoicePos& rPos );
|
||||
|
||||
void CreateIconTextAutoMnemonics( void );
|
||||
};
|
||||
|
||||
#endif //_ICCDLG_HXX
|
||||
|
@ -89,8 +89,6 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
|
||||
BOOL IsCreateNew() const { return aRbNewObject.IsChecked(); }
|
||||
|
||||
public:
|
||||
static void FillObjectServerList( SvObjectServerList* );
|
||||
|
||||
SvInsertOleDlg( Window* pParent,
|
||||
const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
|
||||
const SvObjectServerList* pServers = NULL );
|
||||
|
@ -60,7 +60,6 @@ class _SfxMacroTabPage : public SfxTabPage
|
||||
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
|
||||
|
||||
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton * );
|
||||
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit* );
|
||||
DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
|
||||
|
||||
protected:
|
||||
@ -86,19 +85,11 @@ public:
|
||||
virtual void ScriptChanged( const String& rLanguage );
|
||||
virtual void PageCreated (SfxAllItemSet aSet);
|
||||
|
||||
// zum setzen / abfragen der Links
|
||||
void SetGetRangeLink( FNGetRangeHdl pFn );
|
||||
FNGetRangeHdl GetGetRangeLink() const;
|
||||
void SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn );
|
||||
FNGetMacrosOfRangeHdl GetGetMacrosOfRangeLink() const;
|
||||
|
||||
// --------- Erben aus der Basis -------------
|
||||
virtual BOOL FillItemSet( SfxItemSet& rSet );
|
||||
virtual void Reset( const SfxItemSet& rSet );
|
||||
|
||||
void SetReadOnly( BOOL bSet );
|
||||
BOOL IsReadOnly() const;
|
||||
void SelectEvent( const String& rEventName, USHORT nEventId );
|
||||
};
|
||||
|
||||
inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
|
||||
|
@ -36,14 +36,6 @@
|
||||
#include <sfx2/basedlgs.hxx>
|
||||
#include <sfx2/tabdlg.hxx>
|
||||
|
||||
// class SvxEmptyPage ----------------------------------------------------
|
||||
|
||||
class SvxEmptyPage : public TabPage
|
||||
{
|
||||
public:
|
||||
SvxEmptyPage( Window* pParent );
|
||||
};
|
||||
|
||||
// class SvxImprovementPage ----------------------------------------------
|
||||
|
||||
class SvxImprovementPage : public TabPage
|
||||
@ -105,7 +97,6 @@ public:
|
||||
virtual ~SvxImprovementOptionsPage();
|
||||
|
||||
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
|
||||
static sal_uInt16* GetRanges();
|
||||
|
||||
virtual sal_Bool FillItemSet( SfxItemSet& rSet );
|
||||
virtual void Reset( const SfxItemSet& rSet );
|
||||
@ -123,16 +114,5 @@ public:
|
||||
SvxImprovementDialog( Window* pParent, const String& rInfoURL );
|
||||
};
|
||||
|
||||
class SvxInfoWindow : public Window
|
||||
{
|
||||
private:
|
||||
FixedText m_aInfoText;
|
||||
|
||||
public:
|
||||
SvxInfoWindow( Window* pParent, const ResId& rResId );
|
||||
|
||||
void SetInfoText( const String& rText );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -135,7 +135,6 @@ public:
|
||||
|
||||
|
||||
void SetPageWidth( USHORT nPageWidth );
|
||||
void SetMaxDistance( USHORT nMaxDist );
|
||||
void EnableRelativeMode();
|
||||
void EnableRegisterMode();
|
||||
void EnableAutoFirstLine();
|
||||
|
@ -97,13 +97,7 @@ protected:
|
||||
void ExpandTree( SvLBoxEntry* pRootEntry );
|
||||
virtual void RequestingChilds( SvLBoxEntry* pParent );
|
||||
virtual void ExpandedHdl();
|
||||
SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const String& rText, BYTE nType );
|
||||
virtual long ExpandingHdl();
|
||||
static BOOL dialogSort1( com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node1,
|
||||
com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node2 );
|
||||
static BOOL dialogSort2( com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node1,
|
||||
com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node2 );
|
||||
|
||||
public:
|
||||
void Init( const ::rtl::OUString& language );
|
||||
void RequestSubEntries( SvLBoxEntry* pRootEntry, ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node,
|
||||
@ -111,8 +105,6 @@ public:
|
||||
SFTreeListBox( Window* pParent, const ResId& rRes );
|
||||
~SFTreeListBox();
|
||||
|
||||
void UpdateEntries();
|
||||
|
||||
void ExpandAllTrees();
|
||||
|
||||
|
||||
@ -202,15 +194,12 @@ protected:
|
||||
BOOL getBoolProperty( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xProps, ::rtl::OUString& propName );
|
||||
void CheckButtons( ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node );
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getDocumentModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xCtx, ::rtl::OUString& docName );
|
||||
|
||||
void createEntry( SvLBoxEntry* pEntry );
|
||||
void renameEntry( SvLBoxEntry* pEntry );
|
||||
void deleteEntry( SvLBoxEntry* pEntry );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >
|
||||
getBrowseNode( SvLBoxEntry* pEntry );
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getModel( SvLBoxEntry* pEntry );
|
||||
void EnableButton( Button& rButton, BOOL bEnable );
|
||||
String getListOfChildren( ::com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node, int depth );
|
||||
void StoreCurrentSelection();
|
||||
void RestorePreviousSelection();
|
||||
|
@ -115,13 +115,8 @@ public:
|
||||
SvxConfigFunctionListBox_Impl( Window*, const ResId& );
|
||||
~SvxConfigFunctionListBox_Impl();
|
||||
void ClearAll();
|
||||
SvLBoxEntry* GetEntry_Impl( USHORT nId );
|
||||
SvLBoxEntry* GetEntry_Impl( const String& );
|
||||
USHORT GetId( SvLBoxEntry *pEntry );
|
||||
String GetHelpText( SvLBoxEntry *pEntry );
|
||||
using Window::GetHelpText;
|
||||
USHORT GetCurId()
|
||||
{ return GetId( FirstSelected() ); }
|
||||
SvLBoxEntry* GetLastSelectedEntry();
|
||||
void FunctionSelected();
|
||||
|
||||
@ -235,7 +230,6 @@ public:
|
||||
void SetImageProvider( ImageProvider* provider )
|
||||
{ aCategories.SetImageProvider( provider ); }
|
||||
|
||||
USHORT GetSelectedId();
|
||||
String GetScriptURL() const;
|
||||
String GetSelectedDisplayName();
|
||||
String GetSelectedHelpText();
|
||||
|
@ -335,12 +335,6 @@ private:
|
||||
sal_Bool DispatchAction( const rtl::OUString& rAction );
|
||||
|
||||
public:
|
||||
ExtensionsTabPage(
|
||||
Window* pParent, const ResId&,
|
||||
const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl,
|
||||
const com::sun::star::uno::Reference<
|
||||
com::sun::star::awt::XContainerWindowProvider >& rProvider );
|
||||
|
||||
ExtensionsTabPage(
|
||||
Window* pParent, WinBits nStyle,
|
||||
const rtl::OUString& rPageURL, const rtl::OUString& rEvtHdl,
|
||||
@ -354,6 +348,5 @@ public:
|
||||
|
||||
void ResetPage();
|
||||
void SavePage();
|
||||
void HideWindow();
|
||||
};
|
||||
|
||||
|
@ -99,16 +99,13 @@ public:
|
||||
SvxZoomDialog( Window* pParent, const SfxItemSet& rCoreSet );
|
||||
~SvxZoomDialog();
|
||||
|
||||
static USHORT* GetRanges();
|
||||
const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
|
||||
|
||||
USHORT GetFactor() const;
|
||||
void SetFactor( USHORT nNewFactor, USHORT nBtnId = 0 );
|
||||
|
||||
void SetButtonText( USHORT nBtnId, const String& aNewTxt );
|
||||
void HideButton( USHORT nBtnId );
|
||||
void SetLimits( USHORT nMin, USHORT nMax );
|
||||
void SetSpinSize( USHORT nNewSpin );
|
||||
};
|
||||
|
||||
#include <layout/layout-post.hxx>
|
||||
|
@ -38,13 +38,6 @@ namespace offapp
|
||||
//====================================================================
|
||||
//= DriverPooling
|
||||
//====================================================================
|
||||
//--------------------------------------------------------------------
|
||||
DriverPooling::DriverPooling()
|
||||
:bEnabled(sal_False)
|
||||
,nTimeoutSeconds(0)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
DriverPooling::DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout )
|
||||
:sName(_rName)
|
||||
|
@ -46,7 +46,6 @@ namespace offapp
|
||||
sal_Bool bEnabled;
|
||||
sal_Int32 nTimeoutSeconds;
|
||||
|
||||
DriverPooling();
|
||||
DriverPooling( const String& _rName, sal_Bool _bEnabled, const sal_Int32 _nTimeout );
|
||||
|
||||
sal_Bool operator == (const DriverPooling& _rR) const;
|
||||
|
@ -92,9 +92,3 @@ INT32 SvxJSearchOptionsDialog::GetTransliterationFlags() const
|
||||
{
|
||||
return pPage->GetTransliterationFlags();
|
||||
}
|
||||
|
||||
|
||||
void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
|
||||
{
|
||||
pPage->SetTransliterationFlags( nSettings );
|
||||
}
|
||||
|
@ -424,60 +424,6 @@ void DbRegistrationOptionsPage::insertNewEntry( const ::rtl::OUString& _sName,co
|
||||
pEntry->SetUserData( new DatabaseRegistration( _sLocation, _bReadOnly ) );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
String DbRegistrationOptionsPage::getFileLocation(const String& _sLocation)
|
||||
{
|
||||
try
|
||||
{
|
||||
rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) );
|
||||
Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
|
||||
Reference < XFilePicker > xFilePicker( xFactory->createInstance( aService ), UNO_QUERY );
|
||||
OSL_ENSURE(xFilePicker.is() ,"Could create file picker service!");
|
||||
Reference < XFilterManager> xFilterManager(xFilePicker,UNO_QUERY);
|
||||
static const String s_sDatabaseType = String::CreateFromAscii("StarOffice XML (Base)");
|
||||
const SfxFilter* pFilter = SfxFilter::GetFilterByName( s_sDatabaseType);
|
||||
if ( pFilter )
|
||||
{
|
||||
xFilterManager->appendFilter( pFilter->GetUIName(),pFilter->GetDefaultExtension());
|
||||
xFilterManager->setCurrentFilter(pFilter->GetUIName());
|
||||
}
|
||||
|
||||
INetURLObject aURL( _sLocation, INET_PROT_FILE );
|
||||
xFilePicker->setMultiSelectionMode(sal_False);
|
||||
xFilePicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
|
||||
short nRet = xFilePicker->execute();
|
||||
|
||||
if ( ExecutableDialogResults::OK == nRet )
|
||||
{
|
||||
|
||||
// old path is an URL?
|
||||
INetURLObject aObj( _sLocation );
|
||||
FASTBOOL bURL = ( aObj.GetProtocol() != INET_PROT_NOT_VALID );
|
||||
Sequence< ::rtl::OUString > aFiles = xFilePicker->getFiles();
|
||||
INetURLObject aNewObj( aFiles[0] );
|
||||
aNewObj.removeFinalSlash();
|
||||
|
||||
// then the new path also an URL else system path
|
||||
String sNewLocation = bURL ? rtl::OUString(aFiles[0]) : aNewObj.getFSysPath( INetURLObject::FSYS_DETECT );
|
||||
|
||||
if (
|
||||
#ifdef UNX
|
||||
// Unix is case sensitive
|
||||
( sNewLocation != _sLocation )
|
||||
#else
|
||||
( sNewLocation.CompareIgnoreCaseToAscii( _sLocation ) != COMPARE_EQUAL )
|
||||
#endif
|
||||
)
|
||||
return sNewLocation;
|
||||
}
|
||||
}
|
||||
catch( Exception& )
|
||||
{
|
||||
DBG_ERRORFILE( "DbRegistrationOptionsPage::EditLocationHdl: exception from folder picker" );
|
||||
}
|
||||
|
||||
return String();
|
||||
}
|
||||
// -----------------------------------------------------------------------------
|
||||
void DbRegistrationOptionsPage::openLinkDialog(const String& _sOldName,const String& _sOldLocation,SvLBoxEntry* _pEntry)
|
||||
{
|
||||
|
1
cui/source/options/optdict.cxx
Normal file → Executable file
1
cui/source/options/optdict.cxx
Normal file → Executable file
@ -168,6 +168,7 @@ IMPL_LINK( SvxNewDictionaryDialog, OKHdl_Impl, Button *, EMPTYARG )
|
||||
String aURL( linguistic::GetWritableDictionaryURL( sDict ) );
|
||||
xNewDic = Reference< XDictionary > (
|
||||
xDicList->createDictionary( sDict, aLocale, eType, aURL ) , UNO_QUERY );
|
||||
xNewDic->setActive( sal_True );
|
||||
}
|
||||
DBG_ASSERT(xNewDic.is(), "NULL pointer");
|
||||
}
|
||||
|
@ -1159,51 +1159,6 @@ void OfaViewTabPage::Reset( const SfxItemSet& )
|
||||
LINK( this, OfaViewTabPage, OnAntialiasingToggled ).Call( NULL );
|
||||
#endif
|
||||
}
|
||||
/* -----------------------------23.11.00 14:55--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
class LangConfigItem_Impl : public ConfigItem
|
||||
{
|
||||
Any aValue;
|
||||
OUString aPropertyName;
|
||||
public:
|
||||
LangConfigItem_Impl(const OUString& rTree, const OUString& rProperty);
|
||||
~LangConfigItem_Impl();
|
||||
|
||||
virtual void Commit();
|
||||
|
||||
const Any& GetValue() const {return aValue;}
|
||||
void SetValue(Any& rValue) {aValue = rValue; SetModified();}
|
||||
};
|
||||
/* -----------------------------23.11.00 15:06--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
LangConfigItem_Impl::LangConfigItem_Impl(
|
||||
const OUString& rTree, const OUString& rProperty) :
|
||||
ConfigItem(rTree),
|
||||
aPropertyName(rProperty)
|
||||
{
|
||||
Sequence<OUString> aNames(1);
|
||||
aNames.getArray()[0] = aPropertyName;
|
||||
Sequence<Any> aValues = GetProperties(aNames);
|
||||
aValue = aValues.getConstArray()[0];
|
||||
}
|
||||
/* -----------------------------23.11.00 15:06--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
LangConfigItem_Impl::~LangConfigItem_Impl()
|
||||
{}
|
||||
/* -----------------------------23.11.00 15:10--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
void LangConfigItem_Impl::Commit()
|
||||
{
|
||||
Sequence<OUString> aNames(1);
|
||||
aNames.getArray()[0] = aPropertyName;
|
||||
Sequence<Any> aValues(1);
|
||||
aValues.getArray()[0] = aValue;
|
||||
PutProperties(aNames, aValues);
|
||||
}
|
||||
/* -----------------22.07.2003 10:33-----------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
|
@ -68,26 +68,6 @@ struct GeneralTabPage_Impl
|
||||
mbUsZipEnabled ( FALSE ) {}
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// kommt aus adritem.cxx
|
||||
//CHINA001 extern String ConvertToStore_Impl( const String& );
|
||||
//copy from adritem.cxx, since it will leave in svx.
|
||||
String ConvertToStore_Impl( const String& rText )
|
||||
{
|
||||
String sRet;
|
||||
USHORT i = 0;
|
||||
|
||||
while ( i < rText.Len() )
|
||||
{
|
||||
if ( rText.GetChar(i) == '\\' || rText.GetChar(i) == '#' )
|
||||
sRet += '\\';
|
||||
sRet += rText.GetChar(i++);
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
|
||||
|
@ -197,31 +197,3 @@ IMPL_LINK( SvxImprovementDialog, HandleOK, OKButton*, EMPTYARG )
|
||||
EndDialog( RET_OK );
|
||||
return 0;
|
||||
}
|
||||
|
||||
// class SvxInfoWindow ---------------------------------------------------
|
||||
|
||||
SvxInfoWindow::SvxInfoWindow( Window* pParent, const ResId& rResId ) :
|
||||
Window( pParent, rResId ),
|
||||
m_aInfoText( this )
|
||||
{
|
||||
m_aInfoText.SetPosSizePixel( Point( 10, 10 ), Size( 150, 10 ) );
|
||||
|
||||
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
|
||||
Wallpaper aWall( rSettings.GetWindowColor() );
|
||||
SetBackground( aWall );
|
||||
Font aNewFont( m_aInfoText.GetFont() );
|
||||
aNewFont.SetTransparent( TRUE );
|
||||
m_aInfoText.SetFont( aNewFont );
|
||||
m_aInfoText.SetBackground( aWall );
|
||||
m_aInfoText.SetControlForeground( rSettings.GetWindowTextColor() );
|
||||
}
|
||||
|
||||
void SvxInfoWindow::SetInfoText( const String& rText )
|
||||
{
|
||||
m_aInfoText.SetText( rText );
|
||||
Size aSize = m_aInfoText.CalcMinimumSize();
|
||||
Size aWinSize = GetSizePixel();
|
||||
Point aPos( ( aWinSize.Width() - aSize.Width() ) / 2, ( aWinSize.Height() - aSize.Height() ) / 2 );
|
||||
m_aInfoText.SetPosSizePixel( aPos, aSize );
|
||||
}
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <comphelper/synchronousdispatch.hxx>
|
||||
#include <comphelper/uieventslogger.hxx>
|
||||
#include <tools/testtoolloader.hxx>
|
||||
#include <osl/file.hxx>
|
||||
|
||||
#define C2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
|
||||
|
||||
@ -61,14 +62,16 @@ namespace uno = ::com::sun::star::uno;
|
||||
namespace util = ::com::sun::star::util;
|
||||
using namespace com::sun::star::system;
|
||||
|
||||
// class SvxEmptyPage ----------------------------------------------------
|
||||
|
||||
SvxEmptyPage::SvxEmptyPage( Window* pParent ) :
|
||||
|
||||
TabPage( pParent, CUI_RES( RID_SVXPAGE_IMPROVEMENT ) )
|
||||
|
||||
namespace
|
||||
{
|
||||
FreeResource();
|
||||
bool lcl_doesLogfileExist(const ::rtl::OUString& sLogPath)
|
||||
{
|
||||
::rtl::OUString sLogFile( sLogPath );
|
||||
sLogFile += C2S("/Current.csv");
|
||||
::osl::File aLogFile(sLogFile);
|
||||
return aLogFile.open(osl_File_OpenFlag_Read) == ::osl::FileBase::E_None;
|
||||
}
|
||||
}
|
||||
|
||||
// class SvxImprovementOptionsPage ---------------------------------------
|
||||
@ -153,7 +156,10 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
|
||||
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
|
||||
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
|
||||
if ( xDoc.is() )
|
||||
{
|
||||
dynamic_cast<Dialog*>(GetParent())->EndDialog( RET_CANCEL );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -164,11 +170,6 @@ SfxTabPage* SvxImprovementOptionsPage::Create( Window* pParent, const SfxItemSet
|
||||
return new SvxImprovementOptionsPage( pParent, rSet );
|
||||
}
|
||||
|
||||
sal_uInt16* SvxImprovementOptionsPage::GetRanges()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sal_Bool SvxImprovementOptionsPage::FillItemSet( SfxItemSet& /*rSet*/ )
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
|
||||
@ -259,11 +260,13 @@ void SvxImprovementOptionsPage::Reset( const SfxItemSet& /*rSet*/ )
|
||||
if ( xSubst.is() )
|
||||
sPath = xSubst->substituteVariables( sPath, sal_False );
|
||||
m_sLogPath = sPath;
|
||||
m_aShowDataPB.Enable(lcl_doesLogfileExist(m_sLogPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( uno::Exception& )
|
||||
{
|
||||
m_aShowDataPB.Enable(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
200
cui/source/options/optinet2.cxx
Executable file → Normal file
200
cui/source/options/optinet2.cxx
Executable file → Normal file
@ -136,47 +136,6 @@ const char* SEARCHENGINE_GROUP = "SearchEngines-$(vlang)";
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
String lcl_MakeTabEntry(const SfxFilter* pFilter)
|
||||
{
|
||||
String sEntry(pFilter->GetMimeType());
|
||||
sEntry += '\t';
|
||||
sEntry += pFilter->GetWildcard().GetWildCard();
|
||||
sEntry += '\t';
|
||||
sEntry += pFilter->GetName();
|
||||
#if defined(OS2)
|
||||
sEntry += '\t';
|
||||
sEntry += pFilter->GetTypeName();
|
||||
#endif
|
||||
return sEntry;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
BOOL IsJavaInstalled_Impl( /*!!!SfxIniManager* pIniMgr*/ )
|
||||
{
|
||||
BOOL bRet = FALSE;
|
||||
/*!!! (pb) needs new implementation
|
||||
String aIniEntry;
|
||||
String aFullName = Config::GetConfigName( pIniMgr->Get( SFX_KEY_USERCONFIG_PATH ),
|
||||
String::CreateFromAscii("java") );
|
||||
INetURLObject aIniFileObj( aFullName, INET_PROT_FILE );
|
||||
String aIniPath = aIniFileObj.getName();
|
||||
if ( pIniMgr->SearchFile( aIniPath ) )
|
||||
{
|
||||
Config aJavaCfg( aIniPath );
|
||||
aJavaCfg.SetGroup( "Java" );
|
||||
ByteString sTemp = aJavaCfg.ReadKey( ByteString(::rtl::OUStringToOString(pIniMgr->GetKeyName( SFX_KEY_JAVA_SYSTEMCLASSPATH ),RTL_TEXTENCODING_UTF8)) );
|
||||
String aJavaSystemClassPath = ::rtl::OStringToOUString(sTemp,RTL_TEXTENCODING_UTF8);
|
||||
String aJavaRuntimeLib = ::rtl::OStringToOUString(aJavaCfg.ReadKey( "RuntimeLib" ),RTL_TEXTENCODING_UTF8);
|
||||
if ( aJavaSystemClassPath.Len() && aJavaRuntimeLib.Len() )
|
||||
bRet = TRUE;
|
||||
}
|
||||
*/
|
||||
return bRet;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void SvxNoSpaceEdit::KeyInput( const KeyEvent& rKEvent )
|
||||
{
|
||||
if ( bOnlyNumeric )
|
||||
@ -1130,146 +1089,6 @@ IMPL_LINK( SvxSearchTabPage, SearchPartHdl_Impl, RadioButton *, EMPTYARG )
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
/********************************************************************/
|
||||
/********************************************************************/
|
||||
/* */
|
||||
/* SvxOtherTabPage */
|
||||
/* */
|
||||
/********************************************************************/
|
||||
/********************************************************************/
|
||||
|
||||
/*-----------------15.05.97 09:51-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
/*
|
||||
SvxPatternField::SvxPatternField( Window* pParent, const ResId& rResId ) :
|
||||
|
||||
PatternField( pParent, rResId ),
|
||||
|
||||
sMsg233 ( ResId( ST_MSG_233 ) ),
|
||||
sMsg255 ( ResId( ST_MSG_255 ) )
|
||||
|
||||
{
|
||||
FreeResource();
|
||||
SelectFixedFont();
|
||||
} */
|
||||
|
||||
/*-----------------15.05.97 09:51-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
|
||||
/*void SvxPatternField::KeyInput( const KeyEvent& rKEvt )
|
||||
{
|
||||
PatternField::KeyInput( rKEvt );
|
||||
BOOL bDelete = ( rKEvt.GetKeyCode().GetCode() == KEY_DELETE );
|
||||
String sEntry( GetText() );
|
||||
sEntry[(USHORT)3] = '.';
|
||||
sEntry[(USHORT)7] = '.';
|
||||
sEntry[(USHORT)11] = '.';
|
||||
Selection aSelection( GetSelection() );
|
||||
String sPart( sEntry.GetToken( 0, '.' ) );
|
||||
USHORT i, nPart( sPart.EraseLeadingChars() );
|
||||
BOOL bSet = FALSE;
|
||||
|
||||
if ( sPart.Len() && ( !nPart || nPart > 255 ) )
|
||||
{
|
||||
// der erste Part darf nicht 0 und nicht gr"osser 255 sein
|
||||
String sMsg( sPart );
|
||||
sMsg += ' ';
|
||||
sMsg += sMsg233;
|
||||
InfoBox( this, sMsg ).Execute();
|
||||
|
||||
if ( nPart == 0 )
|
||||
sPart = " 1";
|
||||
else
|
||||
sPart = "255";
|
||||
sEntry.SetToken( 0, '.', sPart );
|
||||
bSet = TRUE;
|
||||
};
|
||||
|
||||
for ( i = 1; i < 4; i++ )
|
||||
{
|
||||
// die anderen Parts d"urfen nicht gr"osser 255 sein
|
||||
sPart = sEntry.GetToken( i, '.' );
|
||||
nPart = sPart.EraseLeadingChars();
|
||||
|
||||
if ( nPart > 255 )
|
||||
{
|
||||
String sMsg( sPart );
|
||||
sMsg += ' ';
|
||||
sMsg += sMsg255;
|
||||
InfoBox( this, sMsg ).Execute();
|
||||
|
||||
if ( nPart == 0 )
|
||||
sPart = " 1";
|
||||
else
|
||||
sPart = "255";
|
||||
sEntry.SetToken( i, '.', sPart );
|
||||
bSet = TRUE;
|
||||
};
|
||||
}
|
||||
|
||||
if ( bSet )
|
||||
{
|
||||
SetText( sEntry );
|
||||
SetSelection( aSelection );
|
||||
}
|
||||
}
|
||||
*/
|
||||
// -----------------------------------------------------------------------
|
||||
#if 0
|
||||
long SvxPatternField::Notify( NotifyEvent& rNEvt )
|
||||
{
|
||||
return PatternField::Notify( rNEvt );
|
||||
/*! long nHandled = 0;
|
||||
|
||||
if ( rNEvt.GetType() == EVENT_KEYUP )
|
||||
{
|
||||
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
|
||||
KeyInput( *pKEvt );
|
||||
nHandled = 1;
|
||||
}
|
||||
return nHandled;*/
|
||||
}
|
||||
#endif
|
||||
|
||||
// class JavaScriptDisableQueryBox_Impl --------------------------------------
|
||||
|
||||
class JavaScriptDisableQueryBox_Impl : public ModalDialog
|
||||
{
|
||||
private:
|
||||
FixedImage aImage;
|
||||
FixedText aWarningFT;
|
||||
CheckBox aDisableCB;
|
||||
OKButton aYesBtn;
|
||||
CancelButton aNoBtn;
|
||||
|
||||
public:
|
||||
JavaScriptDisableQueryBox_Impl( Window* pParent );
|
||||
|
||||
BOOL IsWarningDisabled() const { return aDisableCB.IsChecked(); }
|
||||
};
|
||||
|
||||
JavaScriptDisableQueryBox_Impl::JavaScriptDisableQueryBox_Impl( Window* pParent ) :
|
||||
|
||||
ModalDialog( pParent, CUI_RES( RID_SVXDLG_OPT_JAVASCRIPT_DISABLE ) ),
|
||||
|
||||
aImage ( this, CUI_RES( IMG_JSCPT_WARNING ) ),
|
||||
aWarningFT ( this, CUI_RES( FT_JSCPT_WARNING ) ),
|
||||
aDisableCB ( this, CUI_RES( CB_JSCPT_DISABLE ) ),
|
||||
aYesBtn ( this, CUI_RES( BTN_JSCPT_YES ) ),
|
||||
aNoBtn ( this, CUI_RES( BTN_JSCPT_NO ) )
|
||||
|
||||
{
|
||||
FreeResource();
|
||||
|
||||
aYesBtn.SetText( Button::GetStandardText( BUTTON_YES ) );
|
||||
aNoBtn.SetText( Button::GetStandardText( BUTTON_NO ) );
|
||||
aImage.SetImage( WarningBox::GetStandardImage() );
|
||||
}
|
||||
|
||||
//#98647#----------------------------------------------
|
||||
void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
|
||||
{ // try to show tips just like as on toolbars
|
||||
@ -1645,25 +1464,6 @@ int SvxSecurityTabPage::DeactivatePage( SfxItemSet* _pSet )
|
||||
|
||||
namespace
|
||||
{
|
||||
/* bool Enable( const SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, Control& _rCtrl, FixedImage& _rImg )
|
||||
{
|
||||
bool b = _rOpt.IsOptionEnabled( _eOpt );
|
||||
_rCtrl.Enable( b );
|
||||
_Img.Show( !b );
|
||||
return b;
|
||||
}
|
||||
*/
|
||||
bool EnableAndSet( const SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt,
|
||||
CheckBox& _rCtrl, FixedImage& _rImg )
|
||||
{
|
||||
// bool b = Enable( _rOpt, _eOpt, _rCtrl, _rImg );
|
||||
bool b = _rOpt.IsOptionEnabled( _eOpt );
|
||||
_rCtrl.Enable( b );
|
||||
_rImg.Show( !b );
|
||||
_rCtrl.Check( _rOpt.IsOptionSet( _eOpt ) );
|
||||
return b;
|
||||
}
|
||||
|
||||
bool CheckAndSave( SvtSecurityOptions& _rOpt, SvtSecurityOptions::EOption _eOpt, const bool _bIsChecked, bool& _rModfied )
|
||||
{
|
||||
bool bModified = false;
|
||||
|
@ -65,56 +65,6 @@ using namespace ::com::sun::star::ucb;
|
||||
using namespace ::com::sun::star::ui::dialogs;
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
// class SvxJavaTable ----------------------------------------------------
|
||||
|
||||
SvxJavaTable::SvxJavaTable( Window* _pParent, const ResId& _rId ) :
|
||||
|
||||
SvxSimpleTable( _pParent, _rId )
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
SvxJavaTable::~SvxJavaTable()
|
||||
{
|
||||
}
|
||||
|
||||
void SvxJavaTable::SetTabs()
|
||||
{
|
||||
SvxSimpleTable::SetTabs();
|
||||
/*
|
||||
USHORT nAdjust = SV_LBOXTAB_ADJUST_RIGHT | SV_LBOXTAB_ADJUST_LEFT |
|
||||
SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_ADJUST_NUMERIC | SV_LBOXTAB_FORCE;
|
||||
if ( aTabs.Count() > 0 )
|
||||
{
|
||||
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
|
||||
pTab->nFlags &= ~nAdjust;
|
||||
pTab->nFlags |= SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER | SV_LBOXTAB_FORCE;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void SvxJavaTable::MouseButtonUp( const MouseEvent& _rMEvt )
|
||||
{
|
||||
m_aCurMousePoint = _rMEvt.GetPosPixel();
|
||||
SvxSimpleTable::MouseButtonUp( _rMEvt );
|
||||
}
|
||||
|
||||
void SvxJavaTable::KeyInput( const KeyEvent& rKEvt )
|
||||
{
|
||||
if ( !rKEvt.GetKeyCode().GetModifier() && KEY_SPACE == rKEvt.GetKeyCode().GetCode() )
|
||||
{
|
||||
SvLBoxEntry* pEntry = FirstSelected();
|
||||
if ( GetCheckButtonState( pEntry ) == SV_BUTTON_UNCHECKED )
|
||||
{
|
||||
SetCheckButtonState( pEntry, SV_BUTTON_CHECKED );
|
||||
GetCheckButtonHdl().Call( NULL );
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
SvxSimpleTable::KeyInput( rKEvt );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
bool areListsEqual( const Sequence< ::rtl::OUString >& rListA, const Sequence< ::rtl::OUString >& rListB )
|
||||
|
@ -47,27 +47,6 @@ typedef struct _JavaInfo JavaInfo;
|
||||
class SvxJavaParameterDlg;
|
||||
class SvxJavaClassPathDlg;
|
||||
|
||||
// class SvxJavaTable ----------------------------------------------------
|
||||
|
||||
class SvxJavaTable : public SvxSimpleTable
|
||||
{
|
||||
using SvxSimpleTable::SetTabs;
|
||||
private:
|
||||
Point m_aCurMousePoint;
|
||||
|
||||
protected:
|
||||
virtual void SetTabs();
|
||||
virtual void MouseButtonUp( const MouseEvent& _rMEvt );
|
||||
virtual void KeyInput( const KeyEvent& rKEvt );
|
||||
|
||||
public:
|
||||
SvxJavaTable( Window* _pParent, const ResId& _rId );
|
||||
~SvxJavaTable();
|
||||
|
||||
|
||||
inline Point GetCurMousePoint() { return m_aCurMousePoint; }
|
||||
};
|
||||
|
||||
// class SvxJavaOptionsPage ----------------------------------------------
|
||||
|
||||
class SvxJavaOptionsPage : public SfxTabPage
|
||||
|
@ -78,37 +78,6 @@ using rtl::OUString;
|
||||
#define WININDEX_AUTOSAVE ((USHORT)6)
|
||||
#define WININDEX_SAVEURL_RELFSYS ((USHORT)9)
|
||||
|
||||
// -------------------- --------------------------------------------------
|
||||
class FilterWarningDialog_Impl : public ModalDialog
|
||||
{
|
||||
OKButton aOk;
|
||||
CancelButton aCancel;
|
||||
FixedImage aImage;
|
||||
FixedInfo aFilterWarningFT;
|
||||
|
||||
public:
|
||||
FilterWarningDialog_Impl(Window* pParent);
|
||||
|
||||
void SetFilterName(const String& rFilterUIName);
|
||||
};
|
||||
// ----------------------------------------------------------------------
|
||||
FilterWarningDialog_Impl::FilterWarningDialog_Impl(Window* pParent) :
|
||||
ModalDialog(pParent, CUI_RES( RID_SVXDLG_FILTER_WARNING ) ),
|
||||
aOk( this, CUI_RES(PB_OK )),
|
||||
aCancel( this, CUI_RES(PB_CANCEL )),
|
||||
aImage( this, CUI_RES(IMG_WARNING )),
|
||||
aFilterWarningFT( this, CUI_RES(FT_FILTER_WARNING ))
|
||||
{
|
||||
FreeResource();
|
||||
aImage.SetImage(WarningBox::GetStandardImage());
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
void FilterWarningDialog_Impl::SetFilterName(const String& rFilterUIName)
|
||||
{
|
||||
String sTmp(aFilterWarningFT.GetText());
|
||||
sTmp.SearchAndReplaceAscii("%1", rFilterUIName);
|
||||
aFilterWarningFT.SetText(sTmp);
|
||||
}
|
||||
// ----------------------------------------------------------------------
|
||||
#ifdef FILTER_WARNING_ENABLED
|
||||
class SvxAlienFilterWarningConfig_Impl : public utl::ConfigItem
|
||||
@ -324,23 +293,6 @@ SfxTabPage* SfxSaveTabPage::Create( Window* pParent,
|
||||
return ( new SfxSaveTabPage( pParent, rAttrSet ) );
|
||||
}
|
||||
|
||||
/* -----------------------------05.04.01 13:10--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
OUString lcl_ExtractUIName(const Sequence<PropertyValue> rProperties)
|
||||
{
|
||||
OUString sRet;
|
||||
const PropertyValue* pProperties = rProperties.getConstArray();
|
||||
for(int nProp = 0; nProp < rProperties.getLength(); nProp++)
|
||||
{
|
||||
if(!pProperties[nProp].Name.compareToAscii("UIName"))
|
||||
{
|
||||
pProperties[nProp].Value >>= sRet;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return sRet;
|
||||
}
|
||||
// -----------------------------------------------------------------------
|
||||
bool SfxSaveTabPage::AcceptFilter( USHORT nPos )
|
||||
{
|
||||
|
@ -115,13 +115,6 @@ namespace offapp
|
||||
{
|
||||
return m_pImpl->getDriverImplNames().end();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
sal_Int32 ODriverEnumeration::size() const throw()
|
||||
{
|
||||
return m_pImpl->getDriverImplNames().size();
|
||||
}
|
||||
|
||||
//........................................................................
|
||||
} // namespace offapp
|
||||
//........................................................................
|
||||
|
@ -64,7 +64,6 @@ namespace offapp
|
||||
|
||||
const_iterator begin() const throw();
|
||||
const_iterator end() const throw();
|
||||
sal_Int32 size() const throw();
|
||||
};
|
||||
|
||||
//........................................................................
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <com/sun/star/frame/XLoadable.hpp>
|
||||
#include <tools/rcid.h>
|
||||
#include <tools/shl.hxx>
|
||||
#include <tools/urlobj.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <toolkit/helper/vclunohelper.hxx>
|
||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||
@ -2708,22 +2709,6 @@ short OfaTreeOptionsDialog::Execute()
|
||||
|
||||
// class ExtensionsTabPage -----------------------------------------------
|
||||
|
||||
ExtensionsTabPage::ExtensionsTabPage(
|
||||
Window* pParent, const ResId& rResId, const rtl::OUString& rPageURL,
|
||||
const rtl::OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) :
|
||||
|
||||
TabPage( pParent, rResId ),
|
||||
|
||||
m_sPageURL ( rPageURL ),
|
||||
m_sEventHdl ( rEvtHdl ),
|
||||
m_xWinProvider ( rProvider ),
|
||||
m_bIsWindowHidden ( false )
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
ExtensionsTabPage::ExtensionsTabPage(
|
||||
Window* pParent, WinBits nStyle, const rtl::OUString& rPageURL,
|
||||
const rtl::OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& rProvider ) :
|
||||
@ -2862,15 +2847,3 @@ void ExtensionsTabPage::SavePage()
|
||||
{
|
||||
DispatchAction( C2U("ok") );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void ExtensionsTabPage::HideWindow()
|
||||
{
|
||||
if ( !m_bIsWindowHidden && m_xPage.is() )
|
||||
{
|
||||
m_xPage->setVisible( sal_False );
|
||||
m_bIsWindowHidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
6
cui/source/options/webconninfo.cxx
Normal file → Executable file
6
cui/source/options/webconninfo.cxx
Normal file → Executable file
@ -311,10 +311,8 @@ IMPL_LINK( WebConnectionInfoDialog, ChangePasswordHdl, PushButton*, EMPTYARG )
|
||||
::rtl::OUString aURL = m_aPasswordsLB.GetEntryText( pEntry, 0 );
|
||||
::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 );
|
||||
|
||||
::comphelper::DocPasswordRequest* pPasswordRequest
|
||||
= new ::comphelper::DocPasswordRequest(
|
||||
::comphelper::DocPasswordRequestType_STANDARD,
|
||||
task::PasswordRequestMode_PASSWORD_CREATE, aURL );
|
||||
::comphelper::SimplePasswordRequest* pPasswordRequest
|
||||
= new ::comphelper::SimplePasswordRequest( task::PasswordRequestMode_PASSWORD_CREATE );
|
||||
uno::Reference< task::XInteractionRequest > rRequest( pPasswordRequest );
|
||||
|
||||
uno::Reference< task::XInteractionHandler > xInteractionHandler(
|
||||
|
@ -154,17 +154,6 @@ Color TpBorderRGBColor( ColorData aColorData )
|
||||
return( aRGBColor );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Color TpBorderRGBColor( const Color& rColor )
|
||||
{
|
||||
Color aRGBColor( rColor.GetRed(),
|
||||
rColor.GetGreen(),
|
||||
rColor.GetBlue() );
|
||||
|
||||
return( aRGBColor );
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
void lcl_SetDecimalDigitsTo1(MetricField& rField)
|
||||
{
|
||||
|
@ -283,13 +283,6 @@ sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot,
|
||||
return new FrameLineConnection( nSlot, new FrameSelectorWrapper( rFrameSel, eBorder ), nFlags );
|
||||
}
|
||||
|
||||
sfx::ItemConnectionBase* CreateFrameBoxConnection( USHORT /*nBoxSlot*/, USHORT /*nBoxInfoSlot*/,
|
||||
FrameSelector& /*rFrameSel*/, FrameBorderType /*eBorder*/, sfx::ItemConnFlags /*nFlags*/ )
|
||||
{
|
||||
DBG_ERRORFILE( "svx::CreateFrameBoxConnection - not implemented" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet,
|
||||
MetricField& rMfLeft, MetricField& rMfRight,
|
||||
MetricField& rMfTop, MetricField& rMfBottom,
|
||||
|
@ -48,13 +48,6 @@ sfx::ItemConnectionBase* CreateFrameLineConnection( USHORT nSlot,
|
||||
FrameSelector& rFrameSel, FrameBorderType eBorder,
|
||||
sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT );
|
||||
|
||||
/** Creates an item connection object that connects an SvxBoxItem and an
|
||||
SvxBoxInfoItem with an svx::FrameSelector control. */
|
||||
sfx::ItemConnectionBase* CreateFrameBoxConnection(
|
||||
USHORT nBoxSlot, USHORT nBoxInfoSlot,
|
||||
FrameSelector& rFrameSel, FrameBorderType eBorder,
|
||||
sfx::ItemConnFlags nFlags = sfx::ITEMCONN_DEFAULT );
|
||||
|
||||
/** Creates an item connection object that connects an SvxMarginItem with the
|
||||
controls of the SvxBorderTabPage. */
|
||||
sfx::ItemConnectionBase* CreateMarginConnection( const SfxItemSet& rItemSet,
|
||||
|
@ -1523,47 +1523,6 @@ void SvxCharNamePage::ResetColor_Impl( const SfxItemSet& rSet )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
BOOL SvxCharNamePage::FillItemSetColor_Impl( SfxItemSet& rSet )
|
||||
{
|
||||
USHORT nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
|
||||
const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, SID_ATTR_CHAR_COLOR );
|
||||
const SvxColorItem* pItem = NULL;
|
||||
BOOL bChanged = TRUE;
|
||||
const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL;
|
||||
const SfxItemSet& rOldSet = GetItemSet();
|
||||
|
||||
Color aSelectedColor;
|
||||
if ( m_pColorLB->GetSelectEntry() == m_pImpl->m_aTransparentText )
|
||||
aSelectedColor = Color( COL_TRANSPARENT );
|
||||
else
|
||||
aSelectedColor = m_pColorLB->GetSelectEntryColor();
|
||||
|
||||
if ( pOld && pOld->GetValue() == aSelectedColor )
|
||||
bChanged = FALSE;
|
||||
|
||||
if ( !bChanged )
|
||||
bChanged = ( m_pColorLB->GetSavedValue() == LISTBOX_ENTRY_NOTFOUND );
|
||||
|
||||
if ( !bChanged && pExampleSet &&
|
||||
pExampleSet->GetItemState( nWhich, FALSE, (const SfxPoolItem**)&pItem ) == SFX_ITEM_SET &&
|
||||
( (SvxColorItem*)pItem )->GetValue() != aSelectedColor )
|
||||
bChanged = TRUE;
|
||||
|
||||
BOOL bModified = FALSE;
|
||||
|
||||
if ( bChanged && m_pColorLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
rSet.Put( SvxColorItem( aSelectedColor, nWhich ) );
|
||||
bModified = TRUE;
|
||||
}
|
||||
else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
|
||||
CLEARTITEM;
|
||||
|
||||
return bModified;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
IMPL_LINK( SvxCharNamePage, UpdateHdl_Impl, Timer*, EMPTYARG )
|
||||
{
|
||||
UpdatePreview_Impl();
|
||||
@ -1656,7 +1615,6 @@ BOOL SvxCharNamePage::FillItemSet( SfxItemSet& rSet )
|
||||
BOOL bModified = FillItemSet_Impl( rSet, Western );
|
||||
bModified |= FillItemSet_Impl( rSet, Asian );
|
||||
bModified |= FillItemSet_Impl( rSet, Ctl );
|
||||
//! bModified |= FillItemSetColor_Impl( rSet );
|
||||
return bModified;
|
||||
}
|
||||
|
||||
|
@ -237,26 +237,6 @@ void _SfxMacroTabPage::ScriptChanged( const String& aLangName )
|
||||
EnableButtons( aLangName );
|
||||
}
|
||||
|
||||
void _SfxMacroTabPage::SetGetRangeLink( FNGetRangeHdl pFn )
|
||||
{
|
||||
mpImpl->fnGetRange = pFn;
|
||||
}
|
||||
|
||||
FNGetRangeHdl _SfxMacroTabPage::GetGetRangeLink() const
|
||||
{
|
||||
return mpImpl->fnGetRange;
|
||||
}
|
||||
|
||||
void _SfxMacroTabPage::SetGetMacrosOfRangeLink( FNGetMacrosOfRangeHdl pFn )
|
||||
{
|
||||
mpImpl->fnGetMacroOfRange = pFn;
|
||||
}
|
||||
|
||||
FNGetMacrosOfRangeHdl _SfxMacroTabPage::GetGetMacrosOfRangeLink() const
|
||||
{
|
||||
return mpImpl->fnGetMacroOfRange;
|
||||
}
|
||||
|
||||
BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet )
|
||||
{
|
||||
SvxMacroItem aItem( GetWhich( aPageRg[0] ) );
|
||||
@ -313,11 +293,6 @@ void _SfxMacroTabPage::Reset( const SfxItemSet& rSet )
|
||||
rListBox.SetCurEntry( pE );
|
||||
}
|
||||
|
||||
void _SfxMacroTabPage::SetReadOnly( BOOL bSet )
|
||||
{
|
||||
mpImpl->bReadOnly = bSet;
|
||||
}
|
||||
|
||||
BOOL _SfxMacroTabPage::IsReadOnly() const
|
||||
{
|
||||
return mpImpl->bReadOnly;
|
||||
@ -392,12 +367,6 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG )
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit*, EMPTYARG )
|
||||
{
|
||||
pThis->EnableButtons( DEFINE_CONST_UNICODE("JavaScript") );
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
|
||||
{
|
||||
_SfxMacroTabPage_Impl* pImpl = pThis->mpImpl;
|
||||
@ -580,24 +549,6 @@ void _SfxMacroTabPage::FillEvents()
|
||||
}
|
||||
}
|
||||
|
||||
void _SfxMacroTabPage::SelectEvent( const String & /*rEventName*/, USHORT nEventId )
|
||||
{
|
||||
SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
|
||||
ULONG nEntryCnt = rListBox.GetEntryCount();
|
||||
|
||||
for( ULONG n = 0 ; n < nEntryCnt ; ++n )
|
||||
{
|
||||
SvLBoxEntry* pE = rListBox.GetEntry( n );
|
||||
if( pE && ( USHORT ) ( ULONG ) pE->GetUserData() == nEventId )
|
||||
{
|
||||
rListBox.SetCurEntry( pE );
|
||||
rListBox.MakeVisible( pE );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* /*pTbPg*/, const String& rLanguage )
|
||||
{
|
||||
SvStringsDtor* pNew = new SvStringsDtor;
|
||||
|
@ -939,28 +939,6 @@ void SvxNumPickTabPage::PageCreated(SfxAllItemSet aSet)
|
||||
SetCharFmtNames( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue());
|
||||
}
|
||||
//end of CHINA001
|
||||
/*-----------------07.02.97 15.59-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType,
|
||||
const OUString& rBulletChar, const OUString& rText, const OUString& rFontName,
|
||||
Point& rLeft, Font& rRuleFont, const Font& rTextFont)
|
||||
{
|
||||
|
||||
if(NumberingType::CHAR_SPECIAL == nNumberingType )
|
||||
{
|
||||
rRuleFont.SetStyleName(rFontName);
|
||||
pVDev->SetFont(rRuleFont);
|
||||
pVDev->DrawText(rLeft, rBulletChar);
|
||||
rLeft.X() += pVDev->GetTextWidth(rBulletChar);
|
||||
}
|
||||
else
|
||||
{
|
||||
pVDev->SetFont(rTextFont);
|
||||
pVDev->DrawText(rLeft, rText);
|
||||
rLeft.X() += pVDev->GetTextWidth(rText);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
/* */
|
||||
|
@ -957,13 +957,6 @@ void SvxStdParagraphTabPage::SetPageWidth( USHORT nPageWidth )
|
||||
{
|
||||
nWidth = nPageWidth;
|
||||
}
|
||||
/*-----------------16.01.97 18.01-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
void SvxStdParagraphTabPage::SetMaxDistance( USHORT nMaxDist )
|
||||
{
|
||||
nAbst = nMaxDist;
|
||||
}
|
||||
|
||||
/*-----------------17.01.97 08.11-------------------
|
||||
|
||||
|
@ -1 +1,2 @@
|
||||
..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll
|
||||
..\%__SRC%\misc\emser.component %_DEST%\xml%_EXT%\emser.component
|
||||
|
@ -95,34 +95,6 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic
|
||||
return pRet;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey )
|
||||
{
|
||||
if (pRegistryKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) );
|
||||
|
||||
uno::Reference< registry::XRegistryKey > xNewKey;
|
||||
|
||||
xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
|
||||
EmbedServer_getImplementationName() +
|
||||
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) );
|
||||
|
||||
uno::Sequence< ::rtl::OUString > rServices = EmbedServer_getSupportedServiceNames();
|
||||
for( sal_Int32 ind = 0; ind < rServices.getLength(); ind++ )
|
||||
xNewKey->createKey( rServices.getConstArray()[ind] );
|
||||
|
||||
return sal_True;
|
||||
}
|
||||
catch (registry::InvalidRegistryException &)
|
||||
{
|
||||
OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
|
||||
}
|
||||
}
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
// Fix strange warnings about some
|
||||
@ -130,4 +102,4 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis
|
||||
// warning C4505: 'xxx' : unreferenced local function has been removed
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4505)
|
||||
#endif
|
||||
#endif
|
||||
|
34
embedserv/util/emser.component
Normal file
34
embedserv/util/emser.component
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="com.sun.star.comp.ole.EmbedServer">
|
||||
<service name="com.sun.star.document.OleEmbeddedServerRegistration"/>
|
||||
</implementation>
|
||||
</component>
|
@ -1,3 +1,2 @@
|
||||
component_getImplementationEnvironment
|
||||
component_writeInfo
|
||||
component_getFactory
|
||||
|
@ -94,3 +94,11 @@ DEF1EXPORTFILE= exports.dxp
|
||||
.INCLUDE : target.mk
|
||||
|
||||
|
||||
|
||||
ALLTAR : $(MISC)/emser.component
|
||||
|
||||
$(MISC)/emser.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
|
||||
emser.component
|
||||
$(XSLTPROC) --nonet --stringparam uri \
|
||||
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
|
||||
$(SOLARENV)/bin/createcomponent.xslt emser.component
|
||||
|
@ -22,6 +22,7 @@ mkdir: %_DEST%\bin%_EXT%\so
|
||||
..\%__SRC%\bin\npsoplugin_so.dll %_DEST%\bin%_EXT%\so\npsoplugin.dll
|
||||
..\%__SRC%\bin\x64\so_activex.dll %_DEST%\bin%_EXT%\so_activex_x64.dll
|
||||
..\%__SRC%\bin\mdibundle.zip %_DEST%\bin%_EXT%\mdibundle.zip
|
||||
..\%__SRC%\misc\oleautobridge.component %_DEST%\xml%_EXT%\oleautobridge.component
|
||||
|
||||
..\source\bibliography\uiconfig\sbibliography\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sbibliography\menubar\*.xml
|
||||
|
||||
@ -39,3 +40,19 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
|
||||
..\%__SRC%\misc\registry\spool\org\openoffice\Office\Logging\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Logging
|
||||
|
||||
..\%__SRC%\bin\*.oxt %_DEST%\pck%_EXT%\*
|
||||
..\%__SRC%\misc\abp.component %_DEST%\xml%_EXT%\abp.component
|
||||
..\%__SRC%\misc\bib.component %_DEST%\xml%_EXT%\bib.component
|
||||
..\%__SRC%\misc\dbp.component %_DEST%\xml%_EXT%\dbp.component
|
||||
..\%__SRC%\misc\ldapbe2.component %_DEST%\xml%_EXT%\ldapbe2.component
|
||||
..\%__SRC%\misc\log.component %_DEST%\xml%_EXT%\log.component
|
||||
..\%__SRC%\misc\oooimprovecore.component %_DEST%\xml%_EXT%\oooimprovecore.component
|
||||
..\%__SRC%\misc\oooimprovement.component %_DEST%\xml%_EXT%\oooimprovement.component
|
||||
..\%__SRC%\misc\pcr.component %_DEST%\xml%_EXT%\pcr.component
|
||||
..\%__SRC%\misc\pl.component %_DEST%\xml%_EXT%\pl.component
|
||||
..\%__SRC%\misc\preload.component %_DEST%\xml%_EXT%\preload.component
|
||||
..\%__SRC%\misc\res.component %_DEST%\xml%_EXT%\res.component
|
||||
..\%__SRC%\misc\scn.component %_DEST%\xml%_EXT%\scn.component
|
||||
..\%__SRC%\misc\updatefeed.component %_DEST%\xml%_EXT%\updatefeed.component
|
||||
..\%__SRC%\misc\updchk.component %_DEST%\xml%_EXT%\updchk.component
|
||||
..\%__SRC%\misc\updchk.uno.component %_DEST%\xml%_EXT%\updchk.uno.component
|
||||
..\%__SRC%\misc\xmx.component %_DEST%\xml%_EXT%\xmx.component
|
||||
|
34
extensions/source/abpilot/abp.component
Normal file
34
extensions/source/abpilot/abp.component
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--**********************************************************************
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
||||
*
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
* OpenOffice.org is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 3
|
||||
* only, as published by the Free Software Foundation.
|
||||
*
|
||||
* OpenOffice.org is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License version 3 for more details
|
||||
* (a copy is included in the LICENSE file that accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* version 3 along with OpenOffice.org. If not, see
|
||||
* <http://www.openoffice.org/license.html>
|
||||
* for a copy of the LGPLv3 License.
|
||||
*
|
||||
**********************************************************************-->
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary"
|
||||
xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="org.openoffice.comp.abp.OAddressBookSourcePilot">
|
||||
<service name="com.sun.star.ui.dialogs.AddressBookSourcePilot"/>
|
||||
</implementation>
|
||||
</component>
|
@ -65,27 +65,6 @@ component_getImplementationEnvironment(
|
||||
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
|
||||
void* pServiceManager,
|
||||
void* pRegistryKey
|
||||
)
|
||||
{
|
||||
if (pRegistryKey)
|
||||
try
|
||||
{
|
||||
return ::abp::OModule::writeComponentInfos(
|
||||
static_cast<XMultiServiceFactory*>(pServiceManager),
|
||||
static_cast<XRegistryKey*>(pRegistryKey));
|
||||
}
|
||||
catch (InvalidRegistryException& )
|
||||
{
|
||||
OSL_ASSERT("abp::component_writeInfo: could not create a registry key (InvalidRegistryException) !");
|
||||
}
|
||||
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
|
||||
const sal_Char* pImplementationName,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user