This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 633aadc51c Cleanup
633aadc51c is described below
commit 633aadc51c3c356307be76612d13fe02feb48058
Author: mseidel <[email protected]>
AuthorDate: Thu Mar 27 23:07:16 2025 +0100
Cleanup
---
main/svx/source/dialog/SpellDialogChildWindow.cxx | 42 +-
main/svx/source/dialog/dlgctrl.cxx | 631 ++++++++++------------
main/svx/source/dialog/srchdlg.cxx | 337 ++++++------
main/svx/source/dialog/stddlg.cxx | 11 +-
main/svx/source/dialog/svxdlg.cxx | 10 +-
main/svx/source/dialog/swframeexample.cxx | 140 +++--
6 files changed, 543 insertions(+), 628 deletions(-)
diff --git a/main/svx/source/dialog/SpellDialogChildWindow.cxx
b/main/svx/source/dialog/SpellDialogChildWindow.cxx
index 23a33dbc3a..fdb46353a1 100644
--- a/main/svx/source/dialog/SpellDialogChildWindow.cxx
+++ b/main/svx/source/dialog/SpellDialogChildWindow.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,43 +7,41 @@
* 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"
#include <svx/SpellDialogChildWindow.hxx>
-#include <svx/svxdlg.hxx>
+#include <svx/svxdlg.hxx>
namespace svx {
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
SpellDialogChildWindow::SpellDialogChildWindow (
- Window* _pParent,
+ Window* _pParent,
sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* /*pInfo*/)
: SfxChildWindow (_pParent, nId)
{
-
+
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "SvxAbstractDialogFactory::Create() failed");
- m_pAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent,
+ m_pAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent,
pBindings,
this );
pWindow = m_pAbstractSpellDialog->GetWindow();
@@ -51,13 +49,13 @@ SpellDialogChildWindow::SpellDialogChildWindow (
SetHideNotDelete (sal_True);
}
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
SpellDialogChildWindow::~SpellDialogChildWindow (void)
{
}
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
SfxBindings& SpellDialogChildWindow::GetBindings (void) const
{
@@ -65,31 +63,31 @@ SfxBindings& SpellDialogChildWindow::GetBindings (void)
const
return m_pAbstractSpellDialog->GetBindings();
}
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
void SpellDialogChildWindow::InvalidateSpellDialog()
{
OSL_ASSERT (m_pAbstractSpellDialog != NULL);
if(m_pAbstractSpellDialog)
m_pAbstractSpellDialog->Invalidate();
-}
+}
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
bool SpellDialogChildWindow::HasAutoCorrection()
{
return false;
-}
+}
/*-------------------------------------------------------------------------
-
+
-----------------------------------------------------------------------*/
void SpellDialogChildWindow::AddAutoCorrection(
- const String& /*rOld*/,
- const String& /*rNew*/,
+ const String& /*rOld*/,
+ const String& /*rNew*/,
LanguageType /*eLanguage*/)
{
DBG_ERROR("AutoCorrection should have been overloaded - if available");
-}
+}
/*-- 16.06.2008 10:11:57---------------------------------------------------
-----------------------------------------------------------------------*/
@@ -113,3 +111,5 @@ void SpellDialogChildWindow::SetGrammarChecking(bool )
DBG_ERROR("Grammar checking should have been overloaded - if available");
}
} // end of namespace ::svx
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/dialog/dlgctrl.cxx
b/main/svx/source/dialog/dlgctrl.cxx
index b284562861..7a0dc685fc 100644
--- a/main/svx/source/dialog/dlgctrl.cxx
+++ b/main/svx/source/dialog/dlgctrl.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
@@ -69,10 +67,8 @@ using namespace ::com::sun::star::accessibility;
/*************************************************************************
-|*
|* Control to display select the corner points (and center point)
|* of an object
-|*
\************************************************************************/
Bitmap& SvxRectCtl::GetRectBitmap( void )
@@ -89,16 +85,16 @@ SvxRectCtl::SvxRectCtl( Window* pParent, const ResId&
rResId, RECT_POINT eRpt,
Control( pParent, rResId ),
pAccContext ( NULL ),
- nBorderWidth( nBorder ),
- nRadius ( nCircle),
- eDefRP ( eRpt ),
- eCS ( eStyle ),
+ nBorderWidth( nBorder ),
+ nRadius ( nCircle),
+ eDefRP ( eRpt ),
+ eCS ( eStyle ),
pBitmap ( NULL ),
- m_nState ( 0 ),
- mbCompleteDisable(sal_False)
+ m_nState ( 0 ),
+ mbCompleteDisable(sal_False)
{
SetMapMode( MAP_100TH_MM );
- Resize_Impl();
+ Resize_Impl();
}
// -----------------------------------------------------------------------
@@ -114,15 +110,15 @@ SvxRectCtl::~SvxRectCtl()
// -----------------------------------------------------------------------
void SvxRectCtl::Resize()
{
- Resize_Impl();
- Control::Resize();
+ Resize_Impl();
+ Control::Resize();
}
// -----------------------------------------------------------------------
void SvxRectCtl::Resize_Impl()
{
- aSize = GetOutputSize();
+ aSize = GetOutputSize();
switch( eCS )
{
@@ -178,7 +174,7 @@ void SvxRectCtl::InitRectBitmap( void )
aColorAry1[1] = Color( 0xFF, 0xFF, 0x00 ); // yellow
aColorAry1[2] = Color( 0xFF, 0xFF, 0xFF ); // white
aColorAry1[3] = Color( 0x80, 0x80, 0x80 ); // dark-gray
- aColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
+ aColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
aColorAry1[5] = Color( 0x00, 0xFF, 0x00 ); // green
aColorAry1[6] = Color( 0x00, 0x00, 0xFF ); // blue
aColorAry2[0] = rStyles.GetDialogColor(); // background
@@ -240,10 +236,8 @@ void SvxRectCtl::InitSettings( sal_Bool bForeground,
sal_Bool bBackground )
}
/*************************************************************************
-|*
|* The selected rectangle (3 x 3) is identified and the parent (dialog)
|* is notified that the point has been changed
-|*
\************************************************************************/
void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt )
@@ -298,8 +292,8 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
case RP_LM: eNewRP = RP_LB;
break;
case RP_MM: eNewRP = RP_MB;
break;
case RP_RM: eNewRP = RP_RB;
break;
- default: ; //prevent warning
- }
+ default: ; //prevent warning
+ }
}
break;
case KEY_UP:
@@ -313,8 +307,8 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
case RP_LB: eNewRP = RP_LM;
break;
case RP_MB: eNewRP = bUseMM ?
RP_MM : RP_MT; break;
case RP_RB: eNewRP = RP_RM;
break;
- default: ; //prevent warning
- }
+ default: ; //prevent warning
+ }
}
break;
case KEY_LEFT:
@@ -328,8 +322,8 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
case RP_RM: eNewRP = bUseMM ?
RP_MM : RP_LM; break;
case RP_MB: eNewRP = RP_LB;
break;
case RP_RB: eNewRP = RP_MB;
break;
- default: ; //prevent warning
- }
+ default: ; //prevent warning
+ }
}
break;
case KEY_RIGHT:
@@ -343,8 +337,8 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
case RP_MM: eNewRP = RP_RM;
break;
case RP_LB: eNewRP = RP_MB;
break;
case RP_MB: eNewRP = RP_RB;
break;
- default: ; //prevent warning
- }
+ default: ; //prevent warning
+ }
}
break;
default:
@@ -386,9 +380,7 @@ void SvxRectCtl::DataChanged( const DataChangedEvent&
rDCEvt )
}
/*************************************************************************
-|*
|* Draw the control (rectangle with 9 circles)
-|*
\************************************************************************/
void SvxRectCtl::Paint( const Rectangle& )
@@ -518,14 +510,12 @@ void SvxRectCtl::Paint( const Rectangle& )
}
/*************************************************************************
-|*
|* Converted RECT_POINT in Point
-|*
\************************************************************************/
Point SvxRectCtl::GetPointFromRP( RECT_POINT _eRP) const
{
- switch( _eRP )
+ switch( _eRP )
{
case RP_LT: return aPtLT;
case RP_MT: return aPtMT;
@@ -573,7 +563,7 @@ Point SvxRectCtl::SetActualRPWithoutInvalidate( RECT_POINT
eNewRP )
void SvxRectCtl::GetFocus()
{
SetFocusRect();
- //Solution: Send the accessible focused event
+ // Solution: Send the accessible focused event
Control::GetFocus();
// Send accessibility event.
if(pAccContext)
@@ -624,9 +614,7 @@ Point SvxRectCtl::GetApproxLogPtFromPixPt( const Point& rPt
) const
/*************************************************************************
-|*
|* Converted Point in RECT_POINT
-|*
\************************************************************************/
RECT_POINT SvxRectCtl::GetRPFromPoint( Point aPt ) const
@@ -645,9 +633,7 @@ RECT_POINT SvxRectCtl::GetRPFromPoint( Point aPt ) const
}
/*************************************************************************
-|*
|* Reset the original state of the controls
-|*
\************************************************************************/
void SvxRectCtl::Reset()
@@ -658,9 +644,7 @@ void SvxRectCtl::Reset()
}
/*************************************************************************
-|*
|* Returns the currently selected RECT_POINT
-|*
\************************************************************************/
RECT_POINT SvxRectCtl::GetActualRP() const
@@ -669,9 +653,7 @@ RECT_POINT SvxRectCtl::GetActualRP() const
}
/*************************************************************************
-|*
|* Returns the currently selected RECT_POINT
-|*
\************************************************************************/
void SvxRectCtl::SetActualRP( RECT_POINT eNewRP /* MT: , sal_Bool bFireFocus
*/ )
{
@@ -690,15 +672,15 @@ void SvxRectCtl::SetState( CTL_STATE nState )
m_nState = nState;
Point aPtLast( GetPointFromRP( eRP ) );
- Point _aPtNew( aPtLast );
+ Point _aPtNew( aPtLast );
if( (m_nState & CS_NOHORZ) != 0 )
- _aPtNew.X() = aPtMM.X();
+ _aPtNew.X() = aPtMM.X();
if( (m_nState & CS_NOVERT) != 0 )
- _aPtNew.Y() = aPtMM.Y();
+ _aPtNew.Y() = aPtMM.Y();
- eRP = GetRPFromPoint( _aPtNew );
+ eRP = GetRPFromPoint( _aPtNew );
Invalidate();
if( WINDOW_TABPAGE == GetParent()->GetType() )
@@ -742,13 +724,13 @@ Reference< XAccessible > SvxRectCtl::CreateAccessible()
DBG_ASSERT( pParent, "-SvxRectCtl::CreateAccessible(): No Parent!" );
- Reference< XAccessible > xAccParent = pParent->GetAccessible();
+ Reference< XAccessible > xAccParent = pParent->GetAccessible();
if( xAccParent.is() )
{
pAccContext = new SvxRectCtlAccessibleContext( xAccParent,
*this );
pAccContext->acquire();
- SetActualRP( GetActualRP() );
+ SetActualRP( GetActualRP() );
return pAccContext;
}
@@ -769,9 +751,7 @@ void SvxRectCtl::DoCompletelyDisable(sal_Bool bNew)
}
/*************************************************************************
-|*
|* Constructor without size parameter
-|*
\************************************************************************/
SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId ) :
@@ -785,9 +765,7 @@ SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId&
rResId ) :
}
/*************************************************************************
-|*
|* Constructor with size parameter
-|*
\************************************************************************/
SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId, Size _aSize ) :
@@ -796,14 +774,12 @@ SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId&
rResId, Size _aSize ) :
aFont( Application::GetSettings().GetStyleSettings().GetAppFont() )
{
- aFontSize = _aSize;
+ aFontSize = _aSize;
Initialize();
}
/*************************************************************************
-|*
-|* Initialisation
-|*
+|* Initialization
\************************************************************************/
void SvxAngleCtl::Initialize()
@@ -819,9 +795,7 @@ void SvxAngleCtl::Initialize()
}
/*************************************************************************
-|*
|* Draw the (mini) coordinate system
-|*
\************************************************************************/
void SvxAngleCtl::Paint( const Rectangle& )
@@ -875,21 +849,19 @@ void SvxAngleCtl::Paint( const Rectangle& )
}
/*************************************************************************
-|*
|* Control to edit bitmaps
-|*
\************************************************************************/
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible
> SvxPixelCtl::CreateAccessible()
{
- if(!m_xAccess.is())
+ if(!m_xAccess.is())
{
- m_xAccess = m_pAccess = new SvxPixelCtlAccessible(*this);
+ m_xAccess = m_pAccess = new SvxPixelCtlAccessible(*this);
}
- return m_xAccess;
+ return m_xAccess;
}
-//Logic Pixel
+// Logic Pixel
long SvxPixelCtl::PointToIndex(const Point &aPt) const
{
sal_uInt16 nX, nY;
@@ -912,7 +884,7 @@ Point SvxPixelCtl::IndexToPoint(long nIndex) const
return aPtTl;
}
-long SvxPixelCtl::GetFoucsPosIndex() const
+long SvxPixelCtl::GetFoucsPosIndex() const
{
return aFocusPosition.getX() + aFocusPosition.getY() * nLines ;
}
@@ -926,14 +898,14 @@ long SvxPixelCtl::ShowPosition( const Point &pt)
ChangePixel( nX + nY * nLines );
- //Solution:Set new focus position and repaint
- //Invalidate( Rectangle( aPtTl, aPtBr ) );
+ // Solution:Set new focus position and repaint
+ // Invalidate( Rectangle( aPtTl, aPtBr ) );
aFocusPosition.setX(nX);
aFocusPosition.setY(nY);
Invalidate(Rectangle(Point(0,0),aRectSize));
if( WINDOW_TABPAGE == GetParent()->GetType() )
- ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); //
RectPoint ist dummy
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); //
RectPoint is dummy
return GetFoucsPosIndex();
@@ -942,7 +914,7 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId&
rResId, sal_uInt16 nNumb
Control ( pParent,
rResId ),
nLines ( nNumber ),
bPaintable ( sal_True )
- //Solution:Initialize it's
value to Point(0,0)
+ // Solution:Initialize its
value to Point(0,0)
,aFocusPosition(0,0)
{
// SetMapMode( MAP_100TH_MM );
@@ -959,9 +931,7 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId&
rResId, sal_uInt16 nNumb
}
/*************************************************************************
-|*
|* Destruktor dealociert dyn. Array
-|*
\************************************************************************/
SvxPixelCtl::~SvxPixelCtl( )
@@ -970,9 +940,7 @@ SvxPixelCtl::~SvxPixelCtl( )
}
/*************************************************************************
-|*
|* Change the foreground or background color
-|*
\************************************************************************/
void SvxPixelCtl::ChangePixel( sal_uInt16 nPixel )
@@ -984,9 +952,7 @@ void SvxPixelCtl::ChangePixel( sal_uInt16 nPixel )
}
/*************************************************************************
-|*
|* The selected rectangle is identified to change the color
-|*
\************************************************************************/
void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
@@ -1023,9 +989,7 @@ void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt
)
}
/*************************************************************************
-|*
|* Draw the control (rectangle with 9 circles)
-|*
\************************************************************************/
void SvxPixelCtl::Paint( const Rectangle& )
@@ -1070,7 +1034,7 @@ void SvxPixelCtl::Paint( const Rectangle& )
DrawRect( Rectangle( aPtTl, aPtBr ) );
}
}
- //Solution:Draw visual focus when has focus
+ // Solution:Draw visual focus when has focus
if( HasFocus() )
{
ShowFocus(implCalFocusRect(aFocusPosition));
@@ -1084,7 +1048,7 @@ void SvxPixelCtl::Paint( const Rectangle& )
DrawLine( Point( 0, aRectSize.Height() ), Point(
aRectSize.Width(), 0 ) );
}
}
-//Solution:Caculate visual focus rectangle via focus position
+// Solution:Calculate visual focus rectangle via focus position
Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition )
{
long nLeft,nTop,nRight,nBottom;
@@ -1098,7 +1062,7 @@ Rectangle SvxPixelCtl::implCalFocusRect( const Point&
aPosition )
return Rectangle(nLeft,nTop,nRight,nBottom);
}
-//Solution:Keyboard function
+// Solution:Keyboard function
void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aKeyCode = rKEvt.GetKeyCode();
@@ -1183,7 +1147,7 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
}
}
-//Draw focus when get focus
+// Draw focus when get focus
void SvxPixelCtl::GetFocus()
{
Invalidate(implCalFocusRect(aFocusPosition));
@@ -1196,7 +1160,7 @@ void SvxPixelCtl::GetFocus()
Control::GetFocus();
}
-//Hide focus when lose focus
+// Hide focus when lose focus
void SvxPixelCtl::LoseFocus()
{
HideFocus();
@@ -1209,45 +1173,41 @@ void SvxPixelCtl::LoseFocus()
/*************************************************************************
|*
-|*
-|*
\************************************************************************/
void SvxPixelCtl::SetXBitmap( const BitmapEx& rBitmapEx )
{
- BitmapColor aBack;
- BitmapColor aFront;
+ BitmapColor aBack;
+ BitmapColor aFront;
- if(isHistorical8x8(rBitmapEx, aBack, aFront))
- {
- Bitmap aBitmap(rBitmapEx.GetBitmap());
- BitmapReadAccess* pRead = aBitmap.AcquireReadAccess();
+ if(isHistorical8x8(rBitmapEx, aBack, aFront))
+ {
+ Bitmap aBitmap(rBitmapEx.GetBitmap());
+ BitmapReadAccess* pRead = aBitmap.AcquireReadAccess();
- aBackgroundColor = aBack;
- aPixelColor = aFront;
+ aBackgroundColor = aBack;
+ aPixelColor = aFront;
- for(sal_uInt16 i(0); i < nSquares; i++)
- {
- const BitmapColor aColor(pRead->GetColor(i/8, i%8));
+ for(sal_uInt16 i(0); i < nSquares; i++)
+ {
+ const BitmapColor aColor(pRead->GetColor(i/8, i%8));
- if(aColor == aBack)
- {
- *( pPixel + i ) = 0;
- }
- else
- {
- *( pPixel + i ) = 1;
- }
- }
+ if(aColor == aBack)
+ {
+ *( pPixel + i ) = 0;
+ }
+ else
+ {
+ *( pPixel + i ) = 1;
+ }
+ }
- aBitmap.ReleaseAccess(pRead);
- }
+ aBitmap.ReleaseAccess(pRead);
+ }
}
/*************************************************************************
-|*
|* Return a selected pixel
-|*
\************************************************************************/
sal_uInt16 SvxPixelCtl::GetBitmapPixel( const sal_uInt16 nPixel )
@@ -1256,9 +1216,7 @@ sal_uInt16 SvxPixelCtl::GetBitmapPixel( const sal_uInt16
nPixel )
}
/*************************************************************************
-|*
|* Reset the original state of the control
-|*
\************************************************************************/
void SvxPixelCtl::Reset()
@@ -1269,9 +1227,7 @@ void SvxPixelCtl::Reset()
}
/*************************************************************************
-|*
|* Ctor: BitmapCtl for SvxPixelCtl
-|*
\************************************************************************/
SvxBitmapCtl::SvxBitmapCtl( Window* /*pParent*/, const Size& rSize )
@@ -1281,9 +1237,7 @@ SvxBitmapCtl::SvxBitmapCtl( Window* /*pParent*/, const
Size& rSize )
}
/*************************************************************************
-|*
|* Dtor
-|*
\************************************************************************/
SvxBitmapCtl::~SvxBitmapCtl()
@@ -1291,22 +1245,18 @@ SvxBitmapCtl::~SvxBitmapCtl()
}
/*************************************************************************
-|*
|* BitmapCtl: Return the bitmap
-|*
\************************************************************************/
BitmapEx SvxBitmapCtl::GetBitmapEx()
{
- const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray, aPixelColor,
aBackgroundColor));
+ const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray,
aPixelColor, aBackgroundColor));
return BitmapEx(aRetval);
}
/*************************************************************************
-|*
|* Fill the list box with colors and strings
-|*
\************************************************************************/
void ColorLB::Fill( const XColorListSharedPtr aColorTab )
@@ -1317,11 +1267,11 @@ void ColorLB::Fill( const XColorListSharedPtr aColorTab
)
for( long i = 0; i < nCount; i++ )
{
- pEntry = aColorTab->GetColor( i );
+ pEntry = aColorTab->GetColor( i );
InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
@@ -1329,22 +1279,20 @@ void ColorLB::Fill( const XColorListSharedPtr aColorTab
)
void ColorLB::Append( const XColorEntry& rEntry )
{
- InsertEntry( rEntry.GetColor(), rEntry.GetName() );
- AdaptDropDownLineCountToMaximum();
+ InsertEntry( rEntry.GetColor(), rEntry.GetName() );
+ AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
void ColorLB::Modify( const XColorEntry& rEntry, sal_uInt16 nPos )
{
- RemoveEntry( nPos );
- InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
+ RemoveEntry( nPos );
+ InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
}
/*************************************************************************
-|*
|* Fill the list box with colors and strings
-|*
\************************************************************************/
void FillAttrLB::Fill( const XColorListSharedPtr aColorTab )
@@ -1355,30 +1303,28 @@ void FillAttrLB::Fill( const XColorListSharedPtr
aColorTab )
for( long i = 0; i < nCount; i++ )
{
- pEntry = aColorTab->GetColor( i );
+ pEntry = aColorTab->GetColor( i );
InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
- SetUpdateMode( sal_True );
+ AdaptDropDownLineCountToMaximum();
+ SetUpdateMode( sal_True );
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
HatchingLB::HatchingLB( Window* pParent, ResId Id)
: ListBox( pParent, Id )
{
- SetEdgeBlending(true);
+ SetEdgeBlending(true);
}
HatchingLB::HatchingLB( Window* pParent, WinBits aWB)
: ListBox( pParent, aWB )
{
- SetEdgeBlending(true);
+ SetEdgeBlending(true);
}
void HatchingLB::Fill( const XHatchListSharedPtr aList )
@@ -1390,7 +1336,7 @@ void HatchingLB::Fill( const XHatchListSharedPtr aList )
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetHatch( i );
+ pEntry = aList->GetHatch( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
InsertEntry( pEntry->GetName(), aBitmap );
@@ -1398,7 +1344,7 @@ void HatchingLB::Fill( const XHatchListSharedPtr aList )
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
@@ -1406,32 +1352,32 @@ void HatchingLB::Fill( const XHatchListSharedPtr aList )
void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap )
{
- if(!rBitmap.IsEmpty())
- {
- InsertEntry( rEntry.GetName(), rBitmap );
- }
- else
- {
- InsertEntry( rEntry.GetName() );
- }
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
+ else
+ {
+ InsertEntry( rEntry.GetName() );
+ }
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
void HatchingLB::Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const
Bitmap& rBitmap )
{
- RemoveEntry( nPos );
+ RemoveEntry( nPos );
- if( !rBitmap.IsEmpty() )
- {
- InsertEntry( rEntry.GetName(), rBitmap, nPos );
- }
- else
- {
- InsertEntry( rEntry.GetName(), nPos );
- }
+ if( !rBitmap.IsEmpty() )
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
+ else
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
/************************************************************************/
@@ -1446,7 +1392,7 @@ void HatchingLB::SelectEntryByList( const
XHatchListSharedPtr aList, const Strin
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
- pEntry = aList->GetHatch( i );
+ pEntry = aList->GetHatch( i );
aStr = pEntry->GetName();
@@ -1458,9 +1404,7 @@ void HatchingLB::SelectEntryByList( const
XHatchListSharedPtr aList, const Strin
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
void FillAttrLB::Fill( const XHatchListSharedPtr aList )
@@ -1471,7 +1415,7 @@ void FillAttrLB::Fill( const XHatchListSharedPtr aList )
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetHatch( i );
+ pEntry = aList->GetHatch( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
ListBox::InsertEntry( pEntry->GetName(), aBitmap );
@@ -1479,26 +1423,24 @@ void FillAttrLB::Fill( const XHatchListSharedPtr aList )
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
ListBox::SetUpdateMode( sal_True );
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
GradientLB::GradientLB( Window* pParent, ResId Id)
: ListBox( pParent, Id )
{
- SetEdgeBlending(true);
+ SetEdgeBlending(true);
}
GradientLB::GradientLB( Window* pParent, WinBits aWB)
: ListBox( pParent, aWB )
{
- SetEdgeBlending(true);
+ SetEdgeBlending(true);
}
void GradientLB::Fill( const XGradientListSharedPtr aList )
@@ -1510,7 +1452,7 @@ void GradientLB::Fill( const XGradientListSharedPtr aList
)
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetGradient( i );
+ pEntry = aList->GetGradient( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
InsertEntry( pEntry->GetName(), aBitmap );
@@ -1518,7 +1460,7 @@ void GradientLB::Fill( const XGradientListSharedPtr aList
)
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
@@ -1526,32 +1468,32 @@ void GradientLB::Fill( const XGradientListSharedPtr
aList )
void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap )
{
- if(!rBitmap.IsEmpty())
- {
- InsertEntry( rEntry.GetName(), rBitmap );
- }
- else
- {
- InsertEntry( rEntry.GetName() );
- }
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap );
+ }
+ else
+ {
+ InsertEntry( rEntry.GetName() );
+ }
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
void GradientLB::Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const
Bitmap& rBitmap )
{
- RemoveEntry( nPos );
+ RemoveEntry( nPos );
- if(!rBitmap.IsEmpty())
- {
- InsertEntry( rEntry.GetName(), rBitmap, nPos );
- }
- else
- {
- InsertEntry( rEntry.GetName(), nPos );
- }
+ if(!rBitmap.IsEmpty())
+ {
+ InsertEntry( rEntry.GetName(), rBitmap, nPos );
+ }
+ else
+ {
+ InsertEntry( rEntry.GetName(), nPos );
+ }
}
/************************************************************************/
@@ -1566,7 +1508,7 @@ void GradientLB::SelectEntryByList( const
XGradientListSharedPtr aList, const St
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
- pEntry = aList->GetGradient( i );
+ pEntry = aList->GetGradient( i );
aStr = pEntry->GetName();
@@ -1578,9 +1520,7 @@ void GradientLB::SelectEntryByList( const
XGradientListSharedPtr aList, const St
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
void FillAttrLB::Fill( const XGradientListSharedPtr aList )
@@ -1591,7 +1531,7 @@ void FillAttrLB::Fill( const XGradientListSharedPtr aList
)
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetGradient( i );
+ pEntry = aList->GetGradient( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
ListBox::InsertEntry( pEntry->GetName(), aBitmap );
@@ -1599,33 +1539,31 @@ void FillAttrLB::Fill( const XGradientListSharedPtr
aList )
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
ListBox::SetUpdateMode( sal_True );
}
/*************************************************************************
-|*
|* Constructor of BitmapLB
-|*
\************************************************************************/
BitmapLB::BitmapLB(Window* pParent, ResId Id)
-: ListBox(pParent, Id),
- maBitmapEx()
+: ListBox(pParent, Id),
+ maBitmapEx()
{
- SetEdgeBlending(true);
+ SetEdgeBlending(true);
}
/************************************************************************/
namespace
{
- void formatBitmapExToSize(BitmapEx& rBitmapEx, const Size& rSize)
- {
- if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height() > 0)
- {
- VirtualDevice aVirtualDevice;
- aVirtualDevice.SetOutputSizePixel(rSize);
+ void formatBitmapExToSize(BitmapEx& rBitmapEx, const Size& rSize)
+ {
+ if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height()
> 0)
+ {
+ VirtualDevice aVirtualDevice;
+ aVirtualDevice.SetOutputSizePixel(rSize);
if(rBitmapEx.IsTransparent())
{
@@ -1671,7 +1609,7 @@ namespace
rBitmapEx = aVirtualDevice.GetBitmap(Point(0, 0), rSize);
}
- }
+ }
} // end of anonymous namespace
/************************************************************************/
@@ -1680,20 +1618,20 @@ void BitmapLB::Fill(const XBitmapListSharedPtr aList)
{
XBitmapEntry* pEntry;
const long nCount(aList.get() ? aList->Count() : 0);
- const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
- const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
+ const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
+ const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
SetUpdateMode(false);
for(long i(0); i < nCount; i++)
{
- pEntry = aList->GetBitmap(i);
- maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
- formatBitmapExToSize(maBitmapEx, aSize);
- InsertEntry(pEntry->GetName(), maBitmapEx);
+ pEntry = aList->GetBitmap(i);
+ maBitmapEx =
pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
+ formatBitmapExToSize(maBitmapEx, aSize);
+ InsertEntry(pEntry->GetName(), maBitmapEx);
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode(true);
}
@@ -1701,7 +1639,7 @@ void BitmapLB::Fill(const XBitmapListSharedPtr aList)
void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry)
{
- maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
+ maBitmapEx = rEntry.GetGraphicObject().GetGraphic().GetBitmapEx();
if(!maBitmapEx.IsEmpty())
{
@@ -1713,7 +1651,7 @@ void BitmapLB::Append(const Size& rSize, const
XBitmapEntry& rEntry)
InsertEntry(rEntry.GetName());
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
}
/************************************************************************/
@@ -1741,11 +1679,11 @@ void BitmapLB::SelectEntryByList(const
XBitmapListSharedPtr aList, const String&
const long nCount(aList.get() ? aList->Count() : 0);
XBitmapEntry* pEntry;
bool bFound(false);
- long i(0);
+ long i(0);
for(i = 0; i < nCount && !bFound; i++)
{
- pEntry = aList->GetBitmap(i);
+ pEntry = aList->GetBitmap(i);
const String aStr(pEntry->GetName());
if(rStr == aStr)
@@ -1754,28 +1692,26 @@ void BitmapLB::SelectEntryByList(const
XBitmapListSharedPtr aList, const String&
}
}
- if(bFound)
- {
+ if(bFound)
+ {
SelectEntryPos((sal_uInt16)(i - 1));
- }
+ }
}
/*************************************************************************
-|*
|* Constructor of FillAttrLB
-|*
\************************************************************************/
-FillAttrLB::FillAttrLB( Window* pParent, ResId Id )
-: ColorListBox(pParent, Id),
- maBitmapEx()
+FillAttrLB::FillAttrLB( Window* pParent, ResId Id )
+: ColorListBox(pParent, Id),
+ maBitmapEx()
{
}
/************************************************************************/
-FillAttrLB::FillAttrLB(Window* pParent, WinBits aWB)
-: ColorListBox(pParent, aWB)
+FillAttrLB::FillAttrLB(Window* pParent, WinBits aWB)
+: ColorListBox(pParent, aWB)
{
}
@@ -1785,21 +1721,21 @@ void FillAttrLB::Fill(const XBitmapListSharedPtr aList)
{
const long nCount(aList.get() ? aList->Count() : 0);
XBitmapEntry* pEntry;
- const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
- const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
+ const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
+ const Size aSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
- ListBox::SetUpdateMode(false);
+ ListBox::SetUpdateMode(false);
for(long i(0); i < nCount; i++)
{
- pEntry = aList->GetBitmap( i );
+ pEntry = aList->GetBitmap( i );
maBitmapEx =
pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
- formatBitmapExToSize(maBitmapEx, aSize);
+ formatBitmapExToSize(maBitmapEx, aSize);
ListBox::InsertEntry(pEntry->GetName(), maBitmapEx);
}
- AdaptDropDownLineCountToMaximum();
- ListBox::SetUpdateMode(true);
+ AdaptDropDownLineCountToMaximum();
+ ListBox::SetUpdateMode(true);
}
/************************************************************************/
@@ -1811,9 +1747,9 @@ void FillAttrLB::SelectEntryByList( const
XBitmapListSharedPtr aList, const Stri
bool bFound(false);
long i(0);
- for(i = 0; i < nCount && !bFound; i++)
+ for(i = 0; i < nCount && !bFound; i++)
{
- pEntry = aList->GetBitmap(i);
+ pEntry = aList->GetBitmap(i);
const String aStr(pEntry->GetName());
if(rStr == aStr)
@@ -1822,49 +1758,45 @@ void FillAttrLB::SelectEntryByList( const
XBitmapListSharedPtr aList, const Stri
}
}
- if(bFound)
- {
+ if(bFound)
+ {
SelectEntryPos((sal_uInt16)(i - 1));
- }
+ }
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
void FillTypeLB::Fill()
{
SetUpdateMode( sal_False );
- InsertEntry( String( SVX_RES( RID_SVXSTR_INVISIBLE ) ) );
+ InsertEntry( String( SVX_RES( RID_SVXSTR_INVISIBLE ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_COLOR ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_GRADIENT ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_HATCH ) ) );
InsertEntry( String( SVX_RES( RID_SVXSTR_BITMAP ) ) );
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
LineLB::LineLB(Window* pParent, ResId Id)
-: ListBox(pParent, Id),
- mbAddStandardFields(true)
+: ListBox(pParent, Id),
+ mbAddStandardFields(true)
{
- // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
+ // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
}
-LineLB::LineLB(Window* pParent, WinBits aWB)
-: ListBox(pParent, aWB),
- mbAddStandardFields(true)
+LineLB::LineLB(Window* pParent, WinBits aWB)
+: ListBox(pParent, aWB),
+ mbAddStandardFields(true)
{
- // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
+ // No EdgeBlending for LineStyle/Dash SetEdgeBlending(true);
}
LineLB::~LineLB()
@@ -1892,14 +1824,14 @@ void LineLB::Fill( const XDashListSharedPtr aList )
InsertEntry(aList->GetStringForUiSolidLine(),
aList->GetBitmapForUISolidLine());
}
- // entries for dashed lines
+ // entries for dashed lines
long nCount = aList.get() ? aList->Count() : 0;
XDashEntry* pEntry;
SetUpdateMode( sal_False );
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetDash( i );
+ pEntry = aList->GetDash( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
{
@@ -1910,7 +1842,7 @@ void LineLB::Fill( const XDashListSharedPtr aList )
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
@@ -1959,7 +1891,7 @@ void LineLB::SelectEntryByList( const XDashListSharedPtr
aList, const String& rS
long i;
for( i = 0; i < nCount && !bFound; i++ )
{
- pEntry = aList->GetDash( i );
+ pEntry = aList->GetDash( i );
aStr = pEntry->GetName();
aDash = pEntry->GetDash();
@@ -1972,20 +1904,18 @@ void LineLB::SelectEntryByList( const
XDashListSharedPtr aList, const String& rS
}
/*************************************************************************
-|*
|* Fill the list box (temporarily) with strings
-|*
\************************************************************************/
LineEndLB::LineEndLB( Window* pParent, ResId Id )
- : ListBox( pParent, Id )
+ : ListBox( pParent, Id )
{
- // No EdgeBlending for LineEnds SetEdgeBlending(true);
+ // No EdgeBlending for LineEnds SetEdgeBlending(true);
}
LineEndLB::LineEndLB( Window* pParent, WinBits aWB )
- : ListBox( pParent, aWB )
+ : ListBox( pParent, aWB )
{
- // No EdgeBlending for LineEnds SetEdgeBlending(true);
+ // No EdgeBlending for LineEnds SetEdgeBlending(true);
}
LineEndLB::~LineEndLB(void)
@@ -2002,7 +1932,7 @@ void LineEndLB::Fill( const XLineEndListSharedPtr aList,
bool bStart )
for( long i = 0; i < nCount; i++ )
{
- pEntry = aList->GetLineEnd( i );
+ pEntry = aList->GetLineEnd( i );
const Bitmap aBitmap = aList->GetUiBitmap( i );
if( !aBitmap.IsEmpty() )
{
@@ -2018,7 +1948,7 @@ void LineEndLB::Fill( const XLineEndListSharedPtr aList,
bool bStart )
InsertEntry( pEntry->GetName() );
}
- AdaptDropDownLineCountToMaximum();
+ AdaptDropDownLineCountToMaximum();
SetUpdateMode( sal_True );
}
@@ -2081,9 +2011,9 @@ void SvxPreviewBase::InitSettings(bool bForeground, bool
bBackground)
Color
aTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
if(IsControlForeground())
- {
+ {
aTextColor = GetControlForeground();
- }
+ }
getBufferDevice().SetTextColor(aTextColor);
}
@@ -2091,125 +2021,123 @@ void SvxPreviewBase::InitSettings(bool bForeground,
bool bBackground)
if(bBackground)
{
if(IsControlBackground())
- {
+ {
getBufferDevice().SetBackground(GetControlBackground());
- }
+ }
else
- {
+ {
getBufferDevice().SetBackground(rStyleSettings.GetWindowColor());
- }
+ }
}
- // do not paint background self, it gets painted buffered
+ // do not paint background self, it gets painted buffered
SetControlBackground();
- SetBackground();
+ SetBackground();
- Invalidate();
+ Invalidate();
}
SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId )
: Control( pParent, rResId ),
mpModel( new SdrModel() ),
- mpBufferDevice( new VirtualDevice(*this) )
+ mpBufferDevice( new VirtualDevice(*this) )
{
- // Draw the control's border as a flat thin black line.
- SetBorderStyle(WINDOW_BORDER_MONO);
- SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ?
OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
- SetMapMode(MAP_100TH_MM);
+ // Draw the control's border as a flat thin black line.
+ SetBorderStyle(WINDOW_BORDER_MONO);
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ?
OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetMapMode(MAP_100TH_MM);
- // init model
+ // init model
mpModel->GetItemPool().FreezeIdRanges();
}
SvxPreviewBase::~SvxPreviewBase()
{
delete mpModel;
- delete mpBufferDevice;
+ delete mpBufferDevice;
}
void SvxPreviewBase::LocalPrePaint()
{
- // init BufferDevice
- if(mpBufferDevice->GetOutputSizePixel() != GetOutputSizePixel())
- {
- mpBufferDevice->SetDrawMode(GetDrawMode());
- mpBufferDevice->SetSettings(GetSettings());
- mpBufferDevice->SetAntialiasing(GetAntialiasing());
- mpBufferDevice->SetOutputSizePixel(GetOutputSizePixel());
- mpBufferDevice->SetMapMode(GetMapMode());
- }
+ // init BufferDevice
+ if(mpBufferDevice->GetOutputSizePixel() != GetOutputSizePixel())
+ {
+ mpBufferDevice->SetDrawMode(GetDrawMode());
+ mpBufferDevice->SetSettings(GetSettings());
+ mpBufferDevice->SetAntialiasing(GetAntialiasing());
+ mpBufferDevice->SetOutputSizePixel(GetOutputSizePixel());
+ mpBufferDevice->SetMapMode(GetMapMode());
+ }
- const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
+ const StyleSettings& rStyleSettings =
Application::GetSettings().GetStyleSettings();
- if(rStyleSettings.GetPreviewUsesCheckeredBackground())
- {
- const Point aNull(0, 0);
- static const sal_uInt32 nLen(8);
- static const Color aW(COL_WHITE);
- static const Color aG(0xef, 0xef, 0xef);
- const bool bWasEnabled(mpBufferDevice->IsMapModeEnabled());
-
- mpBufferDevice->EnableMapMode(false);
- mpBufferDevice->DrawCheckered(aNull,
mpBufferDevice->GetOutputSizePixel(), nLen, aW, aG);
- mpBufferDevice->EnableMapMode(bWasEnabled);
- }
- else
- {
- mpBufferDevice->Erase();
- }
+ if(rStyleSettings.GetPreviewUsesCheckeredBackground())
+ {
+ const Point aNull(0, 0);
+ static const sal_uInt32 nLen(8);
+ static const Color aW(COL_WHITE);
+ static const Color aG(0xef, 0xef, 0xef);
+ const bool bWasEnabled(mpBufferDevice->IsMapModeEnabled());
+
+ mpBufferDevice->EnableMapMode(false);
+ mpBufferDevice->DrawCheckered(aNull,
mpBufferDevice->GetOutputSizePixel(), nLen, aW, aG);
+ mpBufferDevice->EnableMapMode(bWasEnabled);
+ }
+ else
+ {
+ mpBufferDevice->Erase();
+ }
}
void SvxPreviewBase::LocalPostPaint()
{
- // copy to front (in pixel mode)
+ // copy to front (in pixel mode)
const bool bWasEnabledSrc(mpBufferDevice->IsMapModeEnabled());
const bool bWasEnabledDst(IsMapModeEnabled());
const Point aEmptyPoint;
- mpBufferDevice->EnableMapMode(false);
- EnableMapMode(false);
+ mpBufferDevice->EnableMapMode(false);
+ EnableMapMode(false);
- DrawOutDev(
- aEmptyPoint, GetOutputSizePixel(),
- aEmptyPoint, GetOutputSizePixel(),
- *mpBufferDevice);
+ DrawOutDev(
+ aEmptyPoint, GetOutputSizePixel(),
+ aEmptyPoint, GetOutputSizePixel(),
+ *mpBufferDevice);
- mpBufferDevice->EnableMapMode(bWasEnabledSrc);
- EnableMapMode(bWasEnabledDst);
+ mpBufferDevice->EnableMapMode(bWasEnabledSrc);
+ EnableMapMode(bWasEnabledDst);
}
void SvxPreviewBase::StateChanged(StateChangedType nType)
{
Control::StateChanged(nType);
- if(STATE_CHANGE_CONTROLFOREGROUND == nType)
- {
+ if(STATE_CHANGE_CONTROLFOREGROUND == nType)
+ {
InitSettings(true, false);
- }
+ }
else if(STATE_CHANGE_CONTROLBACKGROUND == nType)
- {
+ {
InitSettings(false, true);
- }
+ }
}
void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt)
{
- SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ?
OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
+ SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ?
OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
- if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() &
SETTINGS_STYLE))
- {
+ if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() &
SETTINGS_STYLE))
+ {
InitSettings(true, true);
- }
+ }
else
- {
+ {
Control::DataChanged(rDCEvt);
- }
+ }
}
/*************************************************************************
-|*
-|* SvxXLinePreview::SvxXLinePreview()
-|*
+|* SvxXLinePreview::SvxXLinePreview()
*************************************************************************/
SvxXLinePreview::SvxXLinePreview( Window* pParent, const ResId& rResId )
@@ -2263,9 +2191,9 @@ SvxXLinePreview::SvxXLinePreview( Window* pParent, const
ResId& rResId )
SvxXLinePreview::~SvxXLinePreview()
{
- SdrObject::Free( mpLineObjA );
- SdrObject::Free( mpLineObjB );
- SdrObject::Free( mpLineObjC );
+ SdrObject::Free( mpLineObjA );
+ SdrObject::Free( mpLineObjB );
+ SdrObject::Free( mpLineObjC );
}
// -----------------------------------------------------------------------
@@ -2323,7 +2251,7 @@ void SvxXLinePreview::Paint( const Rectangle& )
if ( mbWithSymbol && mpGraphic )
{
- const Size aOutputSize(GetOutputSize());
+ const Size aOutputSize(GetOutputSize());
Point aPos = Point( aOutputSize.Width() / 3,
aOutputSize.Height() / 2 );
aPos.X() -= maSymbolSize.Width() / 2;
aPos.Y() -= maSymbolSize.Height() / 2;
@@ -2334,9 +2262,7 @@ void SvxXLinePreview::Paint( const Rectangle& )
}
/*************************************************************************
-|*
-|* SvxXRectPreview::SvxXRectPreview()
-|*
+|* SvxXRectPreview::SvxXRectPreview()
*************************************************************************/
SvxXRectPreview::SvxXRectPreview( Window* pParent, const ResId& rResId )
@@ -2346,14 +2272,14 @@ SvxXRectPreview::SvxXRectPreview( Window* pParent,
const ResId& rResId )
InitSettings(true, true);
// create RectangleObject
- const Rectangle aObjectSize(Point(), GetOutputSize());
+ const Rectangle aObjectSize(Point(), GetOutputSize());
mpRectangleObject = new SdrRectObj(aObjectSize);
mpRectangleObject->SetModel(&getModel());
}
SvxXRectPreview::~SvxXRectPreview()
{
- SdrObject::Free(mpRectangleObject);
+ SdrObject::Free(mpRectangleObject);
}
void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet)
@@ -2366,51 +2292,49 @@ void SvxXRectPreview::Paint( const Rectangle& )
{
LocalPrePaint();
- sdr::contact::SdrObjectVector aObjectVector;
+ sdr::contact::SdrObjectVector aObjectVector;
- aObjectVector.push_back(mpRectangleObject);
+ aObjectVector.push_back(mpRectangleObject);
- sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(),
aObjectVector, 0);
+ sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(),
aObjectVector, 0);
sdr::contact::DisplayInfo aDisplayInfo;
aPainter.ProcessDisplay(aDisplayInfo);
- LocalPostPaint();
+ LocalPostPaint();
}
/*************************************************************************
-|*
-|* SvxXShadowPreview::SvxXShadowPreview()
-|*
+|* SvxXShadowPreview::SvxXShadowPreview()
*************************************************************************/
SvxXShadowPreview::SvxXShadowPreview( Window* pParent, const ResId& rResId )
: SvxPreviewBase( pParent, rResId ),
mpRectangleObject(0),
- mpRectangleShadow(0)
+ mpRectangleShadow(0)
{
InitSettings(true, true);
- // prepare size
+ // prepare size
Size aSize = GetOutputSize();
aSize.Width() = aSize.Width() / 3;
aSize.Height() = aSize.Height() / 3;
- // create RectangleObject
- const Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ), aSize
);
+ // create RectangleObject
+ const Rectangle aObjectSize( Point( aSize.Width(), aSize.Height() ),
aSize );
mpRectangleObject = new SdrRectObj(aObjectSize);
mpRectangleObject->SetModel(&getModel());
- // create ShadowObject
- const Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ), aSize
);
+ // create ShadowObject
+ const Rectangle aShadowSize( Point( aSize.Width(), aSize.Height() ),
aSize );
mpRectangleShadow = new SdrRectObj(aShadowSize);
mpRectangleShadow->SetModel(&getModel());
}
SvxXShadowPreview::~SvxXShadowPreview()
{
- SdrObject::Free(mpRectangleObject);
- SdrObject::Free(mpRectangleShadow);
+ SdrObject::Free(mpRectangleObject);
+ SdrObject::Free(mpRectangleShadow);
}
void SvxXShadowPreview::SetRectangleAttributes(const SfxItemSet& rItemSet)
@@ -2425,29 +2349,28 @@ void SvxXShadowPreview::SetShadowAttributes(const
SfxItemSet& rItemSet)
mpRectangleShadow->SetMergedItem(XLineStyleItem(XLINE_NONE));
}
-void SvxXShadowPreview::SetShadowPosition(const Point& rPos)
+void SvxXShadowPreview::SetShadowPosition(const Point& rPos)
{
- Rectangle aObjectPosition(mpRectangleObject->GetSnapRect());
- aObjectPosition.Move(rPos.X(), rPos.Y());
- mpRectangleShadow->SetSnapRect(aObjectPosition);
+ Rectangle aObjectPosition(mpRectangleObject->GetSnapRect());
+ aObjectPosition.Move(rPos.X(), rPos.Y());
+ mpRectangleShadow->SetSnapRect(aObjectPosition);
}
void SvxXShadowPreview::Paint( const Rectangle& )
{
LocalPrePaint();
- sdr::contact::SdrObjectVector aObjectVector;
+ sdr::contact::SdrObjectVector aObjectVector;
- aObjectVector.push_back(mpRectangleShadow);
+ aObjectVector.push_back(mpRectangleShadow);
aObjectVector.push_back(mpRectangleObject);
- sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(),
aObjectVector, 0);
+ sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(),
aObjectVector, 0);
sdr::contact::DisplayInfo aDisplayInfo;
aPainter.ProcessDisplay(aDisplayInfo);
- LocalPostPaint();
+ LocalPostPaint();
}
-// -----------------------------------------------------------------------
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/dialog/srchdlg.cxx
b/main/svx/source/dialog/srchdlg.cxx
index 6c0266c970..bf07e250ef 100644
--- a/main/svx/source/dialog/srchdlg.cxx
+++ b/main/svx/source/dialog/srchdlg.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_svx.hxx"
@@ -58,7 +56,6 @@
#include <svx/svxitems.hrc>
#include "srchdlg.hrc"
-
#define ITEMID_SETITEM 0
#include <svl/srchitem.hxx>
@@ -97,11 +94,11 @@ using namespace comphelper;
#define MODIFY_SIMILARITY 0x00000100
#define MODIFY_FORMULAS 0x00000200
#define MODIFY_VALUES 0x00000400
-#define MODIFY_CALC_NOTES 0x00000800
+#define MODIFY_CALC_NOTES 0x00000800
#define MODIFY_ROWS 0x00001000
#define MODIFY_COLUMNS 0x00002000
-#define MODIFY_ALLTABLES 0x00004000
-#define MODIFY_NOTES 0x00008000
+#define MODIFY_ALLTABLES 0x00004000
+#define MODIFY_NOTES 0x00008000
SV_IMPL_VARARR(SrchAttrItemList, SearchAttrItem);
@@ -194,11 +191,11 @@ SearchAttrItemList::SearchAttrItemList( const
SearchAttrItemList& rList ) :
{
SrchAttrItemList::Insert( &rList, 0 );
- SearchAttrItem* _pData = (SearchAttrItem*)GetData();
+ SearchAttrItem* _pData = (SearchAttrItem*)GetData();
- for ( sal_uInt16 i = Count(); i; --i, ++_pData )
- if ( !IsInvalidItem( _pData->pItem ) )
- _pData->pItem = _pData->pItem->Clone();
+ for ( sal_uInt16 i = Count(); i; --i, ++_pData )
+ if ( !IsInvalidItem( _pData->pItem ) )
+ _pData->pItem = _pData->pItem->Clone();
}
// -----------------------------------------------------------------------
@@ -249,13 +246,13 @@ void SearchAttrItemList::Put( const SfxItemSet& rSet )
SfxItemSet& SearchAttrItemList::Get( SfxItemSet& rSet )
{
SfxItemPool* pPool = rSet.GetPool();
- SearchAttrItem* _pData = (SearchAttrItem*)GetData();
+ SearchAttrItem* _pData = (SearchAttrItem*)GetData();
- for ( sal_uInt16 i = Count(); i; --i, ++_pData )
- if ( IsInvalidItem( _pData->pItem ) )
- rSet.InvalidateItem( pPool->GetWhich( _pData->nSlot ) );
+ for ( sal_uInt16 i = Count(); i; --i, ++_pData )
+ if ( IsInvalidItem( _pData->pItem ) )
+ rSet.InvalidateItem( pPool->GetWhich( _pData->nSlot ) );
else
- rSet.Put( *_pData->pItem );
+ rSet.Put( *_pData->pItem );
return rSet;
}
@@ -263,11 +260,11 @@ SfxItemSet& SearchAttrItemList::Get( SfxItemSet& rSet )
void SearchAttrItemList::Clear()
{
- SearchAttrItem* _pData = (SearchAttrItem*)GetData();
+ SearchAttrItem* _pData = (SearchAttrItem*)GetData();
- for ( sal_uInt16 i = Count(); i; --i, ++_pData )
- if ( !IsInvalidItem( _pData->pItem ) )
- delete _pData->pItem;
+ for ( sal_uInt16 i = Count(); i; --i, ++_pData )
+ if ( !IsInvalidItem( _pData->pItem ) )
+ delete _pData->pItem;
SrchAttrItemList::Remove( 0, Count() );
}
@@ -278,11 +275,11 @@ void SearchAttrItemList::Remove( sal_uInt16 nPos,
sal_uInt16 nLen )
{
if ( nPos + nLen > Count() )
nLen = Count() - nPos;
- SearchAttrItem* _pData = (SearchAttrItem*)GetData() + nPos;
+ SearchAttrItem* _pData = (SearchAttrItem*)GetData() + nPos;
- for ( sal_uInt16 n = nLen; n; --n, ++_pData )
- if ( !IsInvalidItem( _pData->pItem ) )
- delete _pData->pItem;
+ for ( sal_uInt16 n = nLen; n; --n, ++_pData )
+ if ( !IsInvalidItem( _pData->pItem ) )
+ delete _pData->pItem;
SrchAttrItemList::Remove( nPos, nLen );
}
@@ -309,52 +306,52 @@ void SearchAttrItemList::Remove( sal_uInt16 nPos,
sal_uInt16 nLen )
aReplaceLB ( this, SVX_RES( ED_REPLACE ) ),
\
aReplaceTmplLB ( this, SVX_RES( LB_REPLACE ) ),
\
aReplaceAttrText( this, SVX_RES( FT_REPLACE_ATTR ) ),
\
- aSearchBtn ( this, SVX_RES( BTN_SEARCH ) ), \
+ aSearchBtn ( this, SVX_RES( BTN_SEARCH ) ),
\
aSearchAllBtn ( this, SVX_RES( BTN_SEARCH_ALL ) ),
\
- aSearchCmdLine ( this, SVX_RES( FL_SEARCH_COMMAND ) ), \
- aReplaceBtn ( this, SVX_RES( BTN_REPLACE ) ), \
- aReplaceAllBtn ( this, SVX_RES( BTN_REPLACE_ALL ) ), \
- aSearchComponentFL( this, SVX_RES( FL_SEARCH_COMPONENT ) ), \
- aSearchComponent1PB( this, SVX_RES( BTN_COMPONENT_1 ) ), \
- aSearchComponent2PB( this, SVX_RES( BTN_COMPONENT_2 ) ), \
- aMatchCaseCB ( this, SVX_RES( CB_MATCH_CASE ) ), \
- aWordBtn ( this, SVX_RES( CB_WHOLE_WORDS ) ), \
- aButtonsFL ( this, SVX_RES( FL_BUTTONS ) ), \
- pMoreBtn ( new MoreButton( this, SVX_RES( BTN_MORE ) ) ), \
- aHelpBtn ( this, SVX_RES( BTN_HELP ) ), \
- aCloseBtn ( this, SVX_RES( BTN_CLOSE ) ), \
- aOptionsFL ( this, SVX_RES( FL_OPTIONS ) ), \
- aSelectionBtn ( this, SVX_RES( CB_SELECTIONS ) ), \
- aBackwardsBtn ( this, SVX_RES( CB_BACKWARDS ) ), \
- aRegExpBtn ( this, SVX_RES( CB_REGEXP ) ), \
- aSimilarityBox ( this, SVX_RES( CB_SIMILARITY) ), \
- aSimilarityBtn ( this, SVX_RES( PB_SIMILARITY) ), \
- aLayoutBtn ( this, SVX_RES( CB_LAYOUTS ) ), \
- aNotesBtn ( this, SVX_RES( CB_NOTES ) ), \
- aJapMatchFullHalfWidthCB( this, SVX_RES( CB_JAP_MATCH_FULL_HALF_WIDTH ) ),\
- aJapOptionsCB ( this, SVX_RES( CB_JAP_SOUNDS_LIKE ) ), \
- aJapOptionsBtn ( this, SVX_RES( PB_JAP_OPTIONS ) ), \
- aAttributeBtn ( this, SVX_RES( BTN_ATTRIBUTE ) ), \
+ aSearchCmdLine ( this, SVX_RES( FL_SEARCH_COMMAND ) ),
\
+ aReplaceBtn ( this, SVX_RES( BTN_REPLACE ) ),
\
+ aReplaceAllBtn ( this, SVX_RES( BTN_REPLACE_ALL ) ),
\
+ aSearchComponentFL( this, SVX_RES( FL_SEARCH_COMPONENT ) ), \
+ aSearchComponent1PB( this, SVX_RES( BTN_COMPONENT_1 ) ), \
+ aSearchComponent2PB( this, SVX_RES( BTN_COMPONENT_2 ) ), \
+ aMatchCaseCB ( this, SVX_RES( CB_MATCH_CASE ) ),
\
+ aWordBtn ( this, SVX_RES( CB_WHOLE_WORDS ) ),
\
+ aButtonsFL ( this, SVX_RES( FL_BUTTONS ) ),
\
+ pMoreBtn ( new MoreButton( this, SVX_RES( BTN_MORE ) ) ),
\
+ aHelpBtn ( this, SVX_RES( BTN_HELP ) ),
\
+ aCloseBtn ( this, SVX_RES( BTN_CLOSE ) ),
\
+ aOptionsFL ( this, SVX_RES( FL_OPTIONS ) ),
\
+ aSelectionBtn ( this, SVX_RES( CB_SELECTIONS ) ),
\
+ aBackwardsBtn ( this, SVX_RES( CB_BACKWARDS ) ),
\
+ aRegExpBtn ( this, SVX_RES( CB_REGEXP ) ),
\
+ aSimilarityBox ( this, SVX_RES( CB_SIMILARITY) ),
\
+ aSimilarityBtn ( this, SVX_RES( PB_SIMILARITY) ),
\
+ aLayoutBtn ( this, SVX_RES( CB_LAYOUTS ) ),
\
+ aNotesBtn ( this, SVX_RES( CB_NOTES ) ),
\
+ aJapMatchFullHalfWidthCB( this, SVX_RES( CB_JAP_MATCH_FULL_HALF_WIDTH )
),\
+ aJapOptionsCB ( this, SVX_RES( CB_JAP_SOUNDS_LIKE ) ),
\
+ aJapOptionsBtn ( this, SVX_RES( PB_JAP_OPTIONS ) ),
\
+ aAttributeBtn ( this, SVX_RES( BTN_ATTRIBUTE ) ),
\
aFormatBtn ( this, SVX_RES( BTN_FORMAT ) ),
\
aNoFormatBtn ( this, SVX_RES( BTN_NOFORMAT ) ),
\
- aCalcFL ( this, SVX_RES( FL_CALC ) ), \
- aCalcSearchInFT ( this, SVX_RES( FT_CALC_SEARCHIN ) ), \
- aCalcSearchInLB ( this, SVX_RES( LB_CALC_SEARCHIN ) ), \
- aCalcSearchDirFT( this, SVX_RES( FT_CALC_SEARCHDIR ) ), \
- aRowsBtn ( this, SVX_RES( RB_CALC_ROWS ) ), \
- aColumnsBtn ( this, SVX_RES( RB_CALC_COLUMNS ) ), \
- aAllSheetsCB ( this, SVX_RES( CB_ALL_SHEETS ) ), \
- rBindings ( rBind ), \
- bWriter ( sal_False ),
\
- bSearch ( sal_True ),
\
+ aCalcFL ( this, SVX_RES( FL_CALC ) ),
\
+ aCalcSearchInFT ( this, SVX_RES( FT_CALC_SEARCHIN ) ),
\
+ aCalcSearchInLB ( this, SVX_RES( LB_CALC_SEARCHIN ) ),
\
+ aCalcSearchDirFT( this, SVX_RES( FT_CALC_SEARCHDIR ) ),
\
+ aRowsBtn ( this, SVX_RES( RB_CALC_ROWS ) ),
\
+ aColumnsBtn ( this, SVX_RES( RB_CALC_COLUMNS ) ),
\
+ aAllSheetsCB ( this, SVX_RES( CB_ALL_SHEETS ) ),
\
+ rBindings ( rBind ),
\
+ bWriter ( sal_False ),
\
+ bSearch ( sal_True ),
\
bFormat ( sal_False ),
\
nOptions ( USHRT_MAX ),
\
bSet ( sal_False ),
\
bReadOnly ( sal_False ),
\
bConstruct ( sal_True ),
\
nModifyFlag ( 0 ),
\
- aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ), \
- pImpl ( NULL ), \
+ aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ),
\
+ pImpl ( NULL ),
\
pSearchList ( NULL ),
\
pReplaceList ( new SearchAttrItemList ),
\
pSearchItem ( NULL ),
\
@@ -423,15 +420,15 @@ SvxSearchDialog::~SvxSearchDialog()
void lcl_MoveDown( Window& rWindow, sal_Int32 nOffset )
{
- Point aPos(rWindow.GetPosPixel());
- aPos.Y() += nOffset;
- rWindow.SetPosPixel(aPos);
+ Point aPos(rWindow.GetPosPixel());
+ aPos.Y() += nOffset;
+ rWindow.SetPosPixel(aPos);
}
void SvxSearchDialog::Construct_Impl()
{
#if ENABLE_LAYOUT
- SetHelpId (".uno:SearchDialog");
+ SetHelpId (".uno:SearchDialog");
#endif /* ENABLE_LAYOUT */
// temporary to avoid incompatibility
@@ -444,8 +441,8 @@ void SvxSearchDialog::Construct_Impl()
EnableControls_Impl( 0 );
// alten Text des aWordBtn's merken
- aCalcStr += sal_Unicode('#');
- aCalcStr += aWordBtn.GetText();
+ aCalcStr += sal_Unicode('#');
+ aCalcStr += aWordBtn.GetText();
aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES );
aStylesStr = aLayoutBtn.GetText();
@@ -456,22 +453,22 @@ void SvxSearchDialog::Construct_Impl()
ListToStrArr_Impl( SID_SEARCHDLG_REPLACESTRINGS,
aReplaceStrings, aReplaceLB );
- pMoreBtn->SetMoreText( String( SVX_RES( STR_MORE_BTN ) ) );
- pMoreBtn->SetLessText( String( SVX_RES( STR_LESS_BTN ) ) );
+ pMoreBtn->SetMoreText( String( SVX_RES( STR_MORE_BTN ) ) );
+ pMoreBtn->SetLessText( String( SVX_RES( STR_LESS_BTN ) ) );
- FreeResource();
+ FreeResource();
InitControls_Impl();
// Attribut-Sets nur einmal im Ctor() besorgen
- const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
+ const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
const SvxSetItem* pSrchSetItem =
- (const SvxSetItem*) rBindings.GetDispatcher()->Execute(
FID_SEARCH_SEARCHSET, SFX_CALLMODE_SLOT, ppArgs );
+ (const SvxSetItem*) rBindings.GetDispatcher()->Execute(
FID_SEARCH_SEARCHSET, SFX_CALLMODE_SLOT, ppArgs );
if ( pSrchSetItem )
InitAttrList_Impl( &pSrchSetItem->GetItemSet(), 0 );
const SvxSetItem* pReplSetItem =
- (const SvxSetItem*)rBindings.GetDispatcher()->Execute(
FID_SEARCH_REPLACESET, SFX_CALLMODE_SLOT, ppArgs );
+ (const SvxSetItem*)rBindings.GetDispatcher()->Execute(
FID_SEARCH_REPLACESET, SFX_CALLMODE_SLOT, ppArgs );
if ( pReplSetItem )
InitAttrList_Impl( 0, &pReplSetItem->GetItemSet() );
@@ -483,7 +480,7 @@ void SvxSearchDialog::Construct_Impl()
pOptionsController =
new SvxSearchController( SID_SEARCH_OPTIONS, rBindings, *this );
rBindings.LeaveRegistrations();
- rBindings.GetDispatcher()->Execute( FID_SEARCH_ON, SFX_CALLMODE_SLOT,
ppArgs );
+ rBindings.GetDispatcher()->Execute( FID_SEARCH_ON, SFX_CALLMODE_SLOT,
ppArgs );
pImpl->aSelectionTimer.Start();
@@ -503,10 +500,10 @@ void SvxSearchDialog::Construct_Impl()
aSimilarityBtn.SetAccessibleRelationMemberOf(&aOptionsFL);
aJapOptionsBtn.SetAccessibleRelationLabeledBy(&aJapOptionsCB);
aJapOptionsBtn.SetAccessibleRelationMemberOf(&aOptionsFL);
- aRowsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
- aColumnsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
+ aRowsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
+ aColumnsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT);
- //component extension - show component search buttons if the commands
+ // component extension - show component search buttons if the commands
// vnd.sun.star::SearchViaComponent1 and 2 are supported
const uno::Reference< frame::XFrame >xFrame = rBindings.GetActiveFrame();
const uno::Reference< frame::XDispatchProvider > xDispatchProv(xFrame,
uno::UNO_QUERY);
@@ -527,7 +524,7 @@ void SvxSearchDialog::Construct_Impl()
if( bSearchComponent1 || bSearchComponent2 )
{
- //get the labels of the FixedLine and the buttons
+ // get the labels of the FixedLine and the buttons
//
"/org.openoffice.Office.Common/SearchOptions/ComponentSearchGroupLabel
//
"/org.openoffice.Office.Common/SearchOptions/ComponentSearchCommandLabel1
//
"/org.openoffice.Office.Common/SearchOptions/ComponentSearchCommandLabel2
@@ -579,7 +576,7 @@ void SvxSearchDialog::Construct_Impl()
if( aSearchComponentFL.IsVisible() && aSearchComponent1PB.IsVisible() )
{
- //dialog must be resized
+ // dialog must be resized
Size aDlgSize(GetSizePixel());
sal_Int32 nOffset = aSearchCmdLine.GetPosPixel().Y() -
aSearchAllBtn.GetPosPixel().Y()
- aButtonsFL.GetPosPixel().Y() +
aSearchComponent2PB.GetPosPixel().Y();
@@ -645,13 +642,13 @@ sal_Bool SvxSearchDialog::Close()
//aOpt.SetMatchCase ( aMatchCaseCB
.IsChecked() );
aOpt.SetSearchForStyles ( aLayoutBtn
.IsChecked() );
aOpt.SetSimilaritySearch ( aSimilarityBox
.IsChecked() );
- //aOpt.SetMatchFullHalfWidthForms (
!aJapMatchFullHalfWidthCB.IsChecked() );
+ //aOpt.SetMatchFullHalfWidthForms (
!aJapMatchFullHalfWidthCB.IsChecked() );
aOpt.SetUseAsianOptions ( aJapOptionsCB
.IsChecked() );
- aOpt.SetNotes ( aNotesBtn .IsChecked()
);
+ aOpt.SetNotes ( aNotesBtn .IsChecked()
);
- const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
- rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SFX_CALLMODE_SLOT,
ppArgs );
- rBindings.Execute( SID_SEARCH_DLG );
+ const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
+ rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SFX_CALLMODE_SLOT,
ppArgs );
+ rBindings.Execute( SID_SEARCH_DLG );
return sal_True;
}
@@ -660,11 +657,11 @@ sal_Bool SvxSearchDialog::Close()
sal_Int32 SvxSearchDialog::GetTransliterationFlags() const
{
- if (!aMatchCaseCB.IsChecked())
+ if (!aMatchCaseCB.IsChecked())
nTransliterationFlags |= TransliterationModules_IGNORE_CASE;
else
nTransliterationFlags &= ~TransliterationModules_IGNORE_CASE;
- if ( !aJapMatchFullHalfWidthCB.IsChecked())
+ if ( !aJapMatchFullHalfWidthCB.IsChecked())
nTransliterationFlags |= TransliterationModules_IGNORE_WIDTH;
else
nTransliterationFlags &= ~TransliterationModules_IGNORE_WIDTH;
@@ -677,9 +674,9 @@ void SvxSearchDialog::ApplyTransliterationFlags_Impl(
sal_Int32 nSettings )
{
nTransliterationFlags = nSettings;
sal_Bool bVal = 0 != (nSettings & TransliterationModules_IGNORE_CASE);
- aMatchCaseCB .Check(!bVal );
+ aMatchCaseCB .Check(!bVal );
bVal = 0 != (nSettings & TransliterationModules_IGNORE_WIDTH);
- aJapMatchFullHalfWidthCB.Check( !bVal );
+ aJapMatchFullHalfWidthCB.Check( !bVal );
}
// -----------------------------------------------------------------------
@@ -691,7 +688,7 @@ void SvxSearchDialog::Activate()
if (pSearchItem)
{
aMatchCaseCB .Check( pSearchItem->GetExact() );
- aJapMatchFullHalfWidthCB.Check(
!pSearchItem->IsMatchFullHalfWidthForms() );
+ aJapMatchFullHalfWidthCB.Check(
!pSearchItem->IsMatchFullHalfWidthForms() );
}
}
@@ -733,16 +730,16 @@ void SvxSearchDialog::InitControls_Impl()
aCloseBtn.SetClickHdl( aLink );
aSimilarityBtn.SetClickHdl( aLink );
aJapOptionsBtn.SetClickHdl( aLink );
- aSearchComponent1PB.SetClickHdl( aLink );
- aSearchComponent2PB.SetClickHdl( aLink );
+ aSearchComponent1PB.SetClickHdl( aLink );
+ aSearchComponent2PB.SetClickHdl( aLink );
aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl );
aWordBtn.SetClickHdl( aLink );
aSelectionBtn.SetClickHdl( aLink );
aMatchCaseCB.SetClickHdl( aLink );
aRegExpBtn.SetClickHdl( aLink );
- aBackwardsBtn.SetClickHdl( aLink );
- aNotesBtn.SetClickHdl( aLink );
+ aBackwardsBtn.SetClickHdl( aLink );
+ aNotesBtn.SetClickHdl( aLink );
aSimilarityBox.SetClickHdl( aLink );
aJapOptionsCB.SetClickHdl( aLink );
aJapMatchFullHalfWidthCB.SetClickHdl( aLink );
@@ -774,7 +771,7 @@ void SvxSearchDialog::InitControls_Impl()
void SvxSearchDialog::CalculateDelta_Impl()
{
- DBG_ASSERT( pSearchItem, "no search item" );
+ DBG_ASSERT( pSearchItem, "no search item" );
bool bDrawApp = false;
bool bCalcApp = false;
@@ -911,8 +908,8 @@ void SvxSearchDialog::CalculateDelta_Impl()
aNewPos.Y() -= nH;
(*pCurrent)->SetPosPixel( aNewPos );
}
- }
- }
+ }
+ }
if ( bCalcApp)
{
@@ -926,9 +923,9 @@ void SvxSearchDialog::CalculateDelta_Impl()
else
nOffset += 64;
- pMoreBtn->SetDelta( nDelta - nOffset );
- pMoreBtn->Show();
- pMoreBtn->Enable();
+ pMoreBtn->SetDelta( nDelta - nOffset );
+ pMoreBtn->Show();
+ pMoreBtn->Enable();
}
#if ENABLE_LAYOUT
@@ -1075,11 +1072,11 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
aAttributeBtn.Show();
*/
}
-// pMoreBtn->SetState( sal_False );
-// pMoreBtn->Hide();
+// pMoreBtn->SetState( sal_False );
+// pMoreBtn->Hide();
}
- if ( 0 && !bDraw ) //!!!!!
+ if ( 0 && !bDraw ) //!!!!!
{
aRegExpBtn.Show();
aLayoutBtn.Show();
@@ -1210,10 +1207,10 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
aSearchAllBtn.Disable();
aReplaceBtn.Disable();
aReplaceAllBtn.Disable();
- aSearchComponentFL.Enable(sal_False);
- aSearchComponent1PB.Enable(sal_False);
- aSearchComponent2PB.Enable(sal_False);
- }
+ aSearchComponentFL.Enable(sal_False);
+ aSearchComponent1PB.Enable(sal_False);
+ aSearchComponent2PB.Enable(sal_False);
+ }
else
{
EnableControl_Impl( &aSearchBtn );
@@ -1320,12 +1317,12 @@ void SvxSearchDialog::InitAttrList_Impl( const
SfxItemSet* pSSet,
IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl )
{
- if ( pCtrl && !bSet )
- SetModifyFlag_Impl( pCtrl );
+ if ( pCtrl && !bSet )
+ SetModifyFlag_Impl( pCtrl );
else
bSet = sal_False;
- if ( pCtrl == &aSimilarityBox )
+ if ( pCtrl == &aSimilarityBox )
{
sal_Bool bIsChecked = aSimilarityBox.IsChecked();
@@ -1418,9 +1415,9 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *,
pCtrl )
}
}
- if ( &aAllSheetsCB == pCtrl )
+ if ( &aAllSheetsCB == pCtrl )
{
- if ( aAllSheetsCB.IsChecked() )
+ if ( aAllSheetsCB.IsChecked() )
aSearchAllBtn.Disable();
else
{
@@ -1429,7 +1426,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *,
pCtrl )
}
}
- if ( &aJapOptionsCB == pCtrl )
+ if ( &aJapOptionsCB == pCtrl )
{
sal_Bool bEnableJapOpt = aJapOptionsCB.IsChecked();
aMatchCaseCB .Enable(!bEnableJapOpt );
@@ -1482,25 +1479,25 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *,
pBtn )
pSearchItem->SetLevenshtein( sal_True );
pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) );
- pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
- pSearchItem->SetNotes( GetCheckBoxValue( aNotesBtn ) );
+ pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
+ pSearchItem->SetNotes( GetCheckBoxValue( aNotesBtn ) );
pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) );
pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) );
pSearchItem->SetUseAsianOptions( GetCheckBoxValue(
aJapOptionsCB ) );
sal_Int32 nFlags = GetTransliterationFlags();
if( !pSearchItem->IsUseAsianOptions())
- nFlags &= (TransliterationModules_IGNORE_CASE |
+ nFlags &= (TransliterationModules_IGNORE_CASE |
TransliterationModules_IGNORE_WIDTH
);
pSearchItem->SetTransliterationFlags( nFlags );
if ( !bWriter )
{
- if ( aCalcSearchInLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND
)
- pSearchItem->SetCellType( aCalcSearchInLB.GetSelectEntryPos()
);
+ if ( aCalcSearchInLB.GetSelectEntryPos() !=
LISTBOX_ENTRY_NOTFOUND )
+ pSearchItem->SetCellType(
aCalcSearchInLB.GetSelectEntryPos() );
pSearchItem->SetRowDirection( aRowsBtn.IsChecked() );
- pSearchItem->SetAllTables( aAllSheetsCB.IsChecked() );
+ pSearchItem->SetAllTables( aAllSheetsCB.IsChecked() );
}
if ( pBtn == &aSearchBtn )
@@ -1522,8 +1519,8 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *,
pBtn )
pReplaceList->Clear();
}
nModifyFlag = 0;
- const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
- rBindings.ExecuteSynchron( FID_SEARCH_NOW, ppArgs, 0L );
+ const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
+ rBindings.ExecuteSynchron( FID_SEARCH_NOW, ppArgs, 0L );
}
else if ( pBtn == &aCloseBtn )
{
@@ -1573,10 +1570,10 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *,
pBtn )
{
SfxItemSet aSet( SFX_APP()->GetPool() );
pSearchItem->SetTransliterationFlags( GetTransliterationFlags()
);
- SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ SvxAbstractDialogFactory* pFact =
SvxAbstractDialogFactory::Create();
if(pFact)
{
- AbstractSvxJSearchOptionsDialog* aDlg =
pFact->CreateSvxJSearchOptionsDialog( LAYOUT_THIS_WINDOW (this), aSet,
+ AbstractSvxJSearchOptionsDialog* aDlg =
pFact->CreateSvxJSearchOptionsDialog( LAYOUT_THIS_WINDOW (this), aSet,
pSearchItem->GetTransliterationFlags()
);
DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001
int nRet = aDlg->Execute(); //CHINA001 int nRet =
aDlg.Execute();
@@ -2276,21 +2273,21 @@ IMPL_LINK( SvxSearchDialog, AttributeHdl_Impl, Button
*, EMPTYARG )
IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer )
{
- SfxViewShell* pViewShell = SfxViewShell::Current();
+ SfxViewShell* pViewShell = SfxViewShell::Current();
- if ( pViewShell )
- {
- if ( pViewShell->HasSelection( aSearchLB.IsVisible() ) )
- EnableControl_Impl( &aSelectionBtn );
- else
- {
- aSelectionBtn.Check( sal_False );
- aSelectionBtn.Disable();
- }
- }
+ if ( pViewShell )
+ {
+ if ( pViewShell->HasSelection( aSearchLB.IsVisible() ) )
+ EnableControl_Impl( &aSelectionBtn );
+ else
+ {
+ aSelectionBtn.Check( sal_False );
+ aSelectionBtn.Disable();
+ }
+ }
- pTimer->Start();
- return 0;
+ pTimer->Start();
+ return 0;
}
// -----------------------------------------------------------------------
@@ -2359,9 +2356,9 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr,
case FUNIT_FOOT:
case FUNIT_MILE: eMapUnit = SFX_MAPUNIT_INCH;
break;
case FUNIT_100TH_MM: eMapUnit = SFX_MAPUNIT_100TH_MM; break;
- default: ;//prevent warning
+ default: ; // prevent warning
}
-
+
ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) );
for ( sal_uInt16 i = 0; i < pList->Count(); ++i )
@@ -2381,14 +2378,14 @@ String& SvxSearchDialog::BuildAttrText_Impl( String&
rStr,
}
else if ( rItem.nSlot == SID_ATTR_BRUSH_CHAR )
{
- //Sonderbehandlung fuer Zeichenhintergrund
+ // Sonderbehandlung für Zeichenhintergrund
rStr += SVX_RESSTR( RID_SVXITEMS_BRUSH_CHAR );
}
else
{
- sal_uInt32 nId = aAttrNames.FindIndex( rItem.nSlot );
- if ( RESARRAY_INDEX_NOTFOUND != nId )
- rStr += aAttrNames.GetString( nId );
+ sal_uInt32 nId = aAttrNames.FindIndex( rItem.nSlot );
+ if ( RESARRAY_INDEX_NOTFOUND != nId )
+ rStr += aAttrNames.GetString( nId );
}
}
return rStr;
@@ -2436,8 +2433,8 @@ void SvxSearchDialog::SetModifyFlag_Impl( const Control*
pCtrl )
nModifyFlag |= MODIFY_EXACT;
else if ( &aBackwardsBtn == (CheckBox*)pCtrl )
nModifyFlag |= MODIFY_BACKWARDS;
- else if ( &aNotesBtn == (CheckBox*)pCtrl )
- nModifyFlag |= MODIFY_NOTES;
+ else if ( &aNotesBtn == (CheckBox*)pCtrl )
+ nModifyFlag |= MODIFY_NOTES;
else if ( &aSelectionBtn == (CheckBox*)pCtrl )
nModifyFlag |= MODIFY_SELECTION;
else if ( &aRegExpBtn == (CheckBox*)pCtrl )
@@ -2446,17 +2443,17 @@ void SvxSearchDialog::SetModifyFlag_Impl( const
Control* pCtrl )
nModifyFlag |= MODIFY_LAYOUT;
else if ( &aSimilarityBox == (CheckBox*)pCtrl )
nModifyFlag |= MODIFY_SIMILARITY;
- else if ( &aCalcSearchInLB == (ListBox*)pCtrl )
- {
+ else if ( &aCalcSearchInLB == (ListBox*)pCtrl )
+ {
nModifyFlag |= MODIFY_FORMULAS;
nModifyFlag |= MODIFY_VALUES;
- nModifyFlag |= MODIFY_CALC_NOTES;
- }
+ nModifyFlag |= MODIFY_CALC_NOTES;
+ }
else if ( &aRowsBtn == (RadioButton*)pCtrl )
nModifyFlag |= MODIFY_ROWS;
else if ( &aColumnsBtn == (RadioButton*)pCtrl )
nModifyFlag |= MODIFY_COLUMNS;
- else if ( &aAllSheetsCB == (CheckBox*)pCtrl )
+ else if ( &aAllSheetsCB == (CheckBox*)pCtrl )
nModifyFlag |= MODIFY_ALLTABLES;
}
@@ -2487,8 +2484,8 @@ void SvxSearchDialog::SaveToModule_Impl()
pSearchItem->SetLevenshtein( sal_True );
pSearchItem->SetWordOnly( GetCheckBoxValue( aWordBtn ) );
- pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
- pSearchItem->SetNotes( GetCheckBoxValue( aNotesBtn ) );
+ pSearchItem->SetBackward( GetCheckBoxValue( aBackwardsBtn ) );
+ pSearchItem->SetNotes( GetCheckBoxValue( aNotesBtn ) );
pSearchItem->SetPattern( GetCheckBoxValue( aLayoutBtn ) );
pSearchItem->SetSelection( GetCheckBoxValue( aSelectionBtn ) );
@@ -2501,30 +2498,30 @@ void SvxSearchDialog::SaveToModule_Impl()
if ( !bWriter )
{
- if ( aCalcSearchInLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
- pSearchItem->SetCellType( aCalcSearchInLB.GetSelectEntryPos() );
+ if ( aCalcSearchInLB.GetSelectEntryPos() !=
LISTBOX_ENTRY_NOTFOUND )
+ pSearchItem->SetCellType(
aCalcSearchInLB.GetSelectEntryPos() );
pSearchItem->SetRowDirection( aRowsBtn.IsChecked() );
- pSearchItem->SetAllTables( aAllSheetsCB.IsChecked() );
+ pSearchItem->SetAllTables( aAllSheetsCB.IsChecked() );
}
pSearchItem->SetCommand( SVX_SEARCHCMD_FIND );
nModifyFlag = 0;
- const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
- rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SFX_CALLMODE_SLOT,
ppArgs );
+ const SfxPoolItem* ppArgs[] = { pSearchItem, 0 };
+ rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SFX_CALLMODE_SLOT,
ppArgs );
}
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
SvxSearchDialog::GetComponentInterface( sal_Bool bCreate )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
xPeer
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
xPeer
(Window::GetComponentInterface(false));
if ( !xPeer.is() && bCreate )
- {
- ::com::sun::star::awt::XWindowPeer* mxPeer = new
VCLXSvxFindReplaceDialog(this);
+ {
+ ::com::sun::star::awt::XWindowPeer* mxPeer = new
VCLXSvxFindReplaceDialog(this);
SetComponentInterface(mxPeer);
return mxPeer;
- }
+ }
else
return xPeer;
}
@@ -2538,10 +2535,10 @@ SFX_IMPL_CHILDWINDOW(SvxSearchDialogWrapper,
SID_SEARCH_DLG);
SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window* _pParent, sal_uInt16
nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo )
- : SfxChildWindow( _pParent, nId )
- , dialog (new SvxSearchDialog (_pParent, this, *pBindings))
+ : SfxChildWindow( _pParent, nId )
+ , dialog (new SvxSearchDialog (_pParent, this, *pBindings))
{
- pWindow = LAYOUT_THIS_WINDOW (dialog);
+ pWindow = LAYOUT_THIS_WINDOW (dialog);
dialog->Initialize( pInfo );
pBindings->Update( SID_SEARCH_ITEM );
@@ -2555,14 +2552,14 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( Window*
_pParent, sal_uInt16 nId
SvxSearchDialogWrapper::~SvxSearchDialogWrapper ()
{
#if ENABLE_LAYOUT
- delete dialog;
- pWindow = 0;
+ delete dialog;
+ pWindow = 0;
#endif /* ENABLE_LAYOUT */
}
SvxSearchDialog *SvxSearchDialogWrapper::getDialog ()
{
- return dialog;
+ return dialog;
}
// -----------------------------------------------------------------------
@@ -2573,3 +2570,5 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
aInfo.bVisible = sal_False;
return aInfo;
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/dialog/stddlg.cxx
b/main/svx/source/dialog/stddlg.cxx
index 4cfb0e3e10..300027e62d 100644
--- a/main/svx/source/dialog/stddlg.cxx
+++ b/main/svx/source/dialog/stddlg.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_svx.hxx"
@@ -34,7 +32,6 @@
// STATIC DATA -----------------------------------------------------------
-
// class SvxStandardDialog -----------------------------------------------
short SvxStandardDialog::Execute()
diff --git a/main/svx/source/dialog/svxdlg.cxx
b/main/svx/source/dialog/svxdlg.cxx
index e690612d7a..906f546ef2 100644
--- a/main/svx/source/dialog/svxdlg.cxx
+++ b/main/svx/source/dialog/svxdlg.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_svx.hxx"
diff --git a/main/svx/source/dialog/swframeexample.cxx
b/main/svx/source/dialog/swframeexample.cxx
index 446e5a44d2..b03c1f38c0 100644
--- a/main/svx/source/dialog/swframeexample.cxx
+++ b/main/svx/source/dialog/swframeexample.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,24 +7,21 @@
* 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"
-
#include <tools/poly.hxx>
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
@@ -42,21 +39,20 @@ using namespace ::com::sun::star::text;
#define DEMOTEXT "Ij"
#define C2S(cChar) UniString::CreateFromAscii(cChar)
-
SvxSwFrameExample::SvxSwFrameExample( Window *pParent, const ResId& rResID ) :
Window(pParent, rResID),
- nHAlign (HoriOrientation::CENTER),
- nHRel (RelOrientation::FRAME),
- nVAlign (VertOrientation::TOP),
- nVRel (RelOrientation::PRINT_AREA),
- nWrap (WrapTextMode_NONE),
- nAnchor (TextContentAnchorType_AT_PAGE),
- bTrans (sal_False),
- aRelPos (Point(0,0))
+ nHAlign (HoriOrientation::CENTER),
+ nHRel (RelOrientation::FRAME),
+ nVAlign (VertOrientation::TOP),
+ nVRel (RelOrientation::PRINT_AREA),
+ nWrap (WrapTextMode_NONE),
+ nAnchor (TextContentAnchorType_AT_PAGE),
+ bTrans (sal_False),
+ aRelPos (Point(0,0))
{
- InitColors_Impl();
+ InitColors_Impl();
SetMapMode(MAP_PIXEL);
}
@@ -75,9 +71,9 @@ void SvxSwFrameExample::InitColors_Impl( void )
m_aAlignColor = Color( COL_LIGHTRED );
m_aTransColor = Color( COL_TRANSPARENT );
- m_aTxtCol = bHC?
- svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR).nColor :
- Color( COL_GRAY ); // old: COL_GRAY
+ m_aTxtCol = bHC?
+ svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR).nColor
:
+ Color( COL_GRAY ); // old: COL_GRAY
m_aPrintAreaCol = bHC? m_aTxtCol : Color( COL_GRAY );
m_aBorderCol = m_aTxtCol;
// old: COL_BLACK;
m_aBlankCol = bHC? m_aTxtCol : Color( COL_LIGHTGRAY );
@@ -89,16 +85,16 @@ void SvxSwFrameExample::DataChanged( const
DataChangedEvent& rDCEvt )
Window::DataChanged( rDCEvt );
if( rDCEvt.GetType() == DATACHANGED_SETTINGS && ( rDCEvt.GetFlags() &
SETTINGS_STYLE ) )
- InitColors_Impl();
+ InitColors_Impl();
}
void SvxSwFrameExample::InitAllRects_Impl()
{
-// const Size aSz(GetOutputSizePixel());
+// const Size aSz(GetOutputSizePixel());
- // Seite
-// aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
- aPage.SetSize( GetOutputSizePixel() );
+ // Page
+// aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
+ aPage.SetSize( GetOutputSizePixel() );
sal_uIntPtr nOutWPix = aPage.GetWidth();
sal_uIntPtr nOutHPix = aPage.GetHeight();
@@ -114,7 +110,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
sal_uIntPtr nTTxtBorder;
sal_uIntPtr nBTxtBorder;
- if (nAnchor != TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
nLBorder = 14;
nRBorder = 10;
@@ -140,7 +136,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
}
aPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix -
1) - nRBorder, (nOutHPix - 1) - nBBorder));
- // Beispiel-Text: Vorbereiten fuer die Textausgabe
+ // Beispiel-Text: Vorbereiten für die Textausgabe
// Eine Textzeile
aTextLine = aPagePrtArea;
aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
@@ -148,21 +144,21 @@ void SvxSwFrameExample::InitAllRects_Impl()
aTextLine.Right() -= nRTxtBorder;
aTextLine.Move(0, nTTxtBorder);
- // Rechteck um Absatz incl. Raender
+ // Rechteck um Absatz incl. Ränder
sal_uInt16 nLines = (sal_uInt16)((aPagePrtArea.GetHeight() / 2 -
nTTxtBorder - nBTxtBorder)
/ (aTextLine.GetHeight() + 2));
aPara = aPagePrtArea;
aPara.SetSize(Size(aPara.GetWidth(),
(aTextLine.GetHeight() + 2) * nLines + nTTxtBorder +
nBTxtBorder));
- // Rechteck um Absatz ohne Raender
+ // Rechteck um Absatz ohne Ränder
aParaPrtArea = aPara;
aParaPrtArea.Left() += nLTxtBorder;
aParaPrtArea.Right() -= nRTxtBorder;
aParaPrtArea.Top() += nTTxtBorder;
aParaPrtArea.Bottom() -= nBTxtBorder;
- if (nAnchor == TextContentAnchorType_AS_CHARACTER || nAnchor ==
TextContentAnchorType_AT_CHARACTER)
+ if (nAnchor == TextContentAnchorType_AS_CHARACTER || nAnchor ==
TextContentAnchorType_AT_CHARACTER)
{
Font aFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_LATIN_TEXT,
Application::GetSettings().GetLanguage(),
@@ -171,7 +167,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
aFont.SetFillColor( m_aBgCol );
aFont.SetWeight(WEIGHT_NORMAL);
- if (nAnchor == TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor == TextContentAnchorType_AS_CHARACTER)
{
aFont.SetSize(Size(0, aParaPrtArea.GetHeight() - 2));
SetFont(aFont);
@@ -187,7 +183,7 @@ void SvxSwFrameExample::InitAllRects_Impl()
}
}
- // Innerer Frame fuer am Frame verankerte Rahmen
+ // Innerer Frame für am Frame verankerte Rahmen
aFrameAtFrame = aPara;
aFrameAtFrame.Left() += 9;
aFrameAtFrame.Right() -= 5;
@@ -195,20 +191,20 @@ void SvxSwFrameExample::InitAllRects_Impl()
aFrameAtFrame.SetPos(Point(aFrameAtFrame.Left() + 2,
(aPagePrtArea.Bottom() - aFrameAtFrame.GetHeight()) / 2 + 5));
// Groesse des zu positionierenden Rahmens
- if (nAnchor != TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
- sal_uIntPtr nLFBorder = nAnchor == TextContentAnchorType_AT_PAGE ?
nLBorder : nLTxtBorder;
- sal_uIntPtr nRFBorder = nAnchor == TextContentAnchorType_AT_PAGE ?
nRBorder : nRTxtBorder;
+ sal_uIntPtr nLFBorder = nAnchor ==
TextContentAnchorType_AT_PAGE ? nLBorder : nLTxtBorder;
+ sal_uIntPtr nRFBorder = nAnchor ==
TextContentAnchorType_AT_PAGE ? nRBorder : nRTxtBorder;
switch (nHRel)
{
- case RelOrientation::PAGE_LEFT:
- case RelOrientation::FRAME_LEFT:
+ case RelOrientation::PAGE_LEFT:
+ case RelOrientation::FRAME_LEFT:
aFrmSize = Size(nLFBorder - 4,
(aTextLine.GetHeight() + 2) * 3);
break;
- case RelOrientation::PAGE_RIGHT:
- case RelOrientation::FRAME_RIGHT:
+ case RelOrientation::PAGE_RIGHT:
+ case RelOrientation::FRAME_RIGHT:
aFrmSize = Size(nRFBorder - 4,
(aTextLine.GetHeight() + 2) * 3);
break;
@@ -234,7 +230,7 @@ void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect)
{
switch (nAnchor)
{
- case TextContentAnchorType_AT_PAGE:
+ case TextContentAnchorType_AT_PAGE:
{
switch (nHRel)
{
@@ -401,7 +397,7 @@ void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle &rRect)
}
break;
- case TextContentAnchorType_AS_CHARACTER:
+ case TextContentAnchorType_AS_CHARACTER:
rRect.Left() = aParaPrtArea.Left();
rRect.Right() = aParaPrtArea.Right();
@@ -444,24 +440,24 @@ void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle
&rRect)
Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(const Rectangle &rRect, const
Color &rFillColor, const Color &rBorderColor)
{
- DrawRect_Impl(rRect, rFillColor, rBorderColor);
+ DrawRect_Impl(rRect, rFillColor, rBorderColor);
// Bereich, zu dem relativ positioniert wird, bestimmen
Rectangle aRect(rRect); // aPagePrtArea = Default
- CalcBoundRect_Impl(aRect);
+ CalcBoundRect_Impl(aRect);
- if (nAnchor == TextContentAnchorType_AT_FRAME && &rRect == &aPagePrtArea)
+ if (nAnchor == TextContentAnchorType_AT_FRAME && &rRect ==
&aPagePrtArea)
{
- // Testabsatz zeichnen
+ // draw test paragraph
Rectangle aTxt(aTextLine);
- sal_Int32 nStep = aTxt.GetHeight() + 2;
+ sal_Int32 nStep = aTxt.GetHeight() + 2;
sal_uInt16 nLines = (sal_uInt16)(aParaPrtArea.GetHeight() /
(aTextLine.GetHeight() + 2));
for (sal_uInt16 i = 0; i < nLines; i++)
{
if (i == nLines - 1)
aTxt.SetSize(Size(aTxt.GetWidth() / 2,
aTxt.GetHeight()));
- DrawRect_Impl(aTxt, m_aTxtCol, m_aTransColor);
+ DrawRect_Impl(aTxt, m_aTxtCol, m_aTransColor);
aTxt.Move(0, nStep);
}
}
@@ -471,28 +467,28 @@ Rectangle SvxSwFrameExample::DrawInnerFrame_Impl(const
Rectangle &rRect, const C
void SvxSwFrameExample::Paint(const Rectangle&)
{
- InitAllRects_Impl();
+ InitAllRects_Impl();
- // Schatten zeichnen
-// Rectangle aShadow(aPage);
-// aShadow += Point(3, 3);
-// DrawRect_Impl(aShadow, Color(COL_GRAY), aTransColor);
+ // draw shadow
+// Rectangle aShadow(aPage);
+// aShadow += Point(3, 3);
+// DrawRect_Impl(aShadow, Color(COL_GRAY), aTransColor);
- // Seite zeichnen
- DrawRect_Impl( aPage, m_aBgCol, m_aBorderCol );
+ // draw page
+ DrawRect_Impl( aPage, m_aBgCol, m_aBorderCol );
- // PrintArea zeichnen
- Rectangle aRect = DrawInnerFrame_Impl( aPagePrtArea, m_aTransColor,
m_aPrintAreaCol );
+ // draw PrintArea
+ Rectangle aRect = DrawInnerFrame_Impl( aPagePrtArea, m_aTransColor,
m_aPrintAreaCol );
- if (nAnchor == TextContentAnchorType_AT_FRAME)
- aRect = DrawInnerFrame_Impl( aFrameAtFrame, m_aBgCol, m_aBorderCol );
+ if (nAnchor == TextContentAnchorType_AT_FRAME)
+ aRect = DrawInnerFrame_Impl( aFrameAtFrame, m_aBgCol,
m_aBorderCol );
long lXPos = 0;
long lYPos = 0;
// Horizontale Ausrichtung
//
- if (nAnchor != TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
switch (nHAlign)
{
@@ -518,11 +514,11 @@ void SvxSwFrameExample::Paint(const Rectangle&)
}
}
else
- lXPos = aRect.Right() + 2;
+ lXPos = aRect.Right() + 2;
// Vertikale Ausrichtung
//
- if (nAnchor != TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
switch (nVAlign)
{
@@ -598,7 +594,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
Rectangle *pOuterFrame = &aPage;
- if (nAnchor == TextContentAnchorType_AT_FRAME)
+ if (nAnchor == TextContentAnchorType_AT_FRAME)
pOuterFrame = &aFrameAtFrame;
if (aFrmRect.Left() < pOuterFrame->Left())
@@ -611,13 +607,13 @@ void SvxSwFrameExample::Paint(const Rectangle&)
if (aFrmRect.Bottom() > pOuterFrame->Bottom())
aFrmRect.Move(0, pOuterFrame->Bottom() - aFrmRect.Bottom());
- // Testabsatz zeichnen
+ // draw test paragraph
const long nTxtLineHeight = aTextLine.GetHeight();
Rectangle aTxt(aTextLine);
- sal_Int32 nStep;
- sal_uInt16 nLines;
+ sal_Int32 nStep;
+ sal_uInt16 nLines;
- if (nAnchor == TextContentAnchorType_AT_FRAME)
+ if (nAnchor == TextContentAnchorType_AT_FRAME)
{
aTxt.Left() = aFrameAtFrame.Left() + FLYINFLY_BORDER;
aTxt.Right() = aFrameAtFrame.Right() - FLYINFLY_BORDER;
@@ -634,15 +630,15 @@ void SvxSwFrameExample::Paint(const Rectangle&)
nLines = (sal_uInt16)(aParaPrtArea.GetHeight() /
(aTextLine.GetHeight() + 2));
}
- if (nAnchor != TextContentAnchorType_AS_CHARACTER)
+ if (nAnchor != TextContentAnchorType_AS_CHARACTER)
{
// Text simulieren
//
const long nOldR = aTxt.Right();
const long nOldL = aTxt.Left();
- // OD 12.11.2003 #i22341#
- const bool bIgnoreWrap = nAnchor == TextContentAnchorType_AT_CHARACTER
&&
+ // OD 12.11.2003 #i22341#
+ const bool bIgnoreWrap = nAnchor ==
TextContentAnchorType_AT_CHARACTER &&
( nHRel == RelOrientation::CHAR || nVRel ==
RelOrientation::CHAR ||
nVRel == RelOrientation::TEXT_LINE );
@@ -651,7 +647,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
if (i == (nLines - 1))
aTxt.SetSize(Size(aTxt.GetWidth() / 2,
aTxt.GetHeight()));
- if (aTxt.IsOver(aFrmRect) && nAnchor !=
TextContentAnchorType_AS_CHARACTER && !bIgnoreWrap)
+ if (aTxt.IsOver(aFrmRect) && nAnchor !=
TextContentAnchorType_AS_CHARACTER && !bIgnoreWrap)
{
switch(nWrap)
{
@@ -680,7 +676,7 @@ void SvxSwFrameExample::Paint(const Rectangle&)
if (nAnchor != TextContentAnchorType_AT_FRAME && aTxt.Bottom() >
aParaPrtArea.Bottom())
{
- // Text wurde durch Rahmen verdraengt, daher Para-Hoehe
anpassen
+ // Text wurde durch Rahmen verdrängt, daher Para-Höhe
anpassen
sal_uIntPtr nDiff = aTxt.Bottom() -
aParaPrtArea.Bottom();
aParaPrtArea.Bottom() += nDiff;
aPara.Bottom() += nDiff;
@@ -728,3 +724,5 @@ void SvxSwFrameExample::DrawRect_Impl(const Rectangle
&rRect, const Color &rFill
SetLineColor(rLineColor);
Window::DrawRect(rRect);
}
+
+/* vim: set noet sw=4 ts=4: */