This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new a20a167bf9 Fixed typos, cleanup
a20a167bf9 is described below
commit a20a167bf92e72b6a7380d695bf6b310032dae91
Author: mseidel <[email protected]>
AuthorDate: Wed Mar 12 19:02:45 2025 +0100
Fixed typos, cleanup
(cherry picked from commit 88c764bff9c8901fbd5e0d89dee3bedcded6f1b3)
---
main/embedserv/source/embed/ed_ioleobject.cxx | 153 ++-
main/filter/source/config/cache/basecontainer.hxx | 17 +-
main/filter/source/config/cache/typedetection.hxx | 29 +-
main/sc/source/ui/view/preview.cxx | 1175 ++++++++++----------
.../source/accessibility/AccessibleTextHelper.cxx | 30 +-
main/svx/source/toolbars/extrusionbar.cxx | 28 +-
main/svx/source/toolbars/fontworkbar.cxx | 10 +-
main/ucb/source/ucp/file/bc.cxx | 190 ++--
main/vcl/source/fontsubset/fontsubset.cxx | 20 +-
9 files changed, 816 insertions(+), 836 deletions(-)
diff --git a/main/embedserv/source/embed/ed_ioleobject.cxx
b/main/embedserv/source/embed/ed_ioleobject.cxx
index 248a7f8b83..7a160e4871 100644
--- a/main/embedserv/source/embed/ed_ioleobject.cxx
+++ b/main/embedserv/source/embed/ed_ioleobject.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,35 +7,30 @@
* 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.
- *
+ *
*************************************************************/
-
-
#include "embeddoc.hxx"
#include <osl/diagnose.h>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
-
using namespace ::com::sun::star;
-
extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* );
//-------------------------------------------------------------------------------
// IOleObject
-
STDMETHODIMP EmbedDocument_Impl::SetClientSite( IOleClientSite* pSite )
{
m_pClientSite = pSite;
@@ -66,28 +61,28 @@ STDMETHODIMP EmbedDocument_Impl::SetHostNames( LPCOLESTR
szContainerApp, LPCOLES
STDMETHODIMP EmbedDocument_Impl::Close( DWORD dwSaveOption )
{
- HRESULT hr = S_OK;
-
- if ( m_pDocHolder->HasFrame() )
- {
- if ( dwSaveOption == 2 && m_aFileName.getLength() )
- {
- // ask the user about saving
- if ( m_pDocHolder->ExecuteSuspendCloseFrame() )
- {
- m_pDocHolder->CloseDocument();
- return S_OK;
- }
- else
- return OLE_E_PROMPTSAVECANCELLED;
- }
-
- if ( dwSaveOption != 1 )
- hr = SaveObject(); // ADVF_DATAONSTOP);
-
- m_pDocHolder->CloseFrame();
- OLENotifyDeactivation();
- }
+ HRESULT hr = S_OK;
+
+ if ( m_pDocHolder->HasFrame() )
+ {
+ if ( dwSaveOption == 2 && m_aFileName.getLength() )
+ {
+ // ask the user about saving
+ if ( m_pDocHolder->ExecuteSuspendCloseFrame() )
+ {
+ m_pDocHolder->CloseDocument();
+ return S_OK;
+ }
+ else
+ return OLE_E_PROMPTSAVECANCELLED;
+ }
+
+ if ( dwSaveOption != 1 )
+ hr = SaveObject(); // ADVF_DATAONSTOP);
+
+ m_pDocHolder->CloseFrame();
+ OLENotifyDeactivation();
+ }
m_pDocHolder->FreeOffice();
m_pDocHolder->CloseDocument();
@@ -117,22 +112,22 @@ HRESULT EmbedDocument_Impl::OLENotifyClosing()
STDMETHODIMP EmbedDocument_Impl::SetMoniker( DWORD /*dwWhichMoniker*/,
IMoniker * /*pmk*/ )
{
- return E_NOTIMPL;
+ return E_NOTIMPL;
}
STDMETHODIMP EmbedDocument_Impl::GetMoniker( DWORD /*dwAssign*/, DWORD
/*dwWhichMoniker*/, IMoniker ** /*ppmk*/ )
{
- return E_NOTIMPL;
+ return E_NOTIMPL;
}
STDMETHODIMP EmbedDocument_Impl::InitFromData( IDataObject * /*pDataObject*/,
BOOL /*fCreation*/, DWORD /*dwReserved*/ )
{
- return E_NOTIMPL;
+ return E_NOTIMPL;
}
STDMETHODIMP EmbedDocument_Impl::GetClipboardData( DWORD /*dwReserved*/,
IDataObject ** /*ppDataObject*/ )
{
- return E_NOTIMPL;
+ return E_NOTIMPL;
}
/**
@@ -150,11 +145,11 @@ STDMETHODIMP EmbedDocument_Impl::DoVerb(
{
// no locking is used since the OLE must use the same thread always
if ( m_bIsInVerbHandling )
- return OLEOBJ_S_CANNOT_DOVERB_NOW;
+ return OLEOBJ_S_CANNOT_DOVERB_NOW;
- // an object can not handle any Verbs in Hands off mode
- if ( m_pMasterStorage == NULL || m_pOwnStream == NULL )
- return OLE_E_CANT_BINDTOSOURCE;
+ // an object can not handle any Verbs in Hands off mode
+ if ( m_pMasterStorage == NULL || m_pOwnStream == NULL )
+ return OLE_E_CANT_BINDTOSOURCE;
BooleanGuard_Impl aGuard( m_bIsInVerbHandling );
@@ -198,7 +193,7 @@ STDMETHODIMP EmbedDocument_Impl::DoVerb(
pActiveSite,TRUE)))
return NOERROR;
- // intended fall trough
+ // intended fall through
case OLEIVERB_OPEN:
OSL_ENSURE(m_pDocHolder,"no document to open");
@@ -253,66 +248,66 @@ STDMETHODIMP EmbedDocument_Impl::DoVerb(
STDMETHODIMP EmbedDocument_Impl::EnumVerbs( IEnumOLEVERB ** /*ppEnumOleVerb*/ )
{
- return OLE_S_USEREG;
+ return OLE_S_USEREG;
}
STDMETHODIMP EmbedDocument_Impl::Update()
{
- return S_OK;
-// HRESULT hr = CACHE_E_NOCACHE_UPDATED;
-// return hr;
+ return S_OK;
+// HRESULT hr = CACHE_E_NOCACHE_UPDATED;
+// return hr;
}
STDMETHODIMP EmbedDocument_Impl::IsUpToDate()
{
- return S_OK;
+ return S_OK;
}
STDMETHODIMP EmbedDocument_Impl::GetUserClassID( CLSID *pClsid )
{
- return GetClassID( pClsid );
+ return GetClassID( pClsid );
}
STDMETHODIMP EmbedDocument_Impl::GetUserType( DWORD /*dwFormOfTypeUe*/,
LPOLESTR * /*pszUserType*/ )
{
- return OLE_S_USEREG;
+ return OLE_S_USEREG;
}
STDMETHODIMP EmbedDocument_Impl::SetExtent( DWORD /*dwDrawAspect*/, SIZEL
*psizel )
{
- if ( !psizel )
- return E_FAIL;
+ if ( !psizel )
+ return E_FAIL;
- m_pDocHolder->SetExtent( psizel );
+ m_pDocHolder->SetExtent( psizel );
- return S_OK;
+ return S_OK;
}
STDMETHODIMP EmbedDocument_Impl::GetExtent( DWORD /*dwDrawAspect*/, SIZEL *
psizel )
{
- if ( !psizel )
- return E_INVALIDARG;
+ if ( !psizel )
+ return E_INVALIDARG;
- if ( FAILED( m_pDocHolder->GetExtent( psizel ) ) )
- {
- // return default values
- psizel->cx = 500;
- psizel->cy = 500;
- }
+ if ( FAILED( m_pDocHolder->GetExtent( psizel ) ) )
+ {
+ // return default values
+ psizel->cx = 500;
+ psizel->cy = 500;
+ }
- return S_OK;
+ return S_OK;
}
STDMETHODIMP EmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD
*pdwConnection )
{
- if ( m_nAdviseNum == 0xFFFFFFFF )
- return E_OUTOFMEMORY;
+ if ( m_nAdviseNum == 0xFFFFFFFF )
+ return E_OUTOFMEMORY;
- pAdvSink->AddRef();
- m_aAdviseHashMap.insert( ::std::pair< DWORD, IAdviseSink* >( m_nAdviseNum,
pAdvSink ) );
- *pdwConnection = m_nAdviseNum++;
+ pAdvSink->AddRef();
+ m_aAdviseHashMap.insert( ::std::pair< DWORD, IAdviseSink* >(
m_nAdviseNum, pAdvSink ) );
+ *pdwConnection = m_nAdviseNum++;
- return S_OK;
+ return S_OK;
}
STDMETHODIMP EmbedDocument_Impl::Unadvise( DWORD dwConnection )
@@ -347,7 +342,7 @@ STDMETHODIMP EmbedDocument_Impl::SetColorScheme( LOGPALETTE
* /*pLogpal*/ )
//-------------------------------------------------------------------------------
// IDispatch
-STDMETHODIMP EmbedDocument_Impl::GetTypeInfoCount( unsigned int FAR* pctinfo )
+STDMETHODIMP EmbedDocument_Impl::GetTypeInfoCount( unsigned int FAR* pctinfo )
{
if ( m_pDocHolder->GetIDispatch() )
return m_pDocHolder->GetIDispatch()->GetTypeInfoCount( pctinfo
);
@@ -405,12 +400,12 @@ STDMETHODIMP EmbedDocument_Impl::Invoke( DISPID
dispIdMember,
DWORD STDMETHODCALLTYPE EmbedDocument_Impl::AddConnection( DWORD , DWORD )
{
- return AddRef();
+ return AddRef();
}
DWORD STDMETHODCALLTYPE EmbedDocument_Impl::ReleaseConnection( DWORD , DWORD ,
BOOL )
{
- return Release();
+ return Release();
}
// C++ - methods
@@ -438,7 +433,7 @@ HRESULT EmbedDocument_Impl::SaveObject()
SaveCompleted( (LPCOLESTR)aPreservFileName.getStr() );
}
- notify( false );
+ notify( false );
return hr;
}
@@ -464,20 +459,20 @@ void EmbedDocument_Impl::notify( bool bDataChanged )
if ( iAdvise->second )
iAdvise->second->OnViewChange( DVASPECT_CONTENT, -1 );
- if ( m_pDAdviseHolder && bDataChanged )
+ if ( m_pDAdviseHolder && bDataChanged )
m_pDAdviseHolder->SendOnDataChange( (IDataObject*)this, 0, 0 );
}
void EmbedDocument_Impl::Deactivate()
{
- HRESULT hr = S_OK;
+ HRESULT hr = S_OK;
- if ( m_pDocHolder->HasFrame() )
- {
- hr = SaveObject();
- m_pDocHolder->CloseFrame();
- OLENotifyDeactivation();
- }
+ if ( m_pDocHolder->HasFrame() )
+ {
+ hr = SaveObject();
+ m_pDocHolder->CloseFrame();
+ OLENotifyDeactivation();
+ }
}
HRESULT EmbedDocument_Impl::OLENotifyDeactivation()
@@ -497,3 +492,5 @@ HRESULT EmbedDocument_Impl::OLENotifyDeactivation()
#if defined(_MSC_VER)
#pragma warning(disable: 4505)
#endif
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/filter/source/config/cache/basecontainer.hxx
b/main/filter/source/config/cache/basecontainer.hxx
index d65b843f4c..bf14db94cc 100644
--- a/main/filter/source/config/cache/basecontainer.hxx
+++ b/main/filter/source/config/cache/basecontainer.hxx
@@ -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,19 +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.
- *
+ *
*************************************************************/
-
#ifndef __FILTER_CONFIG_BASECONTAINER_HXX_
#define __FILTER_CONFIG_BASECONTAINER_HXX_
@@ -56,7 +55,7 @@ namespace filter{
@descr This class can be used as base for own service implementations,
which must provide read/write access to the filter
configuration.
- Parameters regulate read/write access, which sub set of
informations
+ Parameters regulate read/write access, which sub set of
information
should be available etc.
@attention The base class BaseLock must be the first of declared ones.
@@ -151,12 +150,12 @@ class BaseContainer : public BaseLock
//---------------------------------------
- /** @short initialize this generic intsnace with some specialized
values
+ /** @short initialize this generic instance with some specialized
values
from our derived object.
@descr Because an outside class must use ImplInheritanceHelper2
template to
use us a base class ... and there is no way to pass such
initializing
- parameters trough a required default ctor ... we must be
initialized
+ parameters through a required default ctor ... we must be
initialized
by this special method. Of course this method must be
called first before
any other interface method is used.
@@ -317,3 +316,5 @@ class BaseContainer : public BaseLock
} // namespace filter
#endif // __FILTER_CONFIG_BASECONTAINER_HXX_
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/filter/source/config/cache/typedetection.hxx
b/main/filter/source/config/cache/typedetection.hxx
index eac64f1e2e..5d73d4d586 100644
--- a/main/filter/source/config/cache/typedetection.hxx
+++ b/main/filter/source/config/cache/typedetection.hxx
@@ -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,19 +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.
- *
+ *
*************************************************************/
-
#ifndef __FILTER_CONFIG_TYPEDETECTION_HXX_
#define __FILTER_CONFIG_TYPEDETECTION_HXX_
@@ -153,7 +152,7 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
@param rLastChance
the internal name of a "suggested type" ... (see
before)
- Note: it will be reseted to an empty string every
time. So
+ Note: it will be reset to an empty string every time.
So
a set value of "rLastChance" can be detected outside
very easy.
@param rUsedDetectors
@@ -203,9 +202,9 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
const OUStringList&
rUsedDetectors);
//---------------------------------------
-
+
/** @short seek a might existing stream to position 0.
-
+
@descr This is an optional action to be more robust
in case any detect service doesn't make this seek ...
Normally it's part of any called detect service or
filter ...
@@ -215,7 +214,7 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
a stl representation of the MediaDescriptor as in/out
parameter.
*/
void impl_seekStreamToZero(comphelper::MediaDescriptor& rDescriptor);
-
+
//---------------------------------------
/** @short make deep type detection for a specified
@@ -249,12 +248,12 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
@param rDescriptor
a stl representation of the MediaDescriptor as in/out
parameter.
-
+
@return [string]
a valid type name or an empty string if user canceled
interaction.
*/
::rtl::OUString
impl_askUserForTypeAndFilterIfAllowed(::comphelper::MediaDescriptor&
rDescriptor);
-
+
//---------------------------------------
/** @short check if an input stream is already part of the
@@ -288,7 +287,7 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
@throw Any suitable exception if stream should be opened but
operation was not successful.
Note: If an interactionHandler is part of the given
descriptor too, it was already used.
- Means: let the exception pass trough the top most
interface method!
+ Means: let the exception pass through the top most
interface method!
*/
void impl_openStream(::comphelper::MediaDescriptor& rDescriptor)
throw (css::uno::Exception);
@@ -296,7 +295,7 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
//---------------------------------------
/** @short validate the specified type and its relation ships
- and set all needed informations related to this type
+ and set all needed information related to this type
in the specified descriptor.
@descr Related informations are: - corresponding filter
@@ -319,7 +318,7 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
//---------------------------------------
/** @short validate the specified filter and its relation ships
- and set all needed informations related to this filter
+ and set all needed information related to this filter
in the specified descriptor.
@descr Related informations are: - corresponding type
@@ -453,3 +452,5 @@ class TypeDetection : public
::cppu::ImplInheritanceHelper1< BaseContainer
} // namespace filter
#endif // __FILTER_CONFIG_TYPEDETECTION_HXX_
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sc/source/ui/view/preview.cxx
b/main/sc/source/ui/view/preview.cxx
index a72de4c026..3bf6a08ce4 100644
--- a/main/sc/source/ui/view/preview.cxx
+++ b/main/sc/source/ui/view/preview.cxx
@@ -22,7 +22,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
// INCLUDE ---------------------------------------------------------------
#include <tools/pstm.hxx>
#include "scitems.hxx"
@@ -54,7 +53,7 @@
#include "drwlayer.hxx"
#include "scmod.hxx"
#include "globstr.hrc"
-#include "sc.hrc" // for ShellInvalidate
+#include "sc.hrc" // for ShellInvalidate
#include "AccessibleDocumentPagePreview.hxx"
#include <vcl/lineinfo.hxx>
#include <svx/algitem.hxx>
@@ -70,8 +69,6 @@
// STATIC DATA -----------------------------------------------------------
-//==================================================================
-
//#define SC_PREVIEW_SHADOWSIZE 2
long lcl_GetDisplayStart( SCTAB nTab, ScDocument* pDoc, long* pPages )
@@ -102,31 +99,31 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh,
ScPreviewShell* pView
bLocationValid( sal_False ),
pLocationData( NULL ),
pDrawView( NULL ),
- bInPaint( false ),
- bInSetZoom( false ),
+ bInPaint( false ),
+ bInSetZoom( false ),
bInGetState( sal_False ),
pDocShell( pDocSh ),
- pViewShell( pViewSh ),
- bLeftRulerMove( sal_False ),
- bRightRulerMove( sal_False ),
- bTopRulerMove( sal_False ),
- bBottomRulerMove( sal_False ),
- bHeaderRulerMove( sal_False ),
- bFooterRulerMove( sal_False ),
- bLeftRulerChange( sal_False ),
- bRightRulerChange( sal_False ),
- bTopRulerChange( sal_False ),
- bBottomRulerChange( sal_False ),
- bHeaderRulerChange( sal_False ),
- bFooterRulerChange( sal_False ),
- bPageMargin ( sal_False ),
- bColRulerMove( sal_False ),
- mnScale( 0 ),
- nColNumberButttonDown( 0 ),
- nHeaderHeight ( 0 ),
- nFooterHeight ( 0 )
+ pViewShell( pViewSh ),
+ bLeftRulerMove( sal_False ),
+ bRightRulerMove( sal_False ),
+ bTopRulerMove( sal_False ),
+ bBottomRulerMove( sal_False ),
+ bHeaderRulerMove( sal_False ),
+ bFooterRulerMove( sal_False ),
+ bLeftRulerChange( sal_False ),
+ bRightRulerChange( sal_False ),
+ bTopRulerChange( sal_False ),
+ bBottomRulerChange( sal_False ),
+ bHeaderRulerChange( sal_False ),
+ bFooterRulerChange( sal_False ),
+ bPageMargin ( sal_False ),
+ bColRulerMove( sal_False ),
+ mnScale( 0 ),
+ nColNumberButttonDown( 0 ),
+ nHeaderHeight ( 0 ),
+ nFooterHeight ( 0 )
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); //#106611#
+ SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); // #106611#
SetBackground();
SetHelpId( HID_SC_WIN_PREVIEW );
@@ -134,8 +131,8 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh,
ScPreviewShell* pView
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
- for (SCCOL i=0; i<=MAXCOL; i++)
- nRight[i] = 0; // initialized with actual positions
when markers are drawn
+ for (SCCOL i=0; i<=MAXCOL; i++)
+ nRight[i] = 0; // initialized with actual positions when
markers are drawn
}
@@ -145,33 +142,33 @@ __EXPORT ScPreview::~ScPreview()
delete pLocationData;
}
-void ScPreview::UpdateDrawView() // nTab muss richtig sein
+void ScPreview::UpdateDrawView() // nTab muss richtig sein
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0
+ ScDrawLayer* pModel = pDoc->GetDrawLayer(); // is not 0
// #114135#
if ( pModel )
{
- SdrPage* pPage = pModel->GetPage(nTab);
- if ( pDrawView && ( !pDrawView->GetSdrPageView() ||
pDrawView->GetSdrPageView()->GetPage() != pPage ) )
+ SdrPage* pPage = pModel->GetPage(nTab);
+ if ( pDrawView && ( !pDrawView->GetSdrPageView() ||
pDrawView->GetSdrPageView()->GetPage() != pPage ) )
{
- // die angezeigte Page der DrawView umzustellen
(s.u.) funktioniert nicht ?!?
+ // die angezeigte Page der DrawView umzustellen (s.u.)
funktioniert nicht ?!?
delete pDrawView;
pDrawView = NULL;
}
- if ( !pDrawView )
// neu anlegen?
+ if ( !pDrawView ) // neu anlegen?
{
pDrawView = new FmFormView( pModel, this );
- // #55259# die DrawView uebernimmt den Design-Modus vom
Model
- // (Einstellung "Im Entwurfsmodus oeffnen"), darum hier
zuruecksetzen
+ // #55259# die DrawView übernimmt den Design-Modus vom
Model
+ // (Einstellung "Im Entwurfsmodus öffnen"), darum hier
zurücksetzen
pDrawView->SetDesignMode( sal_True );
pDrawView->SetPrintPreview( sal_True );
- pDrawView->ShowSdrPage(pPage);
+ pDrawView->ShowSdrPage(pPage);
}
#if 0
- else if ( !pDrawView->GetSdrPageView()) // angezeigte
Page umstellen
+ else if ( !pDrawView->GetSdrPageView()) // angezeigte Page
umstellen
{
pDrawView->HideSdrPage();
pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
@@ -180,7 +177,7 @@ void ScPreview::UpdateDrawView() // nTab muss
richtig sein
}
else if ( pDrawView )
{
- delete pDrawView; // fuer diese Tabelle
nicht gebraucht
+ delete pDrawView; // für diese Tabelle nicht gebraucht
pDrawView = NULL;
}
}
@@ -194,7 +191,7 @@ void ScPreview::TestLastPage()
{
nPageNo = nTotalPages - 1;
nTab = nTabCount - 1;
- while (nTab > 0 && !nPages[nTab]) //
letzte nicht leere Tabelle
+ while (nTab > 0 && !nPages[nTab]) // letzte nicht leere
Tabelle
--nTab;
DBG_ASSERT(nPages[nTab],"alle Tabellen leer?");
nTabPage = nPages[nTab] - 1;
@@ -205,14 +202,14 @@ void ScPreview::TestLastPage()
ScDocument* pDoc = pDocShell->GetDocument();
nDisplayStart = lcl_GetDisplayStart( nTab, pDoc, nPages
);
}
- else // leeres Dokument
+ else // empty document
{
nTab = 0;
nPageNo = nTabPage = nTabStart = nDisplayStart = 0;
aState.nPrintTab = 0;
- aState.nStartCol = aState.nEndCol = 0;
- aState.nStartRow = aState.nEndRow = 0;
- aState.nZoom = 0;
+ aState.nStartCol =
aState.nEndCol = 0;
+ aState.nStartRow =
aState.nEndRow = 0;
+ aState.nZoom = 0;
aState.nPagesX = aState.nPagesY = 0;
aState.nTabPages = aState.nTotalPages =
aState.nPageStart = aState.nDocPages = 0;
@@ -229,7 +226,7 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
nTabCount = pDoc->GetTableCount();
//SCTAB nAnz = Min( nTabCount, SCTAB(nToWhichTab+1) );
- SCTAB nAnz = nTabCount;
+ SCTAB nAnz = nTabCount;
SCTAB nStart = nTabsTested;
if (!bValid)
{
@@ -238,9 +235,9 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
nTabsTested = 0;
}
- // update all pending row heights with a single progress bar,
- // instead of a separate progress for each sheet from ScPrintFunc
- pDocShell->UpdatePendingRowHeights( nAnz-1, true );
+ // update all pending row heights with a single progress bar,
+ // instead of a separate progress for each sheet from ScPrintFunc
+ pDocShell->UpdatePendingRowHeights( nAnz-1, true );
// PrintOptions is passed to PrintFunc for SkipEmpty flag,
// but always all sheets are used (there is no selected sheet)
@@ -255,7 +252,7 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
long nThisTab = aPrintFunc.GetTotalPages();
nPages[i] = nThisTab;
nTotalPages += nThisTab;
- nFirstAttr[i] = aPrintFunc.GetFirstPageNo(); // behalten
oder aus Vorlage
+ nFirstAttr[i] = aPrintFunc.GetFirstPageNo(); // behalten oder
aus Vorlage
if (nPageNo>=nThisStart && nPageNo<nTotalPages)
{
@@ -273,7 +270,7 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
if (nAnz > nTabsTested)
nTabsTested = nAnz;
- // testen, ob hinter letzter Seite
+ // testen, ob hinter letzter Seite
if ( nTabsTested >= nTabCount )
TestLastPage();
@@ -286,10 +283,10 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
}
-void ScPreview::RecalcPages() // nur nPageNo
geaendert
+void ScPreview::RecalcPages() // nur nPageNo geaendert
{
if (!bValid)
- return; // dann
wird CalcPages aufgerufen
+ return; // dann wird CalcPages aufgerufen
SCTAB nOldTab = nTab;
@@ -322,7 +319,7 @@ void ScPreview::RecalcPages()
// nur nPageNo geaendert
nDisplayStart = lcl_GetDisplayStart( nTab, pDoc, nPages );
}
- TestLastPage(); // testen, ob hinter letzter Seite
+ TestLastPage(); // testen, ob hinter letzter Seite
if ( nTab != nOldTab )
bStateValid = sal_False;
@@ -337,7 +334,7 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
{
CalcPages(0);
RecalcPages();
- UpdateDrawView(); // Tabelle evtl. geaendert
+ UpdateDrawView(); // Tabelle evtl. geaendert
}
Fraction aPreviewZoom( nZoom, 100 );
@@ -348,8 +345,8 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
sal_Bool bValidPage = ( nPageNo < nTotalPages );
ScModule* pScMod = SC_MOD();
- const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
- Color aBackColor( rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor );
+ const svtools::ColorConfig& rColorCfg = pScMod->GetColorConfig();
+ Color aBackColor(
rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor );
if ( bDoPrint && ( aOffset.X() < 0 || aOffset.Y() < 0 ) && bValidPage )
{
@@ -364,15 +361,15 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
DrawRect(Rectangle( 0, 0, aWinSize.Width(),
-aOffset.Y() ));
}
- long nLeftMargin = 0;
- long nRightMargin = 0;
- long nTopMargin = 0;
- long nBottomMargin = 0;
- sal_Bool bHeaderOn = sal_False;
- sal_Bool bFooterOn = sal_False;
+ long nLeftMargin = 0;
+ long nRightMargin = 0;
+ long nTopMargin = 0;
+ long nBottomMargin = 0;
+ sal_Bool bHeaderOn = sal_False;
+ sal_Bool bFooterOn = sal_False;
- ScDocument* pDoc = pDocShell->GetDocument();
- sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ ScDocument* pDoc = pDocShell->GetDocument();
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
Size aLocalPageSize;
if ( bValidPage )
@@ -393,58 +390,58 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
pPrintFunc->SetDrawView( pDrawView );
- // MultiSelection fuer die eine Seite muss etwas umstaendlich
erzeugt werden...
+ // MultiSelection für die eine Seite muss etwas umständlich
erzeugt werden...
Range aPageRange( nPageNo+1, nPageNo+1 );
MultiSelection aPage( aPageRange );
aPage.SetTotalRange( Range(0,RANGE_MAX) );
aPage.Select( aPageRange );
- long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart,
bDoPrint, pFillLocation );
+ long nPrinted = pPrintFunc->DoPrint( aPage, nTabStart,
nDisplayStart, bDoPrint, pFillLocation );
DBG_ASSERT(nPrinted<=1, "was'n nu los?");
SetMapMode(aMMMode);
- //init nLeftMargin ... in the ScPrintFunc::InitParam!!!
- nLeftMargin = pPrintFunc->GetLeftMargin();
- nRightMargin = pPrintFunc->GetRightMargin();
- nTopMargin = pPrintFunc->GetTopMargin();
- nBottomMargin = pPrintFunc->GetBottomMargin();
- nHeaderHeight = pPrintFunc->GetHeader().nHeight;
- nFooterHeight = pPrintFunc->GetFooter().nHeight;
- bHeaderOn = pPrintFunc->GetHeader().bEnable;
- bFooterOn = pPrintFunc->GetFooter().bEnable;
- mnScale = pPrintFunc->GetZoom();
-
- if ( bDoPrint && bPageMargin && pLocationData ) // don't make use
of pLocationData while filling it
- {
- Rectangle aPixRect;
- Rectangle aRectCellPosition;
- Rectangle aRectPosition;
- pLocationData->GetMainCellRange( aPageArea, aPixRect );
- if( !bLayoutRTL )
- {
- pLocationData->GetCellPosition( aPageArea.aStart,
aRectPosition );
- nLeftPosition = aRectPosition.Left();
- for( SCCOL i = aPageArea.aStart.Col(); i <=
aPageArea.aEnd.Col(); i++ )
- {
- pLocationData->GetCellPosition( ScAddress(
i,aPageArea.aStart.Row(),aPageArea.aStart.Tab()),aRectCellPosition );
- nRight[i] = aRectCellPosition.Right();
- }
- }
- else
- {
- pLocationData->GetCellPosition( aPageArea.aEnd, aRectPosition
);
- nLeftPosition = aRectPosition.Right()+1;
-
- pLocationData->GetCellPosition(
aPageArea.aStart,aRectCellPosition );
- nRight[ aPageArea.aEnd.Col() ] = aRectCellPosition.Left();
- for( SCCOL i = aPageArea.aEnd.Col(); i >
aPageArea.aStart.Col(); i-- )
- {
- pLocationData->GetCellPosition( ScAddress(
i,aPageArea.aEnd.Row(),aPageArea.aEnd.Tab()),aRectCellPosition );
- nRight[ i-1 ] = nRight[ i ] + aRectCellPosition.Right() -
aRectCellPosition.Left() + 1;
- }
- }
- }
+ //init nLeftMargin ... in the ScPrintFunc::InitParam!!!
+ nLeftMargin = pPrintFunc->GetLeftMargin();
+ nRightMargin = pPrintFunc->GetRightMargin();
+ nTopMargin = pPrintFunc->GetTopMargin();
+ nBottomMargin = pPrintFunc->GetBottomMargin();
+ nHeaderHeight = pPrintFunc->GetHeader().nHeight;
+ nFooterHeight = pPrintFunc->GetFooter().nHeight;
+ bHeaderOn = pPrintFunc->GetHeader().bEnable;
+ bFooterOn = pPrintFunc->GetFooter().bEnable;
+ mnScale = pPrintFunc->GetZoom();
+
+ if ( bDoPrint && bPageMargin && pLocationData ) // don't make
use of pLocationData while filling it
+ {
+ Rectangle aPixRect;
+ Rectangle aRectCellPosition;
+ Rectangle aRectPosition;
+ pLocationData->GetMainCellRange( aPageArea, aPixRect );
+ if( !bLayoutRTL )
+ {
+ pLocationData->GetCellPosition(
aPageArea.aStart, aRectPosition );
+ nLeftPosition = aRectPosition.Left();
+ for( SCCOL i = aPageArea.aStart.Col(); i <=
aPageArea.aEnd.Col(); i++ )
+ {
+ pLocationData->GetCellPosition(
ScAddress( i,aPageArea.aStart.Row(),aPageArea.aStart.Tab()),aRectCellPosition );
+ nRight[i] = aRectCellPosition.Right();
+ }
+ }
+ else
+ {
+ pLocationData->GetCellPosition( aPageArea.aEnd,
aRectPosition );
+ nLeftPosition = aRectPosition.Right()+1;
+
+ pLocationData->GetCellPosition(
aPageArea.aStart,aRectCellPosition );
+ nRight[ aPageArea.aEnd.Col() ] =
aRectCellPosition.Left();
+ for( SCCOL i = aPageArea.aEnd.Col(); i >
aPageArea.aStart.Col(); i-- )
+ {
+ pLocationData->GetCellPosition(
ScAddress( i,aPageArea.aEnd.Row(),aPageArea.aEnd.Tab()),aRectCellPosition );
+ nRight[ i-1 ] = nRight[ i ] +
aRectCellPosition.Right() - aRectCellPosition.Left() + 1;
+ }
+ }
+ }
if (nPrinted) // wenn nichts, alles grau zeichnen
{
@@ -452,12 +449,12 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
aLocalPageSize.Width() = (long)
(aLocalPageSize.Width() * HMM_PER_TWIPS );
aLocalPageSize.Height() = (long)
(aLocalPageSize.Height() * HMM_PER_TWIPS );
- nLeftMargin = (long) ( nLeftMargin * HMM_PER_TWIPS );
- nRightMargin = (long) ( nRightMargin * HMM_PER_TWIPS );
- nTopMargin = (long) ( nTopMargin * HMM_PER_TWIPS );
- nBottomMargin = (long) ( nBottomMargin * HMM_PER_TWIPS );
- nHeaderHeight = (long) ( nHeaderHeight * HMM_PER_TWIPS * mnScale /
100 + nTopMargin );
- nFooterHeight = (long) ( nFooterHeight * HMM_PER_TWIPS * mnScale /
100 + nBottomMargin );
+ nLeftMargin = (long) ( nLeftMargin * HMM_PER_TWIPS );
+ nRightMargin = (long) ( nRightMargin * HMM_PER_TWIPS );
+ nTopMargin = (long) ( nTopMargin * HMM_PER_TWIPS );
+ nBottomMargin = (long) ( nBottomMargin * HMM_PER_TWIPS
);
+ nHeaderHeight = (long) ( nHeaderHeight * HMM_PER_TWIPS
* mnScale / 100 + nTopMargin );
+ nFooterHeight = (long) ( nFooterHeight * HMM_PER_TWIPS
* mnScale / 100 + nBottomMargin );
}
if (!bStateValid)
@@ -481,38 +478,38 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
sal_Bool bRight = nPageEndX <= aWinEnd.X();
sal_Bool bBottom = nPageEndY <= aWinEnd.Y();
- if( bPageMargin && bValidPage )
- {
- SetMapMode(aMMMode);
- SetLineColor( COL_BLACK );
- DrawInvert( (long)( nTopMargin - aOffset.Y() ), POINTER_VSIZEBAR );
- DrawInvert( (long)(nPageEndY - nBottomMargin ), POINTER_VSIZEBAR );
- DrawInvert( (long)( nLeftMargin - aOffset.X() ), POINTER_HSIZEBAR
);
- DrawInvert( (long)( nPageEndX - nRightMargin ) , POINTER_HSIZEBAR
);
- if( bHeaderOn )
- {
- DrawInvert( nHeaderHeight - aOffset.Y(), POINTER_VSIZEBAR );
- }
- if( bFooterOn )
- {
- DrawInvert( nPageEndY - nFooterHeight, POINTER_VSIZEBAR );
- }
+ if( bPageMargin && bValidPage )
+ {
+ SetMapMode(aMMMode);
+ SetLineColor( COL_BLACK );
+ DrawInvert( (long)( nTopMargin - aOffset.Y() ),
POINTER_VSIZEBAR );
+ DrawInvert( (long)(nPageEndY - nBottomMargin ),
POINTER_VSIZEBAR );
+ DrawInvert( (long)( nLeftMargin - aOffset.X() ),
POINTER_HSIZEBAR );
+ DrawInvert( (long)( nPageEndX - nRightMargin ) ,
POINTER_HSIZEBAR );
+ if( bHeaderOn )
+ {
+ DrawInvert( nHeaderHeight - aOffset.Y(),
POINTER_VSIZEBAR );
+ }
+ if( bFooterOn )
+ {
+ DrawInvert( nPageEndY - nFooterHeight,
POINTER_VSIZEBAR );
+ }
- SetMapMode( MapMode( MAP_PIXEL ) );
- for( int i= aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
- {
- Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() )
,aMMMode );
- SetLineColor( COL_BLACK );
- SetFillColor( COL_BLACK );
- DrawRect( Rectangle( Point( nRight[i] - 2, aColumnTop.Y()
),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) ));
- DrawLine( Point( nRight[i], aColumnTop.Y() ), Point(
nRight[i], 10 + aColumnTop.Y()) );
- }
- SetMapMode( aMMMode );
- }
+ SetMapMode( MapMode( MAP_PIXEL ) );
+ for( int i= aPageArea.aStart.Col(); i<=
aPageArea.aEnd.Col(); i++ )
+ {
+ Point aColumnTop = LogicToPixel( Point( 0,
-aOffset.Y() ) ,aMMMode );
+ SetLineColor( COL_BLACK );
+ SetFillColor( COL_BLACK );
+ DrawRect( Rectangle( Point( nRight[i] - 2,
aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) ));
+ DrawLine( Point( nRight[i], aColumnTop.Y() ),
Point( nRight[i], 10 + aColumnTop.Y()) );
+ }
+ SetMapMode( aMMMode );
+ }
if (bRight || bBottom)
{
- SetMapMode(aMMMode);
+ SetMapMode(aMMMode);
SetLineColor();
SetFillColor(aBackColor);
if (bRight)
@@ -520,7 +517,7 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
if (bBottom)
{
if (bRight)
- DrawRect(Rectangle(0,nPageEndY,
nPageEndX,aWinEnd.Y())); // Ecke nicht doppelt
+ DrawRect(Rectangle(0,nPageEndY,
nPageEndX,aWinEnd.Y())); // Ecke nicht doppelt
else
DrawRect(Rectangle(0,nPageEndY,
aWinEnd.X(),aWinEnd.Y()));
}
@@ -528,9 +525,9 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
if ( bValidPage )
{
- Color aBorderColor(
SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+ Color aBorderColor(
SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
- // draw border
+ // draw border
if ( aOffset.X() <= 0 || aOffset.Y() <= 0 || bRight ||
bBottom )
{
@@ -565,20 +562,20 @@ void ScPreview::DoPrint( ScPreviewLocationData*
pFillLocation )
}
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
void __EXPORT ScPreview::Paint( const Rectangle& /* rRect */ )
{
- bool bWasInPaint = bInPaint; // nested calls shouldn't be
necessary, but allow for now
- bInPaint = true;
+ bool bWasInPaint = bInPaint; // nested calls shouldn't be necessary,
but allow for now
+ bInPaint = true;
- if (bPageMargin)
- GetLocationData(); // fill location data for column
positions
- DoPrint( NULL );
+ if (bPageMargin)
+ GetLocationData(); // fill location data for column positions
+ DoPrint( NULL );
pViewShell->UpdateScrollBars();
- bInPaint = bWasInPaint;
+ bInPaint = bWasInPaint;
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
void __EXPORT ScPreview::Command( const CommandEvent& rCEvt )
{
@@ -598,30 +595,30 @@ void __EXPORT ScPreview::Command( const CommandEvent&
rCEvt )
void __EXPORT ScPreview::KeyInput( const KeyEvent& rKEvt )
{
- // The + and - keys can't be configured as accelerator entries, so they
must be handled directly
- // (in ScPreview, not ScPreviewShell -> only if the preview window has
the focus)
-
- const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- sal_uInt16 nKey = rKeyCode.GetCode();
- sal_Bool bHandled = sal_False;
- if(!rKeyCode.GetModifier())
- {
- sal_uInt16 nSlot = 0;
- switch(nKey)
- {
- case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break;
- case KEY_ESCAPE: nSlot = ScViewUtil::IsFullScreen( *pViewShell )
? SID_CANCEL : SID_PREVIEW_CLOSE; break;
- case KEY_SUBTRACT: nSlot = SID_PREVIEW_ZOOMOUT; break;
- }
- if(nSlot)
- {
- bHandled = sal_True;
- pViewShell->GetViewFrame()->GetDispatcher()->Execute( nSlot,
SFX_CALLMODE_ASYNCHRON );
- }
- }
-
- if ( !bHandled && !pViewShell->KeyInput(rKEvt) )
- Window::KeyInput(rKEvt);
+ // The + and - keys can't be configured as accelerator entries, so they
must be handled directly
+ // (in ScPreview, not ScPreviewShell -> only if the preview window has
the focus)
+
+ const KeyCode& rKeyCode = rKEvt.GetKeyCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
+ sal_Bool bHandled = sal_False;
+ if(!rKeyCode.GetModifier())
+ {
+ sal_uInt16 nSlot = 0;
+ switch(nKey)
+ {
+ case KEY_ADD: nSlot = SID_PREVIEW_ZOOMIN; break;
+ case KEY_ESCAPE: nSlot = ScViewUtil::IsFullScreen(
*pViewShell ) ? SID_CANCEL : SID_PREVIEW_CLOSE; break;
+ case KEY_SUBTRACT: nSlot = SID_PREVIEW_ZOOMOUT; break;
+ }
+ if(nSlot)
+ {
+ bHandled = sal_True;
+ pViewShell->GetViewFrame()->GetDispatcher()->Execute(
nSlot, SFX_CALLMODE_ASYNCHRON );
+ }
+ }
+
+ if ( !bHandled && !pViewShell->KeyInput(rKEvt) )
+ Window::KeyInput(rKEvt);
}
@@ -661,7 +658,7 @@ String ScPreview::GetPosString()
if (!bValid)
{
CalcPages(nTab);
- UpdateDrawView(); // Tabelle evtl. geaendert
+ UpdateDrawView(); // Tabelle evtl. geändert
}
String aString( ScGlobal::GetRscString( STR_PAGE ) );
@@ -695,9 +692,9 @@ void ScPreview::SetZoom(sal_uInt16 nNewZoom)
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom,
aPreviewZoom );
SetMapMode( aMMMode );
- bInSetZoom = true; // don't scroll during SetYOffset in
UpdateScrollBars
+ bInSetZoom = true; // don't scroll during SetYOffset in
UpdateScrollBars
pViewShell->UpdateScrollBars();
- bInSetZoom = false;
+ bInSetZoom = false;
bStateValid = sal_False;
InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
@@ -711,7 +708,7 @@ void ScPreview::SetPageNo( long nPage )
{
nPageNo = nPage;
RecalcPages();
- UpdateDrawView(); // Tabelle evtl. geaendert
+ UpdateDrawView(); // Tabelle evtl. geändert
InvalidateLocationData( SC_HINT_DATACHANGED );
Invalidate();
}
@@ -727,7 +724,7 @@ long ScPreview::GetFirstPage(SCTAB nTabP)
if (nTabP>0)
{
CalcPages( nTabP );
- UpdateDrawView(); // Tabelle evtl. geaendert
+ UpdateDrawView(); // Tabelle evtl. geändert
for (SCTAB i=0; i<nTabP; i++)
nPage += nPages[i];
@@ -804,7 +801,7 @@ void ScPreview::SetXOffset( long nX )
{
long nDif = LogicToPixel(aOffset).X() -
LogicToPixel(Point(nX,0)).X();
aOffset.X() = nX;
- if (nDif && !bInSetZoom)
+ if (nDif && !bInSetZoom)
{
MapMode aOldMode = GetMapMode(); SetMapMode(MAP_PIXEL);
Scroll( nDif, 0 );
@@ -814,11 +811,11 @@ void ScPreview::SetXOffset( long nX )
else
{
aOffset.X() = nX;
- if (!bInSetZoom)
+ if (!bInSetZoom)
Invalidate();
}
InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
- Paint(Rectangle());
+ Paint(Rectangle());
}
@@ -831,7 +828,7 @@ void ScPreview::SetYOffset( long nY )
{
long nDif = LogicToPixel(aOffset).Y() -
LogicToPixel(Point(0,nY)).Y();
aOffset.Y() = nY;
- if (nDif && !bInSetZoom)
+ if (nDif && !bInSetZoom)
{
MapMode aOldMode = GetMapMode(); SetMapMode(MAP_PIXEL);
Scroll( 0, nDif );
@@ -841,18 +838,18 @@ void ScPreview::SetYOffset( long nY )
else
{
aOffset.Y() = nY;
- if (!bInSetZoom)
+ if (!bInSetZoom)
Invalidate();
}
InvalidateLocationData( SC_HINT_ACC_VISAREACHANGED );
- Paint(Rectangle());
+ Paint(Rectangle());
}
void ScPreview::DoInvalidate()
{
- // Wenn das ganze aus dem GetState der Shell gerufen wird,
- // muss das Invalidate hinterher asynchron kommen...
+ // Wenn das ganze aus dem GetState der Shell gerufen wird,
+ // muss das Invalidate hinterher asynchron kommen...
if (bInGetState)
Application::PostUserEvent( STATIC_LINK( this, ScPreview,
InvalidateHdl ) );
@@ -862,8 +859,8 @@ void ScPreview::DoInvalidate()
void ScPreview::StaticInvalidate()
{
- // static method, because it's called asynchronously
- // -> must use current viewframe
+ // static method, because it's called asynchronously
+ // -> must use current viewframe
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (!pViewFrm)
@@ -879,13 +876,13 @@ void ScPreview::StaticInvalidate()
rBindings.Invalidate(SID_ATTR_ZOOM);
rBindings.Invalidate(SID_PREVIEW_ZOOMIN);
rBindings.Invalidate(SID_PREVIEW_ZOOMOUT);
- rBindings.Invalidate(SID_PREVIEW_SCALINGFACTOR);
- rBindings.Invalidate(SID_ATTR_ZOOMSLIDER);
+ rBindings.Invalidate(SID_PREVIEW_SCALINGFACTOR);
+ rBindings.Invalidate(SID_ATTR_ZOOMSLIDER);
}
IMPL_STATIC_LINK( ScPreview, InvalidateHdl, void*, EMPTYARG )
{
- (void)pThis; // avoid warning
+ (void)pThis; // avoid warning
StaticInvalidate();
return 0;
@@ -905,142 +902,142 @@ void ScPreview::DataChanged( const DataChangedEvent&
rDCEvt )
if ( rDCEvt.GetType() == DATACHANGED_FONTS )
pDocShell->UpdateFontList();
- // #i114518# Paint of form controls may modify the window's settings.
- // Ignore the event if it is called from within Paint.
- if ( !bInPaint )
- {
- if ( rDCEvt.GetType() == DATACHANGED_SETTINGS &&
- (rDCEvt.GetFlags() & SETTINGS_STYLE) )
- {
- // scroll bar size may have changed
- pViewShell->InvalidateBorder(); // calls OuterResizePixel
- }
+ // #i114518# Paint of form controls may modify the window's
settings.
+ // Ignore the event if it is called from within Paint.
+ if ( !bInPaint )
+ {
+ if ( rDCEvt.GetType() == DATACHANGED_SETTINGS &&
+ (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+ {
+ // scroll bar size may have changed
+ pViewShell->InvalidateBorder(); // calls
OuterResizePixel
+ }
- Invalidate();
- InvalidateLocationData( SC_HINT_DATACHANGED );
- }
+ Invalidate();
+ InvalidateLocationData( SC_HINT_DATACHANGED );
+ }
}
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
void __EXPORT ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
{
- Fraction aPreviewZoom( nZoom, 100 );
- Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor()
), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
-
- aButtonDownChangePoint = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
- aButtonDownPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
-
- CaptureMouse();
-
- if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR )
- {
- SetMapMode( aMMMode );
- if( bLeftRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = sal_True;
- bRightRulerMove = sal_False;
- }
- else if( bRightRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.X(), POINTER_HSIZEBAR );
- bLeftRulerMove = sal_False;
- bRightRulerMove = sal_True;
- }
- }
-
- if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
- {
- SetMapMode( aMMMode );
- if( bTopRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = sal_True;
- bBottomRulerMove = sal_False;
- }
- else if( bBottomRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bTopRulerMove = sal_False;
- bBottomRulerMove = sal_True;
- }
- else if( bHeaderRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = sal_True;
- bFooterRulerMove = sal_False;
- }
- else if( bFooterRulerChange )
- {
- DrawInvert( aButtonDownChangePoint.Y(), POINTER_VSIZEBAR );
- bHeaderRulerMove = sal_False;
- bFooterRulerMove = sal_True;
- }
- }
-
- if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
- {
- Point aNowPt = rMEvt.GetPosPixel();
- SCCOL i = 0;
- for( i = aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
- {
- if( aNowPt.X() < nRight[i] + 2 && aNowPt.X() > nRight[i] - 2 )
- {
- nColNumberButttonDown = i;
- break;
- }
- }
- if( i == aPageArea.aEnd.Col()+1 )
- return;
-
- SetMapMode( aMMMode );
- if( nColNumberButttonDown == aPageArea.aStart.Col() )
- DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X()
,POINTER_HSPLIT );
- else
- DrawInvert( PixelToLogic( Point( nRight[ nColNumberButttonDown-1
], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
-
- DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT );
- bColRulerMove = sal_True;
- }
+ Fraction aPreviewZoom( nZoom, 100 );
+ Fraction aHorPrevZoom( (long)( 100 * nZoom /
pDocShell->GetOutputFactor() ), 10000 );
+ MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+
+ aButtonDownChangePoint = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
+ aButtonDownPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
+
+ CaptureMouse();
+
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR )
+ {
+ SetMapMode( aMMMode );
+ if( bLeftRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.X(),
POINTER_HSIZEBAR );
+ bLeftRulerMove = sal_True;
+ bRightRulerMove = sal_False;
+ }
+ else if( bRightRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.X(),
POINTER_HSIZEBAR );
+ bLeftRulerMove = sal_False;
+ bRightRulerMove = sal_True;
+ }
+ }
+
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
+ {
+ SetMapMode( aMMMode );
+ if( bTopRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.Y(),
POINTER_VSIZEBAR );
+ bTopRulerMove = sal_True;
+ bBottomRulerMove = sal_False;
+ }
+ else if( bBottomRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.Y(),
POINTER_VSIZEBAR );
+ bTopRulerMove = sal_False;
+ bBottomRulerMove = sal_True;
+ }
+ else if( bHeaderRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.Y(),
POINTER_VSIZEBAR );
+ bHeaderRulerMove = sal_True;
+ bFooterRulerMove = sal_False;
+ }
+ else if( bFooterRulerChange )
+ {
+ DrawInvert( aButtonDownChangePoint.Y(),
POINTER_VSIZEBAR );
+ bHeaderRulerMove = sal_False;
+ bFooterRulerMove = sal_True;
+ }
+ }
+
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
+ {
+ Point aNowPt = rMEvt.GetPosPixel();
+ SCCOL i = 0;
+ for( i = aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
+ {
+ if( aNowPt.X() < nRight[i] + 2 && aNowPt.X() >
nRight[i] - 2 )
+ {
+ nColNumberButttonDown = i;
+ break;
+ }
+ }
+ if( i == aPageArea.aEnd.Col()+1 )
+ return;
+
+ SetMapMode( aMMMode );
+ if( nColNumberButttonDown == aPageArea.aStart.Col() )
+ DrawInvert( PixelToLogic( Point( nLeftPosition, 0
),aMMMode ).X() ,POINTER_HSPLIT );
+ else
+ DrawInvert( PixelToLogic( Point( nRight[
nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
+
+ DrawInvert( aButtonDownChangePoint.X(), POINTER_HSPLIT );
+ bColRulerMove = sal_True;
+ }
}
void __EXPORT ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
{
- Fraction aPreviewZoom( nZoom, 100 );
- Fraction aHorPrevZoom( (long)( 100 * nZoom /
pDocShell->GetOutputFactor() ), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ Fraction aPreviewZoom( nZoom, 100 );
+ Fraction aHorPrevZoom( (long)( 100 * nZoom /
pDocShell->GetOutputFactor() ), 10000 );
+ MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom,
aPreviewZoom );
- aButtonUpPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
+ aButtonUpPt = PixelToLogic( rMEvt.GetPosPixel(),aMMMode );
- long nWidth = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Width();
- long nHeight = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Height();
+ long nWidth = (long)
lcl_GetDocPageSize(pDocShell->GetDocument(), nTab).Width();
+ long nHeight = (long)
lcl_GetDocPageSize(pDocShell->GetDocument(), nTab).Height();
- if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR )
- {
- SetPointer( Pointer( POINTER_ARROW ) );
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_HSIZEBAR )
+ {
+ SetPointer( Pointer( POINTER_ARROW ) );
- sal_Bool bMoveRulerAction= sal_True;
+ sal_Bool bMoveRulerAction= sal_True;
- ScDocument * pDoc = pDocShell->GetDocument();
- String aOldName = pDoc->GetPageStyle( nTab );
- sal_Bool bUndo( pDoc->IsUndoEnabled() );
- ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName,
SFX_STYLE_FAMILY_PAGE );
+ ScDocument * pDoc = pDocShell->GetDocument();
+ String aOldName = pDoc->GetPageStyle( nTab );
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
+ ScStyleSheetPool* pStylePool =
pDoc->GetStyleSheetPool();
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
aOldName, SFX_STYLE_FAMILY_PAGE );
- if ( pStyleSheet )
- {
- ScStyleSaveData aOldData;
- if( bUndo )
- aOldData.InitFromStyle( pStyleSheet );
+ if ( pStyleSheet )
+ {
+ ScStyleSaveData aOldData;
+ if( bUndo )
+ aOldData.InitFromStyle( pStyleSheet );
- SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
+ SfxItemSet& rStyleSet =
pStyleSheet->GetItemSet();
- SvxLRSpaceItem aLRItem = ( const SvxLRSpaceItem& )
rStyleSet.Get( ATTR_LRSPACE );
+ SvxLRSpaceItem aLRItem = ( const
SvxLRSpaceItem& ) rStyleSet.Get( ATTR_LRSPACE );
- if(( bLeftRulerChange || bRightRulerChange ) && (
aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth *
HMM_PER_TWIPS - aOffset.X() ) )
- {
+ if(( bLeftRulerChange || bRightRulerChange ) &&
( aButtonUpPt.X() <= ( 0 - aOffset.X() ) || aButtonUpPt.X() > nWidth *
HMM_PER_TWIPS - aOffset.X() ) )
+ {
bMoveRulerAction = sal_False;
Paint(Rectangle(0,0,10000,10000));
}
@@ -1097,43 +1094,43 @@ void __EXPORT ScPreview::MouseButtonUp( const
MouseEvent& rMEvt )
}
bLeftRulerMove = sal_False;
bRightRulerMove = sal_False;
- }
-
- if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
- {
- SetPointer( POINTER_ARROW );
-
- sal_Bool bMoveRulerAction = sal_True;
- if( ( bTopRulerChange || bBottomRulerChange || bHeaderRulerChange
|| bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 - aOffset.Y() ) ||
aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) )
- {
- bMoveRulerAction = sal_False;
- Paint( Rectangle(0,0,10000,10000) );
- }
- else if( aButtonDownPt.Y() == aButtonUpPt.Y() )
- {
- bMoveRulerAction = sal_False;
- DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR );
- }
- if( bMoveRulerAction )
- {
- ScDocument * pDoc = pDocShell->GetDocument();
- sal_Bool bUndo( pDoc->IsUndoEnabled() );
- ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
- DBG_ASSERT( pStyleSheet, "PageStyle not found" );
- if ( pStyleSheet )
- {
- ScDocShellModificator aModificator( *pDocShell );
- ScStyleSaveData aOldData;
- if( bUndo )
- aOldData.InitFromStyle( pStyleSheet );
-
- SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
+ }
- SvxULSpaceItem aULItem = ( const
SvxULSpaceItem&)rStyleSet.Get( ATTR_ULSPACE );
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_VSIZEBAR )
+ {
+ SetPointer( POINTER_ARROW );
- if( bTopRulerMove && bTopRulerChange )
- {
+ sal_Bool bMoveRulerAction = sal_True;
+ if( ( bTopRulerChange || bBottomRulerChange ||
bHeaderRulerChange || bFooterRulerChange ) && ( aButtonUpPt.Y() <= ( 0 -
aOffset.Y() ) || aButtonUpPt.Y() > nHeight * HMM_PER_TWIPS -aOffset.Y() ) )
+ {
+ bMoveRulerAction = sal_False;
+ Paint( Rectangle(0,0,10000,10000) );
+ }
+ else if( aButtonDownPt.Y() == aButtonUpPt.Y() )
+ {
+ bMoveRulerAction = sal_False;
+ DrawInvert( aButtonUpPt.Y(), POINTER_VSIZEBAR );
+ }
+ if( bMoveRulerAction )
+ {
+ ScDocument * pDoc = pDocShell->GetDocument();
+ sal_Bool bUndo( pDoc->IsUndoEnabled() );
+ ScStyleSheetPool* pStylePool =
pDoc->GetStyleSheetPool();
+ SfxStyleSheetBase* pStyleSheet =
pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
+ DBG_ASSERT( pStyleSheet, "PageStyle not found"
);
+ if ( pStyleSheet )
+ {
+ ScDocShellModificator aModificator(
*pDocShell );
+ ScStyleSaveData aOldData;
+ if( bUndo )
+ aOldData.InitFromStyle(
pStyleSheet );
+
+ SfxItemSet& rStyleSet =
pStyleSheet->GetItemSet();
+
+ SvxULSpaceItem aULItem = ( const
SvxULSpaceItem&)rStyleSet.Get( ATTR_ULSPACE );
+
+ if( bTopRulerMove && bTopRulerChange )
+ {
aULItem.SetUpperValue( (sal_uInt16)( aButtonUpPt.Y() /
HMM_PER_TWIPS + aOffset.Y() / HMM_PER_TWIPS ) );
rStyleSet.Put( aULItem );
}
@@ -1193,41 +1190,41 @@ void __EXPORT ScPreview::MouseButtonUp( const
MouseEvent& rMEvt )
bBottomRulerChange = sal_False;
bHeaderRulerChange = sal_False;
bFooterRulerChange = sal_False;
- }
- }
- bTopRulerMove = sal_False;
- bBottomRulerMove = sal_False;
- bHeaderRulerMove = sal_False;
- bFooterRulerMove = sal_False;
- }
- if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
- {
- SetPointer(POINTER_ARROW);
- ScDocument* pDoc = pDocShell->GetDocument();
- sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
- sal_Bool bMoveRulerAction = sal_True;
- if( aButtonDownPt.X() == aButtonUpPt.X() )
- {
- bMoveRulerAction = sal_False;
- if( nColNumberButttonDown == aPageArea.aStart.Col() )
- DrawInvert( PixelToLogic( Point( nLeftPosition, 0
),aMMMode ).X() ,POINTER_HSPLIT );
- else
- DrawInvert( PixelToLogic( Point( nRight[
nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
- DrawInvert( aButtonUpPt.X(), POINTER_HSPLIT );
- }
- if( bMoveRulerAction )
- {
- long nNewColWidth = 0;
- ScDocFunc aFunc(*pDocShell);
- SCCOLROW nCols[2] = { nColNumberButttonDown,
nColNumberButttonDown };
-
- if( !bLayoutRTL )
- {
- nNewColWidth = (long) ( PixelToLogic( Point(
rMEvt.GetPosPixel().X() - nRight[ nColNumberButttonDown ], 0), aMMMode ).X() /
HMM_PER_TWIPS ) * 100 / mnScale;
- nNewColWidth += pDocShell->GetDocument()->GetColWidth(
nColNumberButttonDown, nTab );
- }
- else
- {
+ }
+ }
+ bTopRulerMove = sal_False;
+ bBottomRulerMove = sal_False;
+ bHeaderRulerMove = sal_False;
+ bFooterRulerMove = sal_False;
+ }
+ if( rMEvt.IsLeft() && GetPointer() == POINTER_HSPLIT )
+ {
+ SetPointer(POINTER_ARROW);
+ ScDocument* pDoc = pDocShell->GetDocument();
+ sal_Bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
+ sal_Bool bMoveRulerAction = sal_True;
+ if( aButtonDownPt.X() == aButtonUpPt.X() )
+ {
+ bMoveRulerAction = sal_False;
+ if( nColNumberButttonDown ==
aPageArea.aStart.Col() )
+ DrawInvert( PixelToLogic( Point(
nLeftPosition, 0 ),aMMMode ).X() ,POINTER_HSPLIT );
+ else
+ DrawInvert( PixelToLogic( Point(
nRight[ nColNumberButttonDown-1 ], 0 ),aMMMode ).X() ,POINTER_HSPLIT );
+ DrawInvert( aButtonUpPt.X(), POINTER_HSPLIT );
+ }
+ if( bMoveRulerAction )
+ {
+ long nNewColWidth = 0;
+ ScDocFunc aFunc(*pDocShell);
+ SCCOLROW nCols[2] = { nColNumberButttonDown,
nColNumberButttonDown };
+
+ if( !bLayoutRTL )
+ {
+ nNewColWidth = (long) ( PixelToLogic(
Point( rMEvt.GetPosPixel().X() - nRight[ nColNumberButttonDown ], 0), aMMMode
).X() / HMM_PER_TWIPS ) * 100 / mnScale;
+ nNewColWidth +=
pDocShell->GetDocument()->GetColWidth( nColNumberButttonDown, nTab );
+ }
+ else
+ {
nNewColWidth = (long) ( PixelToLogic( Point( nRight[
nColNumberButttonDown ] - rMEvt.GetPosPixel().X(), 0), aMMMode ).X() /
HMM_PER_TWIPS ) * 100 / mnScale;
nNewColWidth += pDocShell->GetDocument()->GetColWidth(
nColNumberButttonDown, nTab );
@@ -1241,174 +1238,174 @@ void __EXPORT ScPreview::MouseButtonUp( const
MouseEvent& rMEvt )
{
ScPrintFunc aPrintFunc( this, pDocShell, nTab );
aPrintFunc.UpdatePages();
- }
- Rectangle nRect(0,0,10000,10000);
- Paint( nRect );
- }
- bColRulerMove = sal_False;
- }
- ReleaseMouse();
+ }
+ Rectangle nRect(0,0,10000,10000);
+ Paint( nRect );
+ }
+ bColRulerMove = sal_False;
+ }
+ ReleaseMouse();
}
void __EXPORT ScPreview::MouseMove( const MouseEvent& rMEvt )
{
- Fraction aPreviewZoom( nZoom, 100 );
- Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor()
), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
- Point aMouseMovePoint = PixelToLogic( rMEvt.GetPosPixel(), aMMMode );
-
- long nLeftMargin = 0;
- long nRightMargin = 0;
- long nTopMargin = 0;
- long nBottomMargin = 0;
- Size PageSize;
-
- long nWidth = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Width();
- long nHeight = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Height();
-
- if ( nPageNo < nTotalPages )
- {
- ScPrintOptions aOptions = SC_MOD()->GetPrintOptions();
-
- ScPrintFunc* pPrintFunc;
-
- if (bStateValid)
- pPrintFunc = new ScPrintFunc( this, pDocShell, aState, &aOptions );
- else
- pPrintFunc = new ScPrintFunc( this, pDocShell, nTab,
nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
-
- nLeftMargin = (long)( pPrintFunc->GetLeftMargin() * HMM_PER_TWIPS -
aOffset.X() );
- nRightMargin = (long)( pPrintFunc->GetRightMargin() * HMM_PER_TWIPS );
- nRightMargin = (long)( nWidth * HMM_PER_TWIPS - nRightMargin -
aOffset.X() );
- nTopMargin = (long)( pPrintFunc->GetTopMargin() * HMM_PER_TWIPS -
aOffset.Y() );
- nBottomMargin = (long)( pPrintFunc->GetBottomMargin() * HMM_PER_TWIPS
);
- nBottomMargin = (long)( nHeight * HMM_PER_TWIPS - nBottomMargin -
aOffset.Y() );
- if( mnScale > 0 )
- {
- nHeaderHeight = (long)( nTopMargin +
pPrintFunc->GetHeader().nHeight * HMM_PER_TWIPS * mnScale / 100 );
- nFooterHeight = (long)( nBottomMargin -
pPrintFunc->GetFooter().nHeight * HMM_PER_TWIPS * mnScale / 100 );
- }
- else
- {
- nHeaderHeight = (long)( nTopMargin +
pPrintFunc->GetHeader().nHeight * HMM_PER_TWIPS );
- nFooterHeight = (long)( nBottomMargin -
pPrintFunc->GetFooter().nHeight * HMM_PER_TWIPS );
- }
- delete pPrintFunc;
- }
-
- Point aPixPt( rMEvt.GetPosPixel() );
- Point aLeftTop = LogicToPixel( Point( nLeftMargin, -aOffset.Y() ) ,
aMMMode );
- Point aLeftBottom = LogicToPixel( Point( nLeftMargin ,(long)(nHeight *
HMM_PER_TWIPS - aOffset.Y()) ), aMMMode );
- Point aRightTop = LogicToPixel( Point( nRightMargin, -aOffset.Y() ),
aMMMode );
- Point aTopLeft = LogicToPixel( Point( -aOffset.X(), nTopMargin ),
aMMMode );
- Point aTopRight = LogicToPixel( Point( (long)(nWidth * HMM_PER_TWIPS -
aOffset.X()), nTopMargin ), aMMMode );
- Point aBottomLeft = LogicToPixel( Point( -aOffset.X(), nBottomMargin ),
aMMMode );
- Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight ),
aMMMode );
- Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight ),
aMMMode );
-
- sal_Bool bOnColRulerChange = sal_False;
-
- for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
- {
- Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) ,aMMMode );
- Point aColumnBottom = LogicToPixel( Point( 0, (long)( nHeight *
HMM_PER_TWIPS - aOffset.Y()) ), aMMMode );
- if( aPixPt.X() < ( nRight[i] + 2 ) && ( aPixPt.X() > ( nRight[i] - 2 )
) && ( aPixPt.X() < aRightTop.X() ) && ( aPixPt.X() > aLeftTop.X() )
- && ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() <
aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove
- && !bTopRulerMove && !bBottomRulerMove && !bHeaderRulerMove &&
!bFooterRulerMove )
- {
- bOnColRulerChange = sal_True;
- if( !rMEvt.GetButtons() && GetPointer() == POINTER_HSPLIT )
- nColNumberButttonDown = i;
- break;
- }
- }
-
- if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() - 2 )
&& !bRightRulerMove )
- {
- bLeftRulerChange = sal_True;
- bRightRulerChange = sal_False;
- }
- else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > (
aRightTop.X() - 2 ) && !bLeftRulerMove )
- {
- bLeftRulerChange = sal_False;
- bRightRulerChange = sal_True;
- }
- else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > ( aTopLeft.Y()
- 2 ) && !bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
- {
- bTopRulerChange = sal_True;
- bBottomRulerChange = sal_False;
- bHeaderRulerChange = sal_False;
- bFooterRulerChange = sal_False;
- }
- else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > (
aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove &&
!bFooterRulerMove )
- {
- bTopRulerChange = sal_False;
- bBottomRulerChange = sal_True;
- bHeaderRulerChange = sal_False;
- bFooterRulerChange = sal_False;
- }
- else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > (
aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove &&
!bFooterRulerMove )
- {
- bTopRulerChange = sal_False;
- bBottomRulerChange = sal_False;
- bHeaderRulerChange = sal_True;
- bFooterRulerChange = sal_False;
- }
- else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > (
aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove &&
!bHeaderRulerMove )
- {
- bTopRulerChange = sal_False;
- bBottomRulerChange = sal_False;
- bHeaderRulerChange = sal_False;
- bFooterRulerChange = sal_True;
- }
-
- if( bPageMargin )
- {
- if(( (aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X()
- 2 )) || bLeftRulerMove ||
- ( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > (
aRightTop.X() - 2 ) ) || bRightRulerMove || bOnColRulerChange || bColRulerMove )
- && aPixPt.Y() > aLeftTop.Y() && aPixPt.Y() < aLeftBottom.Y() )
- {
- if( bOnColRulerChange || bColRulerMove )
- {
- SetPointer( Pointer( POINTER_HSPLIT ) );
- if( bColRulerMove )
- {
- if( aMouseMovePoint.X() > -aOffset.X() &&
aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() )
- DragMove( aMouseMovePoint.X(), POINTER_HSPLIT );
- }
- }
- else
- {
- if( bLeftRulerChange && !bTopRulerMove && !bBottomRulerMove &&
!bHeaderRulerMove && !bFooterRulerMove )
- {
+ Fraction aPreviewZoom( nZoom, 100 );
+ Fraction aHorPrevZoom( (long)( 100 * nZoom /
pDocShell->GetOutputFactor() ), 10000 );
+ MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ Point aMouseMovePoint = PixelToLogic( rMEvt.GetPosPixel(), aMMMode );
+
+ long nLeftMargin = 0;
+ long nRightMargin = 0;
+ long nTopMargin = 0;
+ long nBottomMargin = 0;
+ Size PageSize;
+
+ long nWidth = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Width();
+ long nHeight = (long) lcl_GetDocPageSize(pDocShell->GetDocument(),
nTab).Height();
+
+ if ( nPageNo < nTotalPages )
+ {
+ ScPrintOptions aOptions = SC_MOD()->GetPrintOptions();
+
+ ScPrintFunc* pPrintFunc;
+
+ if (bStateValid)
+ pPrintFunc = new ScPrintFunc( this, pDocShell, aState,
&aOptions );
+ else
+ pPrintFunc = new ScPrintFunc( this, pDocShell, nTab,
nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
+
+ nLeftMargin = (long)( pPrintFunc->GetLeftMargin() *
HMM_PER_TWIPS - aOffset.X() );
+ nRightMargin = (long)( pPrintFunc->GetRightMargin() *
HMM_PER_TWIPS );
+ nRightMargin = (long)( nWidth * HMM_PER_TWIPS - nRightMargin -
aOffset.X() );
+ nTopMargin = (long)( pPrintFunc->GetTopMargin() * HMM_PER_TWIPS
- aOffset.Y() );
+ nBottomMargin = (long)( pPrintFunc->GetBottomMargin() *
HMM_PER_TWIPS );
+ nBottomMargin = (long)( nHeight * HMM_PER_TWIPS - nBottomMargin
- aOffset.Y() );
+ if( mnScale > 0 )
+ {
+ nHeaderHeight = (long)( nTopMargin +
pPrintFunc->GetHeader().nHeight * HMM_PER_TWIPS * mnScale / 100 );
+ nFooterHeight = (long)( nBottomMargin -
pPrintFunc->GetFooter().nHeight * HMM_PER_TWIPS * mnScale / 100 );
+ }
+ else
+ {
+ nHeaderHeight = (long)( nTopMargin +
pPrintFunc->GetHeader().nHeight * HMM_PER_TWIPS );
+ nFooterHeight = (long)( nBottomMargin -
pPrintFunc->GetFooter().nHeight * HMM_PER_TWIPS );
+ }
+ delete pPrintFunc;
+ }
+
+ Point aPixPt( rMEvt.GetPosPixel() );
+ Point aLeftTop = LogicToPixel( Point( nLeftMargin, -aOffset.Y() ) ,
aMMMode );
+ Point aLeftBottom = LogicToPixel( Point( nLeftMargin ,(long)(nHeight
* HMM_PER_TWIPS - aOffset.Y()) ), aMMMode );
+ Point aRightTop = LogicToPixel( Point( nRightMargin, -aOffset.Y() ),
aMMMode );
+ Point aTopLeft = LogicToPixel( Point( -aOffset.X(), nTopMargin ),
aMMMode );
+ Point aTopRight = LogicToPixel( Point( (long)(nWidth * HMM_PER_TWIPS
- aOffset.X()), nTopMargin ), aMMMode );
+ Point aBottomLeft = LogicToPixel( Point( -aOffset.X(), nBottomMargin
), aMMMode );
+ Point aHeaderLeft = LogicToPixel( Point( -aOffset.X(), nHeaderHeight
), aMMMode );
+ Point aFooderLeft = LogicToPixel( Point( -aOffset.X(), nFooterHeight
), aMMMode );
+
+ sal_Bool bOnColRulerChange = sal_False;
+
+ for( SCCOL i=aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
+ {
+ Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() )
,aMMMode );
+ Point aColumnBottom = LogicToPixel( Point( 0, (long)( nHeight
* HMM_PER_TWIPS - aOffset.Y()) ), aMMMode );
+ if( aPixPt.X() < ( nRight[i] + 2 ) && ( aPixPt.X() > (
nRight[i] - 2 ) ) && ( aPixPt.X() < aRightTop.X() ) && ( aPixPt.X() >
aLeftTop.X() )
+ && ( aPixPt.Y() > aColumnTop.Y() ) && ( aPixPt.Y() <
aColumnBottom.Y() ) && !bLeftRulerMove && !bRightRulerMove
+ && !bTopRulerMove && !bBottomRulerMove &&
!bHeaderRulerMove && !bFooterRulerMove )
+ {
+ bOnColRulerChange = sal_True;
+ if( !rMEvt.GetButtons() && GetPointer() ==
POINTER_HSPLIT )
+ nColNumberButttonDown = i;
+ break;
+ }
+ }
+
+ if( aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > ( aLeftTop.X() -
2 ) && !bRightRulerMove )
+ {
+ bLeftRulerChange = sal_True;
+ bRightRulerChange = sal_False;
+ }
+ else if( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > (
aRightTop.X() - 2 ) && !bLeftRulerMove )
+ {
+ bLeftRulerChange = sal_False;
+ bRightRulerChange = sal_True;
+ }
+ else if( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > (
aTopLeft.Y() - 2 ) && !bBottomRulerMove && !bHeaderRulerMove &&
!bFooterRulerMove )
+ {
+ bTopRulerChange = sal_True;
+ bBottomRulerChange = sal_False;
+ bHeaderRulerChange = sal_False;
+ bFooterRulerChange = sal_False;
+ }
+ else if( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > (
aBottomLeft.Y() - 2 ) && !bTopRulerMove && !bHeaderRulerMove &&
!bFooterRulerMove )
+ {
+ bTopRulerChange = sal_False;
+ bBottomRulerChange = sal_True;
+ bHeaderRulerChange = sal_False;
+ bFooterRulerChange = sal_False;
+ }
+ else if( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > (
aHeaderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove &&
!bFooterRulerMove )
+ {
+ bTopRulerChange = sal_False;
+ bBottomRulerChange = sal_False;
+ bHeaderRulerChange = sal_True;
+ bFooterRulerChange = sal_False;
+ }
+ else if( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > (
aFooderLeft.Y() - 2 ) && !bTopRulerMove && !bBottomRulerMove &&
!bHeaderRulerMove )
+ {
+ bTopRulerChange = sal_False;
+ bBottomRulerChange = sal_False;
+ bHeaderRulerChange = sal_False;
+ bFooterRulerChange = sal_True;
+ }
+
+ if( bPageMargin )
+ {
+ if(( (aPixPt.X() < ( aLeftTop.X() + 2 ) && aPixPt.X() > (
aLeftTop.X() - 2 )) || bLeftRulerMove ||
+ ( aPixPt.X() < ( aRightTop.X() + 2 ) && aPixPt.X() > (
aRightTop.X() - 2 ) ) || bRightRulerMove || bOnColRulerChange || bColRulerMove )
+ && aPixPt.Y() > aLeftTop.Y() && aPixPt.Y() <
aLeftBottom.Y() )
+ {
+ if( bOnColRulerChange || bColRulerMove )
+ {
+ SetPointer( Pointer( POINTER_HSPLIT ) );
+ if( bColRulerMove )
+ {
+ if( aMouseMovePoint.X() > -aOffset.X()
&& aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() )
+ DragMove( aMouseMovePoint.X(),
POINTER_HSPLIT );
+ }
+ }
+ else
+ {
+ if( bLeftRulerChange && !bTopRulerMove &&
!bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
+ {
SetPointer( Pointer( POINTER_HSIZEBAR ) );
if( bLeftRulerMove )
{
if( aMouseMovePoint.X() > -aOffset.X() &&
aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() )
DragMove( aMouseMovePoint.X(), POINTER_HSIZEBAR );
}
- }
- else if( bRightRulerChange && !bTopRulerMove &&
!bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
- {
+ }
+ else if( bRightRulerChange && !bTopRulerMove &&
!bBottomRulerMove && !bHeaderRulerMove && !bFooterRulerMove )
+ {
SetPointer( Pointer( POINTER_HSIZEBAR ) );
if( bRightRulerMove )
{
if( aMouseMovePoint.X() > -aOffset.X() &&
aMouseMovePoint.X() < nWidth * HMM_PER_TWIPS - aOffset.X() )
DragMove( aMouseMovePoint.X(), POINTER_HSIZEBAR );
}
- }
- }
- }
- else
- {
- if( ( ( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y() > (
aTopLeft.Y() - 2 ) ) || bTopRulerMove ||
- ( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) && aPixPt.Y() > (
aBottomLeft.Y() - 2 ) ) || bBottomRulerMove ||
- ( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) && aPixPt.Y() > (
aHeaderLeft.Y() - 2 ) ) || bHeaderRulerMove ||
- ( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) && aPixPt.Y() > (
aFooderLeft.Y() - 2 ) ) || bFooterRulerMove )
- && aPixPt.X() > aTopLeft.X() && aPixPt.X() < aTopRight.X() )
- {
- if( bTopRulerChange )
- {
+ }
+ }
+ }
+ else
+ {
+ if( ( ( aPixPt.Y() < ( aTopLeft.Y() + 2 ) && aPixPt.Y()
> ( aTopLeft.Y() - 2 ) ) || bTopRulerMove ||
+ ( aPixPt.Y() < ( aBottomLeft.Y() + 2 ) &&
aPixPt.Y() > ( aBottomLeft.Y() - 2 ) ) || bBottomRulerMove ||
+ ( aPixPt.Y() < ( aHeaderLeft.Y() + 2 ) &&
aPixPt.Y() > ( aHeaderLeft.Y() - 2 ) ) || bHeaderRulerMove ||
+ ( aPixPt.Y() < ( aFooderLeft.Y() + 2 ) &&
aPixPt.Y() > ( aFooderLeft.Y() - 2 ) ) || bFooterRulerMove )
+ && aPixPt.X() > aTopLeft.X() && aPixPt.X() <
aTopRight.X() )
+ {
+ if( bTopRulerChange )
+ {
SetPointer( Pointer( POINTER_VSIZEBAR ) );
if( bTopRulerMove )
{
@@ -1436,37 +1433,37 @@ void __EXPORT ScPreview::MouseMove( const MouseEvent&
rMEvt )
}
else if( bFooterRulerChange )
{
- SetPointer( Pointer( POINTER_VSIZEBAR ) );
- if( bFooterRulerMove )
- {
- if( aMouseMovePoint.Y() > -aOffset.Y() &&
aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() )
- DragMove( aMouseMovePoint.Y(), POINTER_VSIZEBAR );
- }
- }
- }
- else
- SetPointer( Pointer( POINTER_ARROW ) );
- }
- }
+ SetPointer( Pointer( POINTER_VSIZEBAR )
);
+ if( bFooterRulerMove )
+ {
+ if( aMouseMovePoint.Y() >
-aOffset.Y() && aMouseMovePoint.Y() < nHeight * HMM_PER_TWIPS - aOffset.Y() )
+ DragMove(
aMouseMovePoint.Y(), POINTER_VSIZEBAR );
+ }
+ }
+ }
+ else
+ SetPointer( Pointer( POINTER_ARROW ) );
+ }
+ }
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
void ScPreview::InvalidateLocationData(sal_uLong nId)
{
bLocationValid = sal_False;
- if (pViewShell->HasAccessibilityObjects())
- pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) );
+ if (pViewShell->HasAccessibilityObjects())
+ pViewShell->BroadcastAccessibility( SfxSimpleHint( nId ) );
}
void ScPreview::GetFocus()
{
- if (pViewShell->HasAccessibilityObjects())
- pViewShell->BroadcastAccessibility(
ScAccWinFocusGotHint(GetAccessible()) );
+ if (pViewShell->HasAccessibilityObjects())
+ pViewShell->BroadcastAccessibility(
ScAccWinFocusGotHint(GetAccessible()) );
}
void ScPreview::LoseFocus()
{
- if (pViewShell->HasAccessibilityObjects())
- pViewShell->BroadcastAccessibility(
ScAccWinFocusLostHint(GetAccessible()) );
+ if (pViewShell->HasAccessibilityObjects())
+ pViewShell->BroadcastAccessibility(
ScAccWinFocusLostHint(GetAccessible()) );
}
com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>
ScPreview::CreateAccessible()
@@ -1497,49 +1494,49 @@ void ScPreview::SwitchView()
pAccDoc->SwitchViewFireFocus();
}
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
void ScPreview::DragMove( long nDragMovePos, sal_uInt16 nFlags )
{
- Fraction aPreviewZoom( nZoom, 100 );
- Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor()
), 10000 );
- MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
- SetMapMode( aMMMode );
- long nPos = nDragMovePos;
- if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT )
- {
- if( nDragMovePos != aButtonDownChangePoint.X() )
- {
- DrawInvert( aButtonDownChangePoint.X(), nFlags );
- aButtonDownChangePoint.X() = nPos;
- DrawInvert( aButtonDownChangePoint.X(), nFlags );
- }
- }
- else if( nFlags == POINTER_VSIZEBAR )
- {
- if( nDragMovePos != aButtonDownChangePoint.Y() )
- {
- DrawInvert( aButtonDownChangePoint.Y(), nFlags );
- aButtonDownChangePoint.Y() = nPos;
- DrawInvert( aButtonDownChangePoint.Y(), nFlags );
- }
- }
+ Fraction aPreviewZoom( nZoom, 100 );
+ Fraction aHorPrevZoom( (long)( 100 * nZoom /
pDocShell->GetOutputFactor() ), 10000 );
+ MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
+ SetMapMode( aMMMode );
+ long nPos = nDragMovePos;
+ if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT )
+ {
+ if( nDragMovePos != aButtonDownChangePoint.X() )
+ {
+ DrawInvert( aButtonDownChangePoint.X(), nFlags );
+ aButtonDownChangePoint.X() = nPos;
+ DrawInvert( aButtonDownChangePoint.X(), nFlags );
+ }
+ }
+ else if( nFlags == POINTER_VSIZEBAR )
+ {
+ if( nDragMovePos != aButtonDownChangePoint.Y() )
+ {
+ DrawInvert( aButtonDownChangePoint.Y(), nFlags );
+ aButtonDownChangePoint.Y() = nPos;
+ DrawInvert( aButtonDownChangePoint.Y(), nFlags );
+ }
+ }
}
void ScPreview::DrawInvert( long nDragPos, sal_uInt16 nFlags )
{
- long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab
).Height();
- long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(), nTab
).Width();
- if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT )
- {
- Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( (
nHeight * HMM_PER_TWIPS ) - aOffset.Y()));
- Invert( aRect,INVERT_50 );
- }
- else if( nFlags == POINTER_VSIZEBAR )
- {
- Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth *
HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 );
- Invert( aRect,INVERT_50 );
- }
+ long nHeight = (long) lcl_GetDocPageSize( pDocShell->GetDocument(),
nTab ).Height();
+ long nWidth = (long) lcl_GetDocPageSize( pDocShell->GetDocument(),
nTab ).Width();
+ if( nFlags == POINTER_HSIZEBAR || nFlags == POINTER_HSPLIT )
+ {
+ Rectangle aRect( nDragPos, -aOffset.Y(), nDragPos + 1,(long)( (
nHeight * HMM_PER_TWIPS ) - aOffset.Y()));
+ Invert( aRect,INVERT_50 );
+ }
+ else if( nFlags == POINTER_VSIZEBAR )
+ {
+ Rectangle aRect( -aOffset.X(), nDragPos,(long)( ( nWidth *
HMM_PER_TWIPS ) - aOffset.X() ), nDragPos + 1 );
+ Invert( aRect,INVERT_50 );
+ }
}
-//Issue51656 Add resizeable margin on page preview from maoyg
+// Issue51656 Add resizeable margin on page preview from maoyg
/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/accessibility/AccessibleTextHelper.cxx
b/main/svx/source/accessibility/AccessibleTextHelper.cxx
index 0d9e5878fe..13510c6036 100644
--- a/main/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/main/svx/source/accessibility/AccessibleTextHelper.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,27 +7,23 @@
* 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_svx.hxx"
//------------------------------------------------------------------------
-//
// Global header
-//
//------------------------------------------------------------------------
#include <limits.h>
@@ -58,9 +54,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
//------------------------------------------------------------------------
-//
// Project-local header
-//
//------------------------------------------------------------------------
#include "AccessibleTextEventQueue.hxx"
#include <svx/AccessibleTextHelper.hxx>
@@ -101,9 +95,7 @@ namespace accessibility
}
//------------------------------------------------------------------------
-//
// AccessibleTextHelper_Impl declaration
-//
//------------------------------------------------------------------------
DBG_NAME( AccessibleTextHelper_Impl )
@@ -195,7 +187,7 @@ namespace accessibility
// checks all children for visibility, throws away invisible ones
void UpdateVisibleChildren( bool bBroadcastEvents=true );
- // check all children for changes in posit�on and size
+ // check all children for changes in position and size
void UpdateBoundRect();
// calls SetSelection on the forwarder and updates maLastSelection
@@ -277,9 +269,7 @@ namespace accessibility
};
//------------------------------------------------------------------------
- //
// AccessibleTextHelper_Impl implementation
- //
//------------------------------------------------------------------------
AccessibleTextHelper_Impl::AccessibleTextHelper_Impl() :
@@ -1223,7 +1213,7 @@ namespace accessibility
// release everything from the insertion position until the end
maParaManager.Release(aFunctor.GetParaIndex(), nCurrParas);
- // TODO: Clarify whether this behaviour _really_ saves
+ // TODO: Clarify whether this behavior _really_ saves
// anybody anything!
// update children, _don't_ broadcast
UpdateVisibleChildren( false );
@@ -1262,7 +1252,7 @@ namespace accessibility
// update num of paras
maParaManager.SetNum( nNewParas );
- // TODO: Clarify whether this behaviour _really_ saves
+ // TODO: Clarify whether this behavior _really_ saves
// anybody anything!
// update children, _don't_ broadcast
UpdateVisibleChildren( false );
@@ -1541,7 +1531,7 @@ namespace accessibility
case TEXT_HINT_BLOCKNOTIFICATION_START:
case TEXT_HINT_INPUT_START:
++maEventOpenFrames;
- // --> OD 2005-12-19 #i27299# - no FALLTROUGH
+ // --> OD 2005-12-19 #i27299# - no FALLTHROUGH
// reason: event will not be processes, thus appending
// the event isn't necessary.
break;
@@ -1774,9 +1764,7 @@ namespace accessibility
}
//------------------------------------------------------------------------
- //
// AccessibleTextHelper implementation (simply forwards to impl)
- //
//------------------------------------------------------------------------
AccessibleTextHelper::AccessibleTextHelper( ::std::auto_ptr< SvxEditSource
> pEditSource ) :
@@ -2114,4 +2102,4 @@ namespace accessibility
} // end of namespace accessibility
-//------------------------------------------------------------------------
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/toolbars/extrusionbar.cxx
b/main/svx/source/toolbars/extrusionbar.cxx
index 892e60d85a..451aaefb00 100644
--- a/main/svx/source/toolbars/extrusionbar.cxx
+++ b/main/svx/source/toolbars/extrusionbar.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
@@ -365,7 +363,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq,
SdrCustomShapeGeometryItem
switch( nSurface )
{
- case 0: // wireframe
+ case 0: // wireframe
eShadeMode = ShadeMode_DRAFT;
break;
case 1: // matte
@@ -511,57 +509,57 @@ void ExtrusionBar::execute( SdrView* pSdrView,
SfxRequest& rReq, SfxBindings& rB
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ON_OFF;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_TILT_DOWN:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_DOWN;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_TILT_UP:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_UP;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_TILT_LEFT:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_LEFT;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_TILT_RIGHT:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ROTATE_RIGHT;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_DIRECTION:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_ORIENTATION;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_PROJECTION:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_PROJECTION;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_DEPTH:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_DEPTH;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_3D_COLOR:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_COLOR;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_SURFACE:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_SURFACE;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_LIGHTING_INTENSITY:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_EXTRUSION_BRIGHTNESS;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_EXTRUSION_LIGHTING_DIRECTION:
{
if ( !nStrResId )
@@ -1362,3 +1360,5 @@ void ExtrusionBar::getState( SdrView* pSdrView,
SfxItemSet& rSet )
getExtrusionColorState( pSdrView, rSet );
}
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/toolbars/fontworkbar.cxx
b/main/svx/source/toolbars/fontworkbar.cxx
index a78d99c9cc..02571dbab1 100644
--- a/main/svx/source/toolbars/fontworkbar.cxx
+++ b/main/svx/source/toolbars/fontworkbar.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include <svx/svdundo.hxx>
@@ -532,17 +530,17 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest&
rReq, SfxBindings& rBi
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_FONTWORK_CHARACTER_SPACING:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_FONTWORK_KERN_CHARACTER_PAIRS:
{
if ( !nStrResId )
nStrResId =
RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING;
- } // PASSTROUGH
+ } // PASSTHROUGH
case SID_FONTWORK_SAME_LETTER_HEIGHTS:
{
if ( !nStrResId )
@@ -629,3 +627,5 @@ void FontworkBar::getState( SdrView* pSdrView, SfxItemSet&
rSet )
SetFontWorkShapeTypeState( pSdrView, rSet );
}
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/ucb/source/ucp/file/bc.cxx b/main/ucb/source/ucp/file/bc.cxx
index 6aa63d1d76..071e1068e9 100644
--- a/main/ucb/source/ucp/file/bc.cxx
+++ b/main/ucb/source/ucp/file/bc.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_file.hxx"
#include <rtl/uri.hxx>
@@ -65,20 +63,18 @@ typedef cppu::OMultiTypeInterfaceContainerHelperVar<
rtl::OUString,hashOUString,
PropertyListeners_impl;
class fileaccess::PropertyListeners
- : public PropertyListeners_impl
+ : public PropertyListeners_impl
{
public:
- PropertyListeners( ::osl::Mutex& aMutex )
- : PropertyListeners_impl( aMutex )
- {
- }
+ PropertyListeners( ::osl::Mutex& aMutex )
+ : PropertyListeners_impl( aMutex )
+ {
+ }
};
/****************************************************************************************/
-/*
*/
/* BaseContent
*/
-/*
*/
/****************************************************************************************/
////////////////////////////////////////////////////////////////////////////////
@@ -145,23 +141,23 @@ BaseContent::~BaseContent( )
void SAL_CALL
BaseContent::acquire( void )
- throw()
+ throw()
{
- OWeakObject::acquire();
+ OWeakObject::acquire();
}
void SAL_CALL
BaseContent::release( void )
- throw()
+ throw()
{
- OWeakObject::release();
+ OWeakObject::release();
}
Any SAL_CALL
BaseContent::queryInterface( const Type& rType )
- throw( RuntimeException )
+ throw( RuntimeException )
{
Any aRet = cppu::queryInterface( rType,
SAL_STATIC_CAST( lang::XComponent*, this
),
@@ -186,15 +182,15 @@ BaseContent::queryInterface( const Type& rType )
void SAL_CALL
BaseContent::addEventListener( const Reference< lang::XEventListener >&
Listener )
- throw( RuntimeException )
+ throw( RuntimeException )
{
- osl::MutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
- if ( ! m_pDisposeEventListeners )
- m_pDisposeEventListeners =
- new cppu::OInterfaceContainerHelper( m_aEventListenerMutex );
+ if ( ! m_pDisposeEventListeners )
+ m_pDisposeEventListeners =
+ new cppu::OInterfaceContainerHelper(
m_aEventListenerMutex );
- m_pDisposeEventListeners->addInterface( Listener );
+ m_pDisposeEventListeners->addInterface( Listener );
}
@@ -259,43 +255,43 @@ BaseContent::dispose()
//////////////////////////////////////////////////////////////////////////////////////////
-// XServiceInfo
+// XServiceInfo
//////////////////////////////////////////////////////////////////////////////////////////
rtl::OUString SAL_CALL
BaseContent::getImplementationName()
- throw( RuntimeException)
+ throw( RuntimeException)
{
- return rtl::OUString::createFromAscii( "com.sun.star.comp.ucb.FileContent"
);
+ return rtl::OUString::createFromAscii(
"com.sun.star.comp.ucb.FileContent" );
}
sal_Bool SAL_CALL
BaseContent::supportsService( const rtl::OUString& ServiceName )
- throw( RuntimeException)
+ throw( RuntimeException)
{
- if( ServiceName.compareToAscii( "com.sun.star.ucb.FileContent" ) == 0 )
- return true;
- else
- return false;
+ if( ServiceName.compareToAscii( "com.sun.star.ucb.FileContent" ) == 0 )
+ return true;
+ else
+ return false;
}
Sequence< rtl::OUString > SAL_CALL
BaseContent::getSupportedServiceNames()
- throw( RuntimeException )
+ throw( RuntimeException )
{
- Sequence< rtl::OUString > ret( 1 );
- ret[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContent" );
- return ret;
+ Sequence< rtl::OUString > ret( 1 );
+ ret[0] = rtl::OUString::createFromAscii( "com.sun.star.ucb.FileContent"
);
+ return ret;
}
//////////////////////////////////////////////////////////////////////////////////////////
-// XTypeProvider
+// XTypeProvider
//////////////////////////////////////////////////////////////////////////////////////////
XTYPEPROVIDER_IMPL_10( BaseContent,
@@ -312,22 +308,22 @@ XTYPEPROVIDER_IMPL_10( BaseContent,
//////////////////////////////////////////////////////////////////////////////////////////
-// XCommandProcessor
+// XCommandProcessor
//////////////////////////////////////////////////////////////////////////////////////////
sal_Int32 SAL_CALL
BaseContent::createCommandIdentifier( void )
- throw( RuntimeException )
+ throw( RuntimeException )
{
- return m_pMyShell->getCommandId();
+ return m_pMyShell->getCommandId();
}
void SAL_CALL
BaseContent::abort( sal_Int32 CommandId )
- throw( RuntimeException )
+ throw( RuntimeException )
{
- m_pMyShell->abort( CommandId );
+ m_pMyShell->abort( CommandId );
}
@@ -348,11 +344,11 @@ BaseContent::execute( const Command& aCommand,
Any aAny;
- if( ! aCommand.Name.compareToAscii( "getPropertySetInfo" ) ) // No
exceptions
+ if( ! aCommand.Name.compareToAscii( "getPropertySetInfo" ) ) // No
exceptions
{
aAny <<= getPropertySetInfo( CommandId );
}
- else if( ! aCommand.Name.compareToAscii( "getCommandInfo" ) ) // no
exceptions
+ else if( ! aCommand.Name.compareToAscii( "getCommandInfo" ) ) // no
exceptions
{
aAny <<= getCommandInfo();
}
@@ -364,7 +360,7 @@ BaseContent::execute( const Command& aCommand,
m_pMyShell->installError( CommandId,
TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT );
else
- aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls
endTask by itself
+ aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls
endTask by itself
}
else if( ! aCommand.Name.compareToAscii( "getPropertyValues" ) )
{
@@ -504,9 +500,9 @@ BaseContent::removePropertiesChangeListener( const
Sequence< rtl::OUString >& Pr
Reference< ucb::XContentIdentifier > SAL_CALL
BaseContent::getIdentifier()
- throw( RuntimeException )
+ throw( RuntimeException )
{
- return m_xContentIdentifier;
+ return m_xContentIdentifier;
}
@@ -557,36 +553,36 @@ BaseContent::getContentType()
}
}
- return rtl::OUString();
+ return rtl::OUString();
}
void SAL_CALL
BaseContent::addContentEventListener(
- const Reference< XContentEventListener >& Listener )
- throw( RuntimeException )
+ const Reference< XContentEventListener >& Listener )
+ throw( RuntimeException )
{
- osl::MutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
- if ( ! m_pContentEventListeners )
- m_pContentEventListeners =
- new cppu::OInterfaceContainerHelper( m_aEventListenerMutex );
+ if ( ! m_pContentEventListeners )
+ m_pContentEventListeners =
+ new cppu::OInterfaceContainerHelper(
m_aEventListenerMutex );
- m_pContentEventListeners->addInterface( Listener );
+ m_pContentEventListeners->addInterface( Listener );
}
void SAL_CALL
BaseContent::removeContentEventListener(
- const Reference< XContentEventListener >& Listener )
- throw( RuntimeException )
+ const Reference< XContentEventListener >& Listener )
+ throw( RuntimeException )
{
- osl::MutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
- if ( m_pContentEventListeners )
- m_pContentEventListeners->removeInterface( Listener );
+ if ( m_pContentEventListeners )
+ m_pContentEventListeners->removeInterface( Listener );
}
@@ -867,7 +863,7 @@ BaseContent::setPropertyValues(
throw()
{
if( m_nState & Deleted )
- { // To do
+ { // To do
return Sequence< Any >( Values.getLength() );
}
@@ -942,7 +938,7 @@ BaseContent::setPropertyValues(
}
else
{
- Sequence< Any > ret = m_pMyShell->setv( m_aUncPath, // Does not
handle Title
+ Sequence< Any > ret = m_pMyShell->setv( m_aUncPath, // Does not handle
Title
Values );
// Special handling Title: Setting Title is equivalent to a renaming
of the underlying file
@@ -973,7 +969,7 @@ BaseContent::setPropertyValues(
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 );
- m_pMyShell->move( nMyCommandIdentifier, // move notifies the
childs also;
+ m_pMyShell->move( nMyCommandIdentifier, // move notifies the
childs also;
m_aUncPath,
aDstName,
NameClash::KEEP );
@@ -987,26 +983,26 @@ BaseContent::setPropertyValues(
ret[i] <<= e;
}
- // NameChanges come back trough a ContentEvent
+ // NameChanges come back through a ContentEvent
break; // only handling Title
} // end for
- return ret;
- }
+ return ret;
+ }
}
Reference< XDynamicResultSet > SAL_CALL
BaseContent::open(
- sal_Int32 nMyCommandIdentifier,
- const OpenCommandArgument2& aCommandArgument )
- throw()
+ sal_Int32 nMyCommandIdentifier,
+ const OpenCommandArgument2& aCommandArgument )
+ throw()
{
- Reference< XDynamicResultSet > retValue( 0 );
+ Reference< XDynamicResultSet > retValue( 0 );
- if( ( m_nState & Deleted ) )
- {
+ if( ( m_nState & Deleted ) )
+ {
m_pMyShell->installError( nMyCommandIdentifier,
TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND );
}
@@ -1058,7 +1054,7 @@ BaseContent::open(
aCommandArgument.SortingInfo );
}
// else if( aCommandArgument.Mode ==
-// OpenMode::DOCUMENT_SHARE_DENY_NONE ||
+// OpenMode::DOCUMENT_SHARE_DENY_NONE ||
// aCommandArgument.Mode ==
// OpenMode::DOCUMENT_SHARE_DENY_WRITE )
// m_pMyShell->installError( nMyCommandIdentifier,
@@ -1070,7 +1066,7 @@ BaseContent::open(
aCommandArgument.Mode);
}
- return retValue;
+ return retValue;
}
@@ -1204,7 +1200,7 @@ void SAL_CALL BaseContent::insert( sal_Int32
nMyCommandIdentifier,
Reference< sdbc::XRow > xRow = getPropertyValues( -1,seq );
- bool contentTypeSet = true; // is set to false, if contentType not set
+ bool contentTypeSet = true; // is set to false, if contentType not set
try
{
bDocument = xRow->getBoolean( 1 );
@@ -1289,8 +1285,8 @@ void SAL_CALL BaseContent::insert( sal_Int32
nMyCommandIdentifier,
void SAL_CALL BaseContent::endTask( sal_Int32 CommandId )
{
- // This is the only function allowed to throw an exception
- m_pMyShell->endTask( CommandId,m_aUncPath,this );
+ // This is the only function allowed to throw an exception
+ m_pMyShell->endTask( CommandId,m_aUncPath,this );
}
@@ -1298,9 +1294,9 @@ void SAL_CALL BaseContent::endTask( sal_Int32 CommandId )
ContentEventNotifier*
BaseContent::cDEL( void )
{
- osl::MutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
- m_nState |= Deleted;
+ m_nState |= Deleted;
ContentEventNotifier* p;
if( m_pContentEventListeners )
@@ -1354,15 +1350,15 @@ BaseContent::cCEL( void )
PropertySetInfoChangeNotifier*
BaseContent::cPSL( void )
{
- osl::MutexGuard aGuard( m_aMutex );
- PropertySetInfoChangeNotifier* p = 0;
- if( m_pPropertySetInfoChangeListeners )
- p = new PropertySetInfoChangeNotifier( m_pMyShell,
+ osl::MutexGuard aGuard( m_aMutex );
+ PropertySetInfoChangeNotifier* p = 0;
+ if( m_pPropertySetInfoChangeListeners )
+ p = new PropertySetInfoChangeNotifier( m_pMyShell,
this,
m_xContentIdentifier,
m_pPropertySetInfoChangeListeners->getElements() );
- return p;
+ return p;
}
@@ -1370,20 +1366,20 @@ BaseContent::cPSL( void )
PropertyChangeNotifier*
BaseContent::cPCL( void )
{
- osl::MutexGuard aGuard( m_aMutex );
+ osl::MutexGuard aGuard( m_aMutex );
- Sequence< rtl::OUString > seqNames;
+ Sequence< rtl::OUString > seqNames;
- if( m_pPropertyListener )
- seqNames = m_pPropertyListener->getContainedTypes();
+ if( m_pPropertyListener )
+ seqNames = m_pPropertyListener->getContainedTypes();
- PropertyChangeNotifier* p = 0;
+ PropertyChangeNotifier* p = 0;
- sal_Int32 length = seqNames.getLength();
+ sal_Int32 length = seqNames.getLength();
- if( length )
- {
- ListenerMap* listener = new ListenerMap();
+ if( length )
+ {
+ ListenerMap* listener = new ListenerMap();
for( sal_Int32 i = 0; i < length; ++i )
{
(*listener)[seqNames[i]] = m_pPropertyListener->getContainer(
seqNames[i] )->getElements();
@@ -1393,13 +1389,15 @@ BaseContent::cPCL( void )
this,
m_xContentIdentifier,
listener );
- }
+ }
- return p;
+ return p;
}
rtl::OUString BaseContent::getKey( void )
{
- return m_aUncPath;
+ return m_aUncPath;
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/source/fontsubset/fontsubset.cxx
b/main/vcl/source/fontsubset/fontsubset.cxx
index 833d67be9e..b42f361014 100644
--- a/main/vcl/source/fontsubset/fontsubset.cxx
+++ b/main/vcl/source/fontsubset/fontsubset.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_vcl.hxx"
@@ -90,7 +88,7 @@ bool FontSubsetInfo::CreateFontSubset(
// TODO: move the glyphid/encid/notdef reshuffling from the callers to
here
- // dispatch to underlying subsetters
+ // dispatch to underlying subsetters
bool bOK = false;
// TODO: better match available input-type to possible subset-types
@@ -108,9 +106,9 @@ bool FontSubsetInfo::CreateFontSubset(
case ANY_TYPE1:
bOK = CreateFontSubsetFromType1( pOutGlyphWidths);
break;
- // fall trough
+ // fall through
case NO_FONT:
- // fall trough
+ // fall through
default:
DBG_ERROR( "unhandled type in CreateFontSubset()");
break;
@@ -153,7 +151,7 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32*
pOutGlyphWidths )
{
nSFTErr = CreateT3FromTTGlyphs( mpSftTTFont, mpOutFile,
mpReqFontName,
aShortGlyphIds, pEncArray, mnReqGlyphCount,
- 0 /* 0 = horizontal, 1 = vertical */ );
+ 0 /* 0 = horizontal, 1 = vertical */ );
}
else if( (mnReqFontTypeMask & SFNT_TTF) != 0 )
{
@@ -178,4 +176,4 @@ bool FontSubsetInfo::CreateFontSubsetFromType1( sal_Int32*
pOutGlyphWidths)
return false;
}
-// ====================================================================
+/* vim: set noet sw=4 ts=4: */