This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new e53c7ad2a8 Fix typos (clipoard, cliboard), cleanup
e53c7ad2a8 is described below
commit e53c7ad2a84deacc7f4366655618732549e4d1d3
Author: mseidel <[email protected]>
AuthorDate: Sun Feb 16 02:19:26 2025 +0100
Fix typos (clipoard, cliboard), cleanup
---
main/dtrans/source/win32/mtaole/MtaOleClipb.cxx | 293 ++++++++-------
.../OOoRunner/src/main/java/util/SysUtils.java | 26 +-
main/sc/source/ui/unoobj/docuno.cxx | 417 ++++++++++-----------
main/sw/source/core/unocore/unocoll.cxx | 109 +++---
4 files changed, 419 insertions(+), 426 deletions(-)
diff --git a/main/dtrans/source/win32/mtaole/MtaOleClipb.cxx
b/main/dtrans/source/win32/mtaole/MtaOleClipb.cxx
index f962b680c5..45aeb5a662 100644
--- a/main/dtrans/source/win32/mtaole/MtaOleClipb.cxx
+++ b/main/dtrans/source/win32/mtaole/MtaOleClipb.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dtrans.hxx"
@@ -31,14 +29,14 @@
the ole clipboard, which runs only in an sta thread.
The consequence is that callback from the ole clipboard are in the
context of this sta thread. In the soffice applications this may lead
- to problems because they all use the one and only mutex called
+ to problems because they all use the one and only mutex called
SolarMutex.
- In order to transfer clipboard requests to our sta thread we use a
+ In order to transfer clipboard requests to our sta thread we use a
hidden window an forward these requests via window messages.
*/
#ifdef _MSC_VER
-#pragma warning( disable : 4786 ) // identifier was truncated to 'number'
+#pragma warning( disable : 4786 ) // identifier was truncated to 'number'
// characters
in the debug information
#endif
@@ -84,21 +82,21 @@ namespace /* private */
const sal_uInt32 MSG_FLUSHCLIPBOARD = WM_USER +
0x0004;
const sal_uInt32 MSG_SHUTDOWN = WM_USER +
0x0005;
- const sal_uInt32 MAX_WAITTIME =
10000; // msec
+ const sal_uInt32 MAX_WAITTIME =
10000; // msec
const sal_uInt32 MAX_WAIT_SHUTDOWN = 10000; // msec
const sal_uInt32 MAX_CLIPEVENT_PROCESSING_TIME = 5000; // msec
const sal_Bool MANUAL_RESET = sal_True;
const sal_Bool AUTO_RESET = sal_False;
const sal_Bool INIT_NONSIGNALED = sal_False;
-
+
//------------------------------------------------------
- /* Cannot use osl conditions because they are blocking
+ /* Cannot use osl conditions because they are blocking
without waking up on messages sent by another thread
this leads to deadlocks because we are blocking the
- communication between inter-thread marshalled COM
+ communication between inter-thread marshalled COM
pointers.
- COM Proxy-Stub communication uses SendMessages for
+ COM Proxy-Stub communication uses SendMessages for
synchronization purposes.
*/
class Win32Condition
@@ -113,50 +111,50 @@ namespace /* private */
false, /* initial state not signaled */
0); /* automatic name */
}
-
- // dtor
+
+ // dtor
~Win32Condition()
{
CloseHandle(m_hEvent);
}
-
+
// wait infinite for event be signaled
// leave messages sent through
void wait()
{
while(1)
{
- DWORD dwResult =
+ DWORD dwResult =
MsgWaitForMultipleObjects(1, &m_hEvent, FALSE,
INFINITE, QS_SENDMESSAGE);
-
- switch (dwResult)
+
+ switch (dwResult)
{
case WAIT_OBJECT_0:
- return;
+ return;
case WAIT_OBJECT_0 + 1:
{
- /* PeekMessage processes all messages
in the SendMessage
+ /* PeekMessage processes all messages
in the SendMessage
queue that's what we want, messages
from the PostMessage
queue stay untouched */
- MSG msg;
+ MSG msg;
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
-
+
break;
- }
+ }
}
}
}
-
+
// reset the event
void set()
{
SetEvent(m_hEvent);
}
-
+
private:
HANDLE m_hEvent;
-
+
// prevent copy/assignment
private:
Win32Condition(const Win32Condition&);
@@ -171,8 +169,8 @@ namespace /* private */
{
Win32Condition aCondition;
HRESULT hr;
- };
-
+ };
+
} /* namespace private */
//----------------------------------------------------------------
@@ -190,13 +188,13 @@ HRESULT MarshalIDataObjectInStream( IDataObject*
pIDataObject, LPSTREAM* ppStrea
{
OSL_ASSERT( NULL != pIDataObject );
OSL_ASSERT( NULL != ppStream );
-
+
*ppStream = NULL;
return CoMarshalInterThreadInterfaceInStream(
- __uuidof(IDataObject), //The IID of inteface to be marshaled
+ __uuidof(IDataObject), //The IID of interface to be marshaled
pIDataObject, //The interface pointer
- ppStream //IStream pointer
- );
+ ppStream //IStream pointer
+ );
}
//--------------------------------------------------------------------
@@ -208,12 +206,12 @@ HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM
lpStream, IDataObject** p
{
OSL_ASSERT( NULL != lpStream );
OSL_ASSERT( NULL != ppIDataObject );
-
+
*ppIDataObject = NULL;
return CoGetInterfaceAndReleaseStream(
- lpStream,
- __uuidof(IDataObject),
- reinterpret_cast<LPVOID*>(ppIDataObject));
+ lpStream,
+ __uuidof(IDataObject),
+ reinterpret_cast<LPVOID*>(ppIDataObject));
}
//--------------------------------------------------------------------
@@ -246,14 +244,14 @@ public:
~CAutoComInit( )
{
/*
- we only call CoUninitialize when
- CoInitailize returned S_FALSE, what
+ we only call CoUninitialize when
+ CoInitailize returned S_FALSE, what
means that com was already initialize
for that thread so we keep the balance
if CoInitialize returned S_OK what means
com was not yet initialized we better
let com initialized or we may run into
- the realm of undefined behaviour
+ the realm of undefined behavior
*/
if ( m_hResult == S_FALSE )
CoUninitialize( );
@@ -267,10 +265,10 @@ private:
// ctor
//--------------------------------------------------------------------
-CMtaOleClipboard::CMtaOleClipboard( ) :
+CMtaOleClipboard::CMtaOleClipboard( ) :
m_hOleThread( NULL ),
m_uOleThreadId( 0 ),
- m_hEvtThrdReady( NULL ),
+ m_hEvtThrdReady( NULL ),
m_hwndMtaOleReqWnd( NULL ),
m_MtaOleReqWndClassAtom( 0 ),
m_hwndNextClipViewer( NULL ),
@@ -279,15 +277,15 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
m_hClipboardChangedEvent( m_hClipboardChangedNotifierEvents[0] ),
m_hTerminateClipboardChangedNotifierEvent(
m_hClipboardChangedNotifierEvents[1] ),
m_ClipboardChangedEventCount( 0 )
-{
+{
// signals that the thread was successfully setup
- m_hEvtThrdReady = CreateEventA( 0, MANUAL_RESET, INIT_NONSIGNALED,
NULL );
-
+ m_hEvtThrdReady = CreateEventA( 0, MANUAL_RESET, INIT_NONSIGNALED,
NULL );
+
OSL_ASSERT( NULL != m_hEvtThrdReady );
s_theMtaOleClipboardInst = this;
- m_hOleThread = (HANDLE)_beginthreadex(
+ m_hOleThread = (HANDLE)_beginthreadex(
NULL, 0, CMtaOleClipboard::oleThreadProc, this, 0,
&m_uOleThreadId );
OSL_ASSERT( NULL != m_hOleThread );
@@ -313,7 +311,7 @@ CMtaOleClipboard::CMtaOleClipboard( ) :
//--------------------------------------------------------------------
CMtaOleClipboard::~CMtaOleClipboard( )
-{
+{
// block calling threads out
if ( NULL != m_hEvtThrdReady )
ResetEvent( m_hEvtThrdReady );
@@ -322,7 +320,7 @@ CMtaOleClipboard::~CMtaOleClipboard( )
m_bRunClipboardNotifierThread = sal_False;
SetEvent( m_hTerminateClipboardChangedNotifierEvent );
- sal_uInt32 dwResult = WaitForSingleObject(
+ sal_uInt32 dwResult = WaitForSingleObject(
m_hClipboardChangedNotifierThread, MAX_WAIT_SHUTDOWN );
OSL_ENSURE( dwResult == WAIT_OBJECT_0, "clipboard notifier thread could
not terminate" );
@@ -337,10 +335,10 @@ CMtaOleClipboard::~CMtaOleClipboard( )
CloseHandle( m_hClipboardChangedNotifierEvents[1] );
// end the thread
- // because DestroyWindow can only be called
+ // because DestroyWindow can only be called
// from within the thread that created the window
- sendMessage( MSG_SHUTDOWN,
- static_cast< WPARAM >( 0 ),
+ sendMessage( MSG_SHUTDOWN,
+ static_cast< WPARAM >( 0 ),
static_cast< LPARAM >( 0 ) );
// wait for thread shutdown
@@ -363,7 +361,7 @@ CMtaOleClipboard::~CMtaOleClipboard( )
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::flushClipboard( )
@@ -377,19 +375,19 @@ HRESULT CMtaOleClipboard::flushClipboard( )
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, \
"flushClipboard from within clipboard sta thread called" );
- MsgCtx aMsgCtx;
+ MsgCtx aMsgCtx;
+
+ postMessage( MSG_FLUSHCLIPBOARD,
+ static_cast< WPARAM >( 0 ),
+ reinterpret_cast< LPARAM >( &aMsgCtx ) );
- postMessage( MSG_FLUSHCLIPBOARD,
- static_cast< WPARAM >( 0 ),
- reinterpret_cast< LPARAM >( &aMsgCtx ) );
-
aMsgCtx.aCondition.wait( /* infinite */ );
-
+
return aMsgCtx.hr;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
@@ -407,25 +405,25 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject**
ppIDataObject )
LPSTREAM lpStream;
HRESULT hr = E_FAIL;
-
+
*ppIDataObject = NULL;
-
- MsgCtx aMsgCtx;
-
+
+ MsgCtx aMsgCtx;
+
postMessage( MSG_GETCLIPBOARD,
reinterpret_cast< WPARAM >( &lpStream ),
reinterpret_cast< LPARAM >( &aMsgCtx ) );
-
+
aMsgCtx.aCondition.wait( /* infinite */ );
hr = aMsgCtx.hr;
-
+
if ( SUCCEEDED( hr ) )
{
hr = UnmarshalIDataObjectAndReleaseStream( lpStream, ppIDataObject
);
OSL_ENSURE( SUCCEEDED( hr ), "unmarshalling clipboard data object
failed" );
}
-
+
return hr;
}
@@ -435,21 +433,21 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject**
ppIDataObject )
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject )
-{
+{
if ( !WaitForThreadReady( ) )
{
OSL_ENSURE( sal_False, "clipboard sta thread not ready" );
return E_FAIL;
}
-
+
CAutoComInit comAutoInit;
-
+
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, "setClipboard from
within the clipboard sta thread called" );
-
+
// because we marshall this request
// into the sta thread we better
- // acquire the interface here so
- // that the object will not be
+ // acquire the interface here so
+ // that the object will not be
// destroyed before the ole clipboard
// can acquire it
// remember: pIDataObject may be NULL
@@ -458,12 +456,12 @@ HRESULT CMtaOleClipboard::setClipboard( IDataObject*
pIDataObject )
if ( pIDataObject )
pIDataObject->AddRef( );
- postMessage(
- MSG_SETCLIPBOARD,
- reinterpret_cast< WPARAM >( pIDataObject ),
+ postMessage(
+ MSG_SETCLIPBOARD,
+ reinterpret_cast< WPARAM >( pIDataObject ),
0 );
-
- // because this is an asynchronous function
+
+ // because this is an asynchronous function
// the return value is useless
return S_OK;
}
@@ -484,14 +482,14 @@ sal_Bool CMtaOleClipboard::registerClipViewer(
LPFNC_CLIPVIEWER_CALLBACK_t pfncC
OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId,
"registerClipViewer from within the OleThread called" );
- MsgCtx aMsgCtx;
+ MsgCtx aMsgCtx;
postMessage( MSG_REGCLIPVIEWER,
reinterpret_cast<WPARAM>(
pfncClipViewerCallback ),
reinterpret_cast<LPARAM>( &aMsgCtx ) );
-
+
aMsgCtx.aCondition.wait( /* infinite */ );
-
+
return bRet;
}
@@ -500,7 +498,7 @@ sal_Bool CMtaOleClipboard::registerClipViewer(
LPFNC_CLIPVIEWER_CALLBACK_t pfncC
//--------------------------------------------------------------------
sal_Bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t
pfncClipViewerCallback )
-{
+{
sal_Bool bRet = sal_True;
// we need exclusive access because the clipboard changed notifier
@@ -510,7 +508,7 @@ sal_Bool CMtaOleClipboard::onRegisterClipViewer(
LPFNC_CLIPVIEWER_CALLBACK_t pfn
// register if not yet done
if ( ( NULL != pfncClipViewerCallback ) && ( NULL ==
m_pfncClipViewerCallback ) )
{
- // SetClipboardViewer sends a WM_DRAWCLIPBOARD message we
ignore
+ // SetClipboardViewer sends a WM_DRAWCLIPBOARD message we ignore
// this message if we register ourself as clip viewer
m_bInRegisterClipViewer = sal_True;
m_hwndNextClipViewer = SetClipboardViewer( m_hwndMtaOleReqWnd );
@@ -530,38 +528,38 @@ sal_Bool CMtaOleClipboard::onRegisterClipViewer(
LPFNC_CLIPVIEWER_CALLBACK_t pfn
// unregister if input parameter is NULL and we previously
registered
// as clipboard viewer
ChangeClipboardChain( m_hwndMtaOleReqWnd, m_hwndNextClipViewer
);
- m_hwndNextClipViewer = NULL;
+ m_hwndNextClipViewer = NULL;
}
return bRet;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject )
-{
+{
return OleSetClipboard( pIDataObject );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream )
-{
+{
OSL_ASSERT(NULL != ppStream);
IDataObjectPtr pIDataObject;
-
+
// forward the request to the OleClipboard
HRESULT hr = OleGetClipboard( &pIDataObject );
if ( SUCCEEDED( hr ) )
- {
+ {
hr = MarshalIDataObjectInStream(pIDataObject.get(), ppStream);
- OSL_ENSURE(SUCCEEDED(hr), "marshalling cliboard data object failed");
- }
+ OSL_ENSURE(SUCCEEDED(hr), "marshalling clipboard data object
failed");
+ }
return hr;
}
@@ -570,7 +568,7 @@ HRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM*
ppStream )
//--------------------------------------------------------------------
HRESULT CMtaOleClipboard::onFlushClipboard( )
-{
+{
return OleFlushClipboard( );
}
@@ -585,11 +583,11 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND
hWndRemove, HWND hWndNext )
else if ( IsWindow( m_hwndNextClipViewer ) )
{
// forward the message to the next one
- DWORD_PTR dwResult;
- SendMessageTimeoutA(
- m_hwndNextClipViewer,
- WM_CHANGECBCHAIN,
- reinterpret_cast<WPARAM>(hWndRemove),
+ DWORD_PTR dwResult;
+ SendMessageTimeoutA(
+ m_hwndNextClipViewer,
+ WM_CHANGECBCHAIN,
+ reinterpret_cast<WPARAM>(hWndRemove),
reinterpret_cast<LPARAM>(hWndNext),
SMTO_BLOCK,
MAX_CLIPEVENT_PROCESSING_TIME,
@@ -607,23 +605,23 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
{
// we don't send a notification if we are
// registering ourself as clipboard
- if ( !m_bInRegisterClipViewer )
- {
- ClearableMutexGuard aGuard( m_ClipboardChangedEventCountMutex );
-
- m_ClipboardChangedEventCount++;
- SetEvent( m_hClipboardChangedEvent );
+ if ( !m_bInRegisterClipViewer )
+ {
+ ClearableMutexGuard aGuard( m_ClipboardChangedEventCountMutex );
- aGuard.clear( );
- }
+ m_ClipboardChangedEventCount++;
+ SetEvent( m_hClipboardChangedEvent );
+
+ aGuard.clear( );
+ }
// forward the message to the next viewer in the chain
if ( IsWindow( m_hwndNextClipViewer ) )
{
DWORD_PTR dwResult;
- SendMessageTimeoutA(
- m_hwndNextClipViewer,
- WM_DRAWCLIPBOARD,
+ SendMessageTimeoutA(
+ m_hwndNextClipViewer,
+ WM_DRAWCLIPBOARD,
static_cast< WPARAM >( 0 ),
static_cast< LPARAM >( 0 ),
SMTO_BLOCK,
@@ -635,7 +633,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( )
}
//--------------------------------------------------------------------
-// SendMessage so we don't need to supply the HWND if we send
+// SendMessage so we don't need to supply the HWND if we send
// something to our wrapped window
//--------------------------------------------------------------------
@@ -645,7 +643,7 @@ LRESULT CMtaOleClipboard::sendMessage( UINT msg, WPARAM
wParam, LPARAM lParam )
}
//--------------------------------------------------------------------
-// PostMessage so we don't need to supply the HWND if we send
+// PostMessage so we don't need to supply the HWND if we send
// something to our wrapped window
//--------------------------------------------------------------------
@@ -662,18 +660,18 @@ sal_Bool CMtaOleClipboard::postMessage( UINT msg, WPARAM
wParam, LPARAM lParam )
LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg,
WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = 0;
-
+
// get a connection to the class-instance via the static member
CMtaOleClipboard* pImpl = CMtaOleClipboard::s_theMtaOleClipboardInst;
OSL_ASSERT( NULL != pImpl );
-
+
switch( uMsg )
{
- case MSG_SETCLIPBOARD:
- {
- IDataObject* pIDataObject = reinterpret_cast< IDataObject* >(
wParam );
+ case MSG_SETCLIPBOARD:
+ {
+ IDataObject* pIDataObject = reinterpret_cast<
IDataObject* >( wParam );
pImpl->onSetClipboard( pIDataObject );
-
+
// in setClipboard we did acquire the
// interface pointer in order to prevent
// destruction of the object before the
@@ -687,8 +685,8 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND
hWnd, UINT uMsg, WPARA
break;
case MSG_GETCLIPBOARD:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
aMsgCtx->hr = pImpl->onGetClipboard( reinterpret_cast< LPSTREAM*
>(wParam) );
@@ -696,28 +694,28 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND
hWnd, UINT uMsg, WPARA
}
break;
- case MSG_FLUSHCLIPBOARD:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ case MSG_FLUSHCLIPBOARD:
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
- aMsgCtx->hr = pImpl->onFlushClipboard( );
+ aMsgCtx->hr = pImpl->onFlushClipboard( );
aMsgCtx->aCondition.set( );
}
break;
case MSG_REGCLIPVIEWER:
- {
- MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
+ {
+ MsgCtx* aMsgCtx = reinterpret_cast< MsgCtx* >( lParam );
OSL_ASSERT( aMsgCtx );
pImpl->onRegisterClipViewer(
reinterpret_cast<CMtaOleClipboard::LPFNC_CLIPVIEWER_CALLBACK_t>(wParam) );
aMsgCtx->aCondition.set( );
- }
+}
break;
case WM_CHANGECBCHAIN:
- lResult = pImpl->onChangeCBChain(
+ lResult = pImpl->onChangeCBChain(
reinterpret_cast< HWND >( wParam ), reinterpret_cast<
HWND >( lParam ) );
break;
@@ -730,32 +728,32 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND
hWnd, UINT uMsg, WPARA
break;
// force the sta thread to end
- case WM_DESTROY:
+ case WM_DESTROY:
PostQuitMessage( 0 );
break;
default:
lResult = DefWindowProcA( hWnd, uMsg, wParam, lParam );
break;
- }
-
+ }
+
return lResult;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void CMtaOleClipboard::createMtaOleReqWnd( )
{
WNDCLASSEXA wcex;
-
+
HINSTANCE hInst = GetModuleHandleA( CLIPSRV_DLL_NAME );
OSL_ENSURE( NULL != hInst, "The name of the clipboard service dll must
have changed" );
ZeroMemory( &wcex, sizeof( WNDCLASSEXA ) );
- wcex.cbSize = sizeof(WNDCLASSEXA);
+ wcex.cbSize = sizeof(WNDCLASSEXA);
wcex.style = 0;
wcex.lpfnWndProc = static_cast< WNDPROC >(
CMtaOleClipboard::mtaOleReqWndProc );
wcex.cbClsExtra = 0;
@@ -771,12 +769,12 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
m_MtaOleReqWndClassAtom = RegisterClassExA( &wcex );
if ( 0 != m_MtaOleReqWndClassAtom )
- m_hwndMtaOleReqWnd = CreateWindowA(
+ m_hwndMtaOleReqWnd = CreateWindowA(
g_szWndClsName, NULL, 0, 0, 0, 0, 0, NULL, NULL, hInst,
NULL );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int CMtaOleClipboard::run( )
@@ -797,9 +795,9 @@ unsigned int CMtaOleClipboard::run( )
SetEvent( m_hEvtThrdReady );
// pumping messages
- MSG msg;
+ MSG msg;
while( GetMessageA( &msg, NULL, 0, 0 ) )
- DispatchMessageA( &msg );
+ DispatchMessageA( &msg );
nRet = 0;
}
@@ -812,20 +810,20 @@ unsigned int CMtaOleClipboard::run( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int WINAPI CMtaOleClipboard::oleThreadProc( LPVOID pParam )
{
- CMtaOleClipboard* pInst =
+ CMtaOleClipboard* pInst =
reinterpret_cast<CMtaOleClipboard*>( pParam );
OSL_ASSERT( NULL != pInst );
-
+
return pInst->run( );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc(
LPVOID pParam )
@@ -838,7 +836,7 @@ unsigned int WINAPI
CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID
// assuming we don't need a lock for
// a boolean variable like m_bRun...
while ( pInst->m_bRunClipboardNotifierThread )
- {
+ {
// wait for clipboard changed or terminate event
WaitForMultipleObjects( 2, pInst->m_hClipboardChangedNotifierEvents,
false, INFINITE );
@@ -858,18 +856,18 @@ unsigned int WINAPI
CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID
// notify all clipboard listener
if ( pInst->m_pfncClipViewerCallback )
pInst->m_pfncClipViewerCallback( );
- }
+ }
else
aGuard.clear( );
- }
-
+ }
+
CoUninitialize( );
return ( 0 );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
inline
@@ -879,7 +877,7 @@ sal_Bool CMtaOleClipboard::WaitForThreadReady( ) const
if ( NULL != m_hEvtThrdReady )
{
- DWORD dwResult = WaitForSingleObject(
+ DWORD dwResult = WaitForSingleObject(
m_hEvtThrdReady, MAX_WAITTIME );
bRet = ( dwResult == WAIT_OBJECT_0 );
}
@@ -887,3 +885,4 @@ sal_Bool CMtaOleClipboard::WaitForThreadReady( ) const
return bRet;
}
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/qadevOOo/java/OOoRunner/src/main/java/util/SysUtils.java
b/main/qadevOOo/java/OOoRunner/src/main/java/util/SysUtils.java
index ce7fcf3ca5..d1ffdbc12e 100644
--- a/main/qadevOOo/java/OOoRunner/src/main/java/util/SysUtils.java
+++ b/main/qadevOOo/java/OOoRunner/src/main/java/util/SysUtils.java
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
package util;
import java.io.File;
@@ -46,9 +44,9 @@ public class SysUtils {
return jh;
}
- static ArrayList files = new ArrayList();
+static ArrayList files = new ArrayList();
- public static Object[] traverse( String afileDirectory ) {
+public static Object[] traverse( String afileDirectory ) {
File fileDirectory = new File(afileDirectory);
// Testing, if the file is a directory, and if so, it throws an exception
@@ -85,10 +83,10 @@ public class SysUtils {
exception.printStackTrace();
}
- }
- }
- return files.toArray();
- }
+ }
+ }
+ return files.toArray();
+}
public static XComponent getActiveComponent(XMultiServiceFactory msf) {
XComponent ac = null;
@@ -115,7 +113,7 @@ public class SysUtils {
}
/**
- * Tries to obtain text data from cliboard if such one exists.
+ * Tries to obtain text data from clipboard if such one exists.
* The method iterates through all 'text/plain' supported data
* flavors and returns the first non-null String value.
*
@@ -147,3 +145,5 @@ public class SysUtils {
return null;
}
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sc/source/ui/unoobj/docuno.cxx
b/main/sc/source/ui/unoobj/docuno.cxx
index 5d22d1f42d..ef1b1481a4 100644
--- a/main/sc/source/ui/unoobj/docuno.cxx
+++ b/main/sc/source/ui/unoobj/docuno.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
@@ -46,7 +44,7 @@
#include <toolkit/awt/vclxdevice.hxx>
#include <ctype.h>
-#include <float.h> // DBL_MAX
+#include <float.h> // DBL_MAX
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/sheet/XNamedRanges.hpp>
@@ -106,7 +104,7 @@ using namespace com::sun::star;
//------------------------------------------------------------------------
-// alles ohne Which-ID, Map nur fuer PropertySetInfo
+// alles ohne Which-ID, Map nur für PropertySetInfo
//! umbenennen, sind nicht mehr nur Options
const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
@@ -238,7 +236,7 @@ ScPrintUIOptions::ScPrintUIOptions()
SvtModuleOptions aOpt;
String aAppGroupname( aStrings.GetString( 9 ) );
aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s"
) ),
- aOpt.GetModuleName(
SvtModuleOptions::E_SCALC ) );
+ aOpt.GetModuleName(
SvtModuleOptions::E_SCALC ) );
m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
// create subgroup for pages
@@ -257,7 +255,7 @@ ScPrintUIOptions::ScPrintUIOptions()
rtl::OUString(),
aPrintRangeOpt
);
-
+
// create a choice for the content to create
uno::Sequence< rtl::OUString > aChoices( 3 ), aHelpIds( 3 );
aChoices[0] = aStrings.GetString( 3 );
@@ -271,7 +269,7 @@ ScPrintUIOptions::ScPrintUIOptions()
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) ),
aChoices,
nContent );
-
+
// create Subgroup for print range
aPrintRangeOpt.mbInternalOnly = sal_True;
m_aUIProperties[5].Value = getSubgroupControlOpt( rtl::OUString(
aStrings.GetString( 6 ) ),
@@ -300,7 +298,7 @@ ScPrintUIOptions::ScPrintUIOptions()
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt
- );
+ );
}
void ScPrintUIOptions::SetDefaults()
@@ -360,7 +358,7 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
if ( pDocShell )
{
- pDocShell->GetDocument()->AddUnoObject(*this); //
SfxModel is derived from SfxListener
+ pDocShell->GetDocument()->AddUnoObject(*this); // SfxModel is
derived from SfxListener
}
}
@@ -381,18 +379,18 @@ uno::Reference< uno::XAggregation>
ScModelObj::GetFormatter()
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
if ( !xNumberAgg.is() && pDocShell )
{
- // setDelegator veraendert den RefCount, darum eine Referenz selber
halten
- // (direkt am m_refCount, um sich beim release nicht selbst zu
loeschen)
+ // setDelegator verändert den RefCount, darum eine Referenz selber
halten
+ // (direkt am m_refCount, um sich beim release nicht selbst zu
löschen)
comphelper::increment( m_refCount );
- // waehrend des queryInterface braucht man ein Ref auf das
- // SvNumberFormatsSupplierObj, sonst wird es geloescht.
+ // während des queryInterface braucht man ein Ref auf das
+ // SvNumberFormatsSupplierObj, sonst wird es gelöscht.
uno::Reference<util::XNumberFormatsSupplier> xFormatter(new
SvNumberFormatsSupplierObj(pDocShell->GetDocument()->GetFormatTable() ));
{
xNumberAgg.set(uno::Reference<uno::XAggregation>(
xFormatter, uno::UNO_QUERY ));
// extra block to force deletion of the temporary
before setDelegator
}
- // beim setDelegator darf die zusaetzliche Ref nicht mehr
existieren
+ // beim setDelegator darf die zusätzliche Ref nicht mehr
existieren
xFormatter = NULL;
if (xNumberAgg.is())
@@ -520,7 +518,7 @@ uno::Sequence<uno::Type> SAL_CALL ScModelObj::getTypes()
throw(uno::RuntimeExcep
long nAggLen = aAggTypes.getLength();
const uno::Type* pAggPtr = aAggTypes.getConstArray();
- const long nThisLen = 15;
+ const long nThisLen = 15;
aTypes.realloc( nParentLen + nAggLen + nThisLen );
uno::Type* pPtr = aTypes.getArray();
pPtr[nParentLen + 0] = getCppuType((const
uno::Reference<sheet::XSpreadsheetDocument>*)0);
@@ -537,14 +535,14 @@ uno::Sequence<uno::Type> SAL_CALL ScModelObj::getTypes()
throw(uno::RuntimeExcep
pPtr[nParentLen +11] = getCppuType((const
uno::Reference<beans::XPropertySet>*)0);
pPtr[nParentLen +12] = getCppuType((const
uno::Reference<lang::XMultiServiceFactory>*)0);
pPtr[nParentLen +13] = getCppuType((const
uno::Reference<lang::XServiceInfo>*)0);
- pPtr[nParentLen +14] = getCppuType((const
uno::Reference<util::XChangesNotifier>*)0);
+ pPtr[nParentLen +14] = getCppuType((const
uno::Reference<util::XChangesNotifier>*)0);
long i;
for (i=0; i<nParentLen; i++)
- pPtr[i] = pParentPtr[i];
// parent types first
+ pPtr[i] = pParentPtr[i]; // parent types first
for (i=0; i<nAggLen; i++)
- pPtr[nParentLen+nThisLen+i] = pAggPtr[i]; //
aggregated types last
+ pPtr[nParentLen+nThisLen+i] = pAggPtr[i]; // aggregated
types last
}
return aTypes;
}
@@ -570,7 +568,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const
SfxHint& rHint )
sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // has become invalid
+ pDocShell = NULL; // has become invalid
if (xNumberAgg.is())
{
SvNumberFormatsSupplierObj* pNumFmt =
@@ -580,7 +578,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const
SfxHint& rHint )
pNumFmt->SetNumberFormatter( NULL );
}
- DELETEZ( pPrintFuncCache ); // must be
deleted because it has a pointer to the DocShell
+ DELETEZ( pPrintFuncCache ); // must be deleted because
it has a pointer to the DocShell
}
else if ( nId == SFX_HINT_DATACHANGED )
{
@@ -664,7 +662,7 @@ OutputDevice* lcl_GetRenderDevice( const
uno::Sequence<beans::PropertyValue>& rO
if (aPropName.EqualsAscii( SC_UNONAME_RENDERDEV ))
{
- uno::Reference<awt::XDevice> xRenderDevice(rProp.Value,
uno::UNO_QUERY);
+ uno::Reference<awt::XDevice> xRenderDevice(rProp.Value,
uno::UNO_QUERY);
if ( xRenderDevice.is() )
{
VCLXDevice* pDevice =
VCLXDevice::GetImplementation( xRenderDevice );
@@ -710,7 +708,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange&
rTargetRange, Rectangle& r
( nNumeric = rTarget.ToInt32() ) > 0 && nNumeric <= MAXROW+1 )
{
// row number is always mapped to cell A(row) on the same sheet
- rTargetRange = ScAddress( 0, (SCROW)(nNumeric-1), nSourceTab ); //
target row number is 1-based
+ rTargetRange = ScAddress( 0, (SCROW)(nNumeric-1), nSourceTab ); //
target row number is 1-based
bRangeValid = true; // row number
}
else if ( pDoc->GetTable( rTarget, nNameTab ) )
@@ -769,7 +767,7 @@ sal_Bool ScModelObj::FillRenderMarkData( const uno::Any&
aSelection,
DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" );
sal_Bool bDone = sal_False;
-
+
uno::Reference<frame::XController> xView;
// defaults when no options are passed: all sheets, include empty pages
@@ -842,9 +840,9 @@ sal_Bool ScModelObj::FillRenderMarkData( const uno::Any&
aSelection,
{
// a sheet object is treated like an empty
selection: print the used area of the sheet
- if ( bCursor || bSheet )
// nothing selected -> use whole tables
+ if ( bCursor || bSheet ) // nothing selected ->
use whole tables
{
- rMark.ResetMark(); //
doesn't change table selection
+ rMark.ResetMark(); // doesn't change
table selection
rStatus.SetMode( SC_PRINTSEL_CURSOR );
}
else
@@ -915,7 +913,7 @@ sal_Bool ScModelObj::FillRenderMarkData( const uno::Any&
aSelection,
ScExtDocOptions* pExtOpt =
pDocShell->GetDocument()->GetExtDocOptions();
if ( pExtOpt && pExtOpt->IsChanged() )
{
- pViewSh->GetViewData()->ReadExtOptions(*pExtOpt);
// Excel view settings
+ pViewSh->GetViewData()->ReadExtOptions(*pExtOpt); // Excel
view settings
pViewSh->SetTabNo( pViewSh->GetViewData()->GetTabNo(),
sal_True );
pExtOpt->SetChanged( false );
}
@@ -954,8 +952,8 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const
uno::Any& aSelection,
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
- String aPagesStr;
- if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr
) )
+ String aPagesStr;
+ if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus,
aPagesStr ) )
return 0;
// The same ScPrintFuncCache object in pPrintFuncCache is used as
long as
@@ -967,7 +965,7 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const
uno::Any& aSelection,
delete pPrintFuncCache;
pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark,
aStatus );
}
- sal_Int32 nPages = pPrintFuncCache->GetPageCount();
+ sal_Int32 nPages = pPrintFuncCache->GetPageCount();
sal_Int32 nSelectCount = nPages;
if ( aPagesStr.Len() )
@@ -981,23 +979,23 @@ sal_Int32 SAL_CALL ScModelObj::getRendererCount( const
uno::Any& aSelection,
sal_Int32 lcl_GetRendererNum( sal_Int32 nSelRenderer, const String& rPagesStr,
sal_Int32 nTotalPages )
{
- if ( !rPagesStr.Len() )
- return nSelRenderer;
+ if ( !rPagesStr.Len() )
+ return nSelRenderer;
- MultiSelection aPageRanges( rPagesStr );
- aPageRanges.SetTotalRange( Range( 1, nTotalPages ) );
+ MultiSelection aPageRanges( rPagesStr );
+ aPageRanges.SetTotalRange( Range( 1, nTotalPages ) );
- sal_Int32 nSelected = aPageRanges.FirstSelected();
- while ( nSelRenderer > 0 )
- {
- nSelected = aPageRanges.NextSelected();
- --nSelRenderer;
- }
- return nSelected - 1; // selection is 1-based
+ sal_Int32 nSelected = aPageRanges.FirstSelected();
+ while ( nSelRenderer > 0 )
+ {
+ nSelected = aPageRanges.NextSelected();
+ --nSelRenderer;
+ }
+ return nSelected - 1; // selection is 1-based
}
uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer(
sal_Int32 nSelRenderer,
- const uno::Any& aSelection, const
uno::Sequence<beans::PropertyValue>& rOptions )
+ const uno::Any& aSelection, const
uno::Sequence<beans::PropertyValue>& rOptions )
throw
(lang::IllegalArgumentException, uno::RuntimeException)
{
ScUnoGuard aGuard;
@@ -1025,7 +1023,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL
ScModelObj::getRenderer( sal_Int32
{
// getRenderer(0) is used to query the settings, so it must always
return something
- SCTAB nCurTab = 0; //! use current sheet from view?
+ SCTAB nCurTab = 0; //! use current sheet from view?
ScPrintFunc aDefaultFunc( pDocShell, pDocShell->GetPrinter(),
nCurTab );
Size aTwips = aDefaultFunc.GetPageSize();
awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM(
aTwips.Height() ) );
@@ -1044,9 +1042,9 @@ uno::Sequence<beans::PropertyValue> SAL_CALL
ScModelObj::getRenderer( sal_Int32
}
else
throw lang::IllegalArgumentException();
- }
+ }
- // printer is used as device (just for page layout), draw view is
not needed
+ // printer is used as device (just for page layout), draw view is not
needed
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
@@ -1069,35 +1067,35 @@ uno::Sequence<beans::PropertyValue> SAL_CALL
ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL );
ScRange aCellRange;
sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
Size aTwips = aFunc.GetPageSize();
awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM(
aTwips.Height() ) );
- long nPropCount = bWasCellRange ? 3 : 2;
+ long nPropCount = bWasCellRange ? 3 : 2;
uno::Sequence<beans::PropertyValue> aSequence(nPropCount);
beans::PropertyValue* pArray = aSequence.getArray();
pArray[0].Name = rtl::OUString::createFromAscii( SC_UNONAME_PAGESIZE );
pArray[0].Value <<= aPageSize;
- // #i111158# all positions are relative to the whole page, including
non-printable area
- pArray[1].Name = rtl::OUString::createFromAscii( SC_UNONAME_INC_NP_AREA );
- pArray[1].Value = uno::makeAny( sal_True );
+ // #i111158# all positions are relative to the whole page, including
non-printable area
+ pArray[1].Name = rtl::OUString::createFromAscii( SC_UNONAME_INC_NP_AREA
);
+ pArray[1].Value = uno::makeAny( sal_True );
if ( bWasCellRange )
{
table::CellRangeAddress aRangeAddress( nTab,
aCellRange.aStart.Col(),
aCellRange.aStart.Row(),
aCellRange.aEnd.Col(),
aCellRange.aEnd.Row() );
- pArray[2].Name = rtl::OUString::createFromAscii(
SC_UNONAME_SOURCERANGE );
- pArray[2].Value <<= aRangeAddress;
+ pArray[2].Name = rtl::OUString::createFromAscii(
SC_UNONAME_SOURCERANGE );
+ pArray[2].Value <<= aRangeAddress;
}
- if( ! pPrinterOptions )
- pPrinterOptions = new ScPrintUIOptions;
- else
- pPrinterOptions->SetDefaults();
- pPrinterOptions->appendPrintUIOptions( aSequence );
+ if( ! pPrinterOptions )
+ pPrinterOptions = new ScPrintUIOptions;
+ else
+ pPrinterOptions->SetDefaults();
+ pPrinterOptions->appendPrintUIOptions( aSequence );
return aSequence;
}
@@ -1111,8 +1109,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
ScMarkData aMark;
ScPrintSelectionStatus aStatus;
- String aPagesStr;
- if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr
) )
+ String aPagesStr;
+ if ( !FillRenderMarkData( aSelection, rOptions, aMark, aStatus,
aPagesStr ) )
throw lang::IllegalArgumentException();
if ( !pPrintFuncCache || !pPrintFuncCache->IsSameSelection( aStatus ) )
@@ -1121,7 +1119,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
pPrintFuncCache = new ScPrintFuncCache( pDocShell, aMark,
aStatus );
}
long nTotalPages = pPrintFuncCache->GetPageCount();
- sal_Int32 nRenderer = lcl_GetRendererNum( nSelRenderer, aPagesStr,
nTotalPages );
+ sal_Int32 nRenderer = lcl_GetRendererNum( nSelRenderer, aPagesStr,
nTotalPages );
if ( nRenderer >= nTotalPages )
throw lang::IllegalArgumentException();
@@ -1159,8 +1157,8 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
ScPrintFunc aFunc( pDev, pDocShell, nTab,
pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange,
&aStatus.GetOptions() );
aFunc.SetDrawView( pDrawView );
aFunc.SetRenderFlag( sal_True );
- if( aStatus.GetMode() ==
SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS )
- aFunc.SetExclusivelyDrawOleAndDrawObjects();
+ if( aStatus.GetMode() ==
SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS )
+ aFunc.SetExclusivelyDrawOleAndDrawObjects();
Range aPageRange( nRenderer+1, nRenderer+1 );
MultiSelection aPage( aPageRange );
@@ -1170,19 +1168,19 @@ void SAL_CALL ScModelObj::render( sal_Int32
nSelRenderer, const uno::Any& aSelec
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData,
pDev->GetExtOutDevData() );
- if ( nRenderer == nTabStart )
- {
- // first page of a sheet: add outline item for the sheet name
+ vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData,
pDev->GetExtOutDevData() );
+ if ( nRenderer == nTabStart )
+ {
+ // first page of a sheet: add outline item for the sheet name
- if ( pPDFData && pPDFData->GetIsExportBookmarks() )
- {
+ if ( pPDFData && pPDFData->GetIsExportBookmarks() )
+ {
// the sheet starts at the top of the page
Rectangle aArea( pDev->PixelToLogic( Rectangle( 0,0,0,0 ) ) );
sal_Int32 nDestID = pPDFData->CreateDest( aArea );
String aTabName;
pDoc->GetName( nTab, aTabName );
- sal_Int32 nParent = -1; // top-level
+ sal_Int32 nParent = -1; // top-level
pPDFData->CreateOutlineItem( nParent, aTabName, nDestID );
}
//--->i56629
@@ -1204,7 +1202,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
if ( pPDFData )
{
- // iterate over the hyperlinks that were output for this page
+ // iterate over the hyperlinks that were output for this page
std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks =
pPDFData->GetBookmarks();
std::vector< vcl::PDFExtOutDevBookmarkEntry >::iterator aIter =
rBookmarks.begin();
@@ -1219,7 +1217,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
String aTarget( aBookmark.copy( 1 ) );
ScRange aTargetRange;
- Rectangle aTargetRect; // 1/100th mm
+ Rectangle aTargetRect; // 1/100th mm
bool bIsSheet = false;
bool bValid = lcl_ParseTarget( aTarget, aTargetRange,
aTargetRect, bIsSheet, pDoc, nTab );
@@ -1236,7 +1234,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
}
else
{
- pPrintFuncCache->InitLocations( aMark, pDev ); //
does nothing if already initialized
+ pPrintFuncCache->InitLocations( aMark, pDev ); // does
nothing if already initialized
ScPrintPageLocation aLocation;
if ( pPrintFuncCache->FindLocation(
aTargetRange.aStart, aLocation ) )
@@ -1290,7 +1288,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer,
const uno::Any& aSelec
}
else
{
- // external link, use as-is
+ // external link, use as-is
pPDFData->SetLinkURL( aIter->nLinkId, aBookmark );
}
aIter++;
@@ -1385,7 +1383,7 @@ void SAL_CALL ScModelObj::calculate()
throw(uno::RuntimeException)
pDocShell->DoRecalc(sal_True);
else
{
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
}
}
@@ -1396,7 +1394,7 @@ void SAL_CALL ScModelObj::calculateAll()
throw(uno::RuntimeException)
pDocShell->DoHardRecalc(sal_True);
else
{
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
}
}
@@ -1406,7 +1404,7 @@ sal_Bool SAL_CALL
ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime
if (pDocShell)
return pDocShell->GetDocument()->GetAutoCalc();
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
return sal_False;
}
@@ -1425,7 +1423,7 @@ void SAL_CALL ScModelObj::enableAutomaticCalculation(
sal_Bool bEnabled )
}
else
{
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
}
}
@@ -1434,8 +1432,8 @@ void SAL_CALL ScModelObj::enableAutomaticCalculation(
sal_Bool bEnabled )
void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword )
throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
- // #i108245# if already protected, don't change anything
- if ( pDocShell && !pDocShell->GetDocument()->IsDocProtected() )
+ // #i108245# if already protected, don't change anything
+ if ( pDocShell && !pDocShell->GetDocument()->IsDocProtected() )
{
String aString(aPassword);
@@ -1453,9 +1451,9 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString&
aPassword )
String aString(aPassword);
ScDocFunc aFunc(*pDocShell);
- sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString, sal_True );
- if (!bDone)
- throw lang::IllegalArgumentException();
+ sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString,
sal_True );
+ if (!bDone)
+ throw lang::IllegalArgumentException();
}
}
@@ -1465,7 +1463,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected()
throw(uno::RuntimeException)
if (pDocShell)
return pDocShell->GetDocument()->IsDocProtected();
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
return sal_False;
}
@@ -1477,7 +1475,7 @@ uno::Reference<drawing::XDrawPages> SAL_CALL
ScModelObj::getDrawPages() throw(un
if (pDocShell)
return new ScDrawPagesObj(pDocShell);
- DBG_ERROR("keine DocShell"); //! Exception oder so?
+ DBG_ERROR("keine DocShell"); //! Exception oder so?
return NULL;
}
@@ -1521,7 +1519,7 @@ void ScModelObj::setPrinterName(const rtl::OUString&
PrinterName)
XPropertySetRef ScModelObj::createPrintOptions(void)
{
ScUnoGuard aGuard;
- return new ScPrintSettingsObj; //! ScPrintSettingsObj
implementieren!
+ return new ScPrintSettingsObj; //! ScPrintSettingsObj implementieren!
}
void ScModelObj::print(const XPropertySetRef& xOptions)
@@ -1546,7 +1544,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
{
ScUnoGuard aGuard;
sheet::GoalResult aResult;
- aResult.Divergence = DBL_MAX; // nichts gefunden
+ aResult.Divergence = DBL_MAX; // nichts gefunden
if (pDocShell)
{
WaitObject aWait( pDocShell->GetActiveDialogParent() );
@@ -1559,7 +1557,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal(
aGoalString, fValue );
aResult.Result = fValue;
if (bFound)
- aResult.Divergence = 0.0; //! das ist gelogen
+ aResult.Divergence = 0.0; //! das ist gelogen
}
return aResult;
}
@@ -1586,8 +1584,8 @@ void SAL_CALL ScModelObj::consolidate(
throw(uno::RuntimeException)
{
ScUnoGuard aGuard;
- // das koennte theoretisch ein fremdes Objekt sein, also nur das
- // oeffentliche XConsolidationDescriptor Interface benutzen, um
+ // das könnte theoretisch ein fremdes Objekt sein, also nur das
+ // öffentliche XConsolidationDescriptor Interface benutzen, um
// die Daten in ein ScConsolidationDescriptor Objekt zu kopieren:
//! wenn es schon ein ScConsolidationDescriptor ist, direkt per
getImplementation?
@@ -1621,9 +1619,9 @@ void SAL_CALL ScModelObj::refreshArrows()
throw(uno::RuntimeException)
// XViewDataSupplier
uno::Reference< container::XIndexAccess > SAL_CALL ScModelObj::getViewData( )
- throw (uno::RuntimeException)
+ throw (uno::RuntimeException)
{
- uno::Reference < container::XIndexAccess > xRet(
SfxBaseModel::getViewData() );
+ uno::Reference < container::XIndexAccess > xRet(
SfxBaseModel::getViewData() );
if( !xRet.is() )
{
@@ -1648,7 +1646,7 @@ uno::Reference< container::XIndexAccess > SAL_CALL
ScModelObj::getViewData( )
}
}
- return xRet;
+ return xRet;
}
// XPropertySet (Doc-Optionen)
@@ -1678,7 +1676,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
ScDocOptions aNewOpt = rOldOpt;
- sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt,
*aPropSet.getPropertyMap(), aPropertyName, aValue );
+ sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt,
*aPropSet.getPropertyMap(), aPropertyName, aValue );
if (bOpt)
{
// done...
@@ -1699,7 +1697,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
rtl::OUString sCodeName;
if ( aValue >>= sCodeName )
pDoc->SetCodeName( sCodeName );
- }
+ }
else if ( aString.EqualsAscii( SC_UNO_CJK_CLOCAL ) )
{
lang::Locale aLocale;
@@ -1777,7 +1775,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
{
aValue >>= maBuildId;
}
- else if ( aString.EqualsAscii( "SavedObject" ) ) // set from chart
after saving
+ else if ( aString.EqualsAscii( "SavedObject" ) ) // set from chart
after saving
{
rtl::OUString aObjName;
aValue >>= aObjName;
@@ -1810,7 +1808,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const
rtl::OUString& aPropertyNa
{
ScDocument* pDoc = pDocShell->GetDocument();
const ScDocOptions& rOpt = pDoc->GetDocOptions();
- aRet = ScDocOptionsHelper::getPropertyValue( rOpt,
*aPropSet.getPropertyMap(), aPropertyName );
+ aRet = ScDocOptionsHelper::getPropertyValue( rOpt,
*aPropSet.getPropertyMap(), aPropertyName );
if ( aRet.hasValue() )
{
// done...
@@ -1824,11 +1822,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const
rtl::OUString& aPropertyNa
ScUnoConversion::FillLocale( aLocale, eLatin );
aRet <<= aLocale;
}
- else if ( aString.EqualsAscii( SC_UNO_CODENAME ) )
- {
- rtl::OUString sCodeName = pDoc->GetCodeName();
- aRet <<= sCodeName;
- }
+ else if ( aString.EqualsAscii( SC_UNO_CODENAME ) )
+ {
+ rtl::OUString sCodeName = pDoc->GetCodeName();
+ aRet <<= sCodeName;
+ }
else if ( aString.EqualsAscii( SC_UNO_CJK_CLOCAL ) )
{
@@ -1876,10 +1874,10 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const
rtl::OUString& aPropertyNa
{
aRet <<= uno::Reference<container::XNameAccess>(new
ScDDELinksObj( pDocShell ));
}
- else if ( aString.EqualsAscii( SC_UNO_EXTERNALDOCLINKS ) )
- {
- aRet <<= uno::Reference<sheet::XExternalDocLinks>(new
ScExternalDocLinksObj(pDocShell));
- }
+ else if ( aString.EqualsAscii( SC_UNO_EXTERNALDOCLINKS ) )
+ {
+ aRet <<= uno::Reference<sheet::XExternalDocLinks>(new
ScExternalDocLinksObj(pDocShell));
+ }
else if ( aString.EqualsAscii( SC_UNO_SHEETLINKS ) )
{
aRet <<= uno::Reference<container::XNameAccess>(new
ScSheetLinksObj( pDocShell ));
@@ -1905,10 +1903,10 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const
rtl::OUString& aPropertyNa
else if ( aString.EqualsAscii( SC_UNO_HASDRAWPAGES ) )
{
ScUnoHelpFunctions::SetBoolInAny( aRet,
(pDocShell->GetDocument()->GetDrawLayer() != 0) );
- }
- else if ( aString.EqualsAscii( SC_UNO_BASICLIBRARIES ) )
- {
- aRet <<= pDocShell->GetBasicContainer();
+ }
+ else if ( aString.EqualsAscii( SC_UNO_BASICLIBRARIES ) )
+ {
+ aRet <<= pDocShell->GetBasicContainer();
}
else if ( aString.EqualsAscii( SC_UNO_DIALOGLIBRARIES ) )
{
@@ -1961,10 +1959,10 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const
rtl::OUString& aPropertyNa
{
aRet <<= maBuildId;
}
- else if ( aString.EqualsAscii( "InternalDocument" ) )
- {
- ScUnoHelpFunctions::SetBoolInAny( aRet,
(pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
- }
+ else if ( aString.EqualsAscii( "InternalDocument" ) )
+ {
+ ScUnoHelpFunctions::SetBoolInAny( aRet,
(pDocShell->GetCreateMode() == SFX_CREATE_MODE_INTERNAL) );
+ }
}
return aRet;
@@ -1988,17 +1986,17 @@ uno::Reference<uno::XInterface> SAL_CALL
ScModelObj::createInstance(
// return stored instance if already set
switch ( nType )
{
- case SC_SERVICE_GRADTAB: xRet.set(xDrawGradTab);
break;
+ case SC_SERVICE_GRADTAB: xRet.set(xDrawGradTab);
break;
case SC_SERVICE_HATCHTAB:
xRet.set(xDrawHatchTab); break;
case SC_SERVICE_BITMAPTAB:
xRet.set(xDrawBitmapTab); break;
case SC_SERVICE_TRGRADTAB:
xRet.set(xDrawTrGradTab); break;
case SC_SERVICE_MARKERTAB:
xRet.set(xDrawMarkerTab); break;
case SC_SERVICE_DASHTAB: xRet.set(xDrawDashTab);
break;
- case SC_SERVICE_CHDATAPROV: xRet.set(xChartDataProv); break;
- case SC_SERVICE_VBAOBJECTPROVIDER: xRet.set(xObjProvider); break;
+ case SC_SERVICE_CHDATAPROV: xRet.set(xChartDataProv);
break;
+ case SC_SERVICE_VBAOBJECTPROVIDER:
xRet.set(xObjProvider); break;
}
- // #i64497# If a chart is in a temporary document during clipoard
paste,
+ // #i64497# If a chart is in a temporary document during clipboard
paste,
// there should be no data provider, so that own data is used
bool bCreate =
! ( nType == SC_SERVICE_CHDATAPROV &&
@@ -2020,24 +2018,24 @@ uno::Reference<uno::XInterface> SAL_CALL
ScModelObj::createInstance(
case SC_SERVICE_TRGRADTAB:
xDrawTrGradTab.set(xRet); break;
case SC_SERVICE_MARKERTAB:
xDrawMarkerTab.set(xRet); break;
case SC_SERVICE_DASHTAB:
xDrawDashTab.set(xRet); break;
- case SC_SERVICE_CHDATAPROV: xChartDataProv.set(xRet); break;
+ case SC_SERVICE_CHDATAPROV: xChartDataProv.set(xRet); break;
case SC_SERVICE_VBAOBJECTPROVIDER: xObjProvider.set(xRet);
break;
}
}
}
else
{
- // alles was ich nicht kenn, werf ich der SvxFmMSFactory
an den Hals,
+ // alles was ich nicht kenne, werfe ich der SvxFmMSFactory
an den Hals,
// da wird dann 'ne Exception geworfen, wenn's nicht
passt...
- try
+ try
{
xRet.set(SvxFmMSFactory::createInstance(aServiceSpecifier));
// extra block to force deletion of the temporary
before ScShapeObj ctor (setDelegator)
}
- catch ( lang::ServiceNotRegisteredException & )
- {
- }
+ catch ( lang::ServiceNotRegisteredException & )
+ {
+ }
// #96117# if the drawing factory created a shape, a
ScShapeObj has to be used
// to support own properties like ImageMap:
@@ -2045,8 +2043,8 @@ uno::Reference<uno::XInterface> SAL_CALL
ScModelObj::createInstance(
uno::Reference<drawing::XShape> xShape( xRet, uno::UNO_QUERY );
if ( xShape.is() )
{
- xRet.clear(); // for
aggregation, xShape must be the object's only ref
- new ScShapeObj( xShape ); // aggregates object
and modifies xShape
+ xRet.clear(); // for aggregation, xShape must be the
object's only ref
+ new ScShapeObj( xShape ); // aggregates object and
modifies xShape
xRet.set(xShape);
}
}
@@ -2069,7 +2067,7 @@ uno::Reference<uno::XInterface> SAL_CALL
ScModelObj::createInstanceWithArguments
uno::Reference<lang::XInitialization> xInit( xInt,
uno::UNO_QUERY );
if ( xInit.is() )
- xInit->initialize( aArgs );
+ xInit->initialize( aArgs );
}
return xInt;
@@ -2109,7 +2107,7 @@ sal_Bool SAL_CALL ScModelObj::supportsService( const
rtl::OUString& rServiceName
uno::Sequence<rtl::OUString> SAL_CALL ScModelObj::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- uno::Sequence<rtl::OUString> aRet(2);
+ uno::Sequence<rtl::OUString> aRet(2);
rtl::OUString* pArray = aRet.getArray();
pArray[0] = rtl::OUString::createFromAscii( SCMODELOBJ_SERVICE );
pArray[1] = rtl::OUString::createFromAscii( SCDOCSETTINGS_SERVICE );
@@ -2125,15 +2123,15 @@ sal_Int64 SAL_CALL ScModelObj::getSomething(
0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
{
- return
sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
+ return
sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
- if ( rId.getLength() == 16 &&
- 0 == rtl_compareMemory(
SfxObjectShell::getUnoTunnelId().getConstArray(),
+ if ( rId.getLength() == 16 &&
+ 0 == rtl_compareMemory(
SfxObjectShell::getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
- {
- return
sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell ));
- }
+ {
+ return
sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(pDocShell ));
+ }
// aggregated number formats supplier has XUnoTunnel, too
// interface from aggregated object must be obtained via
queryAggregation
@@ -2180,40 +2178,40 @@ ScModelObj* ScModelObj::getImplementation( const
uno::Reference<uno::XInterface>
ScModelObj* pRet = NULL;
uno::Reference<lang::XUnoTunnel> xUT( xObj, uno::UNO_QUERY );
if (xUT.is())
- pRet =
reinterpret_cast<ScModelObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
+ pRet =
reinterpret_cast<ScModelObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
return pRet;
}
// XChangesNotifier
void ScModelObj::addChangesListener( const uno::Reference<
util::XChangesListener >& aListener )
- throw (uno::RuntimeException)
+ throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
- maChangesListeners.addInterface( aListener );
+ ScUnoGuard aGuard;
+ maChangesListeners.addInterface( aListener );
}
void ScModelObj::removeChangesListener( const uno::Reference<
util::XChangesListener >& aListener )
- throw (uno::RuntimeException)
+ throw (uno::RuntimeException)
{
- ScUnoGuard aGuard;
- maChangesListeners.removeInterface( aListener );
+ ScUnoGuard aGuard;
+ maChangesListeners.removeInterface( aListener );
}
bool ScModelObj::HasChangesListeners() const
{
- if ( maChangesListeners.getLength() > 0 )
- return true;
+ if ( maChangesListeners.getLength() > 0 )
+ return true;
- // "change" event set in any sheet?
- return pDocShell &&
pDocShell->GetDocument()->HasAnySheetEventScript(SC_SHEETEVENT_CHANGE);
+ // "change" event set in any sheet?
+ return pDocShell &&
pDocShell->GetDocument()->HasAnySheetEventScript(SC_SHEETEVENT_CHANGE);
}
void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const
ScRangeList& rRanges,
- const uno::Sequence< beans::PropertyValue >& rProperties )
+ const uno::Sequence< beans::PropertyValue >& rProperties )
{
- if ( pDocShell && HasChangesListeners() )
- {
+ if ( pDocShell && HasChangesListeners() )
+ {
util::ChangesEvent aEvent;
aEvent.Source.set( static_cast< cppu::OWeakObject* >( this ) );
aEvent.Base <<= aEvent.Source;
@@ -2270,7 +2268,7 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString&
rOperation, const ScRange
const rtl::OUString* pScript =
pEvents->GetScript(SC_SHEETEVENT_CHANGE);
if (pScript)
{
- ScRangeList aTabRanges; // collect ranges on this
sheet
+ ScRangeList aTabRanges; // collect ranges on this sheet
sal_uLong nRangeCount = rRanges.Count();
for ( sal_uLong nIndex = 0; nIndex < nRangeCount;
++nIndex )
{
@@ -2348,7 +2346,7 @@ void ScModelObj::HandleCalculateEvents()
}
}
pDoc->ResetCalcNotifications();
- }
+ }
}
//------------------------------------------------------------------------
@@ -2372,7 +2370,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -2385,7 +2383,7 @@ uno::Reference<drawing::XDrawPage>
ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int
if ( pDrawLayer && nIndex >= 0 && nIndex <
pDocShell->GetDocument()->GetTableCount() )
{
SdrPage* pPage =
pDrawLayer->GetPage((sal_uInt16)nIndex);
- DBG_ASSERT(pPage,"Draw-Page nicht gefunden");
+ DBG_ASSERT(pPage,"Draw-Page not found");
if (pPage)
{
return uno::Reference<drawing::XDrawPage>
(pPage->getUnoPage(), uno::UNO_QUERY);
@@ -2447,10 +2445,10 @@ uno::Any SAL_CALL ScDrawPagesObj::getByIndex( sal_Int32
nIndex )
ScUnoGuard aGuard;
uno::Reference<drawing::XDrawPage> xPage(GetObjectByIndex_Impl(nIndex));
if (xPage.is())
- return uno::makeAny(xPage);
+ return uno::makeAny(xPage);
else
throw lang::IndexOutOfBoundsException();
-// return uno::Any();
+// return uno::Any();
}
uno::Type SAL_CALL ScDrawPagesObj::getElementType()
throw(uno::RuntimeException)
@@ -2486,7 +2484,7 @@ void ScTableSheetsObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -2524,7 +2522,7 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const
rtl::OUString& aName, sal
bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True,
sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName,
sal_Int16 nDestination )
@@ -2540,7 +2538,7 @@ void SAL_CALL ScTableSheetsObj::moveByName( const
rtl::OUString& aName, sal_Int1
bDone = pDocShell->MoveTable( nSource, nDestination,
sal_False, sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName,
@@ -2561,7 +2559,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const
rtl::OUString& aName,
{
// #i92477# any index past the last sheet means "append" in
MoveTable
SCTAB nResultTab = static_cast<SCTAB>(nDestination);
- SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
// count after copying
+ SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
// count after copying
if (nResultTab >= nTabCount)
nResultTab = nTabCount - 1;
@@ -2571,7 +2569,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const
rtl::OUString& aName,
}
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName,
const uno::Any& aElement )
@@ -2586,18 +2584,18 @@ void SAL_CALL ScTableSheetsObj::insertByName( const
rtl::OUString& aName, const
if ( pDocShell )
{
- uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> xInterface(aElement,
uno::UNO_QUERY);
if ( xInterface.is() )
{
ScTableSheetObj* pSheetObj =
ScTableSheetObj::getImplementation( xInterface );
- if ( pSheetObj && !pSheetObj->GetDocShell() ) // noch
nicht eingefuegt?
+ if ( pSheetObj && !pSheetObj->GetDocShell() ) // noch
nicht eingefuegt?
{
ScDocument* pDoc = pDocShell->GetDocument();
String aNamStr(aName);
SCTAB nDummy;
if ( pDoc->GetTable( aNamStr, nDummy ) )
{
- // name already exists
+ // name already exists
throw
container::ElementExistException();
}
else
@@ -2622,7 +2620,7 @@ void SAL_CALL ScTableSheetsObj::insertByName( const
rtl::OUString& aName, const
if (bIllArg)
throw lang::IllegalArgumentException();
else
- throw uno::RuntimeException(); //
ElementExistException is handled above
+ throw uno::RuntimeException(); // ElementExistException
is handled above
}
}
@@ -2638,11 +2636,11 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const
rtl::OUString& aName, const
if ( pDocShell )
{
- uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> xInterface(aElement,
uno::UNO_QUERY);
if ( xInterface.is() )
{
ScTableSheetObj* pSheetObj =
ScTableSheetObj::getImplementation( xInterface );
- if ( pSheetObj && !pSheetObj->GetDocShell() ) // noch
nicht eingefuegt?
+ if ( pSheetObj && !pSheetObj->GetDocShell() ) // noch
nicht eingefuegt?
{
String aNamStr(aName);
SCTAB nPosition;
@@ -2659,7 +2657,7 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const
rtl::OUString& aName, const
}
else
{
- // not found
+ // not found
throw
container::NoSuchElementException();
}
}
@@ -2675,7 +2673,7 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const
rtl::OUString& aName, const
if (bIllArg)
throw lang::IllegalArgumentException();
else
- throw uno::RuntimeException(); //
NoSuchElementException is handled above
+ throw uno::RuntimeException(); //
NoSuchElementException is handled above
}
}
@@ -2696,48 +2694,48 @@ void SAL_CALL ScTableSheetsObj::removeByName( const
rtl::OUString& aName )
}
else
{
- // not found
+ // not found
throw container::NoSuchElementException();
}
}
if (!bDone)
- throw uno::RuntimeException(); //
NoSuchElementException is handled above
+ throw uno::RuntimeException(); // NoSuchElementException is
handled above
}
// XCellRangesAccess
uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition(
sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet )
- throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
- uno::Reference<table::XCellRange>
xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
+ uno::Reference<table::XCellRange>
xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
- throw lang::IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
- return xSheet->getCellByPosition(nColumn, nRow);
+ return xSheet->getCellByPosition(nColumn, nRow);
}
uno::Reference< table::XCellRange > SAL_CALL
ScTableSheetsObj::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet )
- throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
+ throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
ScUnoGuard aGuard;
uno::Reference<table::XCellRange>
xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet)));
if (! xSheet.is())
- throw lang::IndexOutOfBoundsException();
+ throw lang::IndexOutOfBoundsException();
- return xSheet->getCellRangeByPosition(nLeft, nTop, nRight, nBottom);
+ return xSheet->getCellRangeByPosition(nLeft, nTop, nRight, nBottom);
}
uno::Sequence < uno::Reference< table::XCellRange > > SAL_CALL
ScTableSheetsObj::getCellRangesByName( const rtl::OUString& aRange )
- throw (lang::IllegalArgumentException, uno::RuntimeException)
+ throw (lang::IllegalArgumentException, uno::RuntimeException)
{
ScUnoGuard aGuard;
uno::Sequence < uno::Reference < table::XCellRange > > xRet;
ScRangeList aRangeList;
- ScDocument* pDoc = pDocShell->GetDocument();
- if (ScRangeStringConverter::GetRangeListFromString( aRangeList, aRange,
pDoc, ::formula::FormulaGrammar::CONV_OOO, ';' ))
+ ScDocument* pDoc = pDocShell->GetDocument();
+ if (ScRangeStringConverter::GetRangeListFromString( aRangeList, aRange,
pDoc, ::formula::FormulaGrammar::CONV_OOO, ';' ))
{
sal_Int32 nCount = aRangeList.Count();
if (nCount)
@@ -2874,12 +2872,12 @@ void ScTableColumnsObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
{
// const ScUpdateRefHint& rRef = (const ScUpdateRefHint&)rHint;
- //! Referenz-Update fuer Tab und Start/Ende
+ //! Referenz-Update für Tab und Start/Ende
}
else if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -2891,7 +2889,7 @@ ScTableColumnObj*
ScTableColumnsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) con
if ( pDocShell && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL; // falscher Index
+ return NULL; // falscher Index
}
ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const rtl::OUString&
aName) const
@@ -2919,7 +2917,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32
nPosition, sal_Int32 n
bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, sal_True,
sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32
nCount )
@@ -2927,7 +2925,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32
nIndex, sal_Int32 nCou
{
ScUnoGuard aGuard;
sal_Bool bDone = sal_False;
- // Der zu loeschende Bereich muss innerhalb des Objekts liegen
+ // Der zu löschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 &&
nStartCol+nIndex+nCount-1 <= nEndCol )
{
ScDocFunc aFunc(*pDocShell);
@@ -2936,7 +2934,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32
nIndex, sal_Int32 nCou
bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, sal_True,
sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
// XEnumerationAccess
@@ -3017,7 +3015,7 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const
rtl::OUString& aName )
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
return sal_True;
- return sal_False; // nicht gefunden
+ return sal_False; // not found
}
// XPropertySet
@@ -3156,7 +3154,7 @@ void ScTableRowsObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
else if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -3168,7 +3166,7 @@ ScTableRowObj*
ScTableRowsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nRow <= nEndRow )
return new ScTableRowObj( pDocShell, nRow, nTab );
- return NULL; // falscher Index
+ return NULL; // falscher Index
}
void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32
nCount )
@@ -3185,7 +3183,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32
nPosition, sal_Int32 nCou
bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, sal_True,
sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32
nCount )
@@ -3193,7 +3191,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32
nIndex, sal_Int32 nCount
{
ScUnoGuard aGuard;
sal_Bool bDone = sal_False;
- // Der zu loeschende Bereich muss innerhalb des Objekts liegen
+ // Der zu löschende Bereich muss innerhalb des Objekts liegen
if ( pDocShell && nCount > 0 && nIndex >= 0 &&
nStartRow+nIndex+nCount-1 <= nEndRow )
{
ScDocFunc aFunc(*pDocShell);
@@ -3202,7 +3200,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32
nIndex, sal_Int32 nCount
bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, sal_True,
sal_True );
}
if (!bDone)
- throw uno::RuntimeException(); // no other exceptions
specified
+ throw uno::RuntimeException(); // no other exceptions specified
}
// XEnumerationAccess
@@ -3309,7 +3307,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue );
ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT;
aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0,
sal_True, sal_True );
- // SC_SIZE_DIRECT with size 0: hide
+ // SC_SIZE_DIRECT with size 0: hide
}
else if ( aNameString.EqualsAscii( SC_UNONAME_VISFLAG ) )
{
@@ -3319,7 +3317,7 @@ void SAL_CALL ScTableRowsObj::setPropertyValue(
}
else if ( aNameString.EqualsAscii( SC_UNONAME_CELLFILT ) )
{
- //! undo etc.
+ //! undo etc.
if (ScUnoHelpFunctions::GetBoolFromAny( aValue ))
pDoc->SetRowFiltered(nStartRow, nEndRow, nTab, true);
else
@@ -3361,7 +3359,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const
rtl::OUString& aProper
String aNameString(aPropertyName);
uno::Any aAny;
- //! loop over all rows for current state?
+ //! loop over all rows for current state?
if ( aNameString.EqualsAscii( SC_UNONAME_CELLHGT ) )
{
@@ -3426,12 +3424,12 @@ ScSpreadsheetSettingsObj::~ScSpreadsheetSettingsObj()
void ScSpreadsheetSettingsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
- // Referenz-Update interessiert hier nicht
+ // Referenz-Update interessiert hier nicht
if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -3440,7 +3438,7 @@ void ScSpreadsheetSettingsObj::Notify( SfxBroadcaster&,
const SfxHint& rHint )
uno::Reference<beans::XPropertySetInfo> SAL_CALL
ScSpreadsheetSettingsObj::getPropertySetInfo()
throw(uno::RuntimeException)
{
- //! muss noch
+ //! muss noch
return NULL;
}
@@ -3450,14 +3448,14 @@ void SAL_CALL
ScSpreadsheetSettingsObj::setPropertyValue(
lang::IllegalArgumentException,
lang::WrappedTargetException,
uno::RuntimeException)
{
- //! muss noch
+ //! muss noch
}
uno::Any SAL_CALL ScSpreadsheetSettingsObj::getPropertyValue( const
rtl::OUString& /* aPropertyName */ )
throw(beans::UnknownPropertyException,
lang::WrappedTargetException,
uno::RuntimeException)
{
- //! muss noch
+ //! muss noch
return uno::Any();
}
@@ -3485,7 +3483,7 @@ void ScAnnotationsObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -3636,7 +3634,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const
SfxHint& rHint )
else if ( rHint.ISA( SfxSimpleHint ) &&
((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING
)
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = NULL; // ungültig geworden
}
}
@@ -3671,7 +3669,7 @@ ScTableSheetObj*
ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell,
nTab+static_cast<SCTAB>(nIndex)+1 );
- return NULL; // kein Dokument oder falscher Index
+ return NULL; // kein Dokument oder falscher Index
}
ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const rtl::OUString&
aName)
@@ -3680,7 +3678,7 @@ ScTableSheetObj*
ScScenariosObj::GetObjectByName_Impl(const rtl::OUString& aName
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nTab+nIndex+1 );
- return NULL; // nicht gefunden
+ return NULL; // not found
}
void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName,
@@ -3711,7 +3709,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const
rtl::OUString& aName,
String aNameStr(aName);
String aCommStr(aComment);
- Color aColor( COL_LIGHTGRAY ); // Default
+ Color aColor( COL_LIGHTGRAY ); // Default
sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME |
SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT;
pDocShell->MakeScenario( nTab, aNameStr, aCommStr, aColor,
nFlags, aMarkData );
@@ -3807,7 +3805,7 @@ uno::Sequence<rtl::OUString> SAL_CALL
ScScenariosObj::getElementNames()
SCTAB nCount = (SCTAB)getCount();
uno::Sequence<rtl::OUString> aSeq(nCount);
- if ( pDocShell ) // sonst ist auch Count = 0
+ if ( pDocShell ) // sonst ist auch Count = 0
{
String aTabName;
ScDocument* pDoc = pDocShell->GetDocument();
@@ -3828,7 +3826,4 @@ sal_Bool SAL_CALL ScScenariosObj::hasByName( const
rtl::OUString& aName )
return GetScenarioIndex_Impl( aName, nIndex );
}
-
-
-
-
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sw/source/core/unocore/unocoll.cxx
b/main/sw/source/core/unocore/unocoll.cxx
index 99c0293d27..f270054f0c 100644
--- a/main/sw/source/core/unocore/unocoll.cxx
+++ b/main/sw/source/core/unocore/unocoll.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
@@ -267,7 +265,7 @@ const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
const SvEventDescription* lcl_GetSupportedMacroItems()
{
- static const SvEventDescription aMacroDescriptionsImpl[] =
+ static const SvEventDescription aMacroDescriptionsImpl[] =
{
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
@@ -286,7 +284,7 @@ OUString SwXServiceProvider::GetProviderName(sal_uInt16
nObjectType)
OUString sRet;
sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
if(nObjectType < nEntries)
- sRet = C2U(aProvNamesId[nObjectType].pName);
+ sRet = C2U(aProvNamesId[nObjectType].pName);
return sRet;
}
@@ -298,7 +296,7 @@ uno::Sequence<OUString>
SwXServiceProvider::GetAllServiceNames()
sal_uInt16 n = 0;
for(sal_uInt16 i = 0; i < nEntries; i++)
{
- String sProv(C2U(aProvNamesId[i].pName));
+ String sProv(C2U(aProvNamesId[i].pName));
if(sProv.Len())
{
pArray[n] = sProv;
@@ -315,18 +313,18 @@ sal_uInt16
SwXServiceProvider::GetProviderType(const OUString& rServiceName)
sal_uInt16 nEntries = sizeof(aProvNamesId) / sizeof(aProvNamesId[0]);
for(sal_uInt16 i = 0; i < nEntries; i++ )
{
- if( COMPARE_EQUAL ==
rServiceName.compareToAscii(aProvNamesId[i].pName))
- return aProvNamesId[i].nType;
+ if( COMPARE_EQUAL ==
rServiceName.compareToAscii(aProvNamesId[i].pName))
+ return aProvNamesId[i].nType;
}
return SW_SERVICE_INVALID;
}
uno::Reference< uno::XInterface >
SwXServiceProvider::MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc)
{
- vos::OGuard aGuard(Application::GetSolarMutex());
- uno::Reference< uno::XInterface > xRet;
- switch(nObjectType)
- {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ uno::Reference< uno::XInterface > xRet;
+ switch(nObjectType)
+ {
case SW_SERVICE_TYPE_TEXTTABLE:
{
SwXTextTable* pTextTable = new SwXTextTable();
@@ -580,7 +578,7 @@ uno::Reference< uno::XInterface >
SwXServiceProvider::MakeInstance(sal_uInt16
xRet = SvUnoImageMapPolygonObject_createInstance(
lcl_GetSupportedMacroItems() );
break;
case SW_SERVICE_CHART2_DATA_PROVIDER :
- // #i64497# If a chart is in a temporary document during clipoard
+ // #i64497# If a chart is in a temporary document during clipboard
// paste, there should be no data provider, so that own data is
used
// This should not happen during copy/paste, as this will unlink
// charts using table data.
@@ -631,9 +629,9 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32
nIndex)
uno::Any aRet;
if(IsValid())
{
- if(0 <= nIndex && GetDoc()->GetTblFrmFmtCount(sal_True) > nIndex)
+ if(0 <= nIndex && GetDoc()->GetTblFrmFmtCount(sal_True) >
nIndex)
{
- SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt( static_cast< xub_StrLen
>(nIndex), sal_True);
+ SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt( static_cast<
xub_StrLen >(nIndex), sal_True);
uno::Reference< XTextTable > xTbl =
SwXTextTables::GetObject(rFmt);
aRet.setValue( &xTbl,
::getCppuType((uno::Reference< XTextTable>*)0));
@@ -756,7 +754,7 @@ uno::Sequence< OUString >
SwXTextTables::getSupportedServiceNames(void) throw( u
XTextTable* SwXTextTables::GetObject( SwFrmFmt& rFmt )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- SwXTextTable* pTbl = SwIterator<SwXTextTable,SwFmt>::FirstElement( rFmt );
+ SwXTextTable* pTbl = SwIterator<SwXTextTable,SwFmt>::FirstElement( rFmt
);
if( !pTbl )
pTbl = new SwXTextTable(rFmt);
return pTbl ;
@@ -881,36 +879,36 @@ template<FlyCntType T>
sal_Bool SwXFrameEnumeration<T>::hasMoreElements(void) throw( RuntimeException
)
{
vos::OGuard aGuard(Application::GetSolarMutex());
- return !m_aFrames.empty();
+ return !m_aFrames.empty();
}
template<FlyCntType T>
Any SwXFrameEnumeration<T>::nextElement(void) throw( NoSuchElementException,
WrappedTargetException, RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- if(m_aFrames.empty())
- throw NoSuchElementException();
- Any aResult = *m_aFrames.begin();
- m_aFrames.pop_front();
- return aResult;
+ if(m_aFrames.empty())
+ throw NoSuchElementException();
+ Any aResult = *m_aFrames.begin();
+ m_aFrames.pop_front();
+ return aResult;
}
template<FlyCntType T>
OUString SwXFrameEnumeration<T>::getImplementationName(void) throw(
RuntimeException )
{
- return C2U("SwXFrameEnumeration");
+ return C2U("SwXFrameEnumeration");
}
template<FlyCntType T>
sal_Bool SwXFrameEnumeration<T>::supportsService(const OUString& ServiceName)
throw( RuntimeException )
{
- return C2U("com.sun.star.container.XEnumeration") == ServiceName;
+ return C2U("com.sun.star.container.XEnumeration") == ServiceName;
}
template<FlyCntType T>
Sequence< OUString > SwXFrameEnumeration<T>::getSupportedServiceNames(void)
throw( RuntimeException )
{
- return
::comphelper::makeSequence(C2U("com.sun.star.container.XEnumeration"));
+ return
::comphelper::makeSequence(C2U("com.sun.star.container.XEnumeration"));
}
/******************************************************************
@@ -928,7 +926,7 @@ sal_Bool SwXFrames::supportsService(const OUString&
rServiceName) throw( Runtime
Sequence<OUString> SwXFrames::getSupportedServiceNames(void) throw(
RuntimeException )
{
- return ::comphelper::makeSequence(C2U("com.sun.star.text.TextFrames"));
+ return ::comphelper::makeSequence(C2U("com.sun.star.text.TextFrames"));
}
SwXFrames::SwXFrames(SwDoc* _pDoc, FlyCntType eSet) :
@@ -1194,7 +1192,7 @@ Sequence< OUString >
SwXTextSections::getSupportedServiceNames(void) throw( Runt
}
SwXTextSections::SwXTextSections(SwDoc* _pDoc) :
- SwUnoCollection(_pDoc)
+ SwUnoCollection(_pDoc)
{
}
@@ -1205,7 +1203,7 @@ SwXTextSections::~SwXTextSections()
sal_Int32 SwXTextSections::getCount(void) throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- if(!IsValid())
+ if(!IsValid())
throw uno::RuntimeException();
const SwSectionFmts& rSectFmts = GetDoc()->GetSections();
sal_uInt16 nCount = rSectFmts.Count();
@@ -1221,8 +1219,8 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
throw( IndexOutOfBoundsException, WrappedTargetException,
uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- uno::Reference< XTextSection > xRet;
- if(IsValid())
+ uno::Reference< XTextSection > xRet;
+ if(IsValid())
{
SwSectionFmts& rFmts = GetDoc()->GetSections();
@@ -1240,14 +1238,14 @@ uno::Any SwXTextSections::getByIndex(sal_Int32 nIndex)
if(nIndex >= 0 && nIndex < rFmts.Count())
{
SwSectionFmt* pFmt = rFmts[(sal_uInt16)nIndex];
- xRet = GetObject(*pFmt);
+ xRet = GetObject(*pFmt);
}
else
throw IndexOutOfBoundsException();
}
else
throw uno::RuntimeException();
- return makeAny(xRet);
+ return makeAny(xRet);
}
uno::Any SwXTextSections::getByName(const OUString& Name)
@@ -1255,7 +1253,7 @@ uno::Any SwXTextSections::getByName(const OUString& Name)
{
vos::OGuard aGuard(Application::GetSolarMutex());
uno::Any aRet;
- if(IsValid())
+ if(IsValid())
{
String aName(Name);
SwSectionFmts& rFmts = GetDoc()->GetSections();
@@ -1263,8 +1261,8 @@ uno::Any SwXTextSections::getByName(const OUString& Name)
for(sal_uInt16 i = 0; i < rFmts.Count(); i++)
{
SwSectionFmt* pFmt = rFmts[i];
- if (pFmt->IsInNodesArr()
- && (aName == pFmt->GetSection()->GetSectionName()))
+ if (pFmt->IsInNodesArr()
+ && (aName ==
pFmt->GetSection()->GetSectionName()))
{
xSect = GetObject(*pFmt);
aRet.setValue(&xSect,
::getCppuType((uno::Reference<XTextSection>*)0));
@@ -1283,7 +1281,7 @@ uno::Sequence< OUString >
SwXTextSections::getElementNames(void)
throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- if(!IsValid())
+ if(!IsValid())
throw uno::RuntimeException();
sal_uInt16 nCount = GetDoc()->GetSections().Count();
SwSectionFmts& rSectFmts = GetDoc()->GetSections();
@@ -1306,7 +1304,7 @@ uno::Sequence< OUString >
SwXTextSections::getElementNames(void)
{
pFmt = rFmts[++nIndex];
}
- pArray[i] = pFmt->GetSection()->GetSectionName();
+ pArray[i] = pFmt->GetSection()->GetSectionName();
}
}
return aSeq;
@@ -1498,7 +1496,7 @@ sal_Int32 SwXNumberingRulesCollection::getCount(void)
throw( uno::RuntimeExcepti
}
uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
- throw( IndexOutOfBoundsException, WrappedTargetException,
uno::RuntimeException )
+ throw( IndexOutOfBoundsException, WrappedTargetException,
uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
uno::Any aRet;
@@ -1521,15 +1519,15 @@ uno::Any
SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
uno::Type SAL_CALL SwXNumberingRulesCollection::getElementType()
throw(uno::RuntimeException)
{
- return ::getCppuType((uno::Reference<XIndexReplace>*)0);
+ return ::getCppuType((uno::Reference<XIndexReplace>*)0);
}
sal_Bool SwXNumberingRulesCollection::hasElements(void) throw(
uno::RuntimeException )
{
- vos::OGuard aGuard(Application::GetSolarMutex());
- if(!IsValid())
- throw uno::RuntimeException();
- return GetDoc()->GetNumRuleTbl().Count() > 0;
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ if(!IsValid())
+ throw uno::RuntimeException();
+ return GetDoc()->GetNumRuleTbl().Count() > 0;
}
OUString SwXFootnotes::getImplementationName(void) throw( RuntimeException )
@@ -1551,8 +1549,8 @@ Sequence< OUString >
SwXFootnotes::getSupportedServiceNames(void) throw( Runtime
}
SwXFootnotes::SwXFootnotes(sal_Bool bEnd, SwDoc* _pDoc)
- : SwUnoCollection(_pDoc)
- , m_bEndnote(bEnd)
+ : SwUnoCollection(_pDoc)
+ , m_bEndnote(bEnd)
{
}
@@ -1572,7 +1570,7 @@ sal_Int32 SwXFootnotes::getCount(void) throw(
uno::RuntimeException )
{
pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if ( rFtn.IsEndNote() != m_bEndnote )
+ if ( rFtn.IsEndNote() != m_bEndnote )
continue;
nCount++;
}
@@ -1594,13 +1592,13 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
{
pTxtFtn = GetDoc()->GetFtnIdxs()[ n ];
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if ( rFtn.IsEndNote() != m_bEndnote )
+ if ( rFtn.IsEndNote() != m_bEndnote )
continue;
if(nCount == nIndex)
{
- xRef = SwXFootnote::CreateXFootnote(*GetDoc(), rFtn);
- aRet <<= xRef;
+ xRef = SwXFootnote::CreateXFootnote(*GetDoc(),
rFtn);
+ aRet <<= xRef;
break;
}
nCount++;
@@ -1628,7 +1626,7 @@ sal_Bool SwXFootnotes::hasElements(void) throw(
uno::RuntimeException )
Reference<XFootnote> SwXFootnotes::GetObject( SwDoc& rDoc, const SwFmtFtn&
rFmt )
{
- return SwXFootnote::CreateXFootnote(rDoc, rFmt);
+ return SwXFootnote::CreateXFootnote(rDoc, rFmt);
}
/******************************************************************
@@ -1678,7 +1676,7 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
if(!IsValid())
throw uno::RuntimeException();
uno::Reference< XTextContent > xRef;
- if(0 <= nIndex && nIndex < USHRT_MAX)
+ if(0 <= nIndex && nIndex < USHRT_MAX)
{
const SwFmtRefMark* pMark = GetDoc()->GetRefMark( (sal_uInt16)
nIndex );
if(pMark)
@@ -1756,7 +1754,7 @@ SwXReferenceMark* SwXReferenceMarks::GetObject( SwDoc*
pDoc, const SwFmtRefMark*
{
vos::OGuard aGuard(Application::GetSolarMutex());
- return SwXReferenceMark::CreateXReferenceMark(*pDoc, *pMark);
+ return SwXReferenceMark::CreateXReferenceMark(*pDoc, *pMark);
}
/******************************************************************
@@ -1769,3 +1767,4 @@ void SwUnoCollection::Invalidate()
pDoc = 0;
}
+/* vim: set noet sw=4 ts=4: */