summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/dbggui.cxx16
-rw-r--r--vcl/source/app/dndhelp.cxx4
-rw-r--r--vcl/source/app/help.cxx38
-rw-r--r--vcl/source/app/i18nhelp.cxx14
-rw-r--r--vcl/source/app/idlemgr.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/app/session.cxx40
-rwxr-xr-xvcl/source/app/settings.cxx82
-rw-r--r--vcl/source/app/sound.cxx2
-rw-r--r--vcl/source/app/stdtext.cxx2
-rw-r--r--vcl/source/app/svapp.cxx120
-rw-r--r--vcl/source/app/svdata.cxx42
-rw-r--r--vcl/source/app/svmain.cxx18
-rw-r--r--vcl/source/app/svmainhook.cxx4
-rw-r--r--vcl/source/app/timer.cxx78
-rw-r--r--vcl/source/app/unohelp.cxx14
-rw-r--r--vcl/source/app/unohelp2.cxx6
-rw-r--r--vcl/source/app/vclevent.cxx6
-rw-r--r--vcl/source/components/display.cxx6
-rw-r--r--vcl/source/components/dtranscomp.cxx66
-rw-r--r--vcl/source/components/factory.cxx4
-rw-r--r--vcl/source/components/fontident.cxx6
-rw-r--r--vcl/source/control/button.cxx120
-rw-r--r--vcl/source/control/combobox.cxx74
-rw-r--r--vcl/source/control/ctrl.cxx18
-rw-r--r--vcl/source/control/edit.cxx166
-rw-r--r--vcl/source/control/field.cxx73
-rw-r--r--vcl/source/control/field2.cxx44
-rw-r--r--vcl/source/control/fixbrd.cxx18
-rw-r--r--vcl/source/control/fixed.cxx74
-rw-r--r--vcl/source/control/group.cxx32
-rw-r--r--vcl/source/control/ilstbox.cxx220
-rw-r--r--vcl/source/control/imgctrl.cxx4
-rw-r--r--vcl/source/control/longcurr.cxx68
-rw-r--r--vcl/source/control/lstbox.cxx50
-rw-r--r--vcl/source/control/menubtn.cxx30
-rw-r--r--vcl/source/control/morebtn.cxx16
-rw-r--r--vcl/source/control/scrbar.cxx68
-rw-r--r--vcl/source/control/slider.cxx228
-rw-r--r--vcl/source/control/spinbtn.cxx4
-rw-r--r--vcl/source/control/spinfld.cxx40
-rw-r--r--vcl/source/control/tabctrl.cxx62
-rw-r--r--vcl/source/fontsubset/cff.cxx898
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx30
-rw-r--r--vcl/source/fontsubset/gsub.cxx6
-rw-r--r--vcl/source/fontsubset/gsub.h4
-rw-r--r--vcl/source/fontsubset/list.c2
-rw-r--r--vcl/source/fontsubset/sft.cxx46
-rw-r--r--vcl/source/fontsubset/ttcr.cxx98
-rw-r--r--vcl/source/fontsubset/ttcr.hxx8
-rw-r--r--vcl/source/fontsubset/xlat.cxx20
-rw-r--r--vcl/source/fontsubset/xlat.hxx2
-rw-r--r--vcl/source/gdi/alpha.cxx84
-rw-r--r--vcl/source/gdi/animate.cxx110
-rw-r--r--vcl/source/gdi/base14.cxx4
-rw-r--r--vcl/source/gdi/bitmap.cxx454
-rw-r--r--vcl/source/gdi/bitmap2.cxx268
-rw-r--r--vcl/source/gdi/bitmap3.cxx566
-rw-r--r--vcl/source/gdi/bitmap4.cxx302
-rw-r--r--vcl/source/gdi/bitmapex.cxx88
-rw-r--r--vcl/source/gdi/bmpacc.cxx70
-rw-r--r--vcl/source/gdi/bmpacc2.cxx10
-rw-r--r--vcl/source/gdi/bmpacc3.cxx116
-rw-r--r--vcl/source/gdi/bmpconv.cxx20
-rw-r--r--vcl/source/gdi/bmpfast.cxx4
-rw-r--r--vcl/source/gdi/configsettings.cxx10
-rw-r--r--vcl/source/gdi/cvtgrf.cxx38
-rw-r--r--vcl/source/gdi/cvtsvm.cxx422
-rw-r--r--vcl/source/gdi/extoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/font.cxx152
-rw-r--r--vcl/source/gdi/gdimtf.cxx571
-rw-r--r--vcl/source/gdi/gfxlink.cxx52
-rw-r--r--vcl/source/gdi/gradient.cxx6
-rw-r--r--vcl/source/gdi/graph.cxx12
-rw-r--r--vcl/source/gdi/graphictools.cxx82
-rw-r--r--vcl/source/gdi/hatch.cxx28
-rw-r--r--vcl/source/gdi/image.cxx92
-rw-r--r--vcl/source/gdi/imagerepository.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx62
-rw-r--r--vcl/source/gdi/impanmvw.hxx72
-rw-r--r--vcl/source/gdi/impbmp.cxx10
-rw-r--r--vcl/source/gdi/impgraph.cxx222
-rw-r--r--vcl/source/gdi/impimage.cxx42
-rw-r--r--vcl/source/gdi/impimagetree.cxx2
-rw-r--r--vcl/source/gdi/impprn.cxx92
-rw-r--r--vcl/source/gdi/impvect.cxx274
-rw-r--r--vcl/source/gdi/impvect.hxx24
-rw-r--r--vcl/source/gdi/jobset.cxx132
-rw-r--r--vcl/source/gdi/lineinfo.cxx48
-rw-r--r--vcl/source/gdi/mapmod.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx510
-rw-r--r--vcl/source/gdi/metric.cxx26
-rw-r--r--vcl/source/gdi/octree.cxx10
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx4
-rw-r--r--vcl/source/gdi/outdev.cxx300
-rw-r--r--vcl/source/gdi/outdev2.cxx394
-rw-r--r--vcl/source/gdi/outdev3.cxx104
-rw-r--r--vcl/source/gdi/outdev4.cxx336
-rw-r--r--vcl/source/gdi/outdev5.cxx24
-rw-r--r--vcl/source/gdi/outdev6.cxx194
-rw-r--r--vcl/source/gdi/outdevnative.cxx8
-rw-r--r--vcl/source/gdi/outmap.cxx338
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx90
-rw-r--r--vcl/source/gdi/pdffontcache.cxx2
-rw-r--r--vcl/source/gdi/pdffontcache.hxx12
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx1074
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx480
-rw-r--r--vcl/source/gdi/pngread.cxx226
-rw-r--r--vcl/source/gdi/pngwrite.cxx166
-rw-r--r--vcl/source/gdi/polyscan.cxx54
-rw-r--r--vcl/source/gdi/print.cxx190
-rw-r--r--vcl/source/gdi/print2.cxx194
-rwxr-xr-xvcl/source/gdi/print3.cxx242
-rw-r--r--vcl/source/gdi/regband.cxx180
-rw-r--r--vcl/source/gdi/region.cxx178
-rwxr-xr-xvcl/source/gdi/salgdilayout.cxx106
-rwxr-xr-xvcl/source/gdi/sallayout.cxx20
-rw-r--r--vcl/source/gdi/salmisc.cxx106
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx24
-rw-r--r--vcl/source/gdi/svcompat.cxx2
-rw-r--r--vcl/source/gdi/textlayout.cxx2
-rw-r--r--vcl/source/gdi/virdev.cxx54
-rw-r--r--vcl/source/gdi/wall.cxx76
-rw-r--r--vcl/source/glyphs/gcach_ftyp.cxx28
-rw-r--r--vcl/source/glyphs/gcach_ftyp.hxx8
-rw-r--r--vcl/source/glyphs/gcach_layout.cxx20
-rw-r--r--vcl/source/glyphs/gcach_rbmp.cxx4
-rw-r--r--vcl/source/glyphs/gcach_vdev.cxx124
-rw-r--r--vcl/source/glyphs/gcach_vdev.hxx24
-rw-r--r--vcl/source/glyphs/glyphcache.cxx8
-rw-r--r--vcl/source/glyphs/graphite_adaptors.cxx2
-rw-r--r--vcl/source/glyphs/graphite_cache.cxx2
-rw-r--r--vcl/source/glyphs/graphite_features.cxx4
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx75
-rw-r--r--vcl/source/glyphs/graphite_serverfont.cxx2
-rw-r--r--vcl/source/glyphs/graphite_textsrc.cxx2
-rw-r--r--vcl/source/glyphs/graphite_textsrc.hxx4
-rw-r--r--vcl/source/helper/canvasbitmap.cxx156
-rw-r--r--vcl/source/helper/canvastools.cxx60
-rw-r--r--vcl/source/helper/evntpost.cxx2
-rw-r--r--vcl/source/helper/lazydelete.cxx6
-rwxr-xr-xvcl/source/helper/smartid.cxx6
-rw-r--r--vcl/source/helper/strhelper.cxx34
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/source/helper/xconnection.cxx6
-rw-r--r--vcl/source/salmain/salmain.cxx2
-rw-r--r--vcl/source/src/btntext.src16
-rw-r--r--vcl/source/src/helptext.src2
-rw-r--r--vcl/source/src/images.src2
-rw-r--r--vcl/source/src/menu.src24
-rw-r--r--vcl/source/src/print.src30
-rw-r--r--vcl/source/src/stdtext.src2
-rw-r--r--vcl/source/src/units.src5
-rw-r--r--vcl/source/window/abstdlg.cxx2
-rw-r--r--vcl/source/window/accel.cxx82
-rw-r--r--vcl/source/window/accmgr.cxx4
-rw-r--r--vcl/source/window/arrange.cxx44
-rw-r--r--vcl/source/window/brdwin.cxx408
-rw-r--r--vcl/source/window/btndlg.cxx70
-rw-r--r--vcl/source/window/cmdevt.cxx34
-rw-r--r--vcl/source/window/cursor.cxx104
-rw-r--r--vcl/source/window/decoview.cxx176
-rw-r--r--vcl/source/window/dialog.cxx16
-rw-r--r--vcl/source/window/dlgctrl.cxx38
-rw-r--r--vcl/source/window/dndevdis.cxx18
-rw-r--r--vcl/source/window/dndlcon.cxx74
-rw-r--r--vcl/source/window/dockingarea.cxx14
-rw-r--r--vcl/source/window/dockmgr.cxx80
-rw-r--r--vcl/source/window/dockwin.cxx36
-rw-r--r--vcl/source/window/floatwin.cxx52
-rw-r--r--vcl/source/window/introwin.cxx2
-rw-r--r--vcl/source/window/javachild.cxx58
-rw-r--r--vcl/source/window/keycod.cxx8
-rw-r--r--vcl/source/window/keyevent.cxx10
-rw-r--r--vcl/source/window/menu.cxx340
-rw-r--r--vcl/source/window/mnemonic.cxx12
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
-rw-r--r--vcl/source/window/mouseevent.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx78
-rw-r--r--vcl/source/window/popupmenuwindow.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx318
-rw-r--r--vcl/source/window/scrwnd.cxx2
-rw-r--r--vcl/source/window/scrwnd.hxx80
-rw-r--r--vcl/source/window/seleng.cxx25
-rw-r--r--vcl/source/window/split.cxx54
-rw-r--r--vcl/source/window/splitwin.cxx832
-rw-r--r--vcl/source/window/status.cxx184
-rw-r--r--vcl/source/window/syschild.cxx2
-rw-r--r--vcl/source/window/syswin.cxx24
-rw-r--r--vcl/source/window/tabdlg.cxx76
-rw-r--r--vcl/source/window/tabpage.cxx4
-rw-r--r--vcl/source/window/taskpanelist.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx78
-rw-r--r--vcl/source/window/toolbox2.cxx290
-rw-r--r--vcl/source/window/window.cxx46
-rw-r--r--vcl/source/window/window2.cxx276
-rw-r--r--vcl/source/window/window3.cxx2
-rw-r--r--vcl/source/window/winproc.cxx14
-rw-r--r--vcl/source/window/wrkwin.cxx8
200 files changed, 9161 insertions, 8962 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index dd9a5b4a15ee..6f014cebc1f7 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -625,9 +625,9 @@ BOOL DbgWindow::Close()
// remember window position
ByteString aState( GetWindowState() );
DbgData* pData = DbgGetData();
- strncpy( pData->aDbgWinState,
- aState.GetBuffer(),
- std::min( sizeof( pData->aDbgWinState ),
+ strncpy( pData->aDbgWinState,
+ aState.GetBuffer(),
+ std::min( sizeof( pData->aDbgWinState ),
size_t(aState.Len() + 1U )) );
pData->aDbgWinState[ sizeof( pData->aDbgWinState ) - 1 ] = 0;
// and save for next session
@@ -997,7 +997,7 @@ DbgDialog::DbgDialog() :
maOverwrite.SetPosSizePixel( LogicToPixel( Point( 205, 130 ), aAppMap ),
aButtonSize );
}
-
+
{
maHookOSLBox.Show();
maHookOSLBox.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "Reroute osl debug ~messages" ) ) );
@@ -1525,7 +1525,7 @@ void DbgDialogTest( Window* pWindow )
"%s should have a mnemonic char (~): %s",
pClass,
ByteString( aErrorText, RTL_TEXTENCODING_UTF8 ).GetBuffer() );
-
+
// check text width
int aWidth=0;
switch( pChild->GetType() )
@@ -1574,7 +1574,7 @@ void DbgDialogTest( Window* pWindow )
int aWidth=0;
if( nAccelPos != STRING_NOTFOUND )
{
- aWidth = pChild->GetTextWidth( aText, 0, nAccelPos ) +
+ aWidth = pChild->GetTextWidth( aText, 0, nAccelPos ) +
pChild->GetTextWidth( aText, nAccelPos+1, aText.Len() - nAccelPos - 1);
}
else
@@ -1798,7 +1798,7 @@ class DbgMessageBox : public ErrorBox
SetText( String( RTL_CONSTASCII_USTRINGPARAM("Debug Output") ) );
AddButton( String( RTL_CONSTASCII_USTRINGPARAM( "Copy" ) ), COPY_BUTTON_ID, 0 );
}
-
+
virtual void Click()
{
if( GetCurButtonId() == COPY_BUTTON_ID )
diff --git a/vcl/source/app/dndhelp.cxx b/vcl/source/app/dndhelp.cxx
index d1eb2014b4df..ff7a4833a916 100644
--- a/vcl/source/app/dndhelp.cxx
+++ b/vcl/source/app/dndhelp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -90,7 +90,7 @@ vcl::unohelper::DragAndDropWrapper::DragAndDropWrapper( DragAndDropClient* pClie
vcl::unohelper::DragAndDropWrapper::~DragAndDropWrapper()
{
}
-
+
// uno::XInterface
uno::Any vcl::unohelper::DragAndDropWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException)
{
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 1f9efa7b6e65..9c5ed77082c6 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,15 +40,15 @@
// =======================================================================
-#define HELPWINSTYLE_QUICK 0
-#define HELPWINSTYLE_BALLOON 1
+#define HELPWINSTYLE_QUICK 0
+#define HELPWINSTYLE_BALLOON 1
-#define HELPTEXTMARGIN_QUICK 3
-#define HELPTEXTMARGIN_BALLOON 6
+#define HELPTEXTMARGIN_QUICK 3
+#define HELPTEXTMARGIN_BALLOON 6
-#define HELPDELAY_NORMAL 1
-#define HELPDELAY_SHORT 2
-#define HELPDELAY_NONE 3
+#define HELPDELAY_NORMAL 1
+#define HELPDELAY_SHORT 2
+#define HELPDELAY_NONE 3
// =======================================================================
@@ -124,8 +124,8 @@ BOOL Help::StartContextHelp()
Window* pWindow = pSVData->maWinData.mpFocusWin;
if ( pWindow )
{
- Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
- HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
+ Point aMousePos = pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() );
+ HelpEvent aHelpEvent( aMousePos, HELPMODE_CONTEXT );
pWindow->RequestHelp( aHelpEvent );
return TRUE;
}
@@ -321,7 +321,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const XubString& rText, USHORT
mnHelpWinStyle = nHelpWinStyle;
mnStyle = nStyle;
// on windows this will raise the application window, because help windows are system windows now
-// EnableAlwaysOnTop();
+// EnableAlwaysOnTop();
EnableSaveBackground();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -396,9 +396,9 @@ void HelpTextWindow::SetHelpText( const String& rHelpText )
}
else // HELPWINSTYLE_BALLOON
{
- Point aTmpPoint;
- USHORT nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
- XubString aXXX;
+ Point aTmpPoint;
+ USHORT nCharsInLine = 35 + ((maHelpText.Len()/100)*5);
+ XubString aXXX;
aXXX.Fill( nCharsInLine, 'x' ); // Durchschnittliche Breite, damit nicht jedes Fenster anders.
long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
@@ -634,7 +634,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
ULONG nCurTime = Time::GetSystemTicks();
if( (nCurTime - pSVData->maHelpData.mnLastHelpHideTime) < pParent->GetSettings().GetHelpSettings().GetTipDelay() )
nDelayMode = HELPDELAY_NONE;
-
+
DBG_ASSERT( !pHelpWin, "Noch ein HelpWin ?!" );
pHelpWin = new HelpTextWindow( pParent, rHelpText, nHelpWinStyle, nStyle );
pSVData->maHelpData.mpHelpWin = pHelpWin;
@@ -642,7 +642,7 @@ void ImplShowHelpWindow( Window* pParent, USHORT nHelpWinStyle, USHORT nStyle,
if ( pHelpArea )
pHelpWin->SetHelpArea( *pHelpArea );
- // positioning
+ // positioning
Size aSz = pHelpWin->CalcOutSize();
pHelpWin->SetOutputSizePixel( aSz );
ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, rScreenPos, pHelpArea );
@@ -680,9 +680,9 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
void ImplSetHelpWindowPos( Window* pHelpWin, USHORT nHelpWinStyle, USHORT nStyle,
const Point& rPos, const Rectangle* pHelpArea )
{
- Point aPos = rPos;
- Size aSz = pHelpWin->GetSizePixel();
- Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
+ Point aPos = rPos;
+ Size aSz = pHelpWin->GetSizePixel();
+ Rectangle aScreenRect = pHelpWin->ImplGetFrameWindow()->GetDesktopRectPixel();
aPos = pHelpWin->GetParent()->ImplGetFrameWindow()->OutputToAbsoluteScreenPixel( aPos );
// get mouse screen coords
Point mPos( pHelpWin->GetParent()->ImplGetFrameWindow()->GetPointerPosPixel() );
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 17bc760ff5fc..3d7e4df204b8 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -86,16 +86,16 @@ LocaleDataWrapper& vcl::I18nHelper::ImplGetLocaleDataWrapper() const
return *mpLocaleDataWrapper;
}
-const ::com::sun::star::lang::Locale& vcl::I18nHelper::getLocale() const
+const ::com::sun::star::lang::Locale& vcl::I18nHelper::getLocale() const
{
- return maLocale;
+ return maLocale;
}
inline bool is_formatting_mark( sal_Unicode c )
{
- if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers
+ if( (c >= 0x200B) && (c <= 0x200F) ) // BiDi and zero-width-markers
return true;
- if( (c >= 0x2028) && (c <= 0x202E) ) // BiDi and paragraph-markers
+ if( (c >= 0x2028) && (c <= 0x202E) ) // BiDi and paragraph-markers
return true;
return false;
}
@@ -104,7 +104,7 @@ inline bool is_formatting_mark( sal_Unicode c )
the transliteration. The real solution would have been an additional TransliterationModule
to ignore these marks during transliteration; however changin the code in i18npool that actually
implements this could produce unwanted side effects.
-
+
Of course this copying around is not really good, but looking at i18npool, one more time
will not hurt.
*/
@@ -135,7 +135,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt
((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL;
}
-
+
String aStr1( filterFormattingChars(rStr1) );
String aStr2( filterFormattingChars(rStr2) );
return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 );
diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx
index 0318bc5d6f2d..a92474d2fff5 100644
--- a/vcl/source/app/idlemgr.cxx
+++ b/vcl/source/app/idlemgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9a2404d36740..200a0241ebf9 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index c65eb13224e1..6eb70505fd23 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,10 +52,10 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
{
struct Listener
{
- Reference< XSessionManagerListener > m_xListener;
- bool m_bInteractionRequested;
- bool m_bInteractionDone;
- bool m_bSaveDone;
+ Reference< XSessionManagerListener > m_xListener;
+ bool m_bInteractionRequested;
+ bool m_bInteractionDone;
+ bool m_bSaveDone;
Listener( const Reference< XSessionManagerListener >& xListener )
: m_xListener( xListener ),
@@ -65,13 +65,13 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
{}
};
- std::list< Listener > m_aListeners;
- SalSession* m_pSession;
- osl::Mutex m_aMutex;
- bool m_bInteractionRequested;
- bool m_bInteractionGranted;
- bool m_bInteractionDone;
- bool m_bSaveDone;
+ std::list< Listener > m_aListeners;
+ SalSession* m_pSession;
+ osl::Mutex m_aMutex;
+ bool m_bInteractionRequested;
+ bool m_bInteractionGranted;
+ bool m_bInteractionDone;
+ bool m_bSaveDone;
static void SalSessionEventProc( SalSessionEvent* pEvent );
static VCLSession* pOneInstance;
@@ -83,7 +83,7 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient
public:
VCLSession();
virtual ~VCLSession();
-
+
virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
@@ -135,7 +135,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable )
// without session we assume UI is always possible,
// so it was reqeusted and granted
m_bInteractionRequested = m_bInteractionGranted = m_pSession ? false : true;
-
+
// answer the session manager even if no listeners available anymore
DBG_ASSERT( ! aListeners.empty(), "saveRequested but no listeners !" );
if( aListeners.empty() )
@@ -177,7 +177,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
ULONG nAcquireCount = Application::ReleaseSolarMutex();
for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it )
it->m_xListener->approveInteraction( bInteractionGranted );
-
+
Application::AcquireSolarMutex( nAcquireCount );
}
@@ -247,7 +247,7 @@ void VCLSession::SalSessionEventProc( SalSessionEvent* pEvent )
void SAL_CALL VCLSession::addSessionManagerListener( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
{
osl::MutexGuard aGuard( m_aMutex );
-
+
m_aListeners.push_back( Listener( xListener ) );
}
@@ -265,7 +265,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( const Reference<XSession
}
else
++it;
- }
+ }
}
void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException )
@@ -289,8 +289,8 @@ void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListe
{
if( it->m_xListener == xListener )
{
- it->m_bInteractionRequested = true;
- it->m_bInteractionDone = false;
+ it->m_bInteractionRequested = true;
+ it->m_bInteractionDone = false;
}
}
}
@@ -364,6 +364,6 @@ Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XM
ImplSVData* pSVData = ImplGetSVData();
if( ! pSVData->xSMClient.is() )
pSVData->xSMClient = new VCLSession();
-
+
return Reference< XInterface >(pSVData->xSMClient, UNO_QUERY );
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 7f97ba2d8720..a1a175f5f7e1 100755
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -429,10 +429,10 @@ ImplStyleData::ImplStyleData()
mnSelectionOptions = 0;
mnDisplayOptions = 0;
mnOptions = 0;
- mnAutoMnemonic = 1;
- mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
- mnSymbolsStyle = STYLE_SYMBOLS_AUTO;
- mnPreferredSymbolsStyle = STYLE_SYMBOLS_AUTO;
+ mnAutoMnemonic = 1;
+ mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN;
+ mnSymbolsStyle = STYLE_SYMBOLS_AUTO;
+ mnPreferredSymbolsStyle = STYLE_SYMBOLS_AUTO;
mpFontOptions = NULL;
SetStandardStyles();
@@ -530,16 +530,16 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
mnSelectionOptions = rData.mnSelectionOptions;
mnDisplayOptions = rData.mnDisplayOptions;
mnOptions = rData.mnOptions;
- mnHighContrast = rData.mnHighContrast;
- mnUseSystemUIFonts = rData.mnUseSystemUIFonts;
- mnUseFlatBorders = rData.mnUseFlatBorders;
- mnUseFlatMenues = rData.mnUseFlatMenues;
- mnAutoMnemonic = rData.mnAutoMnemonic;
- mnUseImagesInMenus = rData.mnUseImagesInMenus;
- mnSkipDisabledInMenus = rData.mnSkipDisabledInMenus;
- mnToolbarIconSize = rData.mnToolbarIconSize;
- mnSymbolsStyle = rData.mnSymbolsStyle;
- mnPreferredSymbolsStyle = rData.mnPreferredSymbolsStyle;
+ mnHighContrast = rData.mnHighContrast;
+ mnUseSystemUIFonts = rData.mnUseSystemUIFonts;
+ mnUseFlatBorders = rData.mnUseFlatBorders;
+ mnUseFlatMenues = rData.mnUseFlatMenues;
+ mnAutoMnemonic = rData.mnAutoMnemonic;
+ mnUseImagesInMenus = rData.mnUseImagesInMenus;
+ mnSkipDisabledInMenus = rData.mnSkipDisabledInMenus;
+ mnToolbarIconSize = rData.mnToolbarIconSize;
+ mnSymbolsStyle = rData.mnSymbolsStyle;
+ mnPreferredSymbolsStyle = rData.mnPreferredSymbolsStyle;
mpFontOptions = rData.mpFontOptions;
}
@@ -562,8 +562,8 @@ void ImplStyleData::SetStandardStyles()
maPushButtonFont = aStdFont;
maFieldFont = aStdFont;
maIconFont = aStdFont;
- maFloatTitleFont = aStdFont;
aStdFont.SetWeight( WEIGHT_BOLD );
+ maFloatTitleFont = aStdFont;
maTitleFont = aStdFont;
maFaceColor = Color( COL_LIGHTGRAY );
@@ -612,7 +612,7 @@ void ImplStyleData::SetStandardStyles()
maLinkColor = Color( COL_BLUE );
maVisitedLinkColor = Color( 0x00, 0x00, 0xCC );
maHighlightLinkColor = Color( COL_LIGHTBLUE );
- maFontColor = Color( COL_BLACK );
+ maFontColor = Color( COL_BLACK );
mnRadioButtonStyle &= ~STYLE_RADIOBUTTON_STYLE;
mnCheckBoxStyle &= ~STYLE_CHECKBOX_STYLE;
@@ -625,12 +625,12 @@ void ImplStyleData::SetStandardStyles()
mnFloatTitleHeight = 13;
mnTearOffTitleHeight = 8;
mnMenuBarHeight = 14;
- mnHighContrast = 0;
- mnUseSystemUIFonts = 1;
- mnUseFlatBorders = 0;
- mnUseFlatMenues = 0;
- mnUseImagesInMenus = (USHORT)TRUE;
- mnSkipDisabledInMenus = (USHORT)FALSE;
+ mnHighContrast = 0;
+ mnUseSystemUIFonts = 1;
+ mnUseFlatBorders = 0;
+ mnUseFlatMenues = 0;
+ mnUseImagesInMenus = (USHORT)TRUE;
+ mnSkipDisabledInMenus = (USHORT)FALSE;
Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
maWorkspaceGradient = Wallpaper( aGrad );
@@ -1012,7 +1012,7 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
return TRUE;
if ( (mpData->mnOptions == rSet.mpData->mnOptions) &&
- (mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) &&
+ (mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) &&
(mpData->mnLogoDisplayTime == rSet.mpData->mnLogoDisplayTime) &&
(mpData->mnDragFullOptions == rSet.mpData->mnDragFullOptions) &&
(mpData->mnAnimationOptions == rSet.mpData->mnAnimationOptions) &&
@@ -1038,10 +1038,10 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnCheckBoxStyle == rSet.mpData->mnCheckBoxStyle) &&
(mpData->mnPushButtonStyle == rSet.mpData->mnPushButtonStyle) &&
(mpData->mnTabControlStyle == rSet.mpData->mnTabControlStyle) &&
- (mpData->mnHighContrast == rSet.mpData->mnHighContrast) &&
- (mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) &&
- (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) &&
- (mpData->mnUseFlatMenues == rSet.mpData->mnUseFlatMenues) &&
+ (mpData->mnHighContrast == rSet.mpData->mnHighContrast) &&
+ (mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) &&
+ (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) &&
+ (mpData->mnUseFlatMenues == rSet.mpData->mnUseFlatMenues) &&
(mpData->maFaceColor == rSet.mpData->maFaceColor) &&
(mpData->maCheckedColor == rSet.mpData->maCheckedColor) &&
(mpData->maLightColor == rSet.mpData->maLightColor) &&
@@ -1098,10 +1098,10 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->maRadioCheckFont == rSet.mpData->maRadioCheckFont) &&
(mpData->maPushButtonFont == rSet.mpData->maPushButtonFont) &&
(mpData->maFieldFont == rSet.mpData->maFieldFont) &&
- (mpData->maIconFont == rSet.mpData->maIconFont) &&
- (mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
- (mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
- (mpData->maFontColor == rSet.mpData->maFontColor ))
+ (mpData->maIconFont == rSet.mpData->maIconFont) &&
+ (mpData->mnUseImagesInMenus == rSet.mpData->mnUseImagesInMenus) &&
+ (mpData->mnSkipDisabledInMenus == rSet.mpData->mnSkipDisabledInMenus) &&
+ (mpData->maFontColor == rSet.mpData->maFontColor ))
return TRUE;
else
return FALSE;
@@ -1112,8 +1112,8 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
ImplMiscData::ImplMiscData()
{
mnRefCount = 1;
- mnEnableATT = sal::static_int_cast<USHORT>(~0U);
- mnDisablePrinting = sal::static_int_cast<USHORT>(~0U);
+ mnEnableATT = sal::static_int_cast<USHORT>(~0U);
+ mnDisablePrinting = sal::static_int_cast<USHORT>(~0U);
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
mbEnableLocalizedDecimalSep = (pEnv != NULL) ? TRUE : FALSE;
}
@@ -1123,8 +1123,8 @@ ImplMiscData::ImplMiscData()
ImplMiscData::ImplMiscData( const ImplMiscData& rData )
{
mnRefCount = 1;
- mnEnableATT = rData.mnEnableATT;
- mnDisablePrinting = rData.mnDisablePrinting;
+ mnEnableATT = rData.mnEnableATT;
+ mnDisablePrinting = rData.mnDisablePrinting;
mbEnableLocalizedDecimalSep = rData.mbEnableLocalizedDecimalSep;
}
@@ -1196,8 +1196,8 @@ BOOL MiscSettings::operator ==( const MiscSettings& rSet ) const
if ( mpData == rSet.mpData )
return TRUE;
- if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) &&
- (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) &&
+ if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) &&
+ (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) &&
(mpData->mbEnableLocalizedDecimalSep == rSet.mpData->mbEnableLocalizedDecimalSep ) )
return TRUE;
else
@@ -1318,7 +1318,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
DWORD cbData = sizeof(Data);
if( ERROR_SUCCESS == RegQueryValueEx(hkey, "SupportAssistiveTechnology",
- NULL, &dwType, Data, &cbData) )
+ NULL, &dwType, Data, &cbData) )
{
switch (dwType)
{
@@ -1331,7 +1331,7 @@ void MiscSettings::SetEnableATToolSupport( BOOL bEnable )
case REG_DWORD:
((DWORD *) Data)[0] = bEnable ? 1 : 0;
RegSetValueEx(hkey, "SupportAssistiveTechnology",
- NULL, dwType, Data, sizeof(DWORD));
+ NULL, dwType, Data, sizeof(DWORD));
break;
default:
// Unsupported registry type
@@ -1839,7 +1839,7 @@ BOOL AllSettings::operator ==( const AllSettings& rSet ) const
(mpData->maNotificationSettings == rSet.mpData->maNotificationSettings) &&
(mpData->maHelpSettings == rSet.mpData->maHelpSettings) &&
(mpData->mnSystemUpdate == rSet.mpData->mnSystemUpdate) &&
- (mpData->maLocale == rSet.mpData->maLocale) &&
+ (mpData->maLocale == rSet.mpData->maLocale) &&
(mpData->mnWindowUpdate == rSet.mpData->mnWindowUpdate) )
{
return TRUE;
diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx
index bac9d50dc5da..24aa6e78d8a7 100644
--- a/vcl/source/app/sound.cxx
+++ b/vcl/source/app/sound.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index 176ec5a1b4c6..9e2eed60e61b 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e503172eb2c6..1ba14b121f09 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -184,12 +184,12 @@ struct ImplEventHook
struct ImplPostEventData
{
- ULONG mnEvent;
- const Window* mpWin;
- ULONG mnEventId;
- KeyEvent maKeyEvent;
- MouseEvent maMouseEvent;
-
+ ULONG mnEvent;
+ const Window* mpWin;
+ ULONG mnEventId;
+ KeyEvent maKeyEvent;
+ MouseEvent maMouseEvent;
+
ImplPostEventData( ULONG nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
@@ -353,7 +353,7 @@ const XubString& Application::GetAppFileName()
if( !aAppFileName.Len() )
{
vos::OStartupInfo aStartInfo;
- ::rtl::OUString aExeFileName;
+ ::rtl::OUString aExeFileName;
aStartInfo.getExecutableFile( aExeFileName );
@@ -457,7 +457,7 @@ void Application::Execute()
inline void ImplYield( bool i_bWait, bool i_bAllEvents )
{
ImplSVData* pSVData = ImplGetSVData();
-
+
// run timers that have timed out
if ( !pSVData->mbNoCallTimer )
while ( pSVData->mbNotAllTimerCalled )
@@ -474,7 +474,7 @@ inline void ImplYield( bool i_bWait, bool i_bAllEvents )
// flush lazy deleted objects
if( pSVData->maAppData.mnDispatchLevel == 0 )
vcl::LazyDelete::flush();
-
+
// the system timer events will not necesseraly come in in non waiting mode
// e.g. on aqua; need to trigger timer checks manually
if( pSVData->maAppData.mbNoYield && !pSVData->mbNoCallTimer )
@@ -707,7 +707,7 @@ void Application::SetSettings( const AllSettings& rSettings )
{
GetSettings();
*pSVData->maAppData.mpSettings = rSettings;
- ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
+ ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
}
else
{
@@ -717,7 +717,7 @@ void Application::SetSettings( const AllSettings& rSettings )
delete pSVData->mpResMgr;
pSVData->mpResMgr = NULL;
}
- ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
+ ResMgr::SetDefaultLocale( rSettings.GetUILocale() );
*pSVData->maAppData.mpSettings = rSettings;
ULONG nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings );
if ( nChangeFlags )
@@ -918,22 +918,22 @@ BOOL Application::HandleKey( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent )
{
- const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
-
+ const ::vos::OGuard aGuard( GetSolarMutex() );
+ ULONG nEventId = 0;
+
if( pWin && pKeyEvent )
{
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, *pKeyEvent );
-
+
PostUserEvent( nEventId,
STATIC_LINK( NULL, Application, PostEventHandler ),
pPostEventData );
-
+
if( nEventId )
{
pPostEventData->mnEventId = nEventId;
aPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
- }
+ }
else
delete pPostEventData;
}
@@ -945,30 +945,30 @@ ULONG Application::PostKeyEvent( ULONG nEvent, Window *pWin, KeyEvent* pKeyEvent
ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMouseEvent )
{
- const ::vos::OGuard aGuard( GetSolarMutex() );
- ULONG nEventId = 0;
-
+ const ::vos::OGuard aGuard( GetSolarMutex() );
+ ULONG nEventId = 0;
+
if( pWin && pMouseEvent )
{
Point aTransformedPos( pMouseEvent->GetPosPixel() );
-
+
aTransformedPos.X() += pWin->mnOutOffX;
aTransformedPos.Y() += pWin->mnOutOffY;
-
+
const MouseEvent aTransformedEvent( aTransformedPos, pMouseEvent->GetClicks(), pMouseEvent->GetMode(),
pMouseEvent->GetButtons(), pMouseEvent->GetModifier() );
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, aTransformedEvent );
-
+
PostUserEvent( nEventId,
STATIC_LINK( NULL, Application, PostEventHandler ),
pPostEventData );
-
+
if( nEventId )
{
pPostEventData->mnEventId = nEventId;
aPostedEventList.push_back( ImplPostEventPair( pWin, pPostEventData ) );
- }
+ }
else
delete pPostEventData;
}
@@ -980,36 +980,36 @@ ULONG Application::PostMouseEvent( ULONG nEvent, Window *pWin, MouseEvent* pMous
IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
{
- const ::vos::OGuard aGuard( GetSolarMutex() );
- ImplPostEventData* pData = static_cast< ImplPostEventData * >( pCallData );
- const void* pEventData;
+ const ::vos::OGuard aGuard( GetSolarMutex() );
+ ImplPostEventData* pData = static_cast< ImplPostEventData * >( pCallData );
+ const void* pEventData;
ULONG nEvent;
- const ULONG nEventId = pData->mnEventId;
-
+ const ULONG nEventId = pData->mnEventId;
+
switch( pData->mnEvent )
{
- case VCLEVENT_WINDOW_MOUSEMOVE:
+ case VCLEVENT_WINDOW_MOUSEMOVE:
nEvent = SALEVENT_EXTERNALMOUSEMOVE;
- pEventData = &pData->maMouseEvent;
+ pEventData = &pData->maMouseEvent;
break;
-
- case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
+
+ case VCLEVENT_WINDOW_MOUSEBUTTONDOWN:
nEvent = SALEVENT_EXTERNALMOUSEBUTTONDOWN;
pEventData = &pData->maMouseEvent;
break;
-
- case VCLEVENT_WINDOW_MOUSEBUTTONUP:
- nEvent = SALEVENT_EXTERNALMOUSEBUTTONUP;
+
+ case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+ nEvent = SALEVENT_EXTERNALMOUSEBUTTONUP;
pEventData = &pData->maMouseEvent;
break;
- case VCLEVENT_WINDOW_KEYINPUT:
- nEvent = SALEVENT_EXTERNALKEYINPUT;
+ case VCLEVENT_WINDOW_KEYINPUT:
+ nEvent = SALEVENT_EXTERNALKEYINPUT;
pEventData = &pData->maKeyEvent;
break;
-
- case VCLEVENT_WINDOW_KEYUP:
- nEvent = SALEVENT_EXTERNALKEYUP;
+
+ case VCLEVENT_WINDOW_KEYUP:
+ nEvent = SALEVENT_EXTERNALKEYUP;
pEventData = &pData->maKeyEvent;
break;
@@ -1021,10 +1021,10 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
if( pData->mpWin && pData->mpWin->mpWindowImpl->mpFrameWindow && pEventData )
ImplWindowFrameProc( pData->mpWin->mpWindowImpl->mpFrameWindow, NULL, (USHORT) nEvent, pEventData );
-
+
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( nEventId == (*aIter).second->mnEventId )
@@ -1035,7 +1035,7 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
else
++aIter;
}
-
+
return 0;
}
@@ -1043,18 +1043,18 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData )
void Application::RemoveMouseAndKeyEvents( Window* pWin )
{
- const ::vos::OGuard aGuard( GetSolarMutex() );
-
+ const ::vos::OGuard aGuard( GetSolarMutex() );
+
// remove all events for specific window, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( pWin == (*aIter).first )
{
if( (*aIter).second->mnEventId )
RemoveUserEvent( (*aIter).second->mnEventId );
-
+
delete (*aIter).second;
aIter = aPostedEventList.erase( aIter );
}
@@ -1068,15 +1068,15 @@ void Application::RemoveMouseAndKeyEvents( Window* pWin )
BOOL Application::IsProcessedMouseOrKeyEvent( ULONG nEventId )
{
const ::vos::OGuard aGuard( GetSolarMutex() );
-
+
// find event
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
-
+
while( aIter != aPostedEventList.end() )
{
if( (*aIter).second->mnEventId == nEventId )
return FALSE;
-
+
else
++aIter;
}
@@ -1409,8 +1409,8 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
{
if( IsMultiDisplay() )
return GetDefaultDisplayNumber();
-
- const unsigned int nScreens = GetScreenCount();
+
+ const unsigned int nScreens = GetScreenCount();
unsigned int nBestMatchScreen = 0;
unsigned long nOverlap = 0;
for( unsigned int i = 0; i < nScreens; i++ )
@@ -1433,7 +1433,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect )
}
if( nOverlap > 0 )
return nBestMatchScreen;
-
+
// finally the screen which center is nearest to the rect is the best
const Point aCenter( (i_rRect.Left() + i_rRect.Right())/2,
(i_rRect.Top() + i_rRect.Bottom())/2 );
@@ -1598,12 +1598,12 @@ Window* Application::GetDefDialogParent()
{
DBG_ERROR( "Window hierarchy corrupted!" );
pSVData->maWinData.mpFocusWin = NULL; // avoid further access
- return NULL;
+ return NULL;
}
-
+
// MAV: before the implementation has used only decorated windows,
// but it is not true in case of ActiveX or plugin scenario,
- // so this check is commented out
+ // so this check is commented out
// if( pWin->mpWindowImpl->mpFrameWindow->GetStyle() & (WB_MOVEABLE | WB_SIZEABLE) )
return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
// else
@@ -2041,7 +2041,7 @@ BOOL InitAccessBridge( BOOL bShowCancel, BOOL &rCancelled )
(void) rCancelled; // unused
#else
bRet = ImplInitAccessBridge( bShowCancel, rCancelled );
-
+
if( !bRet && bShowCancel && !rCancelled )
{
// disable accessibility if the user chooses to continue
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index f8b0d1d3379f..a81a5ee13c07 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,7 @@ using namespace rtl;
namespace
{
- struct private_aImplSVData :
+ struct private_aImplSVData :
public rtl::Static<ImplSVData, private_aImplSVData> {};
}
@@ -182,7 +182,7 @@ Window* ImplGetDefaultWindow()
// First test if we already have a default window.
// Don't only place a single if..else inside solar mutex lockframe
- // because then we might have to wait for the solar mutex what is not neccessary
+ // because then we might have to wait for the solar mutex what is not neccessary
// if we already have a default window.
if ( !pSVData->mpDefaultWin )
@@ -215,7 +215,7 @@ ResMgr* ImplGetResMgr()
{
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pSVData->mpResMgr = ResMgr::SearchCreateResMgr( VCL_CREATERESMGR_NAME( vcl ), aLocale );
-
+
static bool bMessageOnce = false;
if( !pSVData->mpResMgr && ! bMessageOnce )
{
@@ -236,7 +236,7 @@ ResId VclResId( sal_Int32 nId )
ResMgr* pMgr = ImplGetResMgr();
if( ! pMgr )
throw std::bad_alloc();
-
+
return ResId( nId, *pMgr );
}
@@ -255,7 +255,7 @@ public:
AccessBridgeCurrentContext(
const com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > &context ) :
m_prevContext( context ) {}
-
+
// XCurrentContext
virtual com::sun::star::uno::Any SAL_CALL getValueByName( const rtl::OUString& Name )
throw (com::sun::star::uno::RuntimeException);
@@ -311,7 +311,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( xFactory.is() )
{
- Reference< XExtendedToolkit > xToolkit =
+ Reference< XExtendedToolkit > xToolkit =
Reference< XExtendedToolkit >(Application::GetVCLToolkit(), UNO_QUERY);
Sequence< Any > arguments(1);
@@ -321,7 +321,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// for a disabled user. Use native message boxes which are accessible without java support.
// No need to do this when activated by Tools-Options dialog ..
if( bAllowCancel )
- {
+ {
// customize the java-not-available-interaction-handler entry within the
// current context when called at startup.
com::sun::star::uno::ContextLayer layer(
@@ -329,22 +329,22 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
pSVData->mxAccessBridge = xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.accessibility.AccessBridge" ),
- arguments
+ arguments
);
}
else
{
pSVData->mxAccessBridge = xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.accessibility.AccessBridge" ),
- arguments
+ arguments
);
}
-
+
if( !pSVData->mxAccessBridge.is() )
bSuccess = false;
}
}
-
+
return bSuccess;
}
@@ -369,7 +369,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -394,7 +394,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -419,7 +419,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -444,7 +444,7 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
if( SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL == ret )
rCancelled = TRUE;
}
-
+
return false;
}
@@ -477,8 +477,8 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
aMessage += String(ResId(SV_ACCESSERROR_OK_CANCEL_MSG, *pResMgr));
int ret = ImplGetSalSystem()->ShowNativeMessageBox(
- aTitle,
- ReplaceJavaErrorMessages(aMessage),
+ aTitle,
+ ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL,
SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL);
@@ -491,14 +491,14 @@ bool ImplInitAccessBridge(BOOL bAllowCancel, BOOL &rCancelled)
// The user tried to activate accessibility support using Tools-Options dialog,
// so we don't offer to terminate here !
ImplGetSalSystem()->ShowNativeMessageBox(
- aTitle,
- ReplaceJavaErrorMessages(aMessage),
+ aTitle,
+ ReplaceJavaErrorMessages(aMessage),
SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK,
SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK);
}
}
}
-
+
return false;
}
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 4efa2b659e7c..b421b04f5e2c 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -139,9 +139,9 @@ public:
if ( nVCLException )
{
bIn = TRUE;
-
+
::vos::OGuard aLock(&Application::GetSolarMutex());
-
+
// Timer nicht mehr anhalten, da ansonsten die UAE-Box
// auch nicht mehr gepaintet wird
ImplSVData* pSVData = ImplGetSVData();
@@ -183,10 +183,10 @@ BOOL ImplSVMain()
pSVData->mpApp->Main();
pSVData->maAppData.mbInAppMain = FALSE;
}
-
+
if( pSVData->mxDisplayConnection.is() )
{
- vcl::DisplayConnection* pConnection =
+ vcl::DisplayConnection* pConnection =
dynamic_cast<vcl::DisplayConnection*>(pSVData->mxDisplayConnection.get());
if( pConnection )
@@ -195,7 +195,7 @@ BOOL ImplSVMain()
}
// This is a hack to work around the problem of the asynchronous nature
- // of bridging accessibility through Java: on shutdown there might still
+ // of bridging accessibility through Java: on shutdown there might still
// be some events in the AWT EventQueue, which need the SolarMutex which
// - on the other hand - is destroyed in DeInitVCL(). So empty the queue
// here ..
@@ -271,7 +271,7 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM
if( pExceptionHandler != NULL )
return FALSE;
-
+
if( ! ImplGetSVData() )
ImplInitSVData();
@@ -343,7 +343,7 @@ void DeInitVCL()
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->mbDeInit = TRUE;
-
+
vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit();
// give ime status a chance to destroy its own windows
@@ -489,7 +489,7 @@ void DeInitVCL()
pSVData->maAppData.mpSettings->GetSysLocale().GetOptions().RemoveListener( pSVData->maAppData.mpCfgListener );
delete pSVData->maAppData.mpCfgListener;
}
-
+
delete pSVData->maAppData.mpSettings;
pSVData->maAppData.mpSettings = NULL;
}
diff --git a/vcl/source/app/svmainhook.cxx b/vcl/source/app/svmainhook.cxx
index 413b28b3affb..2b1a854dabed 100644
--- a/vcl/source/app/svmainhook.cxx
+++ b/vcl/source/app/svmainhook.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +68,7 @@ static void RunSVMain(void *pData)
// running
while (!CFRunLoopIsWaiting(*tcx->pRunLoopRef))
usleep(100);
-
+
*tcx->pRet = ImplSVMain();
// Force exit since some JVMs won't shutdown when only exit() is invoked
diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx
index 356608e7fbfc..277e6850fb6a 100644
--- a/vcl/source/app/timer.cxx
+++ b/vcl/source/app/timer.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@
// =======================================================================
-#define MAX_TIMER_PERIOD ((ULONG)0xFFFFFFFF)
+#define MAX_TIMER_PERIOD ((ULONG)0xFFFFFFFF)
// ---------------------
// - TimeManager-Types -
@@ -51,20 +51,20 @@
struct ImplTimerData
{
- ImplTimerData* mpNext; // Pointer to the next Instance
- Timer* mpSVTimer; // Pointer to SV Timer instance
- ULONG mnUpdateTime; // Last Update Time
- ULONG mnTimerUpdate; // TimerCallbackProcs on stack
- BOOL mbDelete; // Wurde Timer waehren Update() geloescht
- BOOL mbInTimeout; // Befinden wir uns im Timeout-Handler
+ ImplTimerData* mpNext; // Pointer to the next Instance
+ Timer* mpSVTimer; // Pointer to SV Timer instance
+ ULONG mnUpdateTime; // Last Update Time
+ ULONG mnTimerUpdate; // TimerCallbackProcs on stack
+ BOOL mbDelete; // Wurde Timer waehren Update() geloescht
+ BOOL mbInTimeout; // Befinden wir uns im Timeout-Handler
};
// =======================================================================
void Timer::ImplDeInitTimer()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplTimerData* pTimerData = pSVData->mpFirstTimerData;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplTimerData* pTimerData = pSVData->mpFirstTimerData;
if ( pTimerData )
{
@@ -81,8 +81,8 @@ void Timer::ImplDeInitTimer()
}
while ( pTimerData );
- pSVData->mpFirstTimerData = NULL;
- pSVData->mnTimerPeriod = 0;
+ pSVData->mpFirstTimerData = NULL;
+ pSVData->mnTimerPeriod = 0;
delete pSVData->mpSalTimer;
pSVData->mpSalTimer = NULL;
}
@@ -106,12 +106,12 @@ static void ImplStartTimer( ImplSVData* pSVData, ULONG nMS )
void Timer::ImplTimerCallbackProc()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplTimerData* pTimerData;
- ImplTimerData* pPrevTimerData;
- ULONG nMinPeriod = MAX_TIMER_PERIOD;
- ULONG nDeltaTime;
- ULONG nTime = Time::GetSystemTicks();
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplTimerData* pTimerData;
+ ImplTimerData* pPrevTimerData;
+ ULONG nMinPeriod = MAX_TIMER_PERIOD;
+ ULONG nDeltaTime;
+ ULONG nTime = Time::GetSystemTicks();
if ( pSVData->mbNoCallTimer )
return;
@@ -221,21 +221,21 @@ void Timer::ImplTimerCallbackProc()
Timer::Timer()
{
- mpTimerData = NULL;
- mnTimeout = 1;
- mbAuto = FALSE;
- mbActive = FALSE;
+ mpTimerData = NULL;
+ mnTimeout = 1;
+ mbAuto = FALSE;
+ mbActive = FALSE;
}
// -----------------------------------------------------------------------
Timer::Timer( const Timer& rTimer )
{
- mpTimerData = NULL;
- mnTimeout = rTimer.mnTimeout;
- mbAuto = FALSE;
- mbActive = FALSE;
- maTimeoutHdl = rTimer.maTimeoutHdl;
+ mpTimerData = NULL;
+ mnTimeout = rTimer.mnTimeout;
+ mbAuto = FALSE;
+ mbActive = FALSE;
+ maTimeoutHdl = rTimer.maTimeoutHdl;
if ( rTimer.IsActive() )
Start();
@@ -294,12 +294,12 @@ void Timer::Start()
}
// insert timer and start
- mpTimerData = new ImplTimerData;
- mpTimerData->mpSVTimer = this;
- mpTimerData->mnUpdateTime = Time::GetSystemTicks();
- mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
- mpTimerData->mbInTimeout = FALSE;
+ mpTimerData = new ImplTimerData;
+ mpTimerData->mpSVTimer = this;
+ mpTimerData->mnUpdateTime = Time::GetSystemTicks();
+ mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
+ mpTimerData->mbDelete = FALSE;
+ mpTimerData->mbInTimeout = FALSE;
// !!!!! Wegen SFX hinten einordnen !!!!!
ImplTimerData* pPrev = NULL;
@@ -324,9 +324,9 @@ void Timer::Start()
}
else
{
- mpTimerData->mnUpdateTime = Time::GetSystemTicks();
- mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
- mpTimerData->mbDelete = FALSE;
+ mpTimerData->mnUpdateTime = Time::GetSystemTicks();
+ mpTimerData->mnTimerUpdate = pSVData->mnTimerUpdate;
+ mpTimerData->mbDelete = FALSE;
}
}
@@ -347,9 +347,9 @@ Timer& Timer::operator=( const Timer& rTimer )
if ( IsActive() )
Stop();
- mbActive = FALSE;
- mnTimeout = rTimer.mnTimeout;
- maTimeoutHdl = rTimer.maTimeoutHdl;
+ mbActive = FALSE;
+ mnTimeout = rTimer.mnTimeout;
+ maTimeoutHdl = rTimer.maTimeoutHdl;
if ( rTimer.IsActive() )
Start();
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 237156a5f9f7..ecc69da75762 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,13 +61,13 @@
using namespace ::com::sun::star;
using namespace ::rtl;
-#define DOSTRING( x ) #x
-#define STRING( x ) DOSTRING( x )
+#define DOSTRING( x ) #x
+#define STRING( x ) DOSTRING( x )
struct VCLRegServiceInfo
{
- const sal_Char* pLibName;
- sal_Bool bHasSUPD;
+ const sal_Char* pLibName;
+ sal_Bool bHasSUPD;
};
static VCLRegServiceInfo aVCLComponentsArray[] =
@@ -110,7 +110,7 @@ uno::Reference< lang::XMultiServiceFactory > vcl::unohelper::GetMultiServiceFact
pSVData->maAppData.mxMSF = ::cppu::createRegistryServiceFactory( aTempFileName, rtl::OUString(), sal_False );
uno::Reference < registry::XImplementationRegistration > xReg(
pSVData->maAppData.mxMSF->createInstance( OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" )), uno::UNO_QUERY );
-
+
if( xReg.is() )
{
sal_Int32 nCompCount = 0;
@@ -237,6 +237,6 @@ void vcl::unohelper::NotifyAccessibleStateEventGlobally( const ::com::sun::star:
if ( nType == ::com::sun::star::accessibility::AccessibleStateType::FOCUSED )
xExtToolkit->fireFocusLost( rEventObject.Source );
}
-
+
}
}
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 5b6d7c73416a..ac71114b33eb 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ namespace vcl { namespace unohelper {
TextDataObject::~TextDataObject()
{
}
-
+
void TextDataObject::CopyStringTo( const String& rContent,
const uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard )
{
@@ -109,4 +109,4 @@ namespace vcl { namespace unohelper {
return ( nT == SOT_FORMAT_STRING );
}
-}} // namespace vcl::unohelper
+}} // namespace vcl::unohelper
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 0c98da48e6d0..64fca5bf5ab9 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -105,7 +105,7 @@ VclEventListeners2::VclEventListeners2()
VclEventListeners2::~VclEventListeners2()
{
}
-
+
void VclEventListeners2::addListener( const Link& i_rLink )
{
// ensure uniqueness
@@ -134,7 +134,7 @@ void VclEventListeners2::removeListener( const Link& i_rLink )
void VclEventListeners2::callListeners( VclSimpleEvent* i_pEvent )
{
vcl::DeletionListener aDel( this );
-
+
m_aIterators.push_back(ListenerIt(m_aListeners.begin()));
size_t nIndex = m_aIterators.size() - 1;
while( ! aDel.isDeleted() && m_aIterators[ nIndex ].m_aIt != m_aListeners.end() )
diff --git a/vcl/source/components/display.cxx b/vcl/source/components/display.cxx
index 6d7653968229..9b103025ac35 100644
--- a/vcl/source/components/display.cxx
+++ b/vcl/source/components/display.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -179,7 +179,7 @@ Sequence< OUString > SAL_CALL DisplayInfo::getSupportedServiceNames( ) throw (R
}
// ====================================================================
-
+
class DisplayAccess : public ::cppu::WeakAggImplHelper4< XPropertySet, XPropertySetInfo, XIndexAccess, XServiceInfo >
{
public:
@@ -283,7 +283,7 @@ Property SAL_CALL DisplayAccess::getPropertyByName( const OUString& aName ) thro
{
if( aName.equalsAscii( pMultiDisplayName ) )
return Property( aName, 0, ::getCppuType( (sal_Bool const *)0 ), PropertyAttribute::READONLY );
-
+
if( aName.equalsAscii( pDefaultDisplayName ) )
return Property( aName, 0, ::getCppuType( (sal_Int32 const *)0 ), PropertyAttribute::READONLY );
throw UnknownPropertyException();
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index 9c88deccec23..5c785efc7355 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,7 @@ public:
* XServiceInfo
*/
- virtual rtl::OUString SAL_CALL getImplementationName() throw( RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName() throw( RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( RuntimeException );
virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( RuntimeException );
@@ -102,16 +102,16 @@ public:
* XClipboard
*/
- virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
+ virtual Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
throw(RuntimeException);
- virtual void SAL_CALL setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
+ virtual void SAL_CALL setContents(
+ const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw(RuntimeException);
- virtual ::rtl::OUString SAL_CALL getName()
- throw(RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw(RuntimeException);
/*
* XClipboardEx
@@ -123,13 +123,13 @@ public:
/*
* XClipboardNotifier
*/
- virtual void SAL_CALL addClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ virtual void SAL_CALL addClipboardListener(
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
throw(RuntimeException);
- virtual void SAL_CALL removeClipboardListener(
- const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
- throw(RuntimeException);
+ virtual void SAL_CALL removeClipboardListener(
+ const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
+ throw(RuntimeException);
};
GenericClipboard::~GenericClipboard()
@@ -174,9 +174,9 @@ Reference< ::com::sun::star::datatransfer::XTransferable > GenericClipboard::get
{
return m_aContents;
}
-
-void GenericClipboard::setContents(
- const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
+
+void GenericClipboard::setContents(
+ const Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans,
const Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
throw( RuntimeException )
{
@@ -191,7 +191,7 @@ void GenericClipboard::setContents(
aEv.Contents = m_aContents;
aGuard.clear();
-
+
if( xOldOwner.is() && xOldOwner != xClipboardOwner )
xOldOwner->lostOwnership( this, xOldContents );
for( std::list< Reference< datatransfer::clipboard::XClipboardListener > >::iterator it =
@@ -223,7 +223,7 @@ void GenericClipboard::removeClipboardListener( const Reference< datatransfer::c
throw( RuntimeException )
{
osl::ClearableMutexGuard aGuard( m_aMutex );
-
+
m_aListeners.remove( listener );
}
@@ -317,11 +317,11 @@ class GenericDragSource : public cppu::WeakComponentImplHelper2<
public:
GenericDragSource() : cppu::WeakComponentImplHelper2< datatransfer::dnd::XDragSource, XInitialization >( m_aMutex ) {}
virtual ~GenericDragSource();
-
+
// XDragSource
- virtual sal_Bool SAL_CALL isDragImageSupported() throw();
- virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
- virtual void SAL_CALL startDrag(
+ virtual sal_Bool SAL_CALL isDragImageSupported() throw();
+ virtual sal_Int32 SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw();
+ virtual void SAL_CALL startDrag(
const datatransfer::dnd::DragGestureEvent& trigger,
sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
const Reference< datatransfer::XTransferable >& transferable,
@@ -329,15 +329,15 @@ public:
) throw();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
-
+ virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
+
static Sequence< OUString > getSupportedServiceNames_static()
{
Sequence< OUString > aRet( 1 );
aRet[0] = OUString::createFromAscii( "com.sun.star.datatransfer.dnd.GenericDragSource" );
return aRet;
}
-
+
static OUString getImplementationName_static()
{
return OUString::createFromAscii( "com.sun.star.datatransfer.dnd.VclGenericDragSource" );
@@ -433,15 +433,15 @@ public:
virtual ~GenericDropTarget();
// XInitialization
- virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( Exception );
+ virtual void SAL_CALL initialize( const Sequence< Any >& args ) throw ( Exception );
// XDropTarget
- virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
- virtual sal_Bool SAL_CALL isActive() throw();
- virtual void SAL_CALL setActive( sal_Bool active ) throw();
- virtual sal_Int8 SAL_CALL getDefaultActions() throw();
- virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw();
+ virtual void SAL_CALL addDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual void SAL_CALL removeDropTargetListener( const Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& ) throw();
+ virtual sal_Bool SAL_CALL isActive() throw();
+ virtual void SAL_CALL setActive( sal_Bool active ) throw();
+ virtual sal_Int8 SAL_CALL getDefaultActions() throw();
+ virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw();
static Sequence< OUString > getSupportedServiceNames_static()
{
@@ -533,7 +533,7 @@ Reference< XInterface > SAL_CALL DropTarget_createInstance( const Reference< XMu
} // namespace vcl
/*
-* SalInstance generic
+* SalInstance generic
*/
Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& )
{
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index 6bed493cacde..ae40ad77d0d0 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,7 @@ extern "C" {
try
{
Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pXUnoKey ) );
-
+
OUStringBuffer aImplName(64);
aImplName.appendAscii( "/" );
aImplName.append( vcl_session_getImplementationName() );
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index ad309e4f2560..6f9f169eacc2 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,10 +70,10 @@ FontIdentificator() {}
virtual OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
virtual ::sal_Bool SAL_CALL supportsService( const OUString& ) throw (RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
-
+
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& ) throw (Exception, RuntimeException);
-
+
// XMaterialHolder
virtual Any SAL_CALL getMaterial() throw(RuntimeException);
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index d4f29e224e7b..80d5fc527553 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -408,7 +408,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
aImageSize.Width() = CalcZoom( aImageSize.Width() );
aImageSize.Height() = CalcZoom( aImageSize.Height() );
-
+
// Drawing text or symbol only is simple, use style and output rectangle
if ( bHasSymbol && !bDrawImage && !bDrawText )
{
@@ -516,7 +516,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
if ( aTSSize.Height() < aTextSize.Height() )
aTSSize.Height() = aTextSize.Height();
-
+
if( bAddImageSep && bDrawImage )
{
long nDiff = (aImageSize.Height() - aTextSize.Height()) / 3;
@@ -1337,11 +1337,11 @@ void PushButton::ImplDrawPushButton( bool bLayout )
ImplControlValue aControlValue;
ControlState nState = 0;
- if ( mbPressed ) nState |= CTRL_STATE_PRESSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( mbPressed ) nState |= CTRL_STATE_PRESSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -1359,18 +1359,18 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
PushButtonValue aControlValue;
- Rectangle aCtrlRegion( aInRect );
- ControlState nState = 0;
+ Rectangle aCtrlRegion( aInRect );
+ ControlState nState = 0;
if ( mbPressed || IsChecked() ) nState |= CTRL_STATE_PRESSED;
if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( bRollOver )
nState |= CTRL_STATE_ROLLOVER;
-
+
if( GetStyle() & WB_BEVELBUTTON )
aControlValue.mbBevelButton = true;
@@ -1385,7 +1385,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
aInRect.Bottom()-=4;
aInRect.Left()+=4;
aInRect.Right()-=4;
-
+
// prepare single line hint (needed on mac to decide between normal push button and
// rectangular bevel button look)
Size aFontSize( Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetSize() );
@@ -1456,8 +1456,8 @@ void PushButton::ImplSetDefButton( BOOL bSet )
Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating
// will not work if the theme has dynamic adornment sizes
ImplControlValue aControlValue;
- Rectangle aCtrlRegion( aCtrlRect );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( aCtrlRect );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
// get native size of a 'default' button
// and adjust the VCL button if more space for adornment is required
@@ -2041,7 +2041,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
return CalcWindowSize( aSize );
-}
+}
Size PushButton::GetOptimalSize(WindowSizeType eType) const
{
@@ -2351,14 +2351,14 @@ void RadioButton::ImplDrawRadioButtonState()
// no native drawing for image radio buttons
if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
- ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
- Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
- ControlState nState = 0;
+ ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
+ Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() );
+ ControlState nState = 0;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && maMouseRect.IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -2470,8 +2470,8 @@ void RadioButton::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
Rectangle aRect( rPos, rSize );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
+ String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
pDev->Push( PUSH_CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -2633,7 +2633,7 @@ void RadioButton::GetRadioButtonGroup( std::vector< RadioButton* >& io_rGroup, b
{
// empty the list
io_rGroup.clear();
-
+
// go back to first in group;
Window* pFirst = const_cast<RadioButton*>(this);
while( ( pFirst->GetStyle() & WB_GROUP ) == 0 )
@@ -3214,8 +3214,8 @@ Size RadioButton::ImplGetRadioImageSize() const
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
Rectangle aBoundingRgn, aContentRgn;
// get native size of a radio button
@@ -3254,7 +3254,7 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings,
Color aMaskColor(0x00, 0x00, 0xFF );
DBG_ASSERT( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must match aColorAry2" );
// FIXME: do we want the mask for the checkbox ?
- pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
+ pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
}
@@ -3340,21 +3340,21 @@ void RadioButton::ImplSetMinimumNWFSize()
Size aCurSize( GetSizePixel() );
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a radiobutton
if( GetNativeControlRegion( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
-
+
if( aSize.Height() > aCurSize.Height() )
{
aCurSize.Height() = aSize.Height();
SetSizePixel( aCurSize );
}
}
-
+
Pop();
}
@@ -3519,7 +3519,7 @@ void CheckBox::ImplInvalidateOrDrawCheckBoxState()
void CheckBox::ImplDrawCheckBoxState()
{
- bool bNativeOK = TRUE;
+ bool bNativeOK = TRUE;
if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == TRUE )
{
@@ -3527,10 +3527,10 @@ void CheckBox::ImplDrawCheckBoxState()
Rectangle aCtrlRegion( maStateRect );
ControlState nState = 0;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
- if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( ImplGetButtonState() & BUTTON_DRAW_PRESSED ) nState |= CTRL_STATE_PRESSED;
+ if ( IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( meState == STATE_CHECK )
aControlValue.setTristateVal( BUTTONVALUE_ON );
@@ -3570,7 +3570,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
{
WinBits nWinStyle = GetStyle();
XubString aText( GetText() );
-
+
pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -3644,12 +3644,12 @@ void CheckBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
ImplSetFocusRect( rStateRect );
}
-
+
const int nLineSpace = 4;
if( (GetStyle() & WB_CBLINESTYLE) != 0 &&
rMouseRect.Right()-1-nLineSpace < rPos.X()+rSize.Width() )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
SetLineColor( Color( COL_BLACK ) );
else
@@ -4087,9 +4087,9 @@ long CheckBox::PreNotify( NotifyEvent& rNEvt )
// trigger redraw if mouse over state has changed
if( IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL) )
{
- if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
+ if( ( maMouseRect.IsInside( GetPointerPosPixel()) &&
!maMouseRect.IsInside( GetLastPointerPosPixel()) ) ||
- ( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
+ ( maMouseRect.IsInside( GetLastPointerPosPixel()) &&
!maMouseRect.IsInside( GetPointerPosPixel()) ) ||
pMouseEvt->IsLeaveWindow() || pMouseEvt->IsEnterWindow() )
{
@@ -4158,10 +4158,10 @@ Size CheckBox::ImplGetCheckImageSize() const
{
ImplControlValue aControlValue;
// #i45896# workaround gcc3.3 temporary problem
- Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
- ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
+ Rectangle aCtrlRegion( Point( 0, 0 ), GetSizePixel() );
+ ControlState nState = CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED;
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a check box
if( pThis->GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
nState, aControlValue, rtl::OUString(),
@@ -4171,7 +4171,7 @@ Size CheckBox::ImplGetCheckImageSize() const
bDefaultSize = false;
}
}
- if( bDefaultSize )
+ if( bDefaultSize )
aSize = GetCheckImage( GetSettings(), 0 ).GetSizePixel();
return aSize;
}
@@ -4249,21 +4249,21 @@ void CheckBox::ImplSetMinimumNWFSize()
Size aCurSize( GetSizePixel() );
Rectangle aCtrlRegion( Point( 0, 0 ), aCurSize );
Rectangle aBoundingRgn, aContentRgn;
-
+
// get native size of a radiobutton
if( GetNativeControlRegion( CTRL_CHECKBOX, PART_ENTIRE_CONTROL, aCtrlRegion,
CTRL_STATE_DEFAULT|CTRL_STATE_ENABLED, aControlValue, rtl::OUString(),
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
-
+
if( aSize.Height() > aCurSize.Height() )
{
aCurSize.Height() = aSize.Height();
SetSizePixel( aCurSize );
}
}
-
+
Pop();
}
@@ -4453,16 +4453,16 @@ void DisclosureButton::ImplDrawCheckBoxState()
would have to be overloaded for DisclosureButton; also GetNativeControlRegion
for CTRL_LISTNODE would have to be implemented and taken into account
*/
-
+
Rectangle aStateRect( GetStateRect() );
-
+
ImplControlValue aControlValue( GetState() == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( aStateRect );
ControlState nState = 0;
- if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
- if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
- if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+ if ( HasFocus() ) nState |= CTRL_STATE_FOCUSED;
+ if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
+ if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
if ( IsMouseOver() && GetMouseRect().IsInside( GetPointerPosPixel() ) )
nState |= CTRL_STATE_ROLLOVER;
@@ -4478,21 +4478,21 @@ void DisclosureButton::ImplDrawCheckBoxState()
rCtrlData.mpDisclosureMinus = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS ) ) );
if( ! rCtrlData.mpDisclosureMinusHC )
rCtrlData.mpDisclosureMinusHC = new Image( BitmapEx( VclResId( SV_DISCLOSURE_MINUS_HC ) ) );
-
+
Image* pImg = NULL;
if( GetSettings().GetStyleSettings().GetHighContrastMode() )
pImg = IsChecked() ? rCtrlData.mpDisclosureMinusHC : rCtrlData.mpDisclosurePlusHC;
else
pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
-
+
DBG_ASSERT( pImg, "no disclosure image" );
if( ! pImg )
return;
-
+
USHORT nStyle = 0;
if( ! IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
-
+
Size aSize( aStateRect.GetSize() );
Size aImgSize( pImg->GetSizePixel() );
Point aOff( (aSize.Width() - aImgSize.Width())/2,
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 8efa3404a44a..7739ad2c1d91 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -117,16 +117,16 @@ ComboBox::~ComboBox()
void ComboBox::ImplInitComboBoxData()
{
- mpSubEdit = NULL;
- mpBtn = NULL;
- mpImplLB = NULL;
- mpFloatWin = NULL;
+ mpSubEdit = NULL;
+ mpBtn = NULL;
+ mpImplLB = NULL;
+ mpFloatWin = NULL;
- mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mbSyntheticModify = FALSE;
- mbMatchCase = FALSE;
- mcMultiSep = ';';
+ mnDDHeight = 0;
+ mbDDAutoSize = TRUE;
+ mbSyntheticModify = FALSE;
+ mbMatchCase = FALSE;
+ mcMultiSep = ';';
}
// -----------------------------------------------------------------------
@@ -331,8 +331,8 @@ IMPL_LINK( ComboBox, ImplPopupModeEndHdl, void*, EMPTYARG )
IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
{
- Selection aSel = pEdit->GetSelection();
- AutocompleteAction eAction = pEdit->GetAutocompleteAction();
+ Selection aSel = pEdit->GetSelection();
+ AutocompleteAction eAction = pEdit->GetAutocompleteAction();
/* If there is no current selection do not auto complete on
Tab/Shift-Tab since then we would not cycle to the next field.
@@ -340,9 +340,9 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
if ( aSel.Len() ||
((eAction != AUTOCOMPLETE_TABFORWARD) && (eAction != AUTOCOMPLETE_TABBACKWARD)) )
{
- XubString aFullText = pEdit->GetText();
- XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
- USHORT nStart = mpImplLB->GetCurrentPos();
+ XubString aFullText = pEdit->GetText();
+ XubString aStartText = aFullText.Copy( 0, (xub_StrLen)aSel.Max() );
+ USHORT nStart = mpImplLB->GetCurrentPos();
if ( nStart == LISTBOX_ENTRY_NOTFOUND )
nStart = 0;
@@ -355,7 +355,7 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
bForward = FALSE;
nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1;
}
-
+
USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
if( ! mbMatchCase )
{
@@ -365,7 +365,7 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit )
// Try match case insensitive, but from start
nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, TRUE );
}
-
+
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match full from current position
nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, FALSE );
@@ -401,11 +401,11 @@ IMPL_LINK( ComboBox, ImplSelectHdl, void*, EMPTYARG )
xub_StrLen nIndex = 0;
while ( nIndex != STRING_NOTFOUND )
{
- xub_StrLen nPrevIndex = nIndex;
- XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
- xub_StrLen nTokenLen = aToken.Len();
+ xub_StrLen nPrevIndex = nIndex;
+ XubString aToken = aText.GetToken( 0, mcMultiSep, nIndex );
+ xub_StrLen nTokenLen = aToken.Len();
aToken.EraseLeadingAndTrailingChars( ' ' );
- USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
+ USHORT nP = mpImplLB->GetEntryList()->FindEntry( aToken );
if ( (nP != LISTBOX_ENTRY_NOTFOUND) && (!mpImplLB->GetEntryList()->IsEntryPosSelected( nP )) )
{
aText.Erase( nPrevIndex, nTokenLen );
@@ -623,8 +623,8 @@ void ComboBox::Resize()
if( IsDropDownBox() )
{
long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- long nTop = 0;
- long nBottom = aOutSz.Height();
+ long nTop = 0;
+ long nBottom = aOutSz.Height();
Window *pBorder = GetWindow( WINDOW_BORDER );
ImplControlValue aControlValue;
@@ -789,7 +789,7 @@ void ComboBox::DataChanged( const DataChangedEvent& rDCEvt )
}
Resize();
mpImplLB->Resize(); // Wird nicht durch ComboBox::Resize() gerufen, wenn sich die ImplLB nicht aendert.
- SetBackground(); // due to a hack in Window::UpdateSettings the background must be reset
+ SetBackground(); // due to a hack in Window::UpdateSettings the background must be reset
// otherwise it will overpaint NWF drawn comboboxes
}
}
@@ -811,7 +811,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
&& !IsReadOnly() )
{
KeyEvent aKeyEvt = *rNEvt.GetKeyEvent();
- USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
+ USHORT nKeyCode = aKeyEvt.GetKeyCode().GetCode();
switch( nKeyCode )
{
case KEY_UP:
@@ -925,9 +925,9 @@ void ComboBox::ImplUpdateFloatSelection()
mpImplLB->SetCallSelectionChangedHdl( FALSE );
if ( !IsMultiSelectionEnabled() )
{
- XubString aSearchStr( mpSubEdit->GetText() );
- USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
- BOOL bSelect = TRUE;
+ XubString aSearchStr( mpSubEdit->GetText() );
+ USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
+ BOOL bSelect = TRUE;
if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND )
{
@@ -1010,6 +1010,14 @@ void ComboBox::Clear()
mpImplLB->Clear();
CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) sal_IntPtr(-1) );
}
+// -----------------------------------------------------------------------
+
+Image ComboBox::GetEntryImage( USHORT nPos ) const
+{
+ if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
+ return mpImplLB->GetEntryList()->GetEntryImage( nPos );
+ return Image();
+}
// -----------------------------------------------------------------------
@@ -1278,9 +1286,9 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
if ( !nLines )
nLines = 1;
USHORT nTEntry = IsReallyVisible() ? mpImplLB->GetTopEntry() : 0;
-
+
Rectangle aTextRect( aPos, aSize );
-
+
aTextRect.Left() += 3*nOnePixel;
aTextRect.Right() -= 3*nOnePixel;
aTextRect.Top() += nEditHeight + nOnePixel;
@@ -1296,14 +1304,14 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, U
}
pDev->Pop();
-
+
// Call Edit::Draw after restoring the MapMode...
if ( IsDropDownBox() )
{
mpSubEdit->Draw( pDev, rPos, rSize, nFlags );
// DD-Button ?
}
-
+
}
// -----------------------------------------------------------------------
@@ -1560,7 +1568,7 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
// point must be either in main list window
// or in impl window (dropdown case)
ImplListBoxWindow* pMain = mpImplLB->GetMainWindow();
-
+
// convert coordinates to ImplListBoxWindow pixel coordinate space
Point aConvPoint = LogicToPixel( rPoint );
aConvPoint = OutputToAbsoluteScreenPixel( aConvPoint );
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 918675cc0783..335c12b27871 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ using namespace vcl;
void Control::ImplInitControlData()
{
- mbHasFocus = FALSE;
+ mbHasFocus = FALSE;
mpControlData = new ImplControlData;
}
@@ -216,7 +216,7 @@ long Control::GetLineCount() const
Pair ControlLayoutData::GetLineStartEnd( long nLine ) const
{
Pair aPair( -1, -1 );
-
+
int nDisplayLines = m_aLineIndices.size();
if( nLine >= 0 && nLine < nDisplayLines )
{
@@ -333,11 +333,11 @@ long Control::Notify( NotifyEvent& rNEvt )
void Control::StateChanged( StateChangedType nStateChange )
{
- if( nStateChange == STATE_CHANGE_INITSHOW ||
- nStateChange == STATE_CHANGE_VISIBLE ||
- nStateChange == STATE_CHANGE_FORMAT ||
- nStateChange == STATE_CHANGE_ZOOM ||
- nStateChange == STATE_CHANGE_BORDER ||
+ if( nStateChange == STATE_CHANGE_INITSHOW ||
+ nStateChange == STATE_CHANGE_VISIBLE ||
+ nStateChange == STATE_CHANGE_FORMAT ||
+ nStateChange == STATE_CHANGE_ZOOM ||
+ nStateChange == STATE_CHANGE_BORDER ||
nStateChange == STATE_CHANGE_CONTROLFONT
)
{
@@ -443,7 +443,7 @@ void Control::DataChanged( const DataChangedEvent& rDCEvt)
{
// we don't want to loose some style settings for controls created with the
// toolkit
- if ( IsCreatedWithToolkit() &&
+ if ( IsCreatedWithToolkit() &&
(rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index c0e7b352642c..69ab2fb8801d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,27 +101,27 @@ static FncGetSpecialChars pImplFncGetSpecialChars = NULL;
// =======================================================================
-#define EDIT_ALIGN_LEFT 1
-#define EDIT_ALIGN_CENTER 2
-#define EDIT_ALIGN_RIGHT 3
+#define EDIT_ALIGN_LEFT 1
+#define EDIT_ALIGN_CENTER 2
+#define EDIT_ALIGN_RIGHT 3
-#define EDIT_DEL_LEFT 1
-#define EDIT_DEL_RIGHT 2
+#define EDIT_DEL_LEFT 1
+#define EDIT_DEL_RIGHT 2
-#define EDIT_DELMODE_SIMPLE 11
-#define EDIT_DELMODE_RESTOFWORD 12
-#define EDIT_DELMODE_RESTOFCONTENT 13
+#define EDIT_DELMODE_SIMPLE 11
+#define EDIT_DELMODE_RESTOFWORD 12
+#define EDIT_DELMODE_RESTOFCONTENT 13
// =======================================================================
struct DDInfo
{
- Cursor aCursor;
+ Cursor aCursor;
Selection aDndStartSel;
- xub_StrLen nDropPos;
- BOOL bStarterOfDD;
- BOOL bDroppedInMe;
- BOOL bVisCursor;
+ xub_StrLen nDropPos;
+ BOOL bStarterOfDD;
+ BOOL bDroppedInMe;
+ BOOL bVisCursor;
DDInfo()
{
@@ -138,17 +138,17 @@ struct DDInfo
struct Impl_IMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
- xub_StrLen nPos;
- xub_StrLen nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ USHORT* pAttribs;
+ xub_StrLen nPos;
+ xub_StrLen nLen;
+ BOOL bCursor;
+ BOOL bWasCursorOverwrite;
Impl_IMEInfos( xub_StrLen nPos, const String& rOldTextAfterStartPos );
~Impl_IMEInfos();
- void CopyAttribs( const xub_StrLen* pA, xub_StrLen nL );
- void DestroyAttribs();
+ void CopyAttribs( const xub_StrLen* pA, xub_StrLen nL );
+ void DestroyAttribs();
};
// -----------------------------------------------------------------------
@@ -281,23 +281,23 @@ Edit::~Edit()
void Edit::ImplInitEditData()
{
- mpSubEdit = NULL;
- mpUpdateDataTimer = NULL;
- mnXOffset = 0;
- mnAlign = EDIT_ALIGN_LEFT;
- mnMaxTextLen = EDIT_NOLIMIT;
- meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
- mbModified = FALSE;
- mbInternModified = FALSE;
- mbReadOnly = FALSE;
- mbInsertMode = TRUE;
- mbClickedInSelection = FALSE;
- mbActivePopup = FALSE;
- mbIsSubEdit = FALSE;
- mbInMBDown = FALSE;
- mpDDInfo = NULL;
- mpIMEInfos = NULL;
- mcEchoChar = 0;
+ mpSubEdit = NULL;
+ mpUpdateDataTimer = NULL;
+ mnXOffset = 0;
+ mnAlign = EDIT_ALIGN_LEFT;
+ mnMaxTextLen = EDIT_NOLIMIT;
+ meAutocompleteAction = AUTOCOMPLETE_KEYINPUT;
+ mbModified = FALSE;
+ mbInternModified = FALSE;
+ mbReadOnly = FALSE;
+ mbInsertMode = TRUE;
+ mbClickedInSelection = FALSE;
+ mbActivePopup = FALSE;
+ mbIsSubEdit = FALSE;
+ mbInMBDown = FALSE;
+ mpDDInfo = NULL;
+ mpIMEInfos = NULL;
+ mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
// note: controls that use a subedit will revert this (SpinField, ComboBox)
@@ -338,7 +338,7 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle )
// --- RTL --- hack: right align until keyinput and cursor travelling works
if( IsRTLEnabled() )
- mnAlign = EDIT_ALIGN_RIGHT;
+ mnAlign = EDIT_ALIGN_RIGHT;
if ( nStyle & WB_RIGHT )
mnAlign = EDIT_ALIGN_RIGHT;
@@ -459,7 +459,7 @@ XubString Edit::ImplGetText() const
{
if ( mcEchoChar || (GetStyle() & WB_PASSWORD) )
{
- XubString aText;
+ XubString aText;
xub_Unicode cEchoChar;
if ( mcEchoChar )
cEchoChar = mcEchoChar;
@@ -509,9 +509,9 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
nStart = 0;
nEnd = aText.Len();
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( aText.Len() )
{
@@ -524,8 +524,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
GetCaretPositions( aText, pDX, nStart, nEnd );
}
- long nTH = GetTextHeight();
- Point aPos( mnXOffset, ImplGetTextYPosition() );
+ long nTH = GetTextHeight();
+ Point aPos( mnXOffset, ImplGetTextYPosition() );
if( bLayout )
{
@@ -894,8 +894,8 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
sal_Bool bCTLSequenceChecking = sal_False;
sal_Bool bCTLSequenceCheckingRestricted = sal_False;
sal_Bool bCTLSequenceCheckingTypeAndReplace = sal_False;
- sal_Bool bCTLFontEnabled = sal_False;
- sal_Bool bIsInputSequenceChecking = sal_False;
+ sal_Bool bCTLFontEnabled = sal_False;
+ sal_Bool bIsInputSequenceChecking = sal_False;
//
// get access to the configuration of this office module
try
@@ -921,7 +921,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
}
catch(...)
{
- bIsInputSequenceChecking = sal_False; // continue with inserting the new text
+ bIsInputSequenceChecking = sal_False; // continue with inserting the new text
}
//
uno::Reference < i18n::XBreakIterator > xBI( ImplGetBreakIterator(), UNO_QUERY );
@@ -967,7 +967,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_
if (aChgText.Len())
{
aNewText = aChgText;
- aSelection.Min() = nChgPos; // position for new text to be inserted
+ aSelection.Min() = nChgPos; // position for new text to be inserted
}
else
aNewText = String::EmptyString();
@@ -1168,14 +1168,14 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) )
return;
- Cursor* pCursor = GetCursor();
- XubString aText = ImplGetText();
+ Cursor* pCursor = GetCursor();
+ XubString aText = ImplGetText();
long nTextPos = 0;
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( aText.Len() )
{
@@ -1226,7 +1226,7 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible )
}
nCursorPosX = nTextPos + mnXOffset + ImplGetExtraOffset();
- if ( nCursorPosX == aOutSize.Width() ) // dann nicht sichtbar...
+ if ( nCursorPosX == aOutSize.Width() ) // dann nicht sichtbar...
nCursorPosX--;
if ( mnXOffset != nOldXOffset )
@@ -1278,7 +1278,7 @@ void Edit::ImplAlign()
else if( mnAlign == EDIT_ALIGN_CENTER )
{
// Mit Abfrage schoener, wenn gescrollt, dann aber nicht zentriert im gescrollten Zustand...
-// if ( nTextWidth < nOutWidth )
+// if ( nTextWidth < nOutWidth )
mnXOffset = (nOutWidth - nTextWidth) / 2;
}
}
@@ -1300,9 +1300,9 @@ xub_StrLen Edit::ImplGetCharPos( const Point& rWindowPos ) const
xub_StrLen nIndex = STRING_LEN;
String aText = ImplGetText();
- sal_Int32 nDXBuffer[256];
- sal_Int32* pDXBuffer = NULL;
- sal_Int32* pDX = nDXBuffer;
+ sal_Int32 nDXBuffer[256];
+ sal_Int32* pDXBuffer = NULL;
+ sal_Int32* pDX = nDXBuffer;
if( 2*aText.Len() > xub_StrLen(sizeof(nDXBuffer)/sizeof(nDXBuffer[0])) )
{
pDXBuffer = new sal_Int32[2*(aText.Len()+1)];
@@ -1471,7 +1471,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
StartTracking( STARTTRACK_SCROLLREPEAT );
}
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
+ mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren
GrabFocus();
mbInMBDown = FALSE;
}
@@ -1529,8 +1529,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt )
BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ BOOL bDone = FALSE;
+ USHORT nCode = rKEvt.GetKeyCode().GetCode();
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
mbInternModified = FALSE;
@@ -1596,7 +1596,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( pImplFncGetSpecialChars )
{
- Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
+ Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
XubString aChars = pImplFncGetSpecialChars( this, GetFont() );
SetSelection( aSaveSel );
if ( aChars.Len() )
@@ -1619,7 +1619,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bDone = TRUE;
}
break;
-
+
case KEY_LEFT:
case KEY_RIGHT:
case KEY_HOME:
@@ -1653,7 +1653,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bool bGoRight = (nCode == KEY_RIGHT);
bool bGoHome = (nCode == KEY_HOME);
bool bGoEnd = (nCode == KEY_END);
-
+
switch( nCode )
{
case com::sun::star::awt::Key::MOVE_WORD_FORWARD:
@@ -1685,7 +1685,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
default:
break;
};
-
+
// Range wird in ImplSetSelection geprueft...
if ( bGoLeft && aSel.Max() )
{
@@ -1825,7 +1825,7 @@ BOOL Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
{
if ( IsCharInput( rKEvt ) )
{
- bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
+ bDone = TRUE; // Auch bei ReadOnly die Zeichen schlucken.
if ( !mbReadOnly )
{
ImplInsertText( rKEvt.GetCharCode(), 0, sal_True );
@@ -1942,12 +1942,12 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG
}
}
- XubString aText = ImplGetText();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOnePixel = GetDrawPixel( pDev, 1 );
- long nOffX = 3*nOnePixel;
- long nOffY = (aSize.Height() - nTextHeight) / 2;
+ XubString aText = ImplGetText();
+ long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth( aText );
+ long nOnePixel = GetDrawPixel( pDev, 1 );
+ long nOffX = 3*nOnePixel;
+ long nOffY = (aSize.Height() - nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -2081,7 +2081,7 @@ void Edit::LoseFocus()
}
if ( !mbActivePopup && !( GetStyle() & WB_NOHIDESELECTION ) && maSelection.Len() )
- ImplInvalidateOrRepaint(); // Selektion malen
+ ImplInvalidateOrRepaint(); // Selektion malen
}
Control::LoseFocus();
@@ -2144,7 +2144,7 @@ void Edit::Command( const CommandEvent& rCEvt )
}
mbActivePopup = TRUE;
- Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
+ Selection aSaveSel = GetSelection(); // Falls jemand in Get/LoseFocus die Selektion verbiegt, z.B. URL-Zeile...
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
{
@@ -2222,7 +2222,7 @@ void Edit::Command( const CommandEvent& rCEvt )
break;
case DICTATIONCOMMAND_DEL:
{
- ImplHandleKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1|KEY_SHIFT ) ) );
+ ImplHandleKeyEvent( KeyEvent( 0, KeyCode( KEY_LEFT, KEY_MOD1|KEY_SHIFT ) ) );
DeleteSelected();
}
break;
@@ -2340,7 +2340,7 @@ void Edit::StateChanged( StateChangedType nType )
{
if ( !mpSubEdit )
{
- mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
+ mnXOffset = 0; // Falls vorher GrabFocus, als Groesse noch falsch.
ImplAlign();
if ( !mpSubEdit )
ImplShowCursor( FALSE );
@@ -2374,7 +2374,7 @@ void Edit::StateChanged( StateChangedType nType )
if( mbIsSubEdit && GetParent()->IsRTLEnabled() )
{
if( GetParent()->GetStyle() & WB_LEFT )
- mnAlign = EDIT_ALIGN_RIGHT;
+ mnAlign = EDIT_ALIGN_RIGHT;
if ( nType == STATE_CHANGE_MIRRORING )
SetLayoutMode( TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT );
}
@@ -2770,10 +2770,10 @@ void Edit::Undo()
void Edit::SetText( const XubString& rStr )
{
if ( mpSubEdit )
- mpSubEdit->SetText( rStr ); // Nicht direkt ImplSetText, falls SetText ueberladen
+ mpSubEdit->SetText( rStr ); // Nicht direkt ImplSetText, falls SetText ueberladen
else
{
- Selection aNewSel( 0, 0 ); // Damit nicht gescrollt wird
+ Selection aNewSel( 0, 0 ); // Damit nicht gescrollt wird
ImplSetText( rStr, &aNewSel );
}
}
@@ -2825,7 +2825,7 @@ void Edit::SetSubEdit( Edit* pEdit )
mpSubEdit = pEdit;
if ( mpSubEdit )
{
- SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
+ SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM...
mpSubEdit->mbIsSubEdit = TRUE;
mpSubEdit->SetReadOnly( mbReadOnly );
@@ -2844,7 +2844,7 @@ Size Edit::CalcMinimumSize() const
aSize.Width() = aMinSize.Width();
// add some space between text entry and border
aSize.Height() += 4;
-
+
aSize = CalcWindowSize( aSize );
// ask NWF what if it has an opinion, too
@@ -2966,7 +2966,7 @@ void Edit::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::Dra
if ( IsTracking() )
- EndTracking(); // Vor D&D Tracking ausschalten
+ EndTracking(); // Vor D&D Tracking ausschalten
::vcl::unohelper::TextDataObject* pDataObj = new ::vcl::unohelper::TextDataObject( GetSelected() );
sal_Int8 nActions = datatransfer::dnd::DNDConstants::ACTION_COPY;
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 090aa2a84163..dff681f709a2 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -230,7 +230,7 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
{
bool bChangeDec = (rOldDecSep != rNewDecSep);
bool bChangeTh = (rOldThSep != rNewThSep );
-
+
if( bChangeDec || bChangeTh )
{
BOOL bUpdateMode = pEdit->IsUpdateMode();
@@ -241,7 +241,7 @@ static void ImplUpdateSeparators( const String& rOldDecSep, const String& rNewDe
if( bChangeTh )
aText.SearchAndReplaceAll( rNewThSep, rOldThSep );
pEdit->SetText( aText );
-
+
ComboBox* pCombo = dynamic_cast<ComboBox*>(pEdit);
if( pCombo )
{
@@ -478,19 +478,19 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_MAX & nMask )
mnMax = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_VALUE & nMask )
{
mnFieldValue = pMgr->ReadLong();
@@ -1073,7 +1073,7 @@ static XubString ImplMetricGetUnitText( const XubString& rStr )
}
}
return aStr;
-
+
/*
// MT: #90545# Preparation for translated strings...
String aMetricText;
@@ -1092,7 +1092,7 @@ static XubString ImplMetricGetUnitText( const XubString& rStr )
break;
}
}
-*/
+*/
}
// -----------------------------------------------------------------------
@@ -1128,6 +1128,10 @@ static FieldUnit ImplStringToMetric( const String &rMetricString )
if ( strAllUnits->GetString( i ).Equals( aStr ) )
return (FieldUnit) strAllUnits->GetValue( i );
+ // Amelia : about character unit
+ if (aStr.EqualsIgnoreCaseAscii("cm"))
+ return FUNIT_CM;
+
return FUNIT_NONE;
}
@@ -1143,20 +1147,24 @@ static FieldUnit ImplMetricGetUnit( const XubString& rStr )
#define M *1000000L
#define X *5280L
-static const sal_Int64 aImplFactor[FUNIT_MILE+1][FUNIT_MILE+1] =
+// Amelia : about measurement unit, 'char' and 'line'
+//static const sal_Int64 aImplFactor[FUNIT_MILE+1][FUNIT_MILE+1] =
+static const sal_Int64 aImplFactor[FUNIT_LINE+1][FUNIT_LINE+1] =
{ /*
-mm/100 mm cm m km twip point pica inch foot mile */
-{ 1, 100, 1 K, 100 K, 100 M, 2540, 2540, 2540, 2540,2540*12,2540*12 X },
-{ 1, 1, 10, 1 K, 1 M, 2540, 2540, 2540, 2540,2540*12,2540*12 X },
-{ 1, 1, 1, 100, 100 K, 254, 254, 254, 254, 254*12, 254*12 X },
-{ 1, 1, 1, 1, 1 K, 254, 254, 254, 254, 254*12, 254*12 X },
-{ 1, 1, 1, 1, 1, 0, 254, 254, 254, 254*12, 254*12 X },
-{ 1440,144 K,144 K,14400 K, 0, 1, 20, 240, 1440,1440*12,1440*12 X },
-{ 72, 7200, 7200, 720 K, 720 M, 1, 1, 12, 72, 72*12, 72*12 X },
-{ 6, 600, 600, 60 K, 60 M, 1, 1, 1, 6, 6*12, 6*12 X },
-{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 12, 12 X },
-{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 1, 1 X },
-{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 1, 1 }
+mm/100 mm cm m km twip point pica inch foot mile char line*/
+{ 1, 100, 1 K, 100 K, 100 M, 2540, 2540, 2540, 2540,2540*12,2540*12 X , 53340, 396240},
+{ 1, 1, 10, 1 K, 1 M, 2540, 2540, 2540, 2540,2540*12,2540*12 X , 5334, 396240},
+{ 1, 1, 1, 100, 100 K, 254, 254, 254, 254, 254*12, 254*12 X , 5334, 39624},
+{ 1, 1, 1, 1, 1 K, 254, 254, 254, 254, 254*12, 254*12 X , 533400, 39624},
+{ 1, 1, 1, 1, 1, 0, 254, 254, 254, 254*12, 254*12 X ,533400 K, 39624},
+{ 1440,144 K,144 K,14400 K, 0, 1, 20, 240, 1440,1440*12,1440*12 X , 210, 3120},
+{ 72, 7200, 7200, 720 K, 720 M, 1, 1, 12, 72, 72*12, 72*12 X , 210, 156},
+{ 6, 600, 600, 60 K, 60 M, 1, 1, 1, 6, 6*12, 6*12 X , 210, 10},
+{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 12, 12 X , 210, 45},
+{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 1, 1 X , 210, 45},
+{ 1, 100, 100, 10 K, 10 M, 1, 1, 1, 1, 1, 1 , 210, 45},
+{ 144, 1440,14400, 14400, 14400, 1, 20, 240, 1440,1440*12, 1440*12 X, 1, 156 },
+{ 720,72000,72000, 7200 K,7200 M, 20, 10, 13, 11, 11*12, 11*12 X, 105, 1 }
};
#undef X
@@ -1489,10 +1497,10 @@ void MetricFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( METRICFORMATTER_UNIT & nMask )
meUnit = (FieldUnit)pMgr->ReadLong();
-
+
if ( METRICFORMATTER_CUSTOMUNITTEXT & nMask )
maCustomUnitText = pMgr->ReadString();
}
@@ -1739,6 +1747,21 @@ MetricField::~MetricField()
{
}
+void MetricField::SetUnit( FieldUnit nNewUnit )
+{
+ sal_Int64 nMax = Denormalize( GetMax( nNewUnit ) );
+ sal_Int64 nMin = Denormalize( GetMin( nNewUnit ) );
+ sal_Int64 nFirst = Denormalize( GetFirst( nNewUnit ) );
+ sal_Int64 nLast = Denormalize( GetLast( nNewUnit ) );
+
+ MetricFormatter::SetUnit( nNewUnit );
+
+ SetMax( Normalize( nMax ), nNewUnit );
+ SetMin( Normalize( nMin ), nNewUnit );
+ SetFirst( Normalize( nFirst ), nNewUnit );
+ SetLast( Normalize( nLast ), nNewUnit );
+}
+
// -----------------------------------------------------------------------
void MetricField::SetFirst( sal_Int64 nNewFirst, FieldUnit eInUnit )
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 8ae2ecff41b9..78d69bd1ad3e 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -155,7 +155,7 @@ static USHORT ImplGetNum( const sal_Unicode*& rpBuf, BOOL& rbError )
static void ImplSkipDelimiters( const sal_Unicode*& rpBuf )
{
- while( ( *rpBuf == ',' ) || ( *rpBuf == '.' ) || ( *rpBuf == ';' ) ||
+ while( ( *rpBuf == ',' ) || ( *rpBuf == '.' ) || ( *rpBuf == ';' ) ||
( *rpBuf == ':' ) || ( *rpBuf == '-' ) || ( *rpBuf == '/' ) )
{
rpBuf++;
@@ -839,16 +839,16 @@ void PatternFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( PATTERNFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( PATTERNFORMATTER_EDITMASK & nMask )
aEditMask = ByteString( pMgr->ReadString(), RTL_TEXTENCODING_ASCII_US );
-
+
if ( PATTERNFORMATTER_LITTERALMASK & nMask )
aLiteralMask = pMgr->ReadString();
-
+
if ( (PATTERNFORMATTER_EDITMASK | PATTERNFORMATTER_LITTERALMASK) & nMask )
ImplSetMask( aEditMask, aLiteralMask );
}
@@ -1567,7 +1567,7 @@ void DateField::ImplDateSpinArea( BOOL bUp )
nPos++;
}
}
-
+
switch( eFormat )
{
@@ -1650,7 +1650,7 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( DATEFORMATTER_MIN & nMask )
{
maMin = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -1663,10 +1663,10 @@ void DateFormatter::ImplLoadRes( const ResId& rResId )
}
if ( DATEFORMATTER_LONGFORMAT & nMask )
mbLongFormat = (BOOL)pMgr->ReadShort();
-
+
if ( DATEFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( DATEFORMATTER_VALUE & nMask )
{
maFieldDate = Date( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -2086,12 +2086,12 @@ DateField::DateField( Window* pParent, const ResId& rResId ) :
void DateField::ImplLoadRes( const ResId& rResId )
{
SpinField::ImplLoadRes( rResId );
-
+
ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
DateFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
+
ULONG nMask = ReadLongRes();
if ( DATEFIELD_FIRST & nMask )
{
@@ -2819,28 +2819,28 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
ULONG nMask = pMgr->ReadLong();
-
+
if ( TIMEFORMATTER_MIN & nMask )
{
SetMin( Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) );
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
-
+
if ( TIMEFORMATTER_MAX & nMask )
{
SetMax( Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) ) );
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
-
+
if ( TIMEFORMATTER_TIMEFIELDFORMAT & nMask )
meFormat = (TimeFieldFormat)pMgr->ReadLong();
-
+
if ( TIMEFORMATTER_DURATION & nMask )
mbDuration = (BOOL)pMgr->ReadShort();
-
+
if ( TIMEFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( TIMEFORMATTER_VALUE & nMask )
{
maFieldTime = Time( ResId( (RSHEADER_TYPE *)pMgr->GetClass(), *pMgr ) );
@@ -2849,7 +2849,7 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId )
if ( maFieldTime < GetMin() )
maFieldTime = GetMin();
maLastTime = maFieldTime;
-
+
pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE *)pMgr->GetClass() ) );
}
}
@@ -3140,9 +3140,9 @@ void TimeField::ImplLoadRes( const ResId& rResId )
if( pMgr )
{
TimeFormatter::ImplLoadRes( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
-
+
ULONG nMask = ReadLongRes();
-
+
if ( TIMEFIELD_FIRST & nMask )
{
maFirst = Time( ResId( (RSHEADER_TYPE *)GetClassRes(), *pMgr ) );
@@ -3154,7 +3154,7 @@ void TimeField::ImplLoadRes( const ResId& rResId )
IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
}
}
-
+
Reformat();
}
diff --git a/vcl/source/control/fixbrd.cxx b/vcl/source/control/fixbrd.cxx
index b519174f95d1..a42097ee53ed 100644
--- a/vcl/source/control/fixbrd.cxx
+++ b/vcl/source/control/fixbrd.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,8 +40,8 @@
void FixedBorder::ImplInit( Window* pParent, WinBits nStyle )
{
- mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
- mbTransparent = TRUE;
+ mnType = FIXEDBORDER_TYPE_DOUBLEOUT;
+ mbTransparent = TRUE;
nStyle = ImplInitStyle( nStyle );
Control::ImplInit( pParent, nStyle, NULL );
@@ -119,9 +119,9 @@ FixedBorder::~FixedBorder()
void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize )
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- Rectangle aRect( rPos, rSize );
- USHORT nBorderStyle = mnType;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ Rectangle aRect( rPos, rSize );
+ USHORT nBorderStyle = mnType;
if ( (nDrawFlags & WINDOW_DRAW_MONO) ||
(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
@@ -144,7 +144,7 @@ void FixedBorder::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
else
*/
{
- DecorationView aDecoView( pDev );
+ DecorationView aDecoView( pDev );
aDecoView.DrawFrame( aRect, nBorderStyle );
}
}
@@ -161,8 +161,8 @@ void FixedBorder::Paint( const Rectangle& )
void FixedBorder::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 37406293d7cf..ef778c1d0cbd 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,21 +37,21 @@
// =======================================================================
-#define FIXEDLINE_TEXT_BORDER 4
+#define FIXEDLINE_TEXT_BORDER 4
-#define FIXEDTEXT_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
- WB_WORDBREAK | WB_NOLABEL | \
+#define FIXEDTEXT_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
+ WB_WORDBREAK | WB_NOLABEL | \
WB_INFO | WB_PATHELLIPSIS)
-#define FIXEDLINE_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
-#define FIXEDBITMAP_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
+#define FIXEDLINE_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
+#define FIXEDBITMAP_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
WB_SCALE)
-#define FIXEDIMAGE_VIEW_STYLE (WB_3DLOOK | \
- WB_LEFT | WB_CENTER | WB_RIGHT | \
- WB_TOP | WB_VCENTER | WB_BOTTOM | \
+#define FIXEDIMAGE_VIEW_STYLE (WB_3DLOOK | \
+ WB_LEFT | WB_CENTER | WB_RIGHT | \
+ WB_TOP | WB_VCENTER | WB_BOTTOM | \
WB_SCALE)
// =======================================================================
@@ -59,8 +59,8 @@
static Point ImplCalcPos( WinBits nStyle, const Point& rPos,
const Size& rObjSize, const Size& rWinSize )
{
- long nX;
- long nY;
+ long nX;
+ long nY;
if ( nStyle & WB_LEFT )
nX = 0;
@@ -228,10 +228,10 @@ void FixedText::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
bool bFillLayout
) const
{
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- WinBits nWinStyle = GetStyle();
- XubString aText( GetText() );
- USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ WinBits nWinStyle = GetStyle();
+ XubString aText( GetText() );
+ USHORT nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
@@ -283,9 +283,9 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ImplInitSettings( TRUE, TRUE, TRUE );
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Font aFont = GetDrawPixelFont( pDev );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Font aFont = GetDrawPixelFont( pDev );
pDev->Push();
pDev->SetMapMode();
@@ -347,7 +347,7 @@ void FixedText::StateChanged( StateChangedType nType )
Invalidate();
}
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
ImplInitSettings( TRUE, FALSE, FALSE );
@@ -494,11 +494,11 @@ void FixedLine::ImplInitSettings( BOOL bFont,
void FixedLine::ImplDraw( bool bLayout )
{
- Size aOutSize = GetOutputSizePixel();
- String aText = GetText();
- WinBits nWinStyle = GetStyle();
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ Size aOutSize = GetOutputSizePixel();
+ String aText = GetText();
+ WinBits nWinStyle = GetStyle();
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
+ String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
DecorationView aDecoView( this );
if ( !aText.Len() || (nWinStyle & WB_VERT) )
@@ -522,8 +522,8 @@ void FixedLine::ImplDraw( bool bLayout )
}
else
{
- USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
- Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
+ USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
+ Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( !IsEnabled() )
@@ -616,7 +616,7 @@ void FixedLine::StateChanged( StateChangedType nType )
(GetStyle() & FIXEDLINE_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_STYLE) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
@@ -806,9 +806,9 @@ void FixedBitmap::Paint( const Rectangle& )
void FixedBitmap::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
@@ -1058,9 +1058,9 @@ void FixedImage::UserDraw( const UserDrawEvent& )
void FixedImage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Rectangle aRect( aPos, aSize );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Rectangle aRect( aPos, aSize );
pDev->Push();
pDev->SetMapMode();
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index ecf00568e11f..9b423709595f 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,10 +39,10 @@
// =======================================================================
-#define GROUP_BORDER 12
-#define GROUP_TEXT_BORDER 2
+#define GROUP_BORDER 12
+#define GROUP_TEXT_BORDER 2
-#define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
+#define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL)
// =======================================================================
@@ -136,12 +136,12 @@ GroupBox::GroupBox( Window* pParent, const ResId& rResId ) :
void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
const Point& rPos, const Size& rSize, bool bLayout )
{
- long nTop;
- long nTextOff;
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- XubString aText( GetText() );
- Rectangle aRect( rPos, rSize );
- USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
+ long nTop;
+ long nTextOff;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ XubString aText( GetText() );
+ Rectangle aRect( rPos, rSize );
+ USHORT nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
if ( GetStyle() & WB_NOLABEL )
nTextStyle &= ~TEXT_DRAW_MNEMONIC;
@@ -186,7 +186,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
pDev->SetLineColor( Color( COL_BLACK ) );
else
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
-
+
if ( !aText.Len() )
pDev->DrawLine( Point( rPos.X(), nTop ), Point( rPos.X()+rSize.Width()-2, nTop ) );
else
@@ -228,7 +228,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
void GroupBox::FillLayoutData() const
{
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
- const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true );
+ const_cast<GroupBox*>(this)-> ImplDraw( const_cast<GroupBox*>(this), 0, Point(), GetOutputSizePixel(), true );
}
// -----------------------------------------------------------------------
@@ -243,9 +243,9 @@ void GroupBox::Paint( const Rectangle& )
void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
ULONG nFlags )
{
- Point aPos = pDev->LogicToPixel( rPos );
- Size aSize = pDev->LogicToPixel( rSize );
- Font aFont = GetDrawPixelFont( pDev );
+ Point aPos = pDev->LogicToPixel( rPos );
+ Size aSize = pDev->LogicToPixel( rSize );
+ Font aFont = GetDrawPixelFont( pDev );
pDev->Push();
pDev->SetMapMode();
@@ -288,7 +288,7 @@ void GroupBox::StateChanged( StateChangedType nType )
(GetStyle() & GROUP_VIEW_STYLE) )
Invalidate();
}
- else if ( (nType == STATE_CHANGE_ZOOM) ||
+ else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
ImplInitSettings( TRUE, FALSE, FALSE );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 02c8d2b5fcb3..f88e9c8f7c76 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -283,10 +283,10 @@ USHORT ImplEntryList::FindEntry( const XubString& rString, BOOL bSearchMRUArea )
USHORT ImplEntryList::FindMatchingEntry( const XubString& rStr, USHORT nStart, BOOL bForward, BOOL bLazy ) const
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
- USHORT nEntryCount = GetEntryCount();
+ USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ USHORT nEntryCount = GetEntryCount();
if ( !bForward )
- nStart++; // wird sofort dekrementiert
+ nStart++; // wird sofort dekrementiert
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
for ( USHORT n = nStart; bForward ? ( n < nEntryCount ) : n; )
@@ -341,7 +341,7 @@ long ImplEntryList::GetAddedHeight( USHORT i_nEndIndex, USHORT i_nBeginIndex, lo
nStop = nEntryCount-1;
if( nStart > nEntryCount-1 )
nStart = nEntryCount-1;
-
+
USHORT nIndex = nStart;
while( nIndex != LISTBOX_ENTRY_NOTFOUND && nIndex < nStop )
{
@@ -531,37 +531,37 @@ USHORT ImplEntryList::FindFirstSelectable( USHORT nPos, bool bForward /* = true
ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) :
Control( pParent, 0 )
{
- mpEntryList = new ImplEntryList( this );
-
- mnTop = 0;
- mnLeft = 0;
- mnBorder = 1;
- mnSelectModifier = 0;
- mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
- mbTrack = FALSE;
- mbImgsDiffSz = FALSE;
- mbTravelSelect = FALSE;
- mbTrackingSelect = FALSE;
- mbSelectionChanged = FALSE;
- mbMouseMoveSelect = FALSE;
- mbMulti = FALSE;
- mbStackMode = FALSE;
- mbGrabFocus = FALSE;
- mbUserDrawEnabled = FALSE;
- mbInUserDraw = FALSE;
- mbReadOnly = FALSE;
+ mpEntryList = new ImplEntryList( this );
+
+ mnTop = 0;
+ mnLeft = 0;
+ mnBorder = 1;
+ mnSelectModifier = 0;
+ mnUserDrawEntry = LISTBOX_ENTRY_NOTFOUND;
+ mbTrack = FALSE;
+ mbImgsDiffSz = FALSE;
+ mbTravelSelect = FALSE;
+ mbTrackingSelect = FALSE;
+ mbSelectionChanged = FALSE;
+ mbMouseMoveSelect = FALSE;
+ mbMulti = FALSE;
+ mbStackMode = FALSE;
+ mbGrabFocus = FALSE;
+ mbUserDrawEnabled = FALSE;
+ mbInUserDraw = FALSE;
+ mbReadOnly = FALSE;
mbHasFocusRect = FALSE;
mbRight = ( nWinStyle & WB_RIGHT ) ? TRUE : FALSE;
mbCenter = ( nWinStyle & WB_CENTER ) ? TRUE : FALSE;
- mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
- mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
+ mbSimpleMode = ( nWinStyle & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ mbSort = ( nWinStyle & WB_SORT ) ? TRUE : FALSE;
// pb: #106948# explicit mirroring for calc
- mbMirroring = FALSE;
+ mbMirroring = FALSE;
- mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
+ mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
mnTrackingSaveSelection = LISTBOX_ENTRY_NOTFOUND;
- mnSeparatorPos = LISTBOX_ENTRY_NOTFOUND;
+ mnSeparatorPos = LISTBOX_ENTRY_NOTFOUND;
meProminentType = PROMINENT_TOP;
SetLineColor();
@@ -594,11 +594,11 @@ void ImplListBoxWindow::ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBa
void ImplListBoxWindow::ImplCalcMetrics()
{
- mnMaxWidth = 0;
- mnMaxTxtWidth = 0;
- mnMaxImgWidth = 0;
+ mnMaxWidth = 0;
+ mnMaxTxtWidth = 0;
+ mnMaxImgWidth = 0;
mnMaxImgTxtWidth= 0;
- mnMaxImgHeight = 0;
+ mnMaxImgHeight = 0;
mnTextHeight = (USHORT)GetTextHeight();
mnMaxTxtHeight = mnTextHeight + mnBorder;
@@ -636,15 +636,15 @@ void ImplListBoxWindow::Clear()
{
mpEntryList->Clear();
- mnMaxHeight = mnMaxTxtHeight;
- mnMaxWidth = 0;
- mnMaxTxtWidth = 0;
+ mnMaxHeight = mnMaxTxtHeight;
+ mnMaxWidth = 0;
+ mnMaxTxtWidth = 0;
mnMaxImgTxtWidth= 0;
- mnMaxImgWidth = 0;
- mnMaxImgHeight = 0;
- mnTop = 0;
- mnLeft = 0;
- mbImgsDiffSz = FALSE;
+ mnMaxImgWidth = 0;
+ mnMaxImgHeight = 0;
+ mnTop = 0;
+ mnLeft = 0;
+ mbImgsDiffSz = FALSE;
ImplClearLayoutData();
mnCurrentPos = LISTBOX_ENTRY_NOTFOUND;
@@ -663,13 +663,13 @@ void ImplListBoxWindow::SetUserItemSize( const Size& rSz )
struct ImplEntryMetrics
{
- BOOL bText;
- BOOL bImage;
- long nEntryWidth;
- long nEntryHeight;
- long nTextWidth;
- long nImgWidth;
- long nImgHeight;
+ BOOL bText;
+ BOOL bImage;
+ long nEntryWidth;
+ long nEntryHeight;
+ long nTextWidth;
+ long nImgWidth;
+ long nImgHeight;
};
// -----------------------------------------------------------------------
@@ -715,7 +715,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
if ( aMetrics.bImage )
{
Size aImgSz = rEntry.maImage.GetSizePixel();
- aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
+ aMetrics.nImgWidth = (USHORT) CalcZoom( aImgSz.Width() );
aMetrics.nImgHeight = (USHORT) CalcZoom( aImgSz.Height() );
if( mnMaxImgWidth && ( aMetrics.nImgWidth != mnMaxImgWidth ) )
@@ -730,7 +730,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxImgTxtWidth = Max( mnMaxImgTxtWidth, aMetrics.nTextWidth );
aMetrics.nEntryHeight = Max( aMetrics.nImgHeight, aMetrics.nEntryHeight );
-
+
}
if ( IsUserDrawEnabled() || aMetrics.bImage )
{
@@ -752,7 +752,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxWidth = aMetrics.nEntryWidth;
if ( aMetrics.nEntryHeight > mnMaxHeight )
mnMaxHeight = aMetrics.nEntryHeight;
-
+
rEntry.mnHeight = aMetrics.nEntryHeight;
}
@@ -808,7 +808,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
if( (GetStyle() & WB_WORDBREAK) )
pNewEntry->mnFlags |= LISTBOX_ENTRY_FLAG_MULTILINE;
-
+
ImplUpdateEntryMetrics( *pNewEntry );
return nNewPos;
}
@@ -861,7 +861,7 @@ void ImplListBoxWindow::ImplHideFocusRect()
USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
{
long nY = mnBorder;
-
+
USHORT nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
while( pEntry && rPoint.Y() > pEntry->mnHeight + nY )
@@ -880,7 +880,7 @@ USHORT ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
{
BOOL bRet = FALSE;
-
+
if( i_nEntry >= mnTop )
{
if( mpEntryList->GetAddedHeight( i_nEntry, mnTop ) <
@@ -889,7 +889,7 @@ BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
bRet = TRUE;
}
}
-
+
return bRet;
}
@@ -903,13 +903,13 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
long nDiff;
for( nDiff = 0; nDiff < nWindowHeight && nPos < nCount; nDiff = mpEntryList->GetAddedHeight( nPos, mnTop ) )
nPos++;
-
+
if( nDiff > nWindowHeight && nPos > mnTop )
nPos--;
-
+
if( nPos >= nCount )
nPos = nCount-1;
-
+
return nPos;
}
@@ -917,7 +917,7 @@ USHORT ImplListBoxWindow::GetLastVisibleEntry() const
void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
+ mbMouseMoveSelect = FALSE; // Nur bis zum ersten MouseButtonDown
maSearchStr.Erase();
if ( !IsReadOnly() )
@@ -991,7 +991,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
nSelect = Min( nSelect, GetLastVisibleEntry() );
nSelect = Min( nSelect, (USHORT) ( mpEntryList->GetEntryCount() - 1 ) );
// Select only visible Entries with MouseMove, otherwise Tracking...
- if ( IsVisible( nSelect ) &&
+ if ( IsVisible( nSelect ) &&
mpEntryList->IsEntrySelectable( nSelect ) &&
( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectEntryPos( 0 ) ) ) )
{
@@ -1303,7 +1303,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
MouseEvent aMEvt = rTEvt.GetMouseEvent();
Point aPt( aMEvt.GetPosPixel() );
BOOL bShift = aMEvt.IsShift();
- BOOL bCtrl = aMEvt.IsMod1();
+ BOOL bCtrl = aMEvt.IsMod1();
USHORT nSelect = LISTBOX_ENTRY_NOTFOUND;
if( aPt.Y() < 0 )
@@ -1319,7 +1319,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mnCurrentPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
+ nSelect = Min( (USHORT)(mnCurrentPos+1), (USHORT)(mpEntryList->GetEntryCount()-1) );
if( nSelect >= GetLastVisibleEntry() )
SetTopEntry( mnTop+1 );
}
@@ -1422,9 +1422,9 @@ void ImplListBoxWindow::KeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-#define IMPL_SELECT_NODIRECTION 0
-#define IMPL_SELECT_UP 1
-#define IMPL_SELECT_DOWN 2
+#define IMPL_SELECT_NODIRECTION 0
+#define IMPL_SELECT_UP 1
+#define IMPL_SELECT_DOWN 2
BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
@@ -1435,12 +1435,12 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
KeyCode aKeyCode = rKEvt.GetKeyCode();
BOOL bShift = aKeyCode.IsShift();
- BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
+ BOOL bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3();
BOOL bMod2 = aKeyCode.IsMod2();
BOOL bDone = FALSE;
switch( aKeyCode.GetCode() )
- {
+ {
case KEY_UP:
{
if ( IsReadOnly() )
@@ -1517,7 +1517,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
USHORT nCurVis = GetLastVisibleEntry() - mnTop +1;
SetTopEntry( ( mnTop > nCurVis ) ? ( mnTop-nCurVis+1 ) : 0 );
}
-
+
// find first selectable starting from mnTop looking foreward
nSelect = mpEntryList->FindFirstSelectable( mnTop, true );
}
@@ -1636,7 +1636,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
{
mnSelectModifier = rKEvt.GetKeyCode().GetModifier();
ImplCallSelect();
- bDone = FALSE; // RETURN nicht abfangen.
+ bDone = FALSE; // RETURN nicht abfangen.
}
maSearchStr.Erase();
}
@@ -1665,16 +1665,16 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
BOOL bUpdates = IsUpdateMode();
SetUpdateMode( FALSE );
- USHORT nEntryCount = mpEntryList->GetEntryCount();
+ USHORT nEntryCount = mpEntryList->GetEntryCount();
for( USHORT i = 0; i < nEntryCount; i++ )
SelectEntry( i, TRUE );
-
+
// restore update mode
SetUpdateMode( bUpdates );
Invalidate();
-
+
maSearchStr.Erase();
-
+
bDone = TRUE;
break;
}
@@ -1748,7 +1748,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
void ImplListBoxWindow::ImplPaint( USHORT nPos, BOOL bErase, bool bLayout )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
+
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
return;
@@ -1801,8 +1801,8 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
{
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos );
if( ! pEntry )
- return;
-
+ return;
+
// Bei Aenderungen in dieser Methode ggf. auch ImplWin::DrawEntry() anpassen.
if ( mbInUserDraw )
@@ -1876,7 +1876,7 @@ void ImplListBoxWindow::DrawEntry( USHORT nPos, BOOL bDrawImage, BOOL bDrawText,
nDrawStyle |= MULTILINE_ENTRY_DRAW_FLAGS;
if( (pEntry->mnFlags & LISTBOX_ENTRY_FLAG_DRAW_DISABLED) )
nDrawStyle |= TEXT_DRAW_DISABLE;
-
+
DrawText( aTextRect, aStr, nDrawStyle, pVector, pDisplayText );
}
}
@@ -1952,7 +1952,7 @@ void ImplListBoxWindow::Paint( const Rectangle& rRect )
USHORT ImplListBoxWindow::GetDisplayLineCount() const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
-
+
USHORT nCount = mpEntryList->GetEntryCount();
long nHeight = GetOutputSizePixel().Height();// - mnMaxHeight + mnBorder;
USHORT nEntries = static_cast< USHORT >( ( nHeight + mnMaxHeight - 1 ) / mnMaxHeight );
@@ -2025,16 +2025,16 @@ void ImplListBoxWindow::SetTopEntry( USHORT nTop )
{
if( mpEntryList->GetEntryCount() == 0 )
return;
-
+
long nWHeight = PixelToLogic( GetSizePixel() ).Height();
-
+
USHORT nLastEntry = mpEntryList->GetEntryCount()-1;
if( nTop > nLastEntry )
nTop = nLastEntry;
const ImplEntryType* pLast = mpEntryList->GetEntryPtr( nLastEntry );
while( nTop > 0 && mpEntryList->GetAddedHeight( nLastEntry, nTop-1 ) + pLast->mnHeight <= nWHeight )
nTop--;
-
+
if ( nTop != mnTop )
{
ImplClearLayoutData();
@@ -2112,10 +2112,10 @@ void ImplListBoxWindow::ScrollHorz( long n )
Size ImplListBoxWindow::CalcSize( USHORT nMaxLines ) const
{
// FIXME: LISTBOX_ENTRY_FLAG_MULTILINE
-
+
Size aSz;
-// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
- aSz.Height() = nMaxLines * mnMaxHeight;
+// USHORT nL = Min( nMaxLines, mpEntryList->GetEntryCount() );
+ aSz.Height() = nMaxLines * mnMaxHeight;
aSz.Width() = mnMaxWidth + 2*mnBorder;
return aSz;
}
@@ -2213,17 +2213,17 @@ ImplListBox::ImplListBox( Window* pParent, WinBits nWinStyle ) :
// for native widget rendering we must be able to detect this window type
SetType( WINDOW_LISTBOXWINDOW );
- mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
- mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
- mpScrollBarBox = new ScrollBarBox( this );
+ mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
+ mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
+ mpScrollBarBox = new ScrollBarBox( this );
Link aLink( LINK( this, ImplListBox, ScrollBarHdl ) );
mpVScrollBar->SetScrollHdl( aLink );
mpHScrollBar->SetScrollHdl( aLink );
- mbVScroll = FALSE;
- mbHScroll = FALSE;
- mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
+ mbVScroll = FALSE;
+ mbHScroll = FALSE;
+ mbAutoHScroll = ( nWinStyle & WB_AUTOHSCROLL ) ? TRUE : FALSE;
maLBWindow.SetScrollHdl( LINK( this, ImplListBox, LBWindowScrolled ) );
maLBWindow.SetMRUChangedHdl( LINK( this, ImplListBox, MRUChanged ) );
@@ -2395,7 +2395,7 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
else
{
@@ -2419,7 +2419,7 @@ void ImplListBox::ImplCheckScrollBars()
bArrange = TRUE;
mbHScroll = TRUE;
- if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
+ if ( !mbVScroll ) // ggf. brauchen wir jetzt doch einen
{
nMaxVisEntries = (USHORT) ( ( aOutSz.Height() - mpHScrollBar->GetSizePixel().Height() ) / GetEntryHeight() );
if( nEntries > nMaxVisEntries )
@@ -2428,7 +2428,7 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
}
@@ -2552,8 +2552,8 @@ void ImplListBox::StateChanged( StateChangedType nType )
{
BOOL bUpdate = IsUpdateMode();
maLBWindow.SetUpdateMode( bUpdate );
-// mpHScrollBar->SetUpdateMode( bUpdate );
-// mpVScrollBar->SetUpdateMode( bUpdate );
+// mpHScrollBar->SetUpdateMode( bUpdate );
+// mpVScrollBar->SetUpdateMode( bUpdate );
if ( bUpdate && IsReallyVisible() )
ImplCheckScrollBars();
}
@@ -2596,13 +2596,13 @@ void ImplListBox::StateChanged( StateChangedType nType )
void ImplListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
-// if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
-// (rDCEvt.GetFlags() & SETTINGS_STYLE) )
-// {
-// maLBWindow.SetSettings( GetSettings() );
-// Resize();
-// }
-// else
+// if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
+// (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+// {
+// maLBWindow.SetSettings( GetSettings() );
+// Resize();
+// }
+// else
Control::DataChanged( rDCEvt );
}
@@ -2751,7 +2751,7 @@ void ImplWin::MouseButtonDown( const MouseEvent& )
{
if( IsEnabled() )
{
-// Control::MouseButtonDown( rMEvt );
+// Control::MouseButtonDown( rMEvt );
MBDown();
}
}
@@ -2812,7 +2812,7 @@ void ImplWin::ImplDraw( bool bLayout )
nState &= ~CTRL_STATE_ENABLED;
if ( pWin->HasFocus() )
nState |= CTRL_STATE_FOCUSED;
-
+
// The listbox is painted over the entire control including the
// border, but ImplWin does not contain the border => correction
// needed.
@@ -2828,10 +2828,10 @@ void ImplWin::ImplDraw( bool bLayout )
while( pChild && (bMouseOver = pChild->IsMouseOver()) == FALSE )
pChild = pChild->GetWindow( WINDOW_NEXT );
}
-
+
if( bMouseOver )
nState |= CTRL_STATE_ROLLOVER;
-
+
// if parent has no border, then nobody has drawn the background
// since no border window exists. so draw it here.
WinBits nParentStyle = pWin->GetStyle();
@@ -2841,7 +2841,7 @@ void ImplWin::ImplDraw( bool bLayout )
pWin->DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aParentRect,
nState, aControlValue, rtl::OUString() );
}
-
+
bNativeOK = DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
}
@@ -3012,7 +3012,7 @@ void ImplWin::LoseFocus()
ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) :
PushButton( pParent, nWinStyle ),
- mbDown ( FALSE )
+ mbDown ( FALSE )
{
}
@@ -3048,7 +3048,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
EnableSaveBackground();
-
+
Window * pBorderWindow = ImplGetBorderWindow();
if( pBorderWindow )
{
@@ -3098,7 +3098,7 @@ void ImplListBoxFloatingWindow::SetPosSizePixel( long nX, long nY, long nWidth,
SetPosPixel( ImplCalcPos( this, Rectangle( aPos, GetParent()->GetSizePixel() ), FLOATWIN_POPUPMODE_DOWN, nIndex ) );
}
-// if( !IsReallyVisible() )
+// if( !IsReallyVisible() )
{
// Die ImplListBox erhaelt kein Resize, weil nicht sichtbar.
// Die Fenster muessen aber ein Resize() erhalten, damit die
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 075a8b1b95e2..f643f0c479e1 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -232,7 +232,7 @@ void ImageControl::Paint( const Rectangle& rRect )
if( HasFocus() )
{
Window *pWin = GetWindow( WINDOW_BORDER );
-
+
BOOL bFlat = (GetBorderStyle() == 2);
Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() );
Color oldLineCol = pWin->GetLineColor();
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index 65fe11929d1e..1d32efdaf54f 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,14 +49,14 @@
// =======================================================================
-#define FORMAT_LONGCURRENCY 4
+#define FORMAT_LONGCURRENCY 4
// =======================================================================
static BigInt ImplPower10( USHORT n )
{
USHORT i;
- BigInt nValue = 1;
+ BigInt nValue = 1;
for ( i=0; i < n; i++ )
nValue *= 10;
@@ -83,7 +83,7 @@ static XubString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const
if ( !aInteger.IsZero() )
{
aFraction += aTmp;
- aTmp = 1000000000L;
+ aTmp = 1000000000L;
}
if ( rNumber.IsNeg() )
aFraction *= -1;
@@ -123,7 +123,7 @@ static BOOL ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt,
else
{
sal_Unicode cChar = rKEvt.GetCharCode();
- USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
+ USHORT nGroup = rKEvt.GetKeyCode().GetGroup();
if ( (nGroup == KEYGROUP_FKEYS) || (nGroup == KEYGROUP_CURSOR) ||
(nGroup == KEYGROUP_MISC) ||
@@ -143,12 +143,12 @@ static BOOL ImplNumericGetValue( const XubString& rStr, BigInt& rValue,
USHORT nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper,
BOOL bCurrency = FALSE )
{
- XubString aStr = rStr;
- XubString aStr1;
- XubString aStr2;
- USHORT nDecPos;
- BOOL bNegative = FALSE;
- xub_StrLen i;
+ XubString aStr = rStr;
+ XubString aStr1;
+ XubString aStr2;
+ USHORT nDecPos;
+ BOOL bNegative = FALSE;
+ xub_StrLen i;
// Reaktion auf leeren String
if ( !rStr.Len() )
@@ -315,7 +315,7 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
}
}
- rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
+ rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
return TRUE;
}
}
@@ -325,14 +325,14 @@ BOOL ImplLongCurrencyReformat( const XubString& rStr, BigInt nMin, BigInt nMax,
void LongCurrencyFormatter::ImpInit()
{
- mnFieldValue = 0;
- mnLastValue = 0;
- mnMin = 0;
- mnMax = 0x7FFFFFFF;
- mnMax *= 0x7FFFFFFF;
- mnCorrectedValue = 0;
+ mnFieldValue = 0;
+ mnLastValue = 0;
+ mnMin = 0;
+ mnMax = 0x7FFFFFFF;
+ mnMax *= 0x7FFFFFFF;
+ mnCorrectedValue = 0;
mnDecimalDigits = 0;
- mnType = FORMAT_LONGCURRENCY;
+ mnType = FORMAT_LONGCURRENCY;
mbThousandSep = TRUE;
SetDecimalDigits( 0 );
}
@@ -350,23 +350,23 @@ void LongCurrencyFormatter::ImplLoadRes( const ResId& rResId )
{
ImpInit();
- ResMgr* pMgr = rResId.GetResMgr();
+ ResMgr* pMgr = rResId.GetResMgr();
if( pMgr )
{
- ULONG nMask = pMgr->ReadLong();
-
+ ULONG nMask = pMgr->ReadLong();
+
if ( NUMERICFORMATTER_MIN & nMask )
mnMin = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_MAX & nMask )
mnMax = pMgr->ReadLong();
-
+
if ( NUMERICFORMATTER_STRICTFORMAT & nMask )
SetStrictFormat( (BOOL)pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_DECIMALDIGITS & nMask )
SetDecimalDigits( pMgr->ReadShort() );
-
+
if ( NUMERICFORMATTER_VALUE & nMask )
{
mnFieldValue = pMgr->ReadLong();
@@ -516,11 +516,11 @@ void LongCurrencyFormatter::SetUseThousandSep( BOOL b )
void LongCurrencyFormatter::SetDecimalDigits( USHORT nDigits )
{
-// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
+// DBG_ASSERT( nDigits < 10, "LongCurrency duerfen nur maximal 9 Nachkommastellen haben" );
if ( nDigits > 9 )
nDigits = 9;
-
+
mnDecimalDigits = nDigits;
ReformatAll();
}
@@ -601,9 +601,9 @@ LongCurrencyField::LongCurrencyField( Window* pParent, WinBits nWinStyle ) :
SpinField( pParent, nWinStyle )
{
SetField( this );
- mnSpinSize = 1;
- mnFirst = mnMin;
- mnLast = mnMax;
+ mnSpinSize = 1;
+ mnFirst = mnMin;
+ mnLast = mnMax;
Reformat();
}
@@ -618,9 +618,9 @@ LongCurrencyField::LongCurrencyField( Window* pParent, const ResId& rResId ) :
SpinField::ImplInit( pParent, nStyle );
SetField( this );
- mnSpinSize = 1;
- mnFirst = mnMin;
- mnLast = mnMax;
+ mnSpinSize = 1;
+ mnFirst = mnMin;
+ mnLast = mnMax;
Reformat();
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 03527bf083a7..56faa153f1ca 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,13 +99,13 @@ ListBox::~ListBox()
void ListBox::ImplInitListBoxData()
{
- mpFloatWin = NULL;
- mpImplWin = NULL;
- mpBtn = NULL;
+ mpFloatWin = NULL;
+ mpImplWin = NULL;
+ mpBtn = NULL;
- mnDDHeight = 0;
- mbDDAutoSize = TRUE;
- mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
+ mnDDHeight = 0;
+ mbDDAutoSize = TRUE;
+ mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
}
@@ -175,7 +175,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle )
mpImplLB->SetUserDrawHdl( LINK( this, ListBox, ImplUserDrawHdl ) );
mpImplLB->SetPosPixel( Point() );
mpImplLB->Show();
-
+
mpImplLB->GetDropTarget()->addDropTargetListener(xDrop);
mpImplLB->SetDropTraget(xDrop);
@@ -216,7 +216,7 @@ void ListBox::ImplLoadRes( const ResId& rResId )
long nId = ReadLongRes();
if( nId )
- SetEntryData( nPos, (void *)nId ); // ID als UserData
+ SetEntryData( nPos, (void *)nId ); // ID als UserData
}
if( nSelPos < nNumber )
@@ -449,11 +449,11 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( IsDropDownBox() )
{
- XubString aText = GetSelectEntry();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOffX = 3*nOnePixel;
- long nOffY = (aSize.Height()-nTextHeight) / 2;
+ XubString aText = GetSelectEntry();
+ long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth( aText );
+ long nOffX = 3*nOnePixel;
+ long nOffY = (aSize.Height()-nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -470,9 +470,9 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
}
else
{
- long nTextHeight = pDev->GetTextHeight();
- USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
- Rectangle aClip( aPos, aSize );
+ long nTextHeight = pDev->GetTextHeight();
+ USHORT nLines = (USHORT)(aSize.Height() / nTextHeight);
+ Rectangle aClip( aPos, aSize );
pDev->IntersectClipRegion( aClip );
@@ -486,7 +486,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
if ( bSelected )
{
pDev->SetFillColor( COL_BLACK );
- pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
+ pDev->DrawRect( Rectangle( Point( aPos.X(), aPos.Y() + n*nTextHeight ),
Point( aPos.X() + aSize.Width(), aPos.Y() + (n+1)*nTextHeight + 2*nOnePixel ) ) );
pDev->SetFillColor();
pDev->SetTextColor( COL_WHITE );
@@ -565,7 +565,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( mpImplWin )
{
- mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
+ mpImplWin->SetSettings( GetSettings() ); // Falls noch nicht eingestellt...
ImplInitFieldSettings( mpImplWin, TRUE, TRUE, TRUE );
mpBtn->SetSettings( GetSettings() );
@@ -654,8 +654,8 @@ void ListBox::Resize()
{
// initialize the dropdown button size with the standard scrollbar width
long nSBWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
- long nTop = 0;
- long nBottom = aOutSz.Height();
+ long nTop = 0;
+ long nBottom = aOutSz.Height();
// note: in case of no border, pBorder will actually be this
Window *pBorder = GetWindow( WINDOW_BORDER );
@@ -759,7 +759,7 @@ long ListBox::GetIndexForPoint( const Point& rPoint, USHORT& rPos ) const
// point must be either in main list window
// or in impl window (dropdown case)
ImplListBoxWindow* pMain = mpImplLB->GetMainWindow();
-
+
// convert coordinates to ImplListBoxWindow pixel coordinate space
Point aConvPoint = LogicToPixel( rPoint );
aConvPoint = OutputToAbsoluteScreenPixel( aConvPoint );
@@ -1349,7 +1349,7 @@ Size ListBox::CalcMinimumSize() const
}
aSz = CalcWindowSize( aSz );
-
+
if ( IsDropDownBox() ) // check minimum height of dropdown box
{
ImplControlValue aControlValue;
@@ -1362,7 +1362,7 @@ Size ListBox::CalcMinimumSize() const
aSz.Height() = aBound.GetHeight();
}
}
-
+
return aSz;
}
@@ -1410,7 +1410,7 @@ Size ListBox::CalcSize( USHORT nColumns, USHORT nLines ) const
{
// ggf. werden ScrollBars eingeblendet
Size aMinSz = CalcMinimumSize();
-// aMinSz = ImplCalcOutSz( aMinSz );
+// aMinSz = ImplCalcOutSz( aMinSz );
Size aSz;
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 1c83779da1a9..1814c65d29a8 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,20 +41,20 @@
// =======================================================================
-#define IMAGEBUTTON_BORDER_OFF1 11
-#define IMAGEBUTTON_BORDER_OFF2 16
+#define IMAGEBUTTON_BORDER_OFF1 11
+#define IMAGEBUTTON_BORDER_OFF2 16
// =======================================================================
void MenuButton::ImplInitMenuButtonData()
{
- mnDDStyle = PUSHBUTTON_DROPDOWN_MENUBUTTON;
+ mnDDStyle = PUSHBUTTON_DROPDOWN_MENUBUTTON;
- mpMenuTimer = NULL;
- mpMenu = NULL;
- mpOwnMenu = NULL;
- mnCurItemId = 0;
- mnMenuMode = 0;
+ mpMenuTimer = NULL;
+ mpMenu = NULL;
+ mpOwnMenu = NULL;
+ mnCurItemId = 0;
+ mnMenuMode = 0;
}
// -----------------------------------------------------------------------
@@ -82,10 +82,10 @@ void MenuButton::ImplExecuteMenu()
if ( !((GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) ||
!(rStyleSettings.GetOptions() & STYLE_OPTION_MACSTYLE)) )
{
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
+ aRect.Left() += 2;
+ aRect.Top() += 2;
+ aRect.Right() -= 2;
+ aRect.Bottom() -= 2;
}
SetPressed( TRUE );
EndSelection();
@@ -181,10 +181,10 @@ void MenuButton::MouseButtonDown( const MouseEvent& rMEvt )
mpMenuTimer = new Timer;
mpMenuTimer->SetTimeoutHdl( LINK( this, MenuButton, ImplMenuTimeoutHdl ) );
}
-
+
mpMenuTimer->SetTimeout( GetSettings().GetMouseSettings().GetActionDelay() );
mpMenuTimer->Start();
-
+
PushButton::MouseButtonDown( rMEvt );
bExecute = false;
}
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 921a25756d32..7a38602f215d 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,9 +51,9 @@ struct ImplMoreButtonData
void MoreButton::ImplInit( Window* pParent, WinBits nStyle )
{
mpMBData = new ImplMoreButtonData;
- mnDelta = 0;
- meUnit = MAP_PIXEL;
- mbState = FALSE;
+ mnDelta = 0;
+ meUnit = MAP_PIXEL;
+ mbState = FALSE;
mpMBData->mpItemList = NULL;
@@ -148,10 +148,10 @@ MoreButton::~MoreButton()
void MoreButton::Click()
{
- Window* pParent = GetParent();
- Size aSize( pParent->GetSizePixel() );
- Window* pWindow = (mpMBData->mpItemList) ? mpMBData->mpItemList->First() : NULL;
- long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height();
+ Window* pParent = GetParent();
+ Size aSize( pParent->GetSizePixel() );
+ Window* pWindow = (mpMBData->mpItemList) ? mpMBData->mpItemList->First() : NULL;
+ long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height();
// Status aendern
mbState = !mbState;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 9c82bb096dec..fb8c5ccddc1d 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,10 +49,10 @@ using namespace rtl;
However aqua draws a little outside. The canonical way would be to enhance the
HitTestNativeControl passing a ScrollbarValue additionally so all necessary
information is available in the call.
- .
+ .
However since there is only this one small exception we will deviate a little and
instead pass the respective rect as control region to allow for a small correction.
-
+
So all places using HitTestNativeControl on PART_THUMB_HORZ, PART_THUMB_VERT,
PART_TRACK_HORZ_LEFT, PART_TRACK_HORZ_RIGHT, PART_TRACK_VERT_UPPER, PART_TRACK_VERT_LOWER
do not use the control rectangle as region but the actuall part rectangle, making
@@ -92,9 +92,9 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
struct ImplScrollBarData
{
- AutoTimer maTimer; // Timer
+ AutoTimer maTimer; // Timer
BOOL mbHide;
- Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
+ Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic
};
// =======================================================================
@@ -375,8 +375,8 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.Left() = maTrackRect.Left();
- maPage1Rect.Bottom() =
- maPage2Rect.Bottom() =
+ maPage1Rect.Bottom() =
+ maPage2Rect.Bottom() =
maThumbRect.Bottom() = maTrackRect.Bottom();
}
else
@@ -416,8 +416,8 @@ void ScrollBar::ImplCalc( BOOL bUpdate )
if( mnThumbPixRange > 0 )
{
maPage1Rect.Top() = maTrackRect.Top();
- maPage1Rect.Right() =
- maPage2Rect.Right() =
+ maPage1Rect.Right() =
+ maPage2Rect.Right() =
maThumbRect.Right() = maTrackRect.Right();
}
else
@@ -498,7 +498,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetSettings( aSettings );
}
- // for printing:
+ // for printing:
// -calculate the size of the rects
// -because this is zero-based add the correct offset
// -print
@@ -534,7 +534,7 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
// Draw the entire background if the control supports it
if( IsNativeControlSupported(CTRL_SCROLLBAR, bHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT) )
{
- ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
+ ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
scrValue.mnMin = mnMinRange;
scrValue.mnMax = mnMaxRange;
@@ -582,8 +582,8 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
{
if ( (nDrawFlags & SCRBAR_DRAW_PAGE1) || (nDrawFlags & SCRBAR_DRAW_PAGE2) )
{
- sal_uInt32 part1 = bHorz ? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER;
- sal_uInt32 part2 = bHorz ? PART_TRACK_HORZ_RIGHT : PART_TRACK_VERT_LOWER;
+ sal_uInt32 part1 = bHorz ? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER;
+ sal_uInt32 part2 = bHorz ? PART_TRACK_HORZ_RIGHT : PART_TRACK_VERT_LOWER;
Rectangle aCtrlRegion1( maPage1Rect );
Rectangle aCtrlRegion2( maPage2Rect );
ControlState nState1 = (IsEnabled() ? CTRL_STATE_ENABLED : 0) | (HasFocus() ? CTRL_STATE_FOCUSED : 0);
@@ -605,19 +605,19 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
}
if ( nDrawFlags & SCRBAR_DRAW_PAGE1 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
scrValue, rtl::OUString() );
if ( nDrawFlags & SCRBAR_DRAW_PAGE2 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
scrValue, rtl::OUString() );
}
if ( (nDrawFlags & SCRBAR_DRAW_BTN1) || (nDrawFlags & SCRBAR_DRAW_BTN2) )
{
- sal_uInt32 part1 = bHorz ? PART_BUTTON_LEFT : PART_BUTTON_UP;
- sal_uInt32 part2 = bHorz ? PART_BUTTON_RIGHT : PART_BUTTON_DOWN;
- Rectangle aCtrlRegion1( maBtn1Rect );
- Rectangle aCtrlRegion2( maBtn2Rect );
+ sal_uInt32 part1 = bHorz ? PART_BUTTON_LEFT : PART_BUTTON_UP;
+ sal_uInt32 part2 = bHorz ? PART_BUTTON_RIGHT : PART_BUTTON_DOWN;
+ Rectangle aCtrlRegion1( maBtn1Rect );
+ Rectangle aCtrlRegion2( maBtn2Rect );
ControlState nState1 = HasFocus() ? CTRL_STATE_FOCUSED : 0;
ControlState nState2 = nState1;
@@ -647,17 +647,17 @@ BOOL ScrollBar::ImplDrawNative( USHORT nDrawFlags )
}
if ( nDrawFlags & SCRBAR_DRAW_BTN1 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part1, aCtrlRegion1, nState1,
scrValue, rtl::OUString() );
if ( nDrawFlags & SCRBAR_DRAW_BTN2 )
- bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
+ bNativeOK = DrawNativeControl( CTRL_SCROLLBAR, part2, aCtrlRegion2, nState2,
scrValue, rtl::OUString() );
}
if ( (nDrawFlags & SCRBAR_DRAW_THUMB) && !maThumbRect.IsEmpty() )
{
- ControlState nState = IsEnabled() ? CTRL_STATE_ENABLED : 0;
- Rectangle aCtrlRegion( maThumbRect );
+ ControlState nState = IsEnabled() ? CTRL_STATE_ENABLED : 0;
+ Rectangle aCtrlRegion( maThumbRect );
if ( mnStateFlags & SCRBAR_STATE_THUMB_DOWN )
nState |= CTRL_STATE_PRESSED;
@@ -699,7 +699,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
Window *pWin = NULL;
if( pOutDev->GetOutDevType() == OUTDEV_WINDOW )
pWin = (Window*) pOutDev;
-
+
// Draw the entire control if the native theme engine needs it
if ( nDrawFlags && pWin && pWin->IsNativeControlSupported(CTRL_SCROLLBAR, PART_DRAW_BACKGROUND_HORZ) )
{
@@ -1067,13 +1067,13 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
if( HasFocus() )
ImplDraw( SCRBAR_DRAW_THUMB, this ); // paint without focus
}
-
+
if ( mnVisibleSize < mnMaxRange-mnMinRange )
{
nTrackFlags = 0;
meScrollType = SCROLL_DRAG;
mnDragDraw = SCRBAR_DRAW_THUMB;
-
+
// calculate mouse offset
if( rMEvt.IsMiddle() || (ImplGetSVData()->maNWFData.mbScrollbarJumpPage && !bThumbHit) )
{
@@ -1090,7 +1090,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
else
mnMouseOff = rMousePos.Y()-maThumbRect.Top();
}
-
+
mnStateFlags |= SCRBAR_STATE_THUMB_DOWN;
ImplDraw( mnDragDraw, this );
}
@@ -1102,11 +1102,11 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
bIsInside : TRUE )
{
nTrackFlags = STARTTRACK_BUTTONREPEAT;
-
+
// HitTestNativeControl, see remark at top of file
if ( HitTestNativeControl( CTRL_SCROLLBAR, bHorizontal? PART_TRACK_HORZ_LEFT : PART_TRACK_VERT_UPPER,
maPage1Rect, rMousePos, bIsInside )?
- bIsInside:
+ bIsInside:
maPage1Rect.IsInside( rMousePos ) )
{
meScrollType = SCROLL_PAGEUP;
@@ -1125,12 +1125,12 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
{
// remember original position in case of abort or EndScroll-Delta
mnStartPos = mnThumbPos;
- // #92906# Call StartTracking() before ImplDoMouseAction(), otherwise
- // MouseButtonUp() / EndTracking() may be called if somebody is spending
+ // #92906# Call StartTracking() before ImplDoMouseAction(), otherwise
+ // MouseButtonUp() / EndTracking() may be called if somebody is spending
// a lot of time in the scroll handler
StartTracking( nTrackFlags );
ImplDoMouseAction( rMousePos );
-
+
if( bDragToMouse )
ImplDragThumb( rMousePos );
}
@@ -1279,7 +1279,7 @@ void ScrollBar::ImplInvert()
aRect.Left() += 2;
aRect.Right() -= 2;
}
- if( aRect.getHeight() > 4 )
+ if( aRect.getHeight() > 4 )
{
aRect.Top() += 2;
aRect.Bottom() -= 2;
@@ -1437,7 +1437,7 @@ long ScrollBar::PreNotify( NotifyEvent& rNEvt )
aClipRegion.Union( *pRect );
if ( pLastRect )
aClipRegion.Union( *pLastRect );
-
+
// Support for 3-button scroll bars
BOOL bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS );
if ( bHas3Buttons && ( pRect == &maBtn1Rect || pLastRect == &maBtn1Rect ) )
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index daf733a57a33..9a539cf00294 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,49 +47,49 @@ static long ImplMulDiv( long nNumber, long nNumerator, long nDenominator )
// =======================================================================
-#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
-#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
-#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
-#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
-#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
+#define SLIDER_DRAW_THUMB ((USHORT)0x0001)
+#define SLIDER_DRAW_CHANNEL1 ((USHORT)0x0002)
+#define SLIDER_DRAW_CHANNEL2 ((USHORT)0x0004)
+#define SLIDER_DRAW_CHANNEL (SLIDER_DRAW_CHANNEL1 | SLIDER_DRAW_CHANNEL2)
+#define SLIDER_DRAW_ALL (SLIDER_DRAW_THUMB | SLIDER_DRAW_CHANNEL)
-#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
-#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
-#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
+#define SLIDER_STATE_CHANNEL1_DOWN ((USHORT)0x0001)
+#define SLIDER_STATE_CHANNEL2_DOWN ((USHORT)0x0002)
+#define SLIDER_STATE_THUMB_DOWN ((USHORT)0x0004)
-#define SLIDER_THUMB_SIZE 9
-#define SLIDER_THUMB_HALFSIZE 4
-#define SLIDER_CHANNEL_OFFSET 0
-#define SLIDER_CHANNEL_SIZE 4
-#define SLIDER_CHANNEL_HALFSIZE 2
+#define SLIDER_THUMB_SIZE 9
+#define SLIDER_THUMB_HALFSIZE 4
+#define SLIDER_CHANNEL_OFFSET 0
+#define SLIDER_CHANNEL_SIZE 4
+#define SLIDER_CHANNEL_HALFSIZE 2
-#define SLIDER_HEIGHT 16
+#define SLIDER_HEIGHT 16
-#define SLIDER_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
+#define SLIDER_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT)
// =======================================================================
void Slider::ImplInit( Window* pParent, WinBits nStyle )
{
- mnThumbPixOffset = 0;
- mnThumbPixRange = 0;
- mnThumbPixPos = 0; // between mnThumbPixOffset and mnThumbPixOffset+mnThumbPixRange
- mnChannelPixOffset = 0;
- mnChannelPixRange = 0;
- mnChannelPixTop = 0;
- mnChannelPixBottom = 0;
-
- mnMinRange = 0;
- mnMaxRange = 100;
- mnThumbPos = 0;
- mnLineSize = 1;
- mnPageSize = 1;
- mnDelta = 0;
- mnDragDraw = 0;
- mnStateFlags = 0;
- meScrollType = SCROLL_DONTKNOW;
- mbCalcSize = TRUE;
- mbFullDrag = TRUE;
+ mnThumbPixOffset = 0;
+ mnThumbPixRange = 0;
+ mnThumbPixPos = 0; // between mnThumbPixOffset and mnThumbPixOffset+mnThumbPixRange
+ mnChannelPixOffset = 0;
+ mnChannelPixRange = 0;
+ mnChannelPixTop = 0;
+ mnChannelPixBottom = 0;
+
+ mnMinRange = 0;
+ mnMaxRange = 100;
+ mnThumbPos = 0;
+ mnLineSize = 1;
+ mnPageSize = 1;
+ mnDelta = 0;
+ mnDragDraw = 0;
+ mnStateFlags = 0;
+ meScrollType = SCROLL_DONTKNOW;
+ mbCalcSize = TRUE;
+ mbFullDrag = TRUE;
Control::ImplInit( pParent, nStyle, NULL );
@@ -125,12 +125,12 @@ void Slider::ImplLoadRes( const ResId& rResId )
{
Control::ImplLoadRes( rResId );
- INT16 nMin = ReadShortRes();
- INT16 nMax = ReadShortRes();
- INT16 nThumbPos = ReadShortRes();
- INT16 nPage = ReadShortRes();
- INT16 nStep = ReadShortRes();
- /* INT16 nVisibleSize = */ ReadShortRes();
+ INT16 nMin = ReadShortRes();
+ INT16 nMax = ReadShortRes();
+ INT16 nThumbPos = ReadShortRes();
+ INT16 nPage = ReadShortRes();
+ INT16 nStep = ReadShortRes();
+ /* INT16 nVisibleSize = */ ReadShortRes();
SetRange( Range( nMin, nMax ) );
SetLineSize( nStep );
@@ -174,27 +174,27 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
{
if ( GetStyle() & WB_HORZ )
{
- maThumbRect.Left() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
- maThumbRect.Right() = maThumbRect.Left()+SLIDER_THUMB_SIZE-1;
+ maThumbRect.Left() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
+ maThumbRect.Right() = maThumbRect.Left()+SLIDER_THUMB_SIZE-1;
if ( mnChannelPixOffset < maThumbRect.Left() )
{
- maChannel1Rect.Left() = mnChannelPixOffset;
- maChannel1Rect.Right() = maThumbRect.Left()-1;
- maChannel1Rect.Top() = mnChannelPixTop;
+ maChannel1Rect.Left() = mnChannelPixOffset;
+ maChannel1Rect.Right() = maThumbRect.Left()-1;
+ maChannel1Rect.Top() = mnChannelPixTop;
maChannel1Rect.Bottom() = mnChannelPixBottom;
}
else
maChannel1Rect.SetEmpty();
if ( mnChannelPixOffset+mnChannelPixRange-1 > maThumbRect.Right() )
{
- maChannel2Rect.Left() = maThumbRect.Right()+1;
- maChannel2Rect.Right() = mnChannelPixOffset+mnChannelPixRange-1;
- maChannel2Rect.Top() = mnChannelPixTop;
+ maChannel2Rect.Left() = maThumbRect.Right()+1;
+ maChannel2Rect.Right() = mnChannelPixOffset+mnChannelPixRange-1;
+ maChannel2Rect.Top() = mnChannelPixTop;
maChannel2Rect.Bottom() = mnChannelPixBottom;
}
else
maChannel2Rect.SetEmpty();
-
+
const Rectangle aControlRegion( Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( CTRL_SLIDER, PART_THUMB_HORZ,
@@ -208,23 +208,23 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
}
else
{
- maThumbRect.Top() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
- maThumbRect.Bottom() = maThumbRect.Top()+SLIDER_THUMB_SIZE-1;
+ maThumbRect.Top() = mnThumbPixPos-SLIDER_THUMB_HALFSIZE;
+ maThumbRect.Bottom() = maThumbRect.Top()+SLIDER_THUMB_SIZE-1;
if ( mnChannelPixOffset < maThumbRect.Top() )
{
- maChannel1Rect.Top() = mnChannelPixOffset;
+ maChannel1Rect.Top() = mnChannelPixOffset;
maChannel1Rect.Bottom() = maThumbRect.Top()-1;
- maChannel1Rect.Left() = mnChannelPixTop;
- maChannel1Rect.Right() = mnChannelPixBottom;
+ maChannel1Rect.Left() = mnChannelPixTop;
+ maChannel1Rect.Right() = mnChannelPixBottom;
}
else
maChannel1Rect.SetEmpty();
if ( mnChannelPixOffset+mnChannelPixRange-1 > maThumbRect.Bottom() )
{
- maChannel2Rect.Top() = maThumbRect.Bottom()+1;
+ maChannel2Rect.Top() = maThumbRect.Bottom()+1;
maChannel2Rect.Bottom() = mnChannelPixOffset+mnChannelPixRange-1;
- maChannel2Rect.Left() = mnChannelPixTop;
- maChannel2Rect.Right() = mnChannelPixBottom;
+ maChannel2Rect.Left() = mnChannelPixTop;
+ maChannel2Rect.Right() = mnChannelPixBottom;
}
else
maChannel2Rect.SetEmpty();
@@ -258,7 +258,7 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
{
Region aInvalidRegion( aOldThumbRect );
aInvalidRegion.Union( maThumbRect );
-
+
if( !IsBackground() && GetParent() )
{
const Point aPos( GetPosPixel() );
@@ -309,10 +309,10 @@ void Slider::ImplCalc( BOOL bUpdate )
if ( mbCalcSize )
{
- long nOldChannelPixOffset = mnChannelPixOffset;
- long nOldChannelPixRange = mnChannelPixRange;
- long nOldChannelPixTop = mnChannelPixTop;
- long nOldChannelPixBottom = mnChannelPixBottom;
+ long nOldChannelPixOffset = mnChannelPixOffset;
+ long nOldChannelPixRange = mnChannelPixRange;
+ long nOldChannelPixTop = mnChannelPixTop;
+ long nOldChannelPixBottom = mnChannelPixBottom;
long nCalcWidth;
long nCalcHeight;
@@ -323,28 +323,28 @@ void Slider::ImplCalc( BOOL bUpdate )
Size aSize = GetOutputSizePixel();
if ( GetStyle() & WB_HORZ )
{
- nCalcWidth = aSize.Width();
- nCalcHeight = aSize.Height();
- maThumbRect.Top() = 0;
+ nCalcWidth = aSize.Width();
+ nCalcHeight = aSize.Height();
+ maThumbRect.Top() = 0;
maThumbRect.Bottom()= aSize.Height()-1;
}
else
{
- nCalcWidth = aSize.Height();
- nCalcHeight = aSize.Width();
- maThumbRect.Left() = 0;
+ nCalcWidth = aSize.Height();
+ nCalcHeight = aSize.Width();
+ maThumbRect.Left() = 0;
maThumbRect.Right() = aSize.Width()-1;
}
if ( nCalcWidth >= SLIDER_THUMB_SIZE )
{
- mnThumbPixOffset = SLIDER_THUMB_HALFSIZE;
- mnThumbPixRange = nCalcWidth-(SLIDER_THUMB_HALFSIZE*2);
- mnThumbPixPos = 0;
- mnChannelPixOffset = SLIDER_CHANNEL_OFFSET;
- mnChannelPixRange = nCalcWidth-(SLIDER_CHANNEL_OFFSET*2);
- mnChannelPixTop = (nCalcHeight/2)-SLIDER_CHANNEL_HALFSIZE;
- mnChannelPixBottom = mnChannelPixTop+SLIDER_CHANNEL_SIZE-1;
+ mnThumbPixOffset = SLIDER_THUMB_HALFSIZE;
+ mnThumbPixRange = nCalcWidth-(SLIDER_THUMB_HALFSIZE*2);
+ mnThumbPixPos = 0;
+ mnChannelPixOffset = SLIDER_CHANNEL_OFFSET;
+ mnChannelPixRange = nCalcWidth-(SLIDER_CHANNEL_OFFSET*2);
+ mnChannelPixTop = (nCalcHeight/2)-SLIDER_CHANNEL_HALFSIZE;
+ mnChannelPixBottom = mnChannelPixTop+SLIDER_CHANNEL_SIZE-1;
}
else
{
@@ -376,10 +376,10 @@ void Slider::ImplCalc( BOOL bUpdate )
void Slider::ImplDraw( USHORT nDrawFlags )
{
- DecorationView aDecoView( this );
- USHORT nStyle;
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- BOOL bEnabled = IsEnabled();
+ DecorationView aDecoView( this );
+ USHORT nStyle;
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ BOOL bEnabled = IsEnabled();
// Evt. noch offene Berechnungen nachholen
if ( mbCalcSize )
@@ -388,12 +388,12 @@ void Slider::ImplDraw( USHORT nDrawFlags )
ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA;
ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
SliderValue sldValue;
-
+
sldValue.mnMin = mnMinRange;
sldValue.mnMax = mnMaxRange;
sldValue.mnCur = mnThumbPos;
sldValue.maThumbRect = maThumbRect;
-
+
if( IsMouseOver() )
{
if( maThumbRect.IsInside( GetPointerPosPixel() ) )
@@ -408,8 +408,8 @@ void Slider::ImplDraw( USHORT nDrawFlags )
if ( (nDrawFlags & SLIDER_DRAW_CHANNEL1) && !maChannel1Rect.IsEmpty() )
{
- long nRectSize;
- Rectangle aRect = maChannel1Rect;
+ long nRectSize;
+ Rectangle aRect = maChannel1Rect;
SetLineColor( rStyleSettings.GetShadowColor() );
if ( GetStyle() & WB_HORZ )
{
@@ -452,8 +452,8 @@ void Slider::ImplDraw( USHORT nDrawFlags )
if ( (nDrawFlags & SLIDER_DRAW_CHANNEL2) && !maChannel2Rect.IsEmpty() )
{
- long nRectSize;
- Rectangle aRect = maChannel2Rect;
+ long nRectSize;
+ Rectangle aRect = maChannel2Rect;
SetLineColor( rStyleSettings.GetLightColor() );
if ( GetStyle() & WB_HORZ )
{
@@ -520,13 +520,13 @@ BOOL Slider::ImplIsPageUp( const Point& rPos )
Rectangle aRect = maChannel1Rect;
if ( GetStyle() & WB_HORZ )
{
- aRect.Top() = 0;
- aRect.Bottom() = aSize.Height()-1;
+ aRect.Top() = 0;
+ aRect.Bottom() = aSize.Height()-1;
}
else
{
- aRect.Left() = 0;
- aRect.Right() = aSize.Width()-1;
+ aRect.Left() = 0;
+ aRect.Right() = aSize.Width()-1;
}
return aRect.IsInside( rPos );
}
@@ -539,13 +539,13 @@ BOOL Slider::ImplIsPageDown( const Point& rPos )
Rectangle aRect = maChannel2Rect;
if ( GetStyle() & WB_HORZ )
{
- aRect.Top() = 0;
- aRect.Bottom() = aSize.Height()-1;
+ aRect.Top() = 0;
+ aRect.Bottom() = aSize.Height()-1;
}
else
{
- aRect.Left() = 0;
- aRect.Right() = aSize.Width()-1;
+ aRect.Left() = 0;
+ aRect.Right() = aSize.Width()-1;
}
return aRect.IsInside( rPos );
}
@@ -606,15 +606,15 @@ long Slider::ImplDoAction( BOOL bCallEndSlide )
void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
{
- USHORT nOldStateFlags = mnStateFlags;
- BOOL bAction = FALSE;
+ USHORT nOldStateFlags = mnStateFlags;
+ BOOL bAction = FALSE;
switch ( meScrollType )
- {
+ {
case( SCROLL_SET ):
{
const bool bUp = ImplIsPageUp( rMousePos ), bDown = ImplIsPageDown( rMousePos );
-
+
if ( bUp || bDown )
{
bAction = bCallAction;
@@ -624,7 +624,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, BOOL bCallAction )
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN );
break;
}
-
+
case SCROLL_PAGEUP:
if ( ImplIsPageUp( rMousePos ) )
{
@@ -698,14 +698,14 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() )
{
- const Point& rMousePos = rMEvt.GetPosPixel();
- USHORT nTrackFlags = 0;
+ const Point& rMousePos = rMEvt.GetPosPixel();
+ USHORT nTrackFlags = 0;
if ( maThumbRect.IsInside( rMousePos ) )
{
- nTrackFlags = 0;
- meScrollType = SCROLL_DRAG;
- mnDragDraw = SLIDER_DRAW_THUMB;
+ nTrackFlags = 0;
+ meScrollType = SCROLL_DRAG;
+ mnDragDraw = SLIDER_DRAW_THUMB;
// Zusaetzliche Daten berechnen
Point aCenterPos = maThumbRect.Center();
@@ -730,7 +730,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
nTrackFlags = STARTTRACK_BUTTONREPEAT;
meScrollType = SCROLL_PAGEUP;
}
-
+
mnDragDraw = SLIDER_DRAW_CHANNEL;
}
else if ( ImplIsPageDown( rMousePos ) )
@@ -742,7 +742,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
nTrackFlags = STARTTRACK_BUTTONREPEAT;
meScrollType = SCROLL_PAGEDOWN;
}
-
+
mnDragDraw = SLIDER_DRAW_CHANNEL;
}
@@ -753,7 +753,7 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
mnStartPos = mnThumbPos;
ImplDoMouseAction( rMousePos, meScrollType != SCROLL_SET );
Update();
-
+
if( meScrollType != SCROLL_SET )
StartTracking( nTrackFlags );
}
@@ -768,12 +768,12 @@ void Slider::MouseButtonUp( const MouseEvent& )
{
// Button und PageRect-Status wieder herstellen
const USHORT nOldStateFlags = mnStateFlags;
-
+
mnStateFlags &= ~( SLIDER_STATE_CHANNEL1_DOWN | SLIDER_STATE_CHANNEL2_DOWN | SLIDER_STATE_THUMB_DOWN );
-
+
if ( nOldStateFlags != mnStateFlags )
ImplDraw( mnDragDraw );
-
+
mnDragDraw = 0;
ImplDoAction( TRUE );
meScrollType = SCROLL_DONTKNOW;
@@ -1077,13 +1077,13 @@ Size Slider::CalcWindowSizePixel()
Size aSize;
if ( GetStyle() & WB_HORZ )
{
- aSize.Width() = nWidth;
- aSize.Height() = nHeight;
+ aSize.Width() = nWidth;
+ aSize.Height() = nHeight;
}
else
{
- aSize.Height() = nWidth;
- aSize.Width() = nHeight;
+ aSize.Height() = nWidth;
+ aSize.Width() = nHeight;
}
return aSize;
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 921ba2a24e5a..aedfe2d8bbf1 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -167,7 +167,7 @@ void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
-
+
pDev->Push();
pDev->SetMapMode();
if ( !(nFlags & WINDOW_DRAW_MONO) )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 754270e9012f..1632e1e823d1 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -88,7 +88,7 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
// there is just no useful native support for spinfields with dropdown
!(pWin->GetStyle() & WB_DROPDOWN) )
{
- if( pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnUpperPart) &&
+ if( pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnUpperPart) &&
pWin->IsNativeControlSupported(CTRL_SPINBOX, rSpinbuttonValue.mnLowerPart) )
{
// only paint the embedded spin buttons, all buttons are painted at once
@@ -119,7 +119,7 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
{
aSize = aContent.GetSize();
}
-
+
Rectangle aRgn( aPt, aSize );
bNativeOK = pBorder->DrawNativeControl( CTRL_SPINBOX, PART_ENTIRE_CONTROL, aRgn, CTRL_STATE_ENABLED,
rSpinbuttonValue, rtl::OUString() );
@@ -295,15 +295,15 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
void SpinField::ImplInitSpinFieldData()
{
- mpEdit = NULL;
- mbSpin = FALSE;
- mbRepeat = FALSE;
- mbUpperIn = FALSE;
- mbLowerIn = FALSE;
- mbInitialUp = FALSE;
- mbInitialDown = FALSE;
- mbNoSelect = FALSE;
- mbInDropDown = FALSE;
+ mpEdit = NULL;
+ mbSpin = FALSE;
+ mbRepeat = FALSE;
+ mbUpperIn = FALSE;
+ mbLowerIn = FALSE;
+ mbInitialUp = FALSE;
+ mbInitialDown = FALSE;
+ mbNoSelect = FALSE;
+ mbInDropDown = FALSE;
}
// --------------------------------------------------------------------
@@ -315,11 +315,11 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle )
if ( nWinStyle & (WB_SPIN|WB_DROPDOWN) )
{
mbSpin = TRUE;
-
+
// Some themes want external spin buttons, therefore the main
// spinfield should not overdraw the border between its encapsulated
// edit field and the spin buttons
- if ( (nWinStyle & WB_SPIN) && ImplUseNativeBorder( nWinStyle ) )
+ if ( (nWinStyle & WB_SPIN) && ImplUseNativeBorder( nWinStyle ) )
{
SetBackground();
mpEdit = new Edit( this, WB_NOBORDER );
@@ -423,13 +423,13 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbUpperIn = TRUE;
+ mbUpperIn = TRUE;
mbInitialUp = TRUE;
Invalidate( maUpperRect );
}
else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) )
{
- mbLowerIn = TRUE;
+ mbLowerIn = TRUE;
mbInitialDown = TRUE;
Invalidate( maLowerRect );
}
@@ -642,7 +642,7 @@ void SpinField::Paint( const Rectangle& rRect )
{
if ( mbSpin )
{
- BOOL bEnable = IsEnabled();
+ BOOL bEnable = IsEnabled();
ImplDrawSpinButton( this, maUpperRect, maLowerRect,
mbUpperIn, mbLowerIn, bEnable, bEnable );
}
@@ -717,12 +717,12 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
// use the full extent of the control
Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
- bNativeRegionOK =
+ bNativeRegionOK =
pWin->GetNativeControlRegion(CTRL_SPINBOX, PART_BUTTON_UP,
aArea, 0, aControlValue, rtl::OUString(), aBound, aContentUp) &&
pWin->GetNativeControlRegion(CTRL_SPINBOX, PART_BUTTON_DOWN,
aArea, 0, aControlValue, rtl::OUString(), aBound, aContentDown);
-
+
if( bNativeRegionOK )
{
// convert back from border space to local coordinates
@@ -769,7 +769,7 @@ void SpinField::Resize()
ImplControlValue aControlValue;
Point aPoint;
Rectangle aContent, aBound;
-
+
// use the full extent of the control
Window *pBorder = GetWindow( WINDOW_BORDER );
Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index c892b32534ec..beaff5115c3d 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,11 +76,11 @@ struct ImplTabItem
struct ImplTabCtrlData
{
- PushButton* mpLeftBtn;
- PushButton* mpRightBtn;
- std::hash_map< int, int > maLayoutPageIdToLine;
- std::hash_map< int, int > maLayoutLineToPageId;
- std::vector< Rectangle > maTabRectangles;
+ PushButton* mpLeftBtn;
+ PushButton* mpRightBtn;
+ std::hash_map< int, int > maLayoutPageIdToLine;
+ std::hash_map< int, int > maLayoutLineToPageId;
+ std::vector< Rectangle > maTabRectangles;
Point maItemsOffset; // offset of the tabitems
std::vector< ImplTabItem > maItemList;
ListBox* mpListBox;
@@ -138,22 +138,22 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
Control::ImplInit( pParent, nStyle, NULL );
- mnLastWidth = 0;
- mnLastHeight = 0;
- mnBtnSize = 0;
- mnMaxPageWidth = 0;
- mnActPageId = 0;
- mnCurPageId = 0;
- mnFirstPagePos = 0;
- mnLastFirstPagePos = 0;
- mbFormat = TRUE;
- mbRestoreHelpId = FALSE;
- mbRestoreUnqId = FALSE;
- mbSingleLine = FALSE;
- mbScroll = FALSE;
+ mnLastWidth = 0;
+ mnLastHeight = 0;
+ mnBtnSize = 0;
+ mnMaxPageWidth = 0;
+ mnActPageId = 0;
+ mnCurPageId = 0;
+ mnFirstPagePos = 0;
+ mnLastFirstPagePos = 0;
+ mbFormat = TRUE;
+ mbRestoreHelpId = FALSE;
+ mbRestoreUnqId = FALSE;
+ mbSingleLine = FALSE;
+ mbScroll = FALSE;
mbRestoreSmartId = FALSE;
- mbSmallInvalidate = FALSE;
- mbExtraSpace = FALSE;
+ mbSmallInvalidate = FALSE;
+ mbExtraSpace = FALSE;
mpTabCtrlData = new ImplTabCtrlData;
mpTabCtrlData->mpLeftBtn = NULL;
mpTabCtrlData->mpRightBtn = NULL;
@@ -174,7 +174,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
EnableChildTransparentMode( TRUE );
-
+
if ( pParent->IsDialog() )
pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
}
@@ -938,7 +938,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == TRUE )
{
Rectangle aCtrlRegion( pItem->maRect );
- ControlState nState = 0;
+ ControlState nState = 0;
if( pItem->mnId == mnCurPageId )
{
@@ -1077,7 +1077,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
{
long nRet = 0;
-
+
if ( GetPageCount() > 1 )
{
KeyCode aKeyCode = rKeyEvent.GetKeyCode();
@@ -1102,8 +1102,8 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
}
}
}
- }
-
+ }
+
return nRet;
}
@@ -1311,9 +1311,9 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout )
{
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
- bool bDrawTabsRTL = IsNativeControlSupported( CTRL_TAB_ITEM, PART_TABS_DRAW_RTL );
- ImplTabItem * pFirstTab = NULL;
- ImplTabItem * pLastTab = NULL;
+ bool bDrawTabsRTL = IsNativeControlSupported( CTRL_TAB_ITEM, PART_TABS_DRAW_RTL );
+ ImplTabItem * pFirstTab = NULL;
+ ImplTabItem * pLastTab = NULL;
size_t idx;
// Event though there is a tab overlap with GTK+, the first tab is not
@@ -1376,7 +1376,7 @@ void TabControl::Resize()
if ( !IsReallyShown() )
return;
-
+
if( mpTabCtrlData->mpListBox )
{
// get the listbox' preferred size
@@ -1817,7 +1817,7 @@ void TabControl::InsertPage( USHORT nPageId, const XubString& rText,
mpTabCtrlData->mpListBox->SelectEntryPos( 0 );
mpTabCtrlData->mpListBox->SetDropDownLineCount( mpTabCtrlData->mpListBox->GetEntryCount() );
}
-
+
// set current page id
if ( !mnCurPageId )
mnCurPageId = nPageId;
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index cb565122ea63..15714b675b79 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,111 +51,111 @@ typedef std::vector<ValType> ValVector;
// ====================================================================
static const char* pStringIds[] = {
-/*0*/ ".notdef", "space", "exclam", "quotedbl",
- "numbersign", "dollar", "percent", "ampersand",
- "quoteright", "parenleft", "parenright", "asterisk",
- "plus", "comma", "hyphen", "period",
-/*16*/ "slash", "zero", "one", "two",
- "three", "four", "five", "six",
- "seven", "eight", "nine", "colon",
- "semicolon", "less", "equal", "greater",
-/*32*/ "question", "at", "A", "B",
- "C", "D", "E", "F",
- "G", "H", "I", "J",
- "K", "L", "M", "N",
-/*48*/ "O", "P", "Q", "R",
- "S", "T", "U", "V",
- "W", "X", "Y", "Z",
- "bracketleft", "backslash", "bracketright", "asciicircum",
-/*64*/ "underscore", "quoteleft", "a", "b",
- "c", "d", "e", "f",
- "g", "h", "i", "j",
- "k", "l", "m", "n",
-/*80*/ "o", "p", "q", "r",
- "s", "t", "u", "v",
- "w", "x", "y", "z",
- "braceleft", "bar", "braceright", "asciitilde",
-/*96*/ "exclamdown", "cent", "sterlin", "fraction",
- "yen", "florin", "section", "currency",
- "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
- "guilsinglright", "fi", "fl", "endash",
-/*112*/ "dagger", "daggerdbl", "periodcentered", "paragraph",
- "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
- "guillemotright", "ellipsis", "perthousand", "questiondown",
- "grave", "acute", "circumflex", "tilde",
-/*128*/ "macron", "breve", "dotaccent", "dieresis",
- "ring", "cedilla", "hungarumlaut", "ogonek",
- "caron", "endash", "AE", "ordfeminine",
- "Lslash", "Oslash", "OE", "ordmasculine",
-/*144*/ "ae", "dotlessi", "lslash", "oslash",
- "oe", "germandbls", "onesuperior", "logicalnot",
- "mu", "trademark", "Eth", "onehalf",
- "plusminus", "Thorn", "onequarter", "divide",
-/*160*/ "brokenbar", "degree", "thorn", "threequarters",
- "twosuperior", "registered", "minus", "eth",
- "multiply", "threesuperior", "copyright", "Aacute",
- "Acircumflex", "Adieresis", "Agrave", "Aring",
-/*176*/ "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
- "Edieresis", "Egrave", "Iacute", "Icircumflex",
- "Idieresis", "Igrave", "Ntilde", "Oacute",
- "Ocircumflex", "Odieresis", "Ograve", "Otilde",
-/*192*/ "Scaron", "Uacute", "Ucircumflex", "Udieresis",
- "Ugrave", "Yacute", "Ydieresis", "Zcaron",
- "aacute", "acircumflex", "adieresis", "agrave",
- "aring", "atilde", "ccedilla", "eacute",
-/*208*/ "ecircumflex", "edieresis", "egrave", "iacute",
- "icircumflex", "idieresis", "igrave", "ntilde",
- "oacute", "ocircumflex", "odieresis", "ograve",
- "otilde", "scaron", "uacute", "ucircumflex",
-/*224*/ "udieresis", "ugrave", "yacute", "ydieresis",
- "zcaron", "exclamsmall", "Hungarumlautsmall","dollaroldstyle",
- "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior",
- "parenrightsuperior","twodotenleader", "onedotenleader", "zerooldstyle",
-/*240*/ "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
- "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle",
- "nineoldstile", "commasuperior", "threequartersemdash","periodsuperior",
- "questionsmall", "asuperior", "bsuperior", "centsuperior",
-/*256*/ "dsuperior", "esuperior", "isuperior", "lsuperior",
- "msuperior", "nsuperior", "osuperior", "rsuperior",
- "ssuperior", "tsuperior", "ff", "ffi",
- "ffl", "parenleftinferior","parenrightinferior","Circumflexsmall",
-/*272*/ "hyphensuperior","Gravesmall", "Asmall", "Bsmall",
- "Csmall", "Dsmall", "Esmall", "Fsmall",
- "Gsmall", "Hsmall", "Ismall", "Jsmall",
- "Ksmall", "Lsmall", "Msmall", "Nsmall",
-/*288*/ "Osmall", "Psmall", "Qsmall", "Rsmall",
- "Ssmall", "Tsmall", "Usmall", "Vsmall",
- "Wsmall", "Xsmall", "Ysmall", "Zsmall",
- "colonmonetary", "onefitted", "rupia", "Tildesmall",
-/*304*/ "exclamdownsmall","centoldstyle", "Lslashsmall", "Scaronsmall",
- "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall",
- "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior",
- "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall",
-/*320*/ "oneeight", "threeeights", "fiveeights", "seveneights",
- "onethird", "twothirds", "zerosuperior", "foursuperior",
- "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior",
- "ninesuperior", "zeroinferior", "oneinferior", "twoinferior",
-/*336*/ "threeinferior","fourinferior", "fiveinferior", "sixinferior",
- "seveninferior", "eightinferior", "nineinferior", "centinferior",
- "dollarinferior", "periodinferior", "commainferior", "Agravesmall",
- "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall",
-/*352*/ "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall",
- "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall",
- "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
- "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall",
-/*368*/ "Otildesmall", "Odieressissmall", "OEsmall", "Oslashsmall",
- "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall",
- "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000",
- "001.001", "001.002", "001.003", "Black",
-/*384*/ "Bold", "Book", "Light", "Medium",
- "Regular", "Roman", "Semibold"
+/*0*/ ".notdef", "space", "exclam", "quotedbl",
+ "numbersign", "dollar", "percent", "ampersand",
+ "quoteright", "parenleft", "parenright", "asterisk",
+ "plus", "comma", "hyphen", "period",
+/*16*/ "slash", "zero", "one", "two",
+ "three", "four", "five", "six",
+ "seven", "eight", "nine", "colon",
+ "semicolon", "less", "equal", "greater",
+/*32*/ "question", "at", "A", "B",
+ "C", "D", "E", "F",
+ "G", "H", "I", "J",
+ "K", "L", "M", "N",
+/*48*/ "O", "P", "Q", "R",
+ "S", "T", "U", "V",
+ "W", "X", "Y", "Z",
+ "bracketleft", "backslash", "bracketright", "asciicircum",
+/*64*/ "underscore", "quoteleft", "a", "b",
+ "c", "d", "e", "f",
+ "g", "h", "i", "j",
+ "k", "l", "m", "n",
+/*80*/ "o", "p", "q", "r",
+ "s", "t", "u", "v",
+ "w", "x", "y", "z",
+ "braceleft", "bar", "braceright", "asciitilde",
+/*96*/ "exclamdown", "cent", "sterlin", "fraction",
+ "yen", "florin", "section", "currency",
+ "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft",
+ "guilsinglright", "fi", "fl", "endash",
+/*112*/ "dagger", "daggerdbl", "periodcentered", "paragraph",
+ "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
+ "guillemotright", "ellipsis", "perthousand", "questiondown",
+ "grave", "acute", "circumflex", "tilde",
+/*128*/ "macron", "breve", "dotaccent", "dieresis",
+ "ring", "cedilla", "hungarumlaut", "ogonek",
+ "caron", "endash", "AE", "ordfeminine",
+ "Lslash", "Oslash", "OE", "ordmasculine",
+/*144*/ "ae", "dotlessi", "lslash", "oslash",
+ "oe", "germandbls", "onesuperior", "logicalnot",
+ "mu", "trademark", "Eth", "onehalf",
+ "plusminus", "Thorn", "onequarter", "divide",
+/*160*/ "brokenbar", "degree", "thorn", "threequarters",
+ "twosuperior", "registered", "minus", "eth",
+ "multiply", "threesuperior", "copyright", "Aacute",
+ "Acircumflex", "Adieresis", "Agrave", "Aring",
+/*176*/ "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
+ "Edieresis", "Egrave", "Iacute", "Icircumflex",
+ "Idieresis", "Igrave", "Ntilde", "Oacute",
+ "Ocircumflex", "Odieresis", "Ograve", "Otilde",
+/*192*/ "Scaron", "Uacute", "Ucircumflex", "Udieresis",
+ "Ugrave", "Yacute", "Ydieresis", "Zcaron",
+ "aacute", "acircumflex", "adieresis", "agrave",
+ "aring", "atilde", "ccedilla", "eacute",
+/*208*/ "ecircumflex", "edieresis", "egrave", "iacute",
+ "icircumflex", "idieresis", "igrave", "ntilde",
+ "oacute", "ocircumflex", "odieresis", "ograve",
+ "otilde", "scaron", "uacute", "ucircumflex",
+/*224*/ "udieresis", "ugrave", "yacute", "ydieresis",
+ "zcaron", "exclamsmall", "Hungarumlautsmall","dollaroldstyle",
+ "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior",
+ "parenrightsuperior","twodotenleader", "onedotenleader", "zerooldstyle",
+/*240*/ "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
+ "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle",
+ "nineoldstile", "commasuperior", "threequartersemdash","periodsuperior",
+ "questionsmall", "asuperior", "bsuperior", "centsuperior",
+/*256*/ "dsuperior", "esuperior", "isuperior", "lsuperior",
+ "msuperior", "nsuperior", "osuperior", "rsuperior",
+ "ssuperior", "tsuperior", "ff", "ffi",
+ "ffl", "parenleftinferior","parenrightinferior","Circumflexsmall",
+/*272*/ "hyphensuperior","Gravesmall", "Asmall", "Bsmall",
+ "Csmall", "Dsmall", "Esmall", "Fsmall",
+ "Gsmall", "Hsmall", "Ismall", "Jsmall",
+ "Ksmall", "Lsmall", "Msmall", "Nsmall",
+/*288*/ "Osmall", "Psmall", "Qsmall", "Rsmall",
+ "Ssmall", "Tsmall", "Usmall", "Vsmall",
+ "Wsmall", "Xsmall", "Ysmall", "Zsmall",
+ "colonmonetary", "onefitted", "rupia", "Tildesmall",
+/*304*/ "exclamdownsmall","centoldstyle", "Lslashsmall", "Scaronsmall",
+ "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall",
+ "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior",
+ "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall",
+/*320*/ "oneeight", "threeeights", "fiveeights", "seveneights",
+ "onethird", "twothirds", "zerosuperior", "foursuperior",
+ "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior",
+ "ninesuperior", "zeroinferior", "oneinferior", "twoinferior",
+/*336*/ "threeinferior","fourinferior", "fiveinferior", "sixinferior",
+ "seveninferior", "eightinferior", "nineinferior", "centinferior",
+ "dollarinferior", "periodinferior", "commainferior", "Agravesmall",
+ "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall",
+/*352*/ "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall",
+ "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall",
+ "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
+ "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall",
+/*368*/ "Otildesmall", "Odieressissmall", "OEsmall", "Oslashsmall",
+ "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall",
+ "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000",
+ "001.001", "001.002", "001.003", "Black",
+/*384*/ "Bold", "Book", "Light", "Medium",
+ "Regular", "Roman", "Semibold"
};
// --------------------------------------------------------------------
#if 0 // TODO: use them
static const char* pStdEncNames[] = {
- "ISOAdobe", "Expert", "ExpertSubSet"
+ "ISOAdobe", "Expert", "ExpertSubSet"
};
#endif
@@ -163,57 +163,57 @@ static const char* pStdEncNames[] = {
// TOP DICT keywords (also covers PRIV DICT keywords)
static const char* pDictOps[] = {
- "sVersion", "sNotice", "sFullName", "sFamilyName",
- "sWeight", "aFontBBox", "dBlueValues", "dOtherBlues",
- "dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
- "xESC", "nUniqueID", "aXUID", "nCharset",
- "nEncoding", "nCharStrings", "PPrivate", "nSubrs",
- "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
- NULL, NULL, NULL, NULL,
- "shortint", "longint", "BCD", NULL
+ "sVersion", "sNotice", "sFullName", "sFamilyName",
+ "sWeight", "aFontBBox", "dBlueValues", "dOtherBlues",
+ "dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
+ "xESC", "nUniqueID", "aXUID", "nCharset",
+ "nEncoding", "nCharStrings", "PPrivate", "nSubrs",
+ "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ "shortint", "longint", "BCD", NULL
};
// --------------------------------------------------------------------
// TOP DICT escapes (also covers PRIV DICT escapes)
static const char* pDictEscs[] = {
- "sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
- "nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
- "nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
- "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
- NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
- "nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
- NULL, NULL, NULL, NULL,
- NULL, NULL, "rROS", "nCIDFontVersion",
- "nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
- "nFDArray", "nFDSelect", "sFontName"
+ "sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
+ "nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
+ "nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
+ "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
+ NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
+ "nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, "rROS", "nCIDFontVersion",
+ "nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
+ "nFDArray", "nFDSelect", "sFontName"
};
// --------------------------------------------------------------------
static const char* pType1Ops[] = {
- NULL, "2hstem", NULL, "2vstem",
- "1vmoveto", "Arlineto", "1hlineto", "1vlineto",
- "Crrcurveto", "0closepath", "Lcallsubr", "0return",
- "xT1ESC", "2hsbw", "0endchar", NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2rmoveto", "1hmoveto", NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, "4vhcurveto", "4hvcurveto"
+ NULL, "2hstem", NULL, "2vstem",
+ "1vmoveto", "Arlineto", "1hlineto", "1vlineto",
+ "Crrcurveto", "0closepath", "Lcallsubr", "0return",
+ "xT1ESC", "2hsbw", "0endchar", NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, "2rmoveto", "1hmoveto", NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, "4vhcurveto", "4hvcurveto"
};
// --------------------------------------------------------------------
static const char* pT1EscOps[] = {
- "0dotsection", "6vstem3", "6hstem3", NULL,
- NULL, NULL, "5seac", "4sbw",
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, NULL, NULL,
- "Gcallothersubr", "1pop", NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2setcurrentpoint"
+ "0dotsection", "6vstem3", "6hstem3", NULL,
+ NULL, NULL, "5seac", "4sbw",
+ NULL, "1abs", "2add", "2sub",
+ "2div", NULL, NULL, NULL,
+ "Gcallothersubr", "1pop", NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ NULL, "2setcurrentpoint"
};
// --------------------------------------------------------------------
@@ -222,47 +222,47 @@ struct TYPE1OP
{
enum OPS
{
- HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
- HLINETO=6, VLINETO=7, RCURVETO=8, CLOSEPATH=9,
- CALLSUBR=10, RETURN=11, T1ESC=12, HSBW=13,
- ENDCHAR=14, RMOVETO=21, HMOVETO=22, VHCURVETO=30,
+ HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
+ HLINETO=6, VLINETO=7, RCURVETO=8, CLOSEPATH=9,
+ CALLSUBR=10, RETURN=11, T1ESC=12, HSBW=13,
+ ENDCHAR=14, RMOVETO=21, HMOVETO=22, VHCURVETO=30,
HVCURVETO=31
};
enum ESCS
{
- DOTSECTION=0, VSTEM3=1, HSTEM3=2, SEAC=6,
- SBW=7, ABS=9, ADD=10, SUB=11,
- DIV=12, CALLOTHERSUBR=16, POP=17, SETCURRENTPOINT=33
+ DOTSECTION=0, VSTEM3=1, HSTEM3=2, SEAC=6,
+ SBW=7, ABS=9, ADD=10, SUB=11,
+ DIV=12, CALLOTHERSUBR=16, POP=17, SETCURRENTPOINT=33
};
};
// --------------------------------------------------------------------
static const char* pType2Ops[] = {
- NULL, "hhstem", NULL, "vvstem",
- "mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
- "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
- "xT2ESC", NULL, "eendchar", NULL,
- NULL, NULL, "Hhstemhm", "Khintmask",
- "Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
- ".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
- ".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
+ NULL, "hhstem", NULL, "vvstem",
+ "mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
+ "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
+ "xT2ESC", NULL, "eendchar", NULL,
+ NULL, NULL, "Hhstemhm", "Khintmask",
+ "Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
+ ".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
+ ".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
};
// --------------------------------------------------------------------
static const char* pT2EscOps[] = {
- NULL, NULL, NULL, "2and",
- "2or", "1not", NULL, NULL,
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, "1neg", "2eq",
- NULL, NULL, "1drop", NULL,
- "1put", "1get", "4ifelse", "0random",
- "2mul", NULL, "1sqrt", "1dup",
- "2exch", "Iindex", "Rroll", NULL,
- NULL, NULL, "7hflex", "Fflex",
- "9hflex1", "fflex1"
+ NULL, NULL, NULL, "2and",
+ "2or", "1not", NULL, NULL,
+ NULL, "1abs", "2add", "2sub",
+ "2div", NULL, "1neg", "2eq",
+ NULL, NULL, "1drop", NULL,
+ "1put", "1get", "4ifelse", "0random",
+ "2mul", NULL, "1sqrt", "1dup",
+ "2exch", "Iindex", "Rroll", NULL,
+ NULL, NULL, "7hflex", "Fflex",
+ "9hflex1", "fflex1"
};
// --------------------------------------------------------------------
@@ -271,23 +271,23 @@ struct TYPE2OP
{
enum OPS
{
- HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
- HLINETO=6, VLINETO=7, RCURVETO=8, CALLSUBR=10,
- RETURN=11, T2ESC=12, ENDCHAR=14, HSTEMHM=18,
- HINTMASK=19, CNTRMASK=20, RMOVETO=21, HMOVETO=22,
- VSTEMHM=23, RCURVELINE=24, RLINECURVE=25, VVCURVETO=26,
- HHCURVETO=27, SHORTINT=28, CALLGSUBR=29, VHCURVETO=30,
+ HSTEM=1, VSTEM=3, VMOVETO=4, RLINETO=5,
+ HLINETO=6, VLINETO=7, RCURVETO=8, CALLSUBR=10,
+ RETURN=11, T2ESC=12, ENDCHAR=14, HSTEMHM=18,
+ HINTMASK=19, CNTRMASK=20, RMOVETO=21, HMOVETO=22,
+ VSTEMHM=23, RCURVELINE=24, RLINECURVE=25, VVCURVETO=26,
+ HHCURVETO=27, SHORTINT=28, CALLGSUBR=29, VHCURVETO=30,
HVCURVETO=31
};
enum ESCS
{
- AND=3, OR=4, NOT=5, ABS=9,
- ADD=10, SUB=11, DIV=12, NEG=14,
- EQ=15, DROP=18, PUT=20, GET=21,
- IFELSE=22, RANDOM=23, MUL=24, SQRT=26,
- DUP=27, EXCH=28, INDEX=29, ROLL=30,
- HFLEX=34, FLEX=35, HFLEX1=36, FLEX1=37
+ AND=3, OR=4, NOT=5, ABS=9,
+ ADD=10, SUB=11, DIV=12, NEG=14,
+ EQ=15, DROP=18, PUT=20, GET=21,
+ IFELSE=22, RANDOM=23, MUL=24, SQRT=26,
+ DUP=27, EXCH=28, INDEX=29, ROLL=30,
+ HFLEX=34, FLEX=35, HFLEX1=36, FLEX1=37
};
};
@@ -297,28 +297,28 @@ struct CffGlobal
{
explicit CffGlobal();
- int mnNameIdxBase;
- int mnNameIdxCount;
- int mnStringIdxBase;
- int mnStringIdxCount;
- bool mbCIDFont;
- int mnCharStrBase;
- int mnCharStrCount;
- int mnEncodingBase;
- int mnCharsetBase;
- int mnGlobalSubrBase;
- int mnGlobalSubrCount;
- int mnGlobalSubrBias;
- int mnFDSelectBase;
- int mnFontDictBase;
- int mnFDAryCount;
-
- ValVector maFontBBox;
- ValVector maFontMatrix;
-
- int mnFontNameSID;
- int mnFullNameSID;
- int mnFamilyNameSID;
+ int mnNameIdxBase;
+ int mnNameIdxCount;
+ int mnStringIdxBase;
+ int mnStringIdxCount;
+ bool mbCIDFont;
+ int mnCharStrBase;
+ int mnCharStrCount;
+ int mnEncodingBase;
+ int mnCharsetBase;
+ int mnGlobalSubrBase;
+ int mnGlobalSubrCount;
+ int mnGlobalSubrBias;
+ int mnFDSelectBase;
+ int mnFontDictBase;
+ int mnFDAryCount;
+
+ ValVector maFontBBox;
+ ValVector maFontMatrix;
+
+ int mnFontNameSID;
+ int mnFullNameSID;
+ int mnFamilyNameSID;
};
// ====================================================================
@@ -327,31 +327,31 @@ struct CffLocal
{
explicit CffLocal();
- int mnPrivDictBase;
- int mnPrivDictSize;
- int mnLocalSubrOffs;
- int mnLocalSubrBase;
- int mnLocalSubrCount;
- int mnLocalSubrBias;
+ int mnPrivDictBase;
+ int mnPrivDictSize;
+ int mnLocalSubrOffs;
+ int mnLocalSubrBase;
+ int mnLocalSubrCount;
+ int mnLocalSubrBias;
- ValType maNominalWidth;
+ ValType maNominalWidth;
ValType maDefaultWidth;
// ATM hinting related values
- ValType maStemStdHW;
- ValType maStemStdVW;
- ValVector maStemSnapH;
- ValVector maStemSnapV;
- ValVector maBlueValues;
- ValVector maOtherBlues;
- ValVector maFamilyBlues;
- ValVector maFamilyOtherBlues;
- RealType mfBlueScale;
- RealType mfBlueShift;
- RealType mfBlueFuzz;
- RealType mfExpFactor;
- int mnLangGroup;
- bool mbForceBold;
+ ValType maStemStdHW;
+ ValType maStemStdVW;
+ ValVector maStemSnapH;
+ ValVector maStemSnapV;
+ ValVector maBlueValues;
+ ValVector maOtherBlues;
+ ValVector maFamilyBlues;
+ ValVector maFamilyOtherBlues;
+ RealType mfBlueScale;
+ RealType mfBlueShift;
+ RealType mfBlueFuzz;
+ RealType mfExpFactor;
+ int mnLangGroup;
+ bool mbForceBold;
};
// ====================================================================
@@ -373,32 +373,32 @@ SubsetterContext::~SubsetterContext( void)
// ====================================================================
class CffSubsetterContext
-: public SubsetterContext
-, private CffGlobal
+: public SubsetterContext
+, private CffGlobal
{
public:
- static const int NMAXSTACK = 48; // see CFF.appendixB
- static const int NMAXHINTS = 2*96; // see CFF.appendixB
- static const int NMAXTRANS = 32; // see CFF.appendixB
+ static const int NMAXSTACK = 48; // see CFF.appendixB
+ static const int NMAXHINTS = 2*96; // see CFF.appendixB
+ static const int NMAXTRANS = 32; // see CFF.appendixB
public:
explicit CffSubsetterContext( const U8* pBasePtr, int nBaseLen);
- virtual ~CffSubsetterContext( void);
+ virtual ~CffSubsetterContext( void);
- void initialCffRead( void);
- bool emitAsType1( class Type1Emitter&,
+ void initialCffRead( void);
+ bool emitAsType1( class Type1Emitter&,
const long* pGlyphIDs, const U8* pEncoding,
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
// used by charstring converter
- void setCharStringType( int);
- void fakeLocalSubrCount( int nLocalSubrs ) { maCffLocal[0].mnLocalSubrCount=nLocalSubrs;}
+ void setCharStringType( int);
+ void fakeLocalSubrCount( int nLocalSubrs ) { maCffLocal[0].mnLocalSubrCount=nLocalSubrs;}
protected:
- int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
+ int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
private:
- void convertOneTypeOp( void);
- void convertOneTypeEsc( void);
- void callType2Subr( bool bGlobal, int nSubrNumber);
- long getReadOfs( void) const { return (long)(mpReadPtr - mpBasePtr);}
+ void convertOneTypeOp( void);
+ void convertOneTypeEsc( void);
+ void callType2Subr( bool bGlobal, int nSubrNumber);
+ long getReadOfs( void) const { return (long)(mpReadPtr - mpBasePtr);}
const U8* mpBasePtr;
const U8* mpBaseEnd;
@@ -406,90 +406,90 @@ private:
const U8* mpReadPtr;
const U8* mpReadEnd;
- U8* mpWritePtr;
- bool mbSawError;
- bool mbNeedClose;
- bool mbIgnoreHints;
- long mnCntrMask;
+ U8* mpWritePtr;
+ bool mbSawError;
+ bool mbNeedClose;
+ bool mbIgnoreHints;
+ long mnCntrMask;
private:
- int seekIndexData( int nIndexBase, int nDataIndex);
- void seekIndexEnd( int nIndexBase);
+ int seekIndexData( int nIndexBase, int nDataIndex);
+ void seekIndexEnd( int nIndexBase);
private:
- const char** mpCharStringOps;
- const char** mpCharStringEscs;
+ const char** mpCharStringOps;
+ const char** mpCharStringEscs;
- CffLocal maCffLocal[16];
- CffLocal* mpCffLocal;
+ CffLocal maCffLocal[16];
+ CffLocal* mpCffLocal;
- void readDictOp( void);
- RealType readRealVal( void);
- const char* getString( int nStringID);
- int getFDSelect( int nGlyphIndex) const;
- int getGlyphSID( int nGlyphIndex) const;
+ void readDictOp( void);
+ RealType readRealVal( void);
+ const char* getString( int nStringID);
+ int getFDSelect( int nGlyphIndex) const;
+ int getGlyphSID( int nGlyphIndex) const;
const char* getGlyphName( int nGlyphIndex);
- void read2push( void);
- void pop2write( void);
- void writeType1Val( ValType);
- void writeTypeOp( int nTypeOp);
- void writeTypeEsc( int nTypeOp);
- void writeCurveTo( int nStackPos, int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3);
- void pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTypeXor=0);
- void popAll2Write( int nTypeOp);
+ void read2push( void);
+ void pop2write( void);
+ void writeType1Val( ValType);
+ void writeTypeOp( int nTypeOp);
+ void writeTypeEsc( int nTypeOp);
+ void writeCurveTo( int nStackPos, int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3);
+ void pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTypeXor=0);
+ void popAll2Write( int nTypeOp);
public: // TODO: is public really needed?
// accessing the value stack
// TODO: add more checks
- void push( ValType nVal) { mnValStack[ mnStackIdx++] = nVal;}
- ValType popVal( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
+ void push( ValType nVal) { mnValStack[ mnStackIdx++] = nVal;}
+ ValType popVal( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
ValType peekVal( void) const { return ((mnStackIdx>0) ? mnValStack[ mnStackIdx-1] : 0);}
ValType getVal( int nIndex) const { return mnValStack[ nIndex];}
- int popInt( void);
- int peekInt( void) const;
- int getInt( int nIndex) const;
- int size( void) const { return mnStackIdx;}
- bool empty( void) const { return !mnStackIdx;}
- void clear( void) { mnStackIdx = 0;}
+ int popInt( void);
+ int peekInt( void) const;
+ int getInt( int nIndex) const;
+ int size( void) const { return mnStackIdx;}
+ bool empty( void) const { return !mnStackIdx;}
+ void clear( void) { mnStackIdx = 0;}
// accessing the charstring hints
- void addHints( bool bVerticalHints);
- int getHorzHintCount( void) const { return (mnHorzHintSize/2);}
- int getVertHintCount( void) const { return (mnHintSize-mnHorzHintSize)/2;}
- void getHintPair( int nIndex, ValType* nMin, ValType* nEnd) const;
+ void addHints( bool bVerticalHints);
+ int getHorzHintCount( void) const { return (mnHorzHintSize/2);}
+ int getVertHintCount( void) const { return (mnHintSize-mnHorzHintSize)/2;}
+ void getHintPair( int nIndex, ValType* nMin, ValType* nEnd) const;
// accessing other charstring specifics
- bool hasCharWidth( void) const { return (maCharWidth > 0);}
- ValType getCharWidth( void) const { return maCharWidth;}
- void setNominalWidth( ValType aWidth) { mpCffLocal->maNominalWidth = aWidth;}
- void setDefaultWidth( ValType aWidth) { mpCffLocal->maDefaultWidth = aWidth;}
- void updateWidth( bool bUseFirstVal);
+ bool hasCharWidth( void) const { return (maCharWidth > 0);}
+ ValType getCharWidth( void) const { return maCharWidth;}
+ void setNominalWidth( ValType aWidth) { mpCffLocal->maNominalWidth = aWidth;}
+ void setDefaultWidth( ValType aWidth) { mpCffLocal->maDefaultWidth = aWidth;}
+ void updateWidth( bool bUseFirstVal);
private:
// typeop exceution context
- int mnStackIdx;
- ValType mnValStack[ NMAXSTACK+4];
- ValType mnTransVals[ NMAXTRANS];
+ int mnStackIdx;
+ ValType mnValStack[ NMAXSTACK+4];
+ ValType mnTransVals[ NMAXTRANS];
- int mnHintSize;
- int mnHorzHintSize;
- ValType mnHintStack[ NMAXHINTS];
+ int mnHintSize;
+ int mnHorzHintSize;
+ ValType mnHintStack[ NMAXHINTS];
- ValType maCharWidth;
+ ValType maCharWidth;
};
// --------------------------------------------------------------------
CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
-: mpBasePtr( pBasePtr)
-, mpBaseEnd( pBasePtr+nBaseLen)
-, mnStackIdx(0)
-, mnHintSize(0)
-, mnHorzHintSize(0)
-, maCharWidth(-1)
+: mpBasePtr( pBasePtr)
+, mpBaseEnd( pBasePtr+nBaseLen)
+, mnStackIdx(0)
+, mnHintSize(0)
+, mnHorzHintSize(0)
+, maCharWidth(-1)
{
-// setCharStringType( 1);
+// setCharStringType( 1);
// TODO: new CffLocal[ mnFDAryCount];
mpCffLocal = &maCffLocal[0];
}
@@ -628,36 +628,36 @@ void CffSubsetterContext::readDictOp( void)
//TODO: if( nStackIdx > 0)
switch( *pCmdName) {
default: fprintf( stderr, "unsupported DictOp.type=\'%c\'\n", *pCmdName); break;
- case 'b': // bool
+ case 'b': // bool
nInt = popInt();
switch( nOpId) {
case 915: mpCffLocal->mbForceBold = nInt; break; // "ForceBold"
default: break; // TODO: handle more boolean dictops?
}
break;
- case 'n': // dict-op number
+ case 'n': // dict-op number
nVal = popVal();
nInt = static_cast<int>(nVal);
switch( nOpId) {
- case 10: mpCffLocal->maStemStdHW = nVal; break; // "StdHW"
- case 11: mpCffLocal->maStemStdVW = nVal; break; // "StdVW"
- case 15: mnCharsetBase = nInt; break; // "charset"
- case 16: mnEncodingBase = nInt; break; // "nEncoding"
- case 17: mnCharStrBase = nInt; break; // "nCharStrings"
+ case 10: mpCffLocal->maStemStdHW = nVal; break; // "StdHW"
+ case 11: mpCffLocal->maStemStdVW = nVal; break; // "StdVW"
+ case 15: mnCharsetBase = nInt; break; // "charset"
+ case 16: mnEncodingBase = nInt; break; // "nEncoding"
+ case 17: mnCharStrBase = nInt; break; // "nCharStrings"
case 19: mpCffLocal->mnLocalSubrOffs = nInt; break;// "nSubrs"
- case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
- case 21: setNominalWidth( nVal ); break; // "nominalWidthX"
- case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
- case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
- case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
- case 912: mpCffLocal->mfExpFactor = nVal; break; // "ExpansionFactor"
- case 917: mpCffLocal->mnLangGroup = nInt; break; // "LanguageGroup"
- case 936: mnFontDictBase = nInt; break; // "nFDArray"
- case 937: mnFDSelectBase = nInt; break; // "nFDSelect"
+ case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
+ case 21: setNominalWidth( nVal ); break; // "nominalWidthX"
+ case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
+ case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
+ case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
+ case 912: mpCffLocal->mfExpFactor = nVal; break; // "ExpansionFactor"
+ case 917: mpCffLocal->mnLangGroup = nInt; break; // "LanguageGroup"
+ case 936: mnFontDictBase = nInt; break; // "nFDArray"
+ case 937: mnFDSelectBase = nInt; break; // "nFDSelect"
default: break; // TODO: handle more numeric dictops?
}
break;
- case 'a': { // array
+ case 'a': { // array
switch( nOpId) {
case 5: maFontBBox.clear(); break; // "FontBBox"
case 907: maFontMatrix.clear(); break; // "FontMatrix"
@@ -673,36 +673,36 @@ void CffSubsetterContext::readDictOp( void)
}
clear();
} break;
- case 'd': { // delta array
+ case 'd': { // delta array
nVal = 0;
for( int i = 0; i < size(); ++i ) {
nVal += getVal(i);
switch( nOpId) {
- case 6: mpCffLocal->maBlueValues.push_back( nVal); break; // "BlueValues"
- case 7: mpCffLocal->maOtherBlues.push_back( nVal); break; // "OtherBlues"
- case 8: mpCffLocal->maFamilyBlues.push_back( nVal); break; // "FamilyBlues"
+ case 6: mpCffLocal->maBlueValues.push_back( nVal); break; // "BlueValues"
+ case 7: mpCffLocal->maOtherBlues.push_back( nVal); break; // "OtherBlues"
+ case 8: mpCffLocal->maFamilyBlues.push_back( nVal); break; // "FamilyBlues"
case 9: mpCffLocal->maFamilyOtherBlues.push_back( nVal); break;// "FamilyOtherBlues"
- case 912: mpCffLocal->maStemSnapH.push_back( nVal); break; // "StemSnapH"
- case 913: mpCffLocal->maStemSnapV.push_back( nVal); break; // "StemSnapV"
+ case 912: mpCffLocal->maStemSnapH.push_back( nVal); break; // "StemSnapH"
+ case 913: mpCffLocal->maStemSnapV.push_back( nVal); break; // "StemSnapV"
default: break; // TODO: handle more delta-array dictops?
}
}
clear();
} break;
- case 's': // stringid (SID)
+ case 's': // stringid (SID)
nInt = popInt();
switch( nOpId ) {
- case 2: mnFullNameSID = nInt; break; // "FullName"
- case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
- case 938: mnFontNameSID = nInt; break; // "FontName"
+ case 2: mnFullNameSID = nInt; break; // "FullName"
+ case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
+ case 938: mnFontNameSID = nInt; break; // "FontName"
default: break; // TODO: handle more string dictops?
}
break;
- case 'P': // private dict
+ case 'P': // private dict
mpCffLocal->mnPrivDictBase = popInt();
mpCffLocal->mnPrivDictSize = popInt();
break;
- case 'r': { // ROS operands
+ case 'r': { // ROS operands
int nSid1 = popInt();
int nSid2 = popInt();
(void)nSid1; // TODO: use
@@ -710,30 +710,30 @@ void CffSubsetterContext::readDictOp( void)
nVal = popVal();
mbCIDFont = true;
} break;
- case 't': // CharstringType
+ case 't': // CharstringType
nInt = popInt();
setCharStringType( nInt );
break;
}
- return;
+ return;
}
if( (c >= 32) || (c == 28) ) {
-// --mpReadPtr;
+// --mpReadPtr;
read2push();
- } else if( c == 29 ) { // longint
- ++mpReadPtr; // skip 29
+ } else if( c == 29 ) { // longint
+ ++mpReadPtr; // skip 29
int nS32 = mpReadPtr[0] << 24;
nS32 += mpReadPtr[1] << 16;
nS32 += mpReadPtr[2] << 8;
nS32 += mpReadPtr[3] << 0;
if( (sizeof(nS32) != 4) && (nS32 & (1<<31)))
- nS32 |= (~0U) << 31; // assuming 2s complement
+ nS32 |= (~0U) << 31; // assuming 2s complement
mpReadPtr += 4;
nVal = static_cast<ValType>(nS32);
push( nVal );
- } else if( c == 30) { // real number
+ } else if( c == 30) { // real number
++mpReadPtr; // skip 30
const RealType fReal = readRealVal();
// push value onto stack
@@ -753,22 +753,22 @@ void CffSubsetterContext::read2push()
if( c == 28 ) {
short nS16 = (p[1] << 8) + p[2];
if( (sizeof(nS16) != 2) && (nS16 & (1<<15)))
- nS16 |= (~0U) << 15; // assuming 2s complement
+ nS16 |= (~0U) << 15; // assuming 2s complement
aVal = nS16;
p += 3;
- } else if( c <= 246 ) { // -107..+107
+ } else if( c <= 246 ) { // -107..+107
aVal = static_cast<ValType>(p[0] - 139);
p += 1;
- } else if( c <= 250 ) { // +108..+1131
+ } else if( c <= 250 ) { // +108..+1131
aVal = static_cast<ValType>(((p[0] << 8) + p[1]) - 63124);
p += 2;
- } else if( c <= 254 ) { // -108..-1131
+ } else if( c <= 254 ) { // -108..-1131
aVal = static_cast<ValType>(64148 - ((p[0] << 8) + p[1]));
p += 2;
- } else /*if( c == 255)*/ { // Fixed16.16
+ } else /*if( c == 255)*/ { // Fixed16.16
int nS32 = (p[1] << 24) + (p[2] << 16) + (p[3] << 8) + p[4];
if( (sizeof(nS32) != 2) && (nS32 & (1<<31)))
- nS32 |= (~0U) << 31; // assuming 2s complement
+ nS32 |= (~0U) << 31; // assuming 2s complement
aVal = static_cast<ValType>(nS32 * (1.0 / 0x10000));
p += 5;
}
@@ -786,19 +786,19 @@ void CffSubsetterContext::writeType1Val( ValType aVal)
static const int nOutCharstrType = 1;
if( (nInt != aVal) && (nOutCharstrType == 2)) {
// numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
- *(pOut++) = 255; // Fixed 16.16
+ *(pOut++) = 255; // Fixed 16.16
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
nInt = static_cast<int>(aVal * 0x10000) & 0xFFFF;
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
} else if( (nInt >= -107) && (nInt <= +107)) {
- *(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
+ *(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
} else if( (nInt >= -1131) && (nInt <= +1131)) {
if( nInt >= 0)
- nInt += 63124; // +108..+1131
+ nInt += 63124; // +108..+1131
else
- nInt = 64148 - nInt; // -108..-1131
+ nInt = 64148 - nInt; // -108..-1131
*(pOut++) = static_cast<U8>(nInt >> 8);
*(pOut++) = static_cast<U8>(nInt);
} else if( nOutCharstrType == 1) {
@@ -847,7 +847,7 @@ void CffSubsetterContext::pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTy
}
i += nArgsPerTypo;
writeTypeOp( nTypeOp);
- nTypeOp ^= nTypeXor; // for toggling vlineto/hlineto
+ nTypeOp ^= nTypeXor; // for toggling vlineto/hlineto
}
clear();
}
@@ -1342,7 +1342,7 @@ int CffSubsetterContext::convert2Type1Ops( CffLocal* pCffLocal, const U8* const
// prepare the charstring conversion
mpWritePtr = pT1Ops;
-#if 1 // TODO: update caller
+#if 1 // TODO: update caller
U8 aType1Ops[ MAX_T1OPS_SIZE];
if( !pT1Ops)
mpWritePtr = aType1Ops;
@@ -1372,10 +1372,10 @@ mnHintSize=mnHorzHintSize=mnStackIdx=0; maCharWidth=-1;//#######
mnCntrMask = 0;
while( mpReadPtr < mpReadEnd)
convertOneTypeOp();
-// if( bActivePath)
-// writeTypeOp( TYPE1OP::CLOSEPATH);
-// if( bSubRoutine)
-// writeTypeOp( TYPE1OP::RETURN);
+// if( bActivePath)
+// writeTypeOp( TYPE1OP::CLOSEPATH);
+// if( bSubRoutine)
+// writeTypeOp( TYPE1OP::RETURN);
if( mbSawError) {
mpWritePtr = pT1Ops+4;
// create an "idiotproof" charstring
@@ -1408,7 +1408,7 @@ if( mbSawError) {
// encrypt the Type1 charstring
int nRDCryptR = 4330; // TODO: mnRDCryptSeed;
for( U8* p = pT1Ops; p < mpWritePtr; ++p) {
- *p ^= (nRDCryptR >> 8);
+ *p ^= (nRDCryptR >> 8);
nRDCryptR = (*(U8*)p + nRDCryptR) * 52845 + 22719;
}
@@ -1432,44 +1432,44 @@ RealType CffSubsetterContext::readRealVal()
if( nH <= 9) {
nNumber = nNumber * 10 + nH;
--nExpVal;
- } else if( nH == 10) { // comma
+ } else if( nH == 10) { // comma
nExpVal = 0;
bComma = true;
- } else if( nH == 11) { // +exp
+ } else if( nH == 11) { // +exp
fReal *= nNumber;
nExpSign = +1;
nNumber = 0;
- } else if( nH == 12) { // -exp
+ } else if( nH == 12) { // -exp
fReal *= nNumber;
nExpSign = -1;
nNumber = 0;
- } else if( nH == 13) { // reserved
+ } else if( nH == 13) { // reserved
// TODO: ignore or error?
- } else if( nH == 14) // minus
+ } else if( nH == 14) // minus
fReal = -fReal;
- else if( nH == 15) // end
+ else if( nH == 15) // end
break;
// parse low nibble
const U8 nL = c & 0x0F;
if( nL <= 9) {
nNumber = nNumber * 10 + nL;
--nExpVal;
- } else if( nL == 10) { // comma
+ } else if( nL == 10) { // comma
nExpVal = 0;
bComma = true;
- } else if( nL == 11) { // +exp
+ } else if( nL == 11) { // +exp
fReal *= nNumber;
nNumber = 0;
nExpSign = +1;
- } else if( nL == 12) { // -exp
+ } else if( nL == 12) { // -exp
fReal *= nNumber;
nNumber = 0;
nExpSign = -1;
- } else if( nL == 13) { // reserved
+ } else if( nL == 13) { // reserved
// TODO: ignore or error?
- } else if( nL == 14) // minus
+ } else if( nL == 14) // minus
fReal = -fReal;
- else if( nL == 15) // end
+ else if( nL == 15) // end
break;
}
@@ -1504,19 +1504,19 @@ int CffSubsetterContext::seekIndexData( int nIndexBase, int nDataIndex)
int nOfs1 = 0;
switch( nDataOfsSz) {
default: fprintf( stderr, "\tINVALID nDataOfsSz=%d\n\n", nDataOfsSz); return -1;
- case 1: nOfs1 = mpReadPtr[0]; break;
- case 2: nOfs1 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nOfs1 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
- case 4: nOfs1 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nOfs1 = mpReadPtr[0]; break;
+ case 2: nOfs1 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nOfs1 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
+ case 4: nOfs1 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr += nDataOfsSz;
int nOfs2 = 0;
switch( nDataOfsSz) {
- case 1: nOfs2 = mpReadPtr[0]; break;
- case 2: nOfs2 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nOfs2 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
- case 4: nOfs2 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nOfs2 = mpReadPtr[0]; break;
+ case 2: nOfs2 = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nOfs2 = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2]; break;
+ case 4: nOfs2 = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr = mpBasePtr + (nIndexBase + 2) + nDataOfsSz * (nDataCount + 1) + nOfs1;
@@ -1542,10 +1542,10 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
int nEndOfs = 0;
switch( nDataOfsSz) {
default: fprintf( stderr, "\tINVALID nDataOfsSz=%d\n\n", nDataOfsSz); return;
- case 1: nEndOfs = mpReadPtr[0]; break;
- case 2: nEndOfs = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
- case 3: nEndOfs = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2];break;
- case 4: nEndOfs = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
+ case 1: nEndOfs = mpReadPtr[0]; break;
+ case 2: nEndOfs = (mpReadPtr[0]<<8) + mpReadPtr[1]; break;
+ case 3: nEndOfs = (mpReadPtr[0]<<16) + (mpReadPtr[1]<<8) + mpReadPtr[2];break;
+ case 4: nEndOfs = (mpReadPtr[0]<<24) + (mpReadPtr[1]<<16) + (mpReadPtr[2]<<8) + mpReadPtr[3]; break;
}
mpReadPtr += nDataOfsSz;
mpReadPtr += nEndOfs - 1;
@@ -1558,22 +1558,22 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
// initialize FONTDICT specific values
CffLocal::CffLocal( void)
-: mnPrivDictBase( 0)
-, mnPrivDictSize( 0)
-, mnLocalSubrOffs( 0)
-, mnLocalSubrBase( 0)
-, mnLocalSubrCount( 0)
-, mnLocalSubrBias( 0)
-, maNominalWidth( 0)
-, maDefaultWidth( 0)
-, maStemStdHW( 0)
-, maStemStdVW( 0)
-, mfBlueScale( 0.0)
-, mfBlueShift( 0.0)
-, mfBlueFuzz( 0.0)
-, mfExpFactor( 0.0)
-, mnLangGroup( 0)
-, mbForceBold( false)
+: mnPrivDictBase( 0)
+, mnPrivDictSize( 0)
+, mnLocalSubrOffs( 0)
+, mnLocalSubrBase( 0)
+, mnLocalSubrCount( 0)
+, mnLocalSubrBias( 0)
+, maNominalWidth( 0)
+, maDefaultWidth( 0)
+, maStemStdHW( 0)
+, maStemStdVW( 0)
+, mfBlueScale( 0.0)
+, mfBlueShift( 0.0)
+, mfBlueFuzz( 0.0)
+, mfExpFactor( 0.0)
+, mnLangGroup( 0)
+, mbForceBold( false)
{
maStemSnapH.clear();
maStemSnapV.clear();
@@ -1586,24 +1586,24 @@ CffLocal::CffLocal( void)
// --------------------------------------------------------------------
CffGlobal::CffGlobal( void)
-: mnNameIdxBase( 0)
-, mnNameIdxCount( 0)
-, mnStringIdxBase( 0)
-, mnStringIdxCount( 0)
-, mbCIDFont( false)
-, mnCharStrBase( 0)
-, mnCharStrCount( 0)
-, mnEncodingBase( 0)
-, mnCharsetBase( 0)
-, mnGlobalSubrBase( 0)
-, mnGlobalSubrCount( 0)
-, mnGlobalSubrBias( 0)
-, mnFDSelectBase( 0)
-, mnFontDictBase( 0)
-, mnFDAryCount( 1)
-, mnFontNameSID( 0)
-, mnFullNameSID( 0)
-, mnFamilyNameSID( 0)
+: mnNameIdxBase( 0)
+, mnNameIdxCount( 0)
+, mnStringIdxBase( 0)
+, mnStringIdxCount( 0)
+, mbCIDFont( false)
+, mnCharStrBase( 0)
+, mnCharStrCount( 0)
+, mnEncodingBase( 0)
+, mnCharsetBase( 0)
+, mnGlobalSubrBase( 0)
+, mnGlobalSubrCount( 0)
+, mnGlobalSubrBias( 0)
+, mnFDSelectBase( 0)
+, mnFontDictBase( 0)
+, mnFDAryCount( 1)
+, mnFontNameSID( 0)
+, mnFullNameSID( 0)
+, mnFamilyNameSID( 0)
{
maFontBBox.clear();
// TODO; maFontMatrix.clear();
@@ -1651,22 +1651,22 @@ void CffSubsetterContext::initialCffRead( void)
mnGlobalSubrCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
mnGlobalSubrBias = (mnGlobalSubrCount<1240)?107:(mnGlobalSubrCount<33900)?1131:32768;
// skip past the last GlobalSubr entry
-// seekIndexEnd( mnGlobalSubrBase);
+// seekIndexEnd( mnGlobalSubrBase);
// get/skip the Encodings (we got mnEncodingBase from TOPDICT)
-// seekEncodingsEnd( mnEncodingBase);
+// seekEncodingsEnd( mnEncodingBase);
// get/skip the Charsets (we got mnCharsetBase from TOPDICT)
-// seekCharsetsEnd( mnCharStrBase);
+// seekCharsetsEnd( mnCharStrBase);
// get/skip FDSelect (CID only) data
// prepare access to the CharStrings index (we got the base from TOPDICT)
mpReadPtr = mpBasePtr + mnCharStrBase;
mnCharStrCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
-// seekIndexEnd( mnCharStrBase);
+// seekIndexEnd( mnCharStrBase);
// read the FDArray index (CID only)
if( mbCIDFont) {
-// assert( mnFontDictBase == tellRel());
+// assert( mnFontDictBase == tellRel());
mpReadPtr = mpBasePtr + mnFontDictBase;
mnFDAryCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
assert( mnFDAryCount < (int)(sizeof(maCffLocal)/sizeof(*maCffLocal)));
@@ -1705,7 +1705,7 @@ void CffSubsetterContext::initialCffRead( void)
const int nSubrCount = (mpReadPtr[0] << 8) + mpReadPtr[1];
mpCffLocal->mnLocalSubrCount = nSubrCount;
mpCffLocal->mnLocalSubrBias = (nSubrCount<1240)?107:(nSubrCount<33900)?1131:32768;
-// seekIndexEnd( mpCffLocal->mnLocalSubrBase);
+// seekIndexEnd( mpCffLocal->mnLocalSubrBase);
}
}
@@ -1782,7 +1782,7 @@ int CffSubsetterContext::getFDSelect( int nGlyphIndex) const
nPrev = nNext;
}
} break;
- default: // invalid FDselect format
+ default: // invalid FDselect format
fprintf( stderr, "invalid CFF.FdselType=%d\n", nFDSelFormat);
break;
}
@@ -1883,40 +1883,40 @@ const char* CffSubsetterContext::getGlyphName( int nGlyphIndex)
class Type1Emitter
{
public:
- explicit Type1Emitter( const char* pOutFileName, bool bPfbSubset = true);
- explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true);
- /*virtual*/ ~Type1Emitter( void);
- void setSubsetName( const char* );
-
- void emitRawData( const char* pData, int nLength) const;
- void emitAllRaw( void);
- void emitAllHex( void);
- void emitAllCrypted( void);
- int tellPos( void) const;
- void updateLen( int nTellPos, int nLength);
- void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&);
+ explicit Type1Emitter( const char* pOutFileName, bool bPfbSubset = true);
+ explicit Type1Emitter( FILE* pOutFile, bool bPfbSubset = true);
+ /*virtual*/ ~Type1Emitter( void);
+ void setSubsetName( const char* );
+
+ void emitRawData( const char* pData, int nLength) const;
+ void emitAllRaw( void);
+ void emitAllHex( void);
+ void emitAllCrypted( void);
+ int tellPos( void) const;
+ void updateLen( int nTellPos, int nLength);
+ void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&);
private:
- FILE* mpFileOut;
- bool mbCloseOutfile;
- char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation
- int mnEECryptR;
+ FILE* mpFileOut;
+ bool mbCloseOutfile;
+ char maBuffer[MAX_T1OPS_SIZE]; // TODO: dynamic allocation
+ int mnEECryptR;
public:
- char* mpPtr;
+ char* mpPtr;
- char maSubsetName[256];
- bool mbPfbSubset;
- int mnHexLineCol;
+ char maSubsetName[256];
+ bool mbPfbSubset;
+ int mnHexLineCol;
};
// --------------------------------------------------------------------
Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset)
-: mpFileOut( NULL)
-, mbCloseOutfile( true)
-, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
-, mpPtr( maBuffer)
-, mbPfbSubset( bPfbSubset)
-, mnHexLineCol( 0)
+: mpFileOut( NULL)
+, mbCloseOutfile( true)
+, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
+, mpPtr( maBuffer)
+, mbPfbSubset( bPfbSubset)
+, mnHexLineCol( 0)
{
mpFileOut = fopen( pPfbFileName, "wb");
maSubsetName[0] = '\0';
@@ -1925,12 +1925,12 @@ Type1Emitter::Type1Emitter( const char* pPfbFileName, bool bPfbSubset)
// --------------------------------------------------------------------
Type1Emitter::Type1Emitter( FILE* pOutFile, bool bPfbSubset)
-: mpFileOut( pOutFile)
-, mbCloseOutfile( false)
-, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
-, mpPtr( maBuffer)
-, mbPfbSubset( bPfbSubset)
-, mnHexLineCol( 0)
+: mpFileOut( pOutFile)
+, mbCloseOutfile( false)
+, mnEECryptR( 55665) // default eexec seed, TODO: mnEECryptSeed
+, mpPtr( maBuffer)
+, mbPfbSubset( bPfbSubset)
+, mnHexLineCol( 0)
{
maSubsetName[0] = '\0';
}
@@ -2135,7 +2135,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pFamilyName, pFamilyName, nUniqueId);
#endif
pOut += sprintf( pOut,
- "11 dict begin\n" // TODO: dynamic entry count for TOPDICT
+ "11 dict begin\n" // TODO: dynamic entry count for TOPDICT
"/FontType 1 def\n"
"/PaintType 0 def\n");
pOut += sprintf( pOut, "/FontName /%s def\n", rEmitter.maSubsetName);
@@ -2152,12 +2152,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += sprintf( pOut, "/FontBBox {0 0 999 999}readonly def\n");
// emit FONTINFO into TOPDICT
pOut += sprintf( pOut,
- "/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count
+ "/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count
" /FullName (%s) readonly def\n"
" /FamilyName (%s) readonly def\n"
"end readonly def\n",
pFullName, pFamilyName);
-#if 0 // TODO: use an standard Type1 encoding if possible
+#if 0 // TODO: use an standard Type1 encoding if possible
pOut += sprintf( pOut,
"/Encoding StandardEncoding def\n");
#else
@@ -2181,9 +2181,9 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
// update PFB header segment
const int nPfbHeaderLen = rEmitter.tellPos() - 6;
rEmitter.updateLen( 2, nPfbHeaderLen);
-
+
// prepare start of eexec segment
- rEmitter.emitRawData( "\x80\x02\x00\x00\x00\x00", 6); // segment start
+ rEmitter.emitRawData( "\x80\x02\x00\x00\x00\x00", 6); // segment start
}
const int nEExecSegTell = rEmitter.tellPos();
@@ -2217,11 +2217,11 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
"/ND{noaccess def}executeonly def\n"
"/NP{noaccess put}executeonly def\n"
"/MinFeature{16 16}ND\n"
- "/password 5839 def\n", // TODO: mnRDCryptSeed?
+ "/password 5839 def\n", // TODO: mnRDCryptSeed?
nPrivEntryCount);
#if defined(IGNORE_HINTS)
- pOut += sprintf( pOut, "/BlueValues []ND\n"); // BlueValues are mandatory
+ pOut += sprintf( pOut, "/BlueValues []ND\n"); // BlueValues are mandatory
#else
// emit blue hint related privdict entries
if( !mpCffLocal->maBlueValues.empty())
@@ -2237,12 +2237,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += dbl2str( pOut, mpCffLocal->mfBlueScale, 6);
pOut += sprintf( pOut, " def\n");
}
- if( mpCffLocal->mfBlueShift) { // default BlueShift==7
+ if( mpCffLocal->mfBlueShift) { // default BlueShift==7
pOut += sprintf( pOut, "/BlueShift ");
pOut += dbl2str( pOut, mpCffLocal->mfBlueShift);
pOut += sprintf( pOut, " def\n");
}
- if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1
+ if( mpCffLocal->mfBlueFuzz) { // default BlueFuzz==1
pOut += sprintf( pOut, "/BlueFuzz ");
pOut += dbl2str( pOut, mpCffLocal->mfBlueFuzz);
pOut += sprintf( pOut, " def\n");
@@ -2352,7 +2352,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
const int nEExecLen = rEmitter.tellPos() - nEExecSegTell;
rEmitter.updateLen( nEExecSegTell-4, nEExecLen);
}
-
+
// create PFB footer
static const char aPfxFooter[] = "\x80\x01\x14\x02\x00\x00\n" // TODO: check segment len
"0000000000000000000000000000000000000000000000000000000000000000\n"
@@ -2385,12 +2385,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
static_cast<long>(maFontBBox[3] * fYFactor) ) );
// PDF-Spec says the values below mean the ink bounds!
// TODO: use better approximations for these ink bounds
- rFSInfo.m_nAscent = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
- rFSInfo.m_nDescent = -rFSInfo.m_aFontBBox.Top(); // for all letters
- rFSInfo.m_nCapHeight = rFSInfo.m_nAscent; // for top-flat capital letters
+ rFSInfo.m_nAscent = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
+ rFSInfo.m_nDescent = -rFSInfo.m_aFontBBox.Top(); // for all letters
+ rFSInfo.m_nCapHeight = rFSInfo.m_nAscent; // for top-flat capital letters
rFSInfo.m_nFontType = rEmitter.mbPfbSubset ? FontSubsetInfo::TYPE1_PFB : FontSubsetInfo::TYPE1_PFA;
- rFSInfo.m_aPSName = String( rEmitter.maSubsetName, RTL_TEXTENCODING_UTF8 );
+ rFSInfo.m_aPSName = String( rEmitter.maSubsetName, RTL_TEXTENCODING_UTF8 );
return true;
}
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index 64cf243c6a9d..0fb4ffa25b20 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,14 +35,14 @@
// ====================================================================
FontSubsetInfo::FontSubsetInfo()
-: m_nAscent( 0)
-, m_nDescent( 0)
-, m_nCapHeight( 0)
-, m_nFontType( FontSubsetInfo::NO_FONT)
-, mpInFontBytes( NULL)
-, mnInByteLength( 0)
-, meInFontType( FontSubsetInfo::NO_FONT)
-, mpSftTTFont( NULL)
+: m_nAscent( 0)
+, m_nDescent( 0)
+, m_nCapHeight( 0)
+, m_nFontType( FontSubsetInfo::NO_FONT)
+, mpInFontBytes( NULL)
+, mnInByteLength( 0)
+, meInFontType( FontSubsetInfo::NO_FONT)
+, mpSftTTFont( NULL)
{}
// --------------------------------------------------------------------
@@ -85,15 +85,15 @@ bool FontSubsetInfo::CreateFontSubset(
{
// prepare request details needed by all underlying subsetters
mnReqFontTypeMask = nReqFontTypeMask;
- mpOutFile = pOutFile;
- mpReqFontName = pReqFontName;
- mpReqGlyphIds = pReqGlyphIds;
- mpReqEncodedIds = pReqEncodedIds;
- mnReqGlyphCount = nReqGlyphCount;
+ mpOutFile = pOutFile;
+ mpReqFontName = pReqFontName;
+ mpReqGlyphIds = pReqGlyphIds;
+ mpReqEncodedIds = pReqEncodedIds;
+ mnReqGlyphCount = nReqGlyphCount;
// 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
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index 37650003eefa..a718b1ea8899 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -185,10 +185,10 @@ int ReadGSUB( struct _TrueTypeFont* pTTFile,
if( aFeatureIndexList[0] != nFeatureIndex ) // do not ignore the required feature
{
const int nRequested = std::count( aFeatureIndexList.begin(), aFeatureIndexList.end(), nFeatureIndex);
- if( !nRequested ) // ignore features that are not requested
+ if( !nRequested ) // ignore features that are not requested
continue;
const int nAvailable = std::count( aReqFeatureTagList.begin(), aReqFeatureTagList.end(), nTag);
- if( !nAvailable ) // some fonts don't provide features they request!
+ if( !nAvailable ) // some fonts don't provide features they request!
continue;
}
diff --git a/vcl/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h
index 9d552ce45701..fe80f6b2606f 100644
--- a/vcl/source/fontsubset/gsub.h
+++ b/vcl/source/fontsubset/gsub.h
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
namespace vcl
{
-
+
int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile );
int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, int wmode );
diff --git a/vcl/source/fontsubset/list.c b/vcl/source/fontsubset/list.c
index 3b55b4dfee15..91101feb653a 100644
--- a/vcl/source/fontsubset/list.c
+++ b/vcl/source/fontsubset/list.c
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 43f24e5026ea..a52e8afeaf11 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -93,7 +93,7 @@ struct PSPathElement
int x1, y1;
int x2, y2;
int x3, y3;
-
+
PSPathElement( PathSegmentType i_eType ) : type( i_eType ),
x1( 0 ), y1( 0 ),
x2( 0 ), y2( 0 ),
@@ -541,11 +541,11 @@ static int GetSimpleTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoin
/* printf("GetSimpleTTOutline(%d)\n", glyphID); */
- if( glyphID >= ttf->nglyphs ) /*- glyph is not present in the font */
+ if( glyphID >= ttf->nglyphs ) /*- glyph is not present in the font */
return 0;
const sal_uInt8* ptr = table + ttf->goffsets[glyphID];
const sal_Int16 numberOfContours = GetInt16(ptr, 0, 1);
- if( numberOfContours <= 0 ) /*- glyph is not simple */
+ if( numberOfContours <= 0 ) /*- glyph is not simple */
return 0;
if (metrics) { /*- GetCompoundTTOutline() calls this function with NULL metrics -*/
@@ -809,7 +809,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
pa = (ControlPoint*)calloc(np, sizeof(ControlPoint));
assert(pa != 0);
-
+
memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
*pointArray = pa;
@@ -1177,7 +1177,7 @@ static void GetNames(TrueTypeFont *t)
{
t->subfamily = strdup("");
}
-
+
/* #i60349# sanity check psname
* psname parctically has to be 7bit ascii and should not contains spaces
* there is a class of broken fonts which do not fullfill that at all, so let's try
@@ -1409,7 +1409,7 @@ static void FindCmap(TrueTypeFont *ttf)
for (i = 0; i < ncmaps; i++) {
sal_uInt32 offset;
sal_uInt16 pID, eID;
-
+
/* sanity check, cmap entry must lie within table */
if( i*8+4 > table_size )
break;
@@ -1417,14 +1417,14 @@ static void FindCmap(TrueTypeFont *ttf)
pID = GetUInt16(table, 4 + i * 8, 1);
eID = GetUInt16(table, 6 + i * 8, 1);
offset = GetUInt32(table, 8 + i * 8, 1);
-
+
/* sanity check, cmap must lie within file */
if( (table - ttf->ptr) + offset > (sal_uInt32)ttf->fsize )
continue;
/* Unicode tables in Apple fonts */
if (pID == 0) {
- AppleUni = offset;
+ AppleUni = offset;
}
if (pID == 3) {
@@ -1553,10 +1553,10 @@ static void KernGlyphsPrim1(TrueTypeFont *ttf, sal_uInt16 *glyphs, int nglyphs,
{
(void)ttf; /* avoid warning */
(void)glyphs; /* avoid warning */
- (void)nglyphs; /* avoid warning */
- (void)wmode; /* avoid warning */
- (void)nglyphs; /* avoid warning */
- (void)kern; /* avoid warning */
+ (void)nglyphs; /* avoid warning */
+ (void)wmode; /* avoid warning */
+ (void)nglyphs; /* avoid warning */
+ (void)kern; /* avoid warning */
fprintf(stderr, "MacOS kerning tables have not been implemented yet!\n");
}
@@ -1659,7 +1659,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
struct stat st;
if (!fname || !*fname) return SF_BADFILE;
-
+
allocTrueTypeFont( ttf );
if( ! *ttf )
return SF_MEMORY;
@@ -1699,7 +1699,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
goto cleanup;
}
close(fd);
-
+
return doOpenTTFont( facenum, *ttf );
cleanup:
@@ -1717,12 +1717,12 @@ int OpenTTFontBuffer(void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTyp
allocTrueTypeFont( ttf );
if( *ttf == NULL )
return SF_MEMORY;
-
+
(*ttf)->fname = NULL;
(*ttf)->fsize = nLen;
(*ttf)->ptr = (sal_uInt8*)pBuffer;
-
- return doOpenTTFont( facenum, *ttf );
+
+ return doOpenTTFont( facenum, *ttf );
}
static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
@@ -1811,8 +1811,8 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if( !pHead )
return SF_TTFORMAT;
/* limit Head candidate to TTC extract's limits */
- if( pHead > t->ptr + (t->fsize - 54) )
- pHead = t->ptr + (t->fsize - 54);
+ if( pHead > t->ptr + (t->fsize - 54) )
+ pHead = t->ptr + (t->fsize - 54);
/* TODO: find better method than searching head table's magic */
sal_uInt8* p = NULL;
for( p = pHead + 12; p > t->ptr; --p ) {
@@ -1836,7 +1836,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
* tables, but this would be quite time intensive.
* Try to fix tables, so we can cope with minor problems.
*/
-
+
if( (sal_uInt8*)t->tables[i] < t->ptr )
{
#if OSL_DEBUG_LEVEL > 1
@@ -1893,7 +1893,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
for( i = 0; i <= (int)t->nglyphs; ++i )
t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) << 1;
- } else if( getTable(t, O_CFF) ) { /* PS-OpenType */
+ } else if( getTable(t, O_CFF) ) { /* PS-OpenType */
t->goffsets = (sal_uInt32 *) calloc(1+t->nglyphs, sizeof(sal_uInt32));
/* TODO: implement to get subsetting */
assert(t->goffsets != 0);
@@ -2233,7 +2233,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
for (i = 0; i < nGlyphs; i++) {
gID[i] = glyfAdd(glyf, GetTTRawGlyphData(ttf, glyphArray[i]), ttf);
}
-
+
/** cmap **/
cmap = TrueTypeTableNew_cmap();
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index badf9fb496b0..8ec131dc3492 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ namespace vcl
sal_uInt32 tag; /**< TrueType file tag */
list tables; /**< List of table tags and pointers */
};
-
+
/* These must be #defined so that they can be used in initializers */
#define T_maxp 0x6D617870
#define T_glyf 0x676C7966
@@ -167,7 +167,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bige
ptr[offset] = (sal_uInt8)(val & 0xFF);
}
}
-
+
_inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
assert(ptr != 0);
@@ -239,7 +239,7 @@ static int NameRecordCompareF(const void *l, const void *r)
}
return 0;
}
-
+
static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
{
@@ -292,7 +292,7 @@ int AddTable(TrueTypeCreator *_this, TrueTypeTable *table)
void RemoveTable(TrueTypeCreator *_this, sal_uInt32 tag)
{
int done = 0;
-
+
if (listCount(_this->tables)) {
listToFirst(_this->tables);
do {
@@ -316,16 +316,16 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
sal_uInt32 *p;
int i=0, n;
sal_uInt8 *head = NULL; /* saved pointer to the head table data for checkSumAdjustment calculation */
-
+
if ((n = listCount(_this->tables)) == 0) return SF_TTFORMAT;
ProcessTables(_this);
/* ProcessTables() adds 'loca' and 'hmtx' */
-
+
n = listCount(_this->tables);
numTables = (sal_uInt16) n;
-
+
TableEntry* te = (TableEntry*)scalloc(n, sizeof(TableEntry));
@@ -336,7 +336,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
}
qsort(te, n, sizeof(TableEntry), TableEntryCompareF);
-
+
do {
searchRange *= 2;
entrySelector++;
@@ -386,7 +386,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
*ptr = ttf;
*length = s;
-
+
return SF_OK;
}
@@ -476,12 +476,12 @@ typedef struct {
sal_uInt32 isFixedPitch;
void *ptr; /* format-specific pointer */
} tdata_post;
-
+
/* allocate memory for a TT table */
static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
{
- sal_uInt32 n;
+ sal_uInt32 n;
n = (nbytes + 3) & (sal_uInt32) ~3;
sal_uInt8* res = (sal_uInt8*)malloc(n);
@@ -490,7 +490,7 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
return res;
}
-
+
static void FreeGlyphData(void *ptr)
{
GlyphData *p = (GlyphData *) ptr;
@@ -559,7 +559,7 @@ static void TrueTypeTableDispose_cmap(TrueTypeTable *_this)
table_cmap *t;
CmapSubTable *s;
sal_uInt32 i;
-
+
if (_this) {
t = (table_cmap *) _this->data;
if (t) {
@@ -617,7 +617,7 @@ static struct {
{T_cmap, TrueTypeTableDispose_cmap},
{T_name, TrueTypeTableDispose_name},
{T_post, TrueTypeTableDispose_post}
-
+
};
static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
@@ -638,7 +638,7 @@ static int GetRawData_head(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_head;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_head;
-
+
return TTCR_OK;
}
@@ -647,7 +647,7 @@ static int GetRawData_hhea(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_hhea;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_hhea;
-
+
return TTCR_OK;
}
@@ -673,7 +673,7 @@ static int GetRawData_maxp(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
*len = TABLESIZE_maxp;
*ptr = (sal_uInt8 *) _this->data;
*tag = T_maxp;
-
+
return TTCR_OK;
}
@@ -765,7 +765,7 @@ static sal_uInt8 *PackCmapType6(CmapSubTable *s, sal_uInt32 *length)
return ptr;
}
-
+
/* XXX it only handles Format 0 encoding tables */
static sal_uInt8 *PackCmap(CmapSubTable *s, sal_uInt32 *length)
@@ -862,7 +862,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
qsort(nr, n, sizeof(NameRecord), NameRecordCompareF);
int nameLen = stringLen + 12 * n + 6;
- sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
+ sal_uInt8* name = (sal_uInt8*)ttmalloc(nameLen);
PutUInt16(0, name, 0, 1);
PutUInt16(n, name, 2, 1);
@@ -926,9 +926,9 @@ static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
return ret;
}
+
-
-
+
static struct {
sal_uInt32 tag;
@@ -944,10 +944,10 @@ static struct {
{T_cmap, GetRawData_cmap},
{T_name, GetRawData_name},
{T_post, GetRawData_post}
-
-
+
+
};
-
+
/*
* TrueTypeTable public methods
*/
@@ -968,11 +968,11 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
const sal_uInt8* ptr)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
- tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic));
+ tdata_generic* pdata = (tdata_generic*)smalloc(sizeof(tdata_generic));
pdata->nbytes = nbytes;
pdata->tag = tag;
if (nbytes) {
- pdata->ptr = ttmalloc(nbytes);
+ pdata->ptr = ttmalloc(nbytes);
memcpy(pdata->ptr, ptr, nbytes);
} else {
pdata->ptr = 0;
@@ -984,7 +984,7 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
return table;
}
-
+
TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
sal_uInt16 flags,
sal_uInt16 unitsPerEm,
@@ -995,7 +995,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
{
assert(created != 0);
- TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
+ TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
sal_uInt8* ptr = (sal_uInt8*)ttmalloc(TABLESIZE_head);
@@ -1039,7 +1039,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
PutUInt16(0, ptr, 28, 1); /* reserved 4 */
PutUInt16(0, ptr, 30, 1); /* reserved 5 */
PutUInt16(0, ptr, 32, 1); /* metricDataFormat */
-
+
table->data = (void *) ptr;
table->tag = T_hhea;
table->rawdata = 0;
@@ -1069,7 +1069,7 @@ TrueTypeTable *TrueTypeTableNew_maxp( const sal_uInt8* maxp, int size)
if (maxp && size == TABLESIZE_maxp) {
memcpy(table->data, maxp, TABLESIZE_maxp);
}
-
+
table->tag = T_maxp;
table->rawdata = 0;
@@ -1080,7 +1080,7 @@ TrueTypeTable *TrueTypeTableNew_glyf(void)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
list l = listNewEmpty();
-
+
assert(l != 0);
listSetElementDtor(l, (list_destructor)FreeGlyphData);
@@ -1096,12 +1096,12 @@ TrueTypeTable *TrueTypeTableNew_cmap(void)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
table_cmap* cmap = (table_cmap*)smalloc(sizeof(table_cmap));
-
+
cmap->n = 0;
cmap->m = CMAP_SUBTABLE_INIT;
cmap->s = (CmapSubTable *) scalloc(CMAP_SUBTABLE_INIT, sizeof(CmapSubTable));
memset(cmap->s, 0, sizeof(CmapSubTable) * CMAP_SUBTABLE_INIT);
-
+
table->data = (table_cmap *) cmap;
table->rawdata = 0;
@@ -1137,7 +1137,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
{
TrueTypeTable* table = (TrueTypeTable*)smalloc(sizeof(TrueTypeTable));
list l = listNewEmpty();
-
+
assert(l != 0);
listSetElementDtor(l, (list_destructor)DisposeNameRecord);
@@ -1206,7 +1206,7 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3
assert(!"Unknwon TrueType table.\n");
return TTCR_UNKNOWN;
}
-
+
void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
{
sal_uInt32 i, found;
@@ -1229,7 +1229,7 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
if (!found) {
if (t->n == t->m) {
- CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + CMAP_SUBTABLE_INCR, sizeof(CmapSubTable));
+ CmapSubTable* tmp = (CmapSubTable*)scalloc(t->m + CMAP_SUBTABLE_INCR, sizeof(CmapSubTable));
memset(tmp, 0, t->m + CMAP_SUBTABLE_INCR * sizeof(CmapSubTable));
memcpy(tmp, s, sizeof(CmapSubTable) * t->m);
t->m += CMAP_SUBTABLE_INCR;
@@ -1335,7 +1335,7 @@ sal_uInt32 glyfCount(const TrueTypeTable *table)
assert(table->tag == T_glyf);
return listCount((list) table->data);
}
-
+
void nameAdd(TrueTypeTable *table, NameRecord *nr)
{
@@ -1425,10 +1425,10 @@ static void ProcessTables(TrueTypeCreator *tt)
z = GetInt16(gd->ptr, 4, 1);
if (z < yMin) yMin = z;
-
+
z = GetInt16(gd->ptr, 6, 1);
if (z > xMax) xMax = z;
-
+
z = GetInt16(gd->ptr, 8, 1);
if (z > yMax) yMax = z;
}
@@ -1440,14 +1440,14 @@ static void ProcessTables(TrueTypeCreator *tt)
if (gd->npoints > maxCompositePoints) maxCompositePoints = gd->npoints;
if (gd->ncontours > maxCompositeContours) maxCompositeContours = gd->ncontours;
}
-
+
} while (listNext(glyphlist));
indexToLocFormat = (glyfLen / 2 > 0xFFFF) ? 1 : 0;
locaLen = indexToLocFormat ? (nGlyphs + 1) << 2 : (nGlyphs + 1) << 1;
sal_uInt8* glyfPtr = ttmalloc(glyfLen);
- sal_uInt8* locaPtr = ttmalloc(locaLen);
+ sal_uInt8* locaPtr = ttmalloc(locaLen);
TTSimpleGlyphMetrics* met = (TTSimpleGlyphMetrics*)scalloc(nGlyphs, sizeof(TTSimpleGlyphMetrics));
i = 0;
@@ -1456,7 +1456,7 @@ static void ProcessTables(TrueTypeCreator *tt)
p2 = locaPtr;
do {
GlyphData *gd = (GlyphData *) listCurrent(glyphlist);
-
+
if (gd->compflag) { /* re-number all components */
sal_uInt16 flags, index;
sal_uInt8 *ptr = gd->ptr + 10;
@@ -1525,7 +1525,7 @@ static void ProcessTables(TrueTypeCreator *tt)
((tdata_loca *) loca->data)->nbytes = locaLen;
AddTable(tt, loca);
-
+
head = FindTable(tt, T_head);
sal_uInt8* const pHeadData = (sal_uInt8*)head->data;
PutInt16(xMin, pHeadData, 36, 1);
@@ -1589,7 +1589,7 @@ static void ProcessTables(TrueTypeCreator *tt)
}
} // namespace vcl
-
+
extern "C"
{
/**
@@ -1609,11 +1609,11 @@ extern "C"
{
/* XXX do a binary search */
unsigned int i;
-
+
assert(_this != 0);
-
+
if (_this->rawdata) free(_this->rawdata);
-
+
for(i=0; i < sizeof(vcl::vtable1)/sizeof(*vcl::vtable1); i++) {
if (_this->tag == vcl::vtable1[i].tag) {
vcl::vtable1[i].f(_this);
@@ -1623,7 +1623,7 @@ extern "C"
assert(!"Unknown TrueType table.\n");
}
}
-
+
#ifdef TEST_TTCR
int main(void)
diff --git a/vcl/source/fontsubset/ttcr.hxx b/vcl/source/fontsubset/ttcr.hxx
index 69583ecdbdda..0f7a9573dbe1 100644
--- a/vcl/source/fontsubset/ttcr.hxx
+++ b/vcl/source/fontsubset/ttcr.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,7 @@ namespace vcl
};
/** Error codes for most functions */
- enum TTCRErrCodes {
+ enum TTCRErrCodes {
TTCR_OK = 0, /**< no error */
TTCR_ZEROGLYPHS = 1, /**< At least one glyph should be defined */
TTCR_UNKNOWN = 2, /**< Unknown TrueType table */
@@ -212,7 +212,7 @@ namespace vcl
* Table manipulation functions
*
*------------------------------------------------------------------------------*/
-
+
/**
* Add a character/glyph pair to a cmap table
@@ -242,7 +242,7 @@ namespace vcl
*/
void nameAdd(TrueTypeTable *, NameRecord *nr);
-} // namespace
+} // namespace
extern "C"
diff --git a/vcl/source/fontsubset/xlat.cxx b/vcl/source/fontsubset/xlat.cxx
index 108c69cee8c7..85782fddb18d 100644
--- a/vcl/source/fontsubset/xlat.cxx
+++ b/vcl/source/fontsubset/xlat.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,12 +37,12 @@ namespace { // anonymous namespace
class ConverterCache
{
public:
- explicit ConverterCache( void );
+ explicit ConverterCache( void );
~ConverterCache( void );
- sal_uInt16 convertOne( int nSelect, sal_Unicode );
- void convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount );
+ sal_uInt16 convertOne( int nSelect, sal_Unicode );
+ void convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount );
protected:
- void ensureConverter( int nSelect );
+ void ensureConverter( int nSelect );
private:
rtl_UnicodeToTextConverter maConverterCache[ MAX_CVT_SELECT+1 ];
rtl_UnicodeToTextContext maContexts[ MAX_CVT_SELECT+1 ];
@@ -191,22 +191,22 @@ sal_uInt16 TranslateChar16(sal_uInt16 src)
{
return aCC.convertOne( 6, src);
}
-
+
void TranslateString12(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 2, src, dst, n);
}
-
+
void TranslateString13(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 3, src, dst, n);
}
-
+
void TranslateString14(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 4, src, dst, n);
}
-
+
void TranslateString15(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 5, src, dst, n);
@@ -216,6 +216,6 @@ void TranslateString16(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n)
{
aCC.convertStr( 6, src, dst, n);
}
-
+
} // namespace vcl
diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx
index 5960336e13e3..36a316a1e26f 100644
--- a/vcl/source/fontsubset/xlat.hxx
+++ b/vcl/source/fontsubset/xlat.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 9d93a540750a..31553882cf0d 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,15 +126,15 @@ BOOL AlphaMask::Expand( ULONG nDX, ULONG nDY, BYTE* pInitTransparency )
// -----------------------------------------------------------------------------
-BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
+BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
const AlphaMask* pAlphaSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
// this optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
- const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRectDst( rRectDst );
+ BOOL bRet = FALSE;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -142,9 +142,9 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
{
if( pAlphaSrc && ( *pAlphaSrc != *this ) )
{
- Bitmap* pSrc = (Bitmap*) pAlphaSrc;
- const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
+ Bitmap* pSrc = (Bitmap*) pAlphaSrc;
+ const Size aCopySizePix( pSrc->GetSizePixel() );
+ Rectangle aRectSrc( rRectSrc );
aRectSrc.Intersection( Rectangle( Point(), aCopySizePix ) );
@@ -158,11 +158,11 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcEndX = aRectSrc.Left() + nWidth;
+ const long nSrcEndY = aRectSrc.Top() + nHeight;
+ long nDstY = aRectDst.Top();
for( long nSrcY = aRectSrc.Top(); nSrcY < nSrcEndY; nSrcY++, nDstY++ )
for( long nSrcX = aRectSrc.Left(), nDstX = aRectDst.Left(); nSrcX < nSrcEndX; nSrcX++, nDstX++ )
@@ -184,20 +184,20 @@ BOOL AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcX = aRectSrc.Left();
+ const long nSrcY = aRectSrc.Top();
+ const long nSrcEndX1 = nSrcX + nWidth - 1L;
+ const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nDstX = aRectDst.Left();
+ const long nDstY = aRectDst.Top();
+ const long nDstEndX1 = nDstX + nWidth - 1L;
+ const long nDstEndY1 = nDstY + nHeight - 1L;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -246,14 +246,14 @@ BOOL AlphaMask::Erase( BYTE cTransparency )
BOOL AlphaMask::Invert()
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc && pAcc->GetBitCount() == 8 )
{
- BitmapColor aCol( 0 );
- const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
- BYTE* pMap = new BYTE[ 256 ];
+ BitmapColor aCol( 0 );
+ const long nWidth = pAcc->Width(), nHeight = pAcc->Height();
+ BYTE* pMap = new BYTE[ 256 ];
for( long i = 0; i < 256; i++ )
pMap[ i ] = ~(BYTE) i;
@@ -319,16 +319,16 @@ BOOL AlphaMask::Rotate( long nAngle10, BYTE cFillTransparency )
BOOL AlphaMask::Replace( const Bitmap& rMask, BYTE cReplaceTransparency )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const BitmapColor aReplace( cReplaceTransparency );
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aReplace( cReplaceTransparency );
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
for( long nY = 0L; nY < nHeight; nY++ )
for( long nX = 0L; nX < nWidth; nX++ )
@@ -350,8 +350,8 @@ nTol
#endif
)
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" );
@@ -374,7 +374,7 @@ nTol
}
else
{
- BitmapColor aReplace( cReplaceTransparency );
+ BitmapColor aReplace( cReplaceTransparency );
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -400,9 +400,9 @@ nTol
BOOL AlphaMask::Replace( BYTE* pSearchTransparencies, BYTE* pReplaceTransparencies,
ULONG nColorCount, ULONG* pTols )
{
- Color* pSearchColors = new Color[ nColorCount ];
- Color* pReplaceColors = new Color[ nColorCount ];
- BOOL bRet;
+ Color* pSearchColors = new Color[ nColorCount ];
+ Color* pReplaceColors = new Color[ nColorCount ];
+ BOOL bRet;
for( ULONG i = 0; i < nColorCount; i++ )
{
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index b0fb3b3de513..c011ad0c26f1 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,8 +57,8 @@ ULONG Animation::mnAnimCount = 0UL;
ULONG AnimationBitmap::GetChecksum() const
{
- sal_uInt32 nCrc = aBmpEx.GetChecksum();
- SVBT32 aBT32;
+ sal_uInt32 nCrc = aBmpEx.GetChecksum();
+ SVBT32 aBT32;
UInt32ToSVBT32( aPosPix.X(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -89,13 +89,13 @@ ULONG AnimationBitmap::GetChecksum() const
// -------------
Animation::Animation() :
- mnLoopCount ( 0 ),
- mnLoops ( 0 ),
- mnPos ( 0 ),
- meCycleMode ( CYCLE_NORMAL ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( FALSE ),
- mbIsWaiting ( FALSE )
+ mnLoopCount ( 0 ),
+ mnLoops ( 0 ),
+ mnPos ( 0 ),
+ meCycleMode ( CYCLE_NORMAL ),
+ mbIsInAnimation ( FALSE ),
+ mbLoopTerminated ( FALSE ),
+ mbIsWaiting ( FALSE )
{
DBG_CTOR( Animation, NULL );
maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) );
@@ -105,14 +105,14 @@ Animation::Animation() :
// -----------------------------------------------------------------------
Animation::Animation( const Animation& rAnimation ) :
- maBitmapEx ( rAnimation.maBitmapEx ),
- maGlobalSize ( rAnimation.maGlobalSize ),
- mnLoopCount ( rAnimation.mnLoopCount ),
- mnPos ( rAnimation.mnPos ),
- meCycleMode ( rAnimation.meCycleMode ),
- mbIsInAnimation ( FALSE ),
- mbLoopTerminated ( rAnimation.mbLoopTerminated ),
- mbIsWaiting ( rAnimation.mbIsWaiting )
+ maBitmapEx ( rAnimation.maBitmapEx ),
+ maGlobalSize ( rAnimation.maGlobalSize ),
+ mnLoopCount ( rAnimation.mnLoopCount ),
+ mnPos ( rAnimation.mnPos ),
+ meCycleMode ( rAnimation.meCycleMode ),
+ mbIsInAnimation ( FALSE ),
+ mbLoopTerminated ( rAnimation.mbLoopTerminated ),
+ mbIsWaiting ( rAnimation.mbIsWaiting )
{
DBG_CTOR( Animation, NULL );
@@ -168,7 +168,7 @@ Animation& Animation::operator=( const Animation& rAnimation )
BOOL Animation::operator==( const Animation& rAnimation ) const
{
const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx == maBitmapEx &&
@@ -196,7 +196,7 @@ BOOL Animation::operator==( const Animation& rAnimation ) const
BOOL Animation::IsEqual( const Animation& rAnimation ) const
{
const ULONG nCount = maList.Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( rAnimation.maList.Count() == nCount &&
rAnimation.maBitmapEx.IsEqual( maBitmapEx ) &&
@@ -247,9 +247,9 @@ void Animation::Clear()
BOOL Animation::IsTransparent() const
{
- Point aPoint;
- Rectangle aRect( aPoint, maGlobalSize );
- BOOL bRet = FALSE;
+ Point aPoint;
+ Rectangle aRect( aPoint, maGlobalSize );
+ BOOL bRet = FALSE;
// Falls irgendein 'kleines' Bildchen durch den Hintergrund
// ersetzt werden soll, muessen wir 'transparent' sein, um
@@ -291,8 +291,8 @@ ULONG Animation::GetSizeBytes() const
ULONG Animation::GetChecksum() const
{
- SVBT32 aBT32;
- sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
+ SVBT32 aBT32;
+ sal_uInt32 nCrc = GetBitmapEx().GetChecksum();
UInt32ToSVBT32( maList.Count(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -335,8 +335,8 @@ BOOL Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
if( ( pOut->GetOutDevType() == OUTDEV_WINDOW ) && !mbLoopTerminated &&
( ANIMATION_TIMEOUT_ON_CLICK != ( (AnimationBitmap*) maList.GetObject( mnPos ) )->nWait ) )
{
- ImplAnimView* pView;
- ImplAnimView* pMatch = NULL;
+ ImplAnimView* pView;
+ ImplAnimView* pMatch = NULL;
for( pView = (ImplAnimView*) mpViewList->First(); pView; pView = (ImplAnimView*) mpViewList->Next() )
{
@@ -454,8 +454,8 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
if( nAnimCount )
{
- ImplAnimView* pView;
- BOOL bGlobalPause = TRUE;
+ ImplAnimView* pView;
+ BOOL bGlobalPause = TRUE;
if( maNotifyLink.IsSet() )
{
@@ -509,7 +509,7 @@ IMPL_LINK( Animation, ImplTimeoutHdl, Timer*, EMPTYARG )
}
}
else
- bGlobalPause = FALSE;
+ bGlobalPause = FALSE;
if( !mpViewList->Count() )
Stop();
@@ -578,8 +578,8 @@ BOOL Animation::Insert( const AnimationBitmap& rStepBmp )
if( !IsInAnimation() )
{
- Point aPoint;
- Rectangle aGlobalRect( aPoint, maGlobalSize );
+ Point aPoint;
+ Rectangle aGlobalRect( aPoint, maGlobalSize );
maGlobalSize = aGlobalRect.Union( Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize();
maList.Insert( new AnimationBitmap( rStepBmp ), LIST_APPEND );
@@ -712,7 +712,7 @@ BOOL Animation::Mirror( ULONG nMirrorFlags )
{
DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" );
- BOOL bRet;
+ BOOL bRet;
if( !IsInAnimation() && maList.Count() )
{
@@ -828,8 +828,8 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
if( nCount )
{
- const ByteString aDummyStr;
- const UINT32 nDummy32 = 0UL;
+ const ByteString aDummyStr;
+ const UINT32 nDummy32 = 0UL;
// Falls keine BitmapEx gesetzt wurde, schreiben wir
// einfach die erste Bitmap der Animation
@@ -843,8 +843,8 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
for( USHORT i = 0; i < nCount; i++ )
{
- const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
- const UINT16 nRest = nCount - i - 1;
+ const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
+ const UINT16 nRest = nCount - i - 1;
// AnimationBitmap schreiben
rOStm << rAnimBmp.aBmpEx;
@@ -855,11 +855,11 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << (UINT16) rAnimBmp.eDisposal;
rOStm << (BYTE) rAnimBmp.bUserInput;
rOStm << (UINT32) rAnimation.mnLoopCount;
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // unbenutzt
rOStm << aDummyStr; // unbenutzt
- rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
+ rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
}
}
@@ -870,11 +870,11 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
{
- Bitmap aBmp;
- ULONG nStmPos = rIStm.Tell();
- UINT32 nAnimMagic1, nAnimMagic2;
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bReadAnimations = FALSE;
+ Bitmap aBmp;
+ ULONG nStmPos = rIStm.Tell();
+ UINT32 nAnimMagic1, nAnimMagic2;
+ USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BOOL bReadAnimations = FALSE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nStmPos = rIStm.Tell();
@@ -904,11 +904,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
if( bReadAnimations )
{
AnimationBitmap aAnimBmp;
- BitmapEx aBmpEx;
- ByteString aDummyStr;
- UINT32 nTmp32;
- UINT16 nTmp16;
- BYTE cTmp;
+ BitmapEx aBmpEx;
+ ByteString aDummyStr;
+ UINT32 nTmp32;
+ UINT16 nTmp16;
+ BYTE cTmp;
do
{
@@ -920,11 +920,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
rIStm >> cTmp; aAnimBmp.bUserInput = (BOOL) cTmp;
rIStm >> nTmp32; rAnimation.mnLoopCount = (USHORT) nTmp32;
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
+ rIStm >> nTmp32; // unbenutzt
rIStm >> aDummyStr; // unbenutzt
- rIStm >> nTmp16; // Rest zu lesen
+ rIStm >> nTmp16; // Rest zu lesen
rAnimation.Insert( aAnimBmp );
}
diff --git a/vcl/source/gdi/base14.cxx b/vcl/source/gdi/base14.cxx
index 83820bc654bf..cecd90c287e5 100644
--- a/vcl/source/gdi/base14.cxx
+++ b/vcl/source/gdi/base14.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ OString PDFWriterImpl::BuiltinFont::getNameObject() const
OStringBuffer aBuf( 16 );
aBuf.append( '/' );
const char* pRun = m_pPSName;
-
+
unsigned int nCopied = 0;
while( *pRun )
{
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 074935086b0b..138d162dd299 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,16 +58,16 @@ Bitmap::Bitmap( const ResId& rResId ) :
mpImpBmp( NULL )
{
const BitmapEx aBmpEx( rResId );
-
+
if( !aBmpEx.IsEmpty() )
- *this = aBmpEx.GetBitmap();
+ *this = aBmpEx.GetBitmap();
}
// ------------------------------------------------------------------
Bitmap::Bitmap( const Bitmap& rBitmap ) :
- maPrefMapMode ( rBitmap.maPrefMapMode ),
- maPrefSize ( rBitmap.maPrefSize )
+ maPrefMapMode ( rBitmap.maPrefMapMode ),
+ maPrefSize ( rBitmap.maPrefSize )
{
mpImpBmp = rBitmap.mpImpBmp;
@@ -91,8 +91,8 @@ Bitmap::Bitmap( const Size& rSizePixel, USHORT nBitCount, const BitmapPalette* p
{
if( rSizePixel.Width() && rSizePixel.Height() )
{
- BitmapPalette aPal;
- BitmapPalette* pRealPal = NULL;
+ BitmapPalette aPal;
+ BitmapPalette* pRealPal = NULL;
if( nBitCount <= 8 )
{
@@ -319,8 +319,8 @@ USHORT Bitmap::GetBitCount() const
BOOL Bitmap::HasGreyPalette() const
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const USHORT nBitCount = GetBitCount();
+ BOOL bRet = FALSE;
if( 1 == nBitCount )
{
@@ -348,7 +348,7 @@ BOOL Bitmap::HasGreyPalette() const
{
if( pRAcc->HasPalette() && ( (BitmapPalette&) pRAcc->GetPalette() == GetGreyPalette( 1 << nBitCount ) ) )
bRet = TRUE;
-
+
( (Bitmap*) this )->ReleaseAccess( pRAcc );
}
}
@@ -372,8 +372,8 @@ ULONG Bitmap::GetChecksum() const
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
- sal_uInt32 nCrc = 0;
- SVBT32 aBT32;
+ sal_uInt32 nCrc = 0;
+ SVBT32 aBT32;
pRAcc->ImplZeroInitUnusedBits();
@@ -394,7 +394,7 @@ ULONG Bitmap::GetChecksum() const
UInt32ToSVBT32( pRAcc->GetColorMask().GetBlueMask(), aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
-
+
if( pRAcc->HasPalette() )
{
nCrc = rtl_crc32( nCrc, pRAcc->GetPalette().ImplGetColorBuffer(),
@@ -402,7 +402,7 @@ ULONG Bitmap::GetChecksum() const
}
nCrc = rtl_crc32( nCrc, pRAcc->GetBuffer(), pRAcc->GetScanlineSize() * pRAcc->Height() );
-
+
mpImpBmp->ImplSetChecksum( nRet = nCrc );
}
@@ -448,10 +448,10 @@ void Bitmap::ImplMakeUnique()
void Bitmap::ImplAssignWithSize( const Bitmap& rBitmap )
{
- const Size aOldSizePix( GetSizePixel() );
- const Size aNewSizePix( rBitmap.GetSizePixel() );
- const MapMode aOldMapMode( maPrefMapMode );
- Size aNewPrefSize;
+ const Size aOldSizePix( GetSizePixel() );
+ const Size aNewSizePix( rBitmap.GetSizePixel() );
+ const MapMode aOldMapMode( maPrefMapMode );
+ Size aNewPrefSize;
if( ( aOldSizePix != aNewSizePix ) && aOldSizePix.Width() && aOldSizePix.Height() )
{
@@ -528,15 +528,15 @@ BOOL Bitmap::Erase( const Color& rFillColor )
{
if( !(*this) )
return TRUE;
-
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pWriteAcc )
{
const ULONG nFormat = pWriteAcc->GetScanlineFormat();
- BYTE cIndex = 0;
- BOOL bFast = FALSE;
+ BYTE cIndex = 0;
+ BOOL bFast = FALSE;
switch( nFormat )
{
@@ -608,15 +608,15 @@ BOOL Bitmap::Erase( const Color& rFillColor )
BOOL Bitmap::Invert()
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
if( pAcc->HasPalette() )
{
- BitmapPalette aBmpPal( pAcc->GetPalette() );
- const USHORT nCount = aBmpPal.GetEntryCount();
+ BitmapPalette aBmpPal( pAcc->GetPalette() );
+ const USHORT nCount = aBmpPal.GetEntryCount();
for( USHORT i = 0; i < nCount; i++ )
aBmpPal[ i ].Invert();
@@ -625,8 +625,8 @@ BOOL Bitmap::Invert()
}
else
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
+ const long nWidth = pAcc->Width();
+ const long nHeight = pAcc->Height();
for( long nX = 0L; nX < nWidth; nX++ )
for( long nY = 0L; nY < nHeight; nY++ )
@@ -650,14 +650,14 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
if( bHorz && !bVert )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nWidth = pAcc->Width();
- const long nHeight = pAcc->Height();
- const long nWidth1 = nWidth - 1L;
- const long nWidth_2 = nWidth >> 1L;
+ const long nWidth = pAcc->Width();
+ const long nHeight = pAcc->Height();
+ const long nWidth1 = nWidth - 1L;
+ const long nWidth_2 = nWidth >> 1L;
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -676,15 +676,15 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
else if( bVert && !bHorz )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nScanSize = pAcc->GetScanlineSize();
- BYTE* pBuffer = new BYTE[ nScanSize ];
- const long nHeight = pAcc->Height();
- const long nHeight1 = nHeight - 1L;
- const long nHeight_2 = nHeight >> 1L;
+ const long nScanSize = pAcc->GetScanlineSize();
+ BYTE* pBuffer = new BYTE[ nScanSize ];
+ const long nHeight = pAcc->Height();
+ const long nHeight1 = nHeight - 1L;
+ const long nHeight_2 = nHeight >> 1L;
for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- )
{
@@ -700,14 +700,14 @@ BOOL Bitmap::Mirror( ULONG nMirrorFlags )
}
else if( bHorz && bVert )
{
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
if( pAcc )
{
- const long nWidth = pAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pAcc->Height();
- long nHeight_2 = nHeight >> 1;
+ const long nWidth = pAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pAcc->Height();
+ long nHeight_2 = nHeight >> 1;
for( long nY = 0L, nOtherY = nHeight - 1L; nY < nHeight_2; nY++, nOtherY-- )
{
@@ -750,33 +750,33 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
nAngle10 %= 3600L;
nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10;
- if( !nAngle10 )
+ if( !nAngle10 )
bRet = TRUE;
else if( 1800L == nAngle10 )
bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT );
else
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aRotatedBmp;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aRotatedBmp;
if( pReadAcc )
{
- const Size aSizePix( GetSizePixel() );
+ const Size aSizePix( GetSizePixel() );
if( ( 900L == nAngle10 ) || ( 2700L == nAngle10 ) )
{
- const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() );
- Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() );
+ Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = aSizePix.Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = aSizePix.Height();
- const long nHeight1 = nHeight - 1L;
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
+ const long nWidth = aSizePix.Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = aSizePix.Height();
+ const long nHeight1 = nHeight - 1L;
+ const long nNewWidth = aNewSizePix.Width();
+ const long nNewHeight = aNewSizePix.Height();
if( 900L == nAngle10 )
{
@@ -798,37 +798,37 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
}
else
{
- Point aTmpPoint;
- Rectangle aTmpRectangle( aTmpPoint, aSizePix );
- Polygon aPoly( aTmpRectangle );
+ Point aTmpPoint;
+ Rectangle aTmpRectangle( aTmpPoint, aSizePix );
+ Polygon aPoly( aTmpRectangle );
aPoly.Rotate( aTmpPoint, (USHORT) nAngle10 );
- Rectangle aNewBound( aPoly.GetBoundRect() );
- const Size aNewSizePix( aNewBound.GetSize() );
- Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Rectangle aNewBound( aPoly.GetBoundRect() );
+ const Size aNewSizePix( aNewBound.GetSize() );
+ Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aFillColor( pWriteAcc->GetBestMatchingColor( rFillColor ) );
- const double fCosAngle = cos( nAngle10 * F_PI1800 );
- const double fSinAngle = sin( nAngle10 * F_PI1800 );
- const double fXMin = aNewBound.Left();
- const double fYMin = aNewBound.Top();
- const long nWidth = aSizePix.Width();
- const long nHeight = aSizePix.Height();
- const long nNewWidth = aNewSizePix.Width();
- const long nNewHeight = aNewSizePix.Height();
- long nX;
- long nY;
- long nRotX;
- long nRotY;
- long nSinY;
- long nCosY;
- long* pCosX = new long[ nNewWidth ];
- long* pSinX = new long[ nNewWidth ];
- long* pCosY = new long[ nNewHeight ];
- long* pSinY = new long[ nNewHeight ];
+ const BitmapColor aFillColor( pWriteAcc->GetBestMatchingColor( rFillColor ) );
+ const double fCosAngle = cos( nAngle10 * F_PI1800 );
+ const double fSinAngle = sin( nAngle10 * F_PI1800 );
+ const double fXMin = aNewBound.Left();
+ const double fYMin = aNewBound.Top();
+ const long nWidth = aSizePix.Width();
+ const long nHeight = aSizePix.Height();
+ const long nNewWidth = aNewSizePix.Width();
+ const long nNewHeight = aNewSizePix.Height();
+ long nX;
+ long nY;
+ long nRotX;
+ long nRotY;
+ long nSinY;
+ long nCosY;
+ long* pCosX = new long[ nNewWidth ];
+ long* pSinX = new long[ nNewWidth ];
+ long* pCosY = new long[ nNewHeight ];
+ long* pSinY = new long[ nNewHeight ];
for ( nX = 0; nX < nNewWidth; nX++ )
{
@@ -888,9 +888,9 @@ BOOL Bitmap::Rotate( long nAngle10, const Color& rFillColor )
BOOL Bitmap::Crop( const Rectangle& rRectPixel )
{
- const Size aSizePix( GetSizePixel() );
- Rectangle aRect( rRectPixel );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRect( rRectPixel );
+ BOOL bRet = FALSE;
aRect.Intersection( Rectangle( Point(), aSizePix ) );
@@ -900,10 +900,10 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
if( pReadAcc )
{
- Point aTmpPoint;
- const Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
- Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Point aTmpPoint;
+ const Rectangle aNewRect( aTmpPoint, aRect.GetSize() );
+ Bitmap aNewBmp( aNewRect.GetSize(), GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
@@ -935,9 +935,9 @@ BOOL Bitmap::Crop( const Rectangle& rRectPixel )
BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
const Rectangle& rRectSrc, const Bitmap* pBmpSrc )
{
- const Size aSizePix( GetSizePixel() );
- Rectangle aRectDst( rRectDst );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ Rectangle aRectDst( rRectDst );
+ BOOL bRet = FALSE;
aRectDst.Intersection( Rectangle( Point(), aSizePix ) );
@@ -945,11 +945,11 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
{
if( pBmpSrc && ( *pBmpSrc != *this ) )
{
- Bitmap* pSrc = (Bitmap*) pBmpSrc;
- const Size aCopySizePix( pSrc->GetSizePixel() );
- Rectangle aRectSrc( rRectSrc );
- const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
- const USHORT nDstBitCount = GetBitCount();
+ Bitmap* pSrc = (Bitmap*) pBmpSrc;
+ const Size aCopySizePix( pSrc->GetSizePixel() );
+ Rectangle aRectSrc( rRectSrc );
+ const USHORT nSrcBitCount = pBmpSrc->GetBitCount();
+ const USHORT nDstBitCount = GetBitCount();
if( nSrcBitCount > nDstBitCount )
{
@@ -970,14 +970,14 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( nNextIndex )
{
- BitmapReadAccess* pSrcAcc = pSrc->AcquireReadAccess();
- BitmapWriteAccess* pDstAcc = AcquireWriteAccess();
+ BitmapReadAccess* pSrcAcc = pSrc->AcquireReadAccess();
+ BitmapWriteAccess* pDstAcc = AcquireWriteAccess();
if( pSrcAcc && pDstAcc )
{
- const long nSrcCount = pDstAcc->GetPaletteEntryCount();
- const long nDstCount = 1 << nDstBitCount;
- BOOL bFound;
+ const long nSrcCount = pDstAcc->GetPaletteEntryCount();
+ const long nDstCount = 1 << nDstBitCount;
+ BOOL bFound;
for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
{
@@ -1019,16 +1019,16 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcEndX = aRectSrc.Left() + nWidth;
- const long nSrcEndY = aRectSrc.Top() + nHeight;
- long nDstY = aRectDst.Top();
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcEndX = aRectSrc.Left() + nWidth;
+ const long nSrcEndY = aRectSrc.Top() + nHeight;
+ long nDstY = aRectDst.Top();
if( pReadAcc->HasPalette() && pWriteAcc->HasPalette() )
{
- const USHORT nCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pMap = new BYTE[ nCount ];
+ const USHORT nCount = pReadAcc->GetPaletteEntryCount();
+ BYTE* pMap = new BYTE[ nCount ];
// Index-Map fuer Farbtabelle
// aufbauen, da das Bild ja (relativ) farbgenau
@@ -1069,20 +1069,20 @@ BOOL Bitmap::CopyPixel( const Rectangle& rRectDst,
if( !aRectSrc.IsEmpty() && ( aRectSrc != aRectDst ) )
{
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
- const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
- const long nSrcX = aRectSrc.Left();
- const long nSrcY = aRectSrc.Top();
- const long nSrcEndX1 = nSrcX + nWidth - 1L;
- const long nSrcEndY1 = nSrcY + nHeight - 1L;
- const long nDstX = aRectDst.Left();
- const long nDstY = aRectDst.Top();
- const long nDstEndX1 = nDstX + nWidth - 1L;
- const long nDstEndY1 = nDstY + nHeight - 1L;
+ const long nWidth = Min( aRectSrc.GetWidth(), aRectDst.GetWidth() );
+ const long nHeight = Min( aRectSrc.GetHeight(), aRectDst.GetHeight() );
+ const long nSrcX = aRectSrc.Left();
+ const long nSrcY = aRectSrc.Top();
+ const long nSrcEndX1 = nSrcX + nWidth - 1L;
+ const long nSrcEndY1 = nSrcY + nHeight - 1L;
+ const long nDstX = aRectDst.Left();
+ const long nDstY = aRectDst.Top();
+ const long nDstEndX1 = nDstX + nWidth - 1L;
+ const long nDstEndY1 = nDstY + nHeight - 1L;
if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) )
{
@@ -1127,27 +1127,27 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
if( nDX || nDY )
{
- const Size aSizePixel( GetSizePixel() );
- const long nWidth = aSizePixel.Width();
- const long nHeight = aSizePixel.Height();
- const Size aNewSize( nWidth + nDX, nHeight + nDY );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ const Size aSizePixel( GetSizePixel() );
+ const long nWidth = aSizePixel.Width();
+ const long nHeight = aSizePixel.Height();
+ const Size aNewSize( nWidth + nDX, nHeight + nDY );
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
if( pReadAcc )
{
- BitmapPalette aBmpPal( pReadAcc->GetPalette() );
- Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aBmpPal( pReadAcc->GetPalette() );
+ Bitmap aNewBmp( aNewSize, GetBitCount(), &aBmpPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
BitmapColor aColor;
- const long nNewX = nWidth;
- const long nNewY = nHeight;
- const long nNewWidth = pWriteAcc->Width();
- const long nNewHeight = pWriteAcc->Height();
- long nX;
- long nY;
+ const long nNewX = nWidth;
+ const long nNewY = nHeight;
+ const long nNewWidth = pWriteAcc->Width();
+ const long nNewHeight = pWriteAcc->Height();
+ long nX;
+ long nY;
if( pInitColor )
aColor = pWriteAcc->GetBestMatchingColor( *pInitColor );
@@ -1184,9 +1184,9 @@ BOOL Bitmap::Expand( ULONG nDX, ULONG nDY, const Color* pInitColor )
Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pWriteAcc )
{
@@ -1194,15 +1194,15 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
if( pReadAcc )
{
- const long nWidth = pReadAcc->Width();
- const long nHeight = pReadAcc->Height();
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pReadAcc->Width();
+ const long nHeight = pReadAcc->Height();
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
if( !nTol )
{
- const BitmapColor aTest( pReadAcc->GetBestMatchingColor( rTransColor ) );
- long nX, nY, nShift;
+ const BitmapColor aTest( pReadAcc->GetBestMatchingColor( rTransColor ) );
+ long nX, nY, nShift;
if( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ||
pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_LSN_PAL )
@@ -1211,7 +1211,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
const BYTE cTest = aTest.GetIndex();
const long nShiftInit = ( ( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL ) ? 4 : 0 );
- if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
+ if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
@@ -1248,7 +1248,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
// optimized for 8Bit source palette
const BYTE cTest = aTest.GetIndex();
- if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
+ if( pWriteAcc->GetScanlineFormat() == BMP_FORMAT_1BIT_MSB_PAL &&
aWhite.GetIndex() == 1 )
{
// optimized for 1Bit-MSB destination palette
@@ -1298,13 +1298,13 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
else
{
BitmapColor aCol;
- long nR, nG, nB;
- const long nMinR = MinMax( (long) rTransColor.GetRed() - nTol, 0, 255 );
- const long nMaxR = MinMax( (long) rTransColor.GetRed() + nTol, 0, 255 );
- const long nMinG = MinMax( (long) rTransColor.GetGreen() - nTol, 0, 255 );
- const long nMaxG = MinMax( (long) rTransColor.GetGreen() + nTol, 0, 255 );
- const long nMinB = MinMax( (long) rTransColor.GetBlue() - nTol, 0, 255 );
- const long nMaxB = MinMax( (long) rTransColor.GetBlue() + nTol, 0, 255 );
+ long nR, nG, nB;
+ const long nMinR = MinMax( (long) rTransColor.GetRed() - nTol, 0, 255 );
+ const long nMaxR = MinMax( (long) rTransColor.GetRed() + nTol, 0, 255 );
+ const long nMinG = MinMax( (long) rTransColor.GetGreen() - nTol, 0, 255 );
+ const long nMaxG = MinMax( (long) rTransColor.GetGreen() + nTol, 0, 255 );
+ const long nMinB = MinMax( (long) rTransColor.GetBlue() - nTol, 0, 255 );
+ const long nMaxB = MinMax( (long) rTransColor.GetBlue() + nTol, 0, 255 );
if( pReadAcc->HasPalette() )
{
@@ -1374,21 +1374,21 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, ULONG nTol ) const
Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
{
- Region aRegion;
- Rectangle aRect( rRect );
- BitmapReadAccess* pReadAcc = ( (Bitmap*) this )->AcquireReadAccess();
+ Region aRegion;
+ Rectangle aRect( rRect );
+ BitmapReadAccess* pReadAcc = ( (Bitmap*) this )->AcquireReadAccess();
aRect.Intersection( Rectangle( Point(), GetSizePixel() ) );
aRect.Justify();
if( pReadAcc )
{
- Rectangle aSubRect;
- const long nLeft = aRect.Left();
- const long nTop = aRect.Top();
- const long nRight = aRect.Right();
- const long nBottom = aRect.Bottom();
- const BitmapColor aMatch( pReadAcc->GetBestMatchingColor( rColor ) );
+ Rectangle aSubRect;
+ const long nLeft = aRect.Left();
+ const long nTop = aRect.Top();
+ const long nRight = aRect.Right();
+ const long nBottom = aRect.Bottom();
+ const BitmapColor aMatch( pReadAcc->GetBestMatchingColor( rColor ) );
aRegion.ImplBeginAddRect();
@@ -1427,16 +1427,16 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const
BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- BitmapColor aReplace;
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ BitmapColor aReplace;
if( pAcc->HasPalette() )
{
@@ -1505,17 +1505,17 @@ BOOL Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapReadAccess* pAcc = AcquireReadAccess();
- BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
- BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapReadAccess* pAcc = AcquireReadAccess();
+ BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
+ BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc && pAlphaAcc && pNewAcc )
{
- BitmapColor aCol;
- const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
+ BitmapColor aCol;
+ const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
for( long nY = 0L; nY < nHeight; nY++ )
{
@@ -1535,8 +1535,8 @@ BOOL Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1556,17 +1556,17 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
if( 1 == GetBitCount() )
Convert( BMP_CONVERSION_4BIT_COLORS );
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
- const long nMinR = MinMax( (long) rSearchColor.GetRed() - nTol, 0, 255 );
- const long nMaxR = MinMax( (long) rSearchColor.GetRed() + nTol, 0, 255 );
- const long nMinG = MinMax( (long) rSearchColor.GetGreen() - nTol, 0, 255 );
- const long nMaxG = MinMax( (long) rSearchColor.GetGreen() + nTol, 0, 255 );
- const long nMinB = MinMax( (long) rSearchColor.GetBlue() - nTol, 0, 255 );
- const long nMaxB = MinMax( (long) rSearchColor.GetBlue() + nTol, 0, 255 );
+ const long nMinR = MinMax( (long) rSearchColor.GetRed() - nTol, 0, 255 );
+ const long nMaxR = MinMax( (long) rSearchColor.GetRed() + nTol, 0, 255 );
+ const long nMinG = MinMax( (long) rSearchColor.GetGreen() - nTol, 0, 255 );
+ const long nMaxG = MinMax( (long) rSearchColor.GetGreen() + nTol, 0, 255 );
+ const long nMinB = MinMax( (long) rSearchColor.GetBlue() - nTol, 0, 255 );
+ const long nMaxB = MinMax( (long) rSearchColor.GetBlue() + nTol, 0, 255 );
if( pAcc->HasPalette() )
{
@@ -1584,8 +1584,8 @@ BOOL Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, ULO
}
else
{
- BitmapColor aCol;
- const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) );
+ BitmapColor aCol;
+ const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) );
for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ )
{
@@ -1620,19 +1620,19 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
if( 1 == GetBitCount() )
Convert( BMP_CONVERSION_4BIT_COLORS );
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAcc )
{
- long* pMinR = new long[ nColorCount ];
- long* pMaxR = new long[ nColorCount ];
- long* pMinG = new long[ nColorCount ];
- long* pMaxG = new long[ nColorCount ];
- long* pMinB = new long[ nColorCount ];
- long* pMaxB = new long[ nColorCount ];
- long* pTols;
- ULONG i;
+ long* pMinR = new long[ nColorCount ];
+ long* pMaxR = new long[ nColorCount ];
+ long* pMinG = new long[ nColorCount ];
+ long* pMaxG = new long[ nColorCount ];
+ long* pMinB = new long[ nColorCount ];
+ long* pMaxB = new long[ nColorCount ];
+ long* pTols;
+ ULONG i;
if( !_pTols )
{
@@ -1644,8 +1644,8 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
for( i = 0UL; i < nColorCount; i++ )
{
- const Color& rCol = pSearchColors[ i ];
- const long nTol = pTols[ i ];
+ const Color& rCol = pSearchColors[ i ];
+ const long nTol = pTols[ i ];
pMinR[ i ] = MinMax( (long) rCol.GetRed() - nTol, 0, 255 );
pMaxR[ i ] = MinMax( (long) rCol.GetRed() + nTol, 0, 255 );
@@ -1675,8 +1675,8 @@ BOOL Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors,
}
else
{
- BitmapColor aCol;
- BitmapColor* pReplaces = new BitmapColor[ nColorCount ];
+ BitmapColor aCol;
+ BitmapColor* pReplaces = new BitmapColor[ nColorCount ];
for( i = 0UL; i < nColorCount; i++ )
pReplaces[ i ] = pAcc->GetBestMatchingColor( pReplaceColors[ i ] );
@@ -1743,19 +1743,19 @@ Bitmap Bitmap::CreateDisplayBitmap( OutputDevice* pDisplay )
Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
{
Bitmap aRet;
-
+
if( BMP_COLOR_HIGHCONTRAST == eColorMode )
{
Color* pSrcColors = NULL;
Color* pDstColors = NULL;
ULONG nColorCount = 0;
-
+
aRet = *this;
Image::GetColorTransformArrays( (ImageColorTransform) eColorMode, pSrcColors, pDstColors, nColorCount );
if( nColorCount && pSrcColors && pDstColors )
- aRet.Replace( pSrcColors, pDstColors, nColorCount );
+ aRet.Replace( pSrcColors, pDstColors, nColorCount );
delete[] pSrcColors;
delete[] pDstColors;
@@ -1766,7 +1766,7 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
aRet = *this;
aRet.MakeMono( BMP_COLOR_MONOCHROME_THRESHOLD );
}
-
+
return aRet;
}
@@ -1774,20 +1774,20 @@ Bitmap Bitmap::GetColorTransformedBitmap( BmpColorMode eColorMode ) const
BOOL Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
{
- BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pMaskAcc && pAcc )
{
- const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
- const Color aColBlack( COL_BLACK );
- BitmapColor aPixel;
- BitmapColor aMaskPixel;
- const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) );
- const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) );
+ const long nWidth = Min( pMaskAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pMaskAcc->Height(), pAcc->Height() );
+ const Color aColBlack( COL_BLACK );
+ BitmapColor aPixel;
+ BitmapColor aMaskPixel;
+ const BitmapColor aWhite( pAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aBlack( pAcc->GetBestMatchingColor( aColBlack ) );
+ const BitmapColor aMaskBlack( pMaskAcc->GetBestMatchingColor( aColBlack ) );
switch( eCombine )
{
@@ -1921,19 +1921,19 @@ BOOL Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
if( GetBitCount() <= 8 )
Convert( BMP_CONVERSION_24BIT );
- BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
- BitmapWriteAccess* pAcc = AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess();
+ BitmapWriteAccess* pAcc = AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pAlphaAcc && pAcc )
{
- const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
- const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
+ const long nWidth = Min( pAlphaAcc->Width(), pAcc->Width() );
+ const long nHeight = Min( pAlphaAcc->Height(), pAcc->Height() );
for( long nY = 0L; nY < nHeight; ++nY )
for( long nX = 0L; nX < nWidth; ++nX )
- pAcc->SetPixel( nY, nX,
- pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
+ pAcc->SetPixel( nY, nX,
+ pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor,
255 - pAlphaAcc->GetPixel( nY, nX ) ) );
bRet = TRUE;
@@ -1963,6 +1963,6 @@ bool Bitmap::GetSystemData( BitmapSystemData& rData ) const
if( pSalBitmap )
bRet = pSalBitmap->GetSystemData( rData );
}
-
+
return bRet;
}
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index de926a0446ca..558aebcf9adc 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,20 +44,20 @@
// - Defines -
// -----------
-#define DIBCOREHEADERSIZE ( 12UL )
-#define DIBINFOHEADERSIZE ( sizeof( DIBInfoHeader ) )
+#define DIBCOREHEADERSIZE ( 12UL )
+#define DIBINFOHEADERSIZE ( sizeof( DIBInfoHeader ) )
#define SETPIXEL4( pBuf, nX, cChar )( (pBuf)[ (nX) >> 1 ] |= ( (nX) & 1 ) ? ( cChar ): (cChar) << 4 );
// ----------------------
// - Compression defines
// ----------------------
-#define COMPRESS_OWN ('S'|('D'<<8UL))
-#define COMPRESS_NONE ( 0UL )
-#define RLE_8 ( 1UL )
-#define RLE_4 ( 2UL )
-#define BITFIELDS ( 3UL )
-#define ZCOMPRESS ( COMPRESS_OWN | 0x01000000UL ) /* == 'SD01' (binary) */
+#define COMPRESS_OWN ('S'|('D'<<8UL))
+#define COMPRESS_NONE ( 0UL )
+#define RLE_8 ( 1UL )
+#define RLE_4 ( 2UL )
+#define BITFIELDS ( 3UL )
+#define ZCOMPRESS ( COMPRESS_OWN | 0x01000000UL ) /* == 'SD01' (binary) */
// -----------------
// - DIBInfoHeader -
@@ -65,17 +65,17 @@
struct DIBInfoHeader
{
- sal_uInt32 nSize;
- sal_Int32 nWidth;
- sal_Int32 nHeight;
- sal_uInt16 nPlanes;
- sal_uInt16 nBitCount;
- sal_uInt32 nCompression;
- sal_uInt32 nSizeImage;
- sal_Int32 nXPelsPerMeter;
- sal_Int32 nYPelsPerMeter;
- sal_uInt32 nColsUsed;
- sal_uInt32 nColsImportant;
+ sal_uInt32 nSize;
+ sal_Int32 nWidth;
+ sal_Int32 nHeight;
+ sal_uInt16 nPlanes;
+ sal_uInt16 nBitCount;
+ sal_uInt32 nCompression;
+ sal_uInt32 nSizeImage;
+ sal_Int32 nXPelsPerMeter;
+ sal_Int32 nYPelsPerMeter;
+ sal_uInt32 nColsUsed;
+ sal_uInt32 nColsImportant;
DIBInfoHeader() :
nSize( 0UL ),
@@ -131,10 +131,10 @@ SvStream& operator<<( SvStream& rOStm, const Bitmap& rBitmap )
BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
{
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- const ULONG nOldPos = rIStm.Tell();
- ULONG nOffset = 0UL;
- BOOL bRet = FALSE;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const ULONG nOldPos = rIStm.Tell();
+ ULONG nOffset = 0UL;
+ BOOL bRet = FALSE;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -163,26 +163,26 @@ BOOL Bitmap::Read( SvStream& rIStm, BOOL bFileHeader )
BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
{
- DIBInfoHeader aHeader;
- const ULONG nStmPos = rIStm.Tell();
- BOOL bRet = FALSE;
- sal_Bool bTopDown = sal_False;
+ DIBInfoHeader aHeader;
+ const ULONG nStmPos = rIStm.Tell();
+ BOOL bRet = FALSE;
+ sal_Bool bTopDown = sal_False;
if( ImplReadDIBInfoHeader( rIStm, aHeader, bTopDown ) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount )
{
const USHORT nBitCount( discretizeBitcount(aHeader.nBitCount) );
- const Size aSizePixel( aHeader.nWidth, aHeader.nHeight );
- BitmapPalette aDummyPal;
- Bitmap aNewBmp( aSizePixel, nBitCount, &aDummyPal );
- BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
+ const Size aSizePixel( aHeader.nWidth, abs(aHeader.nHeight) );
+ BitmapPalette aDummyPal;
+ Bitmap aNewBmp( aSizePixel, nBitCount, &aDummyPal );
+ BitmapWriteAccess* pAcc = aNewBmp.AcquireWriteAccess();
if( pAcc )
{
- USHORT nColors;
- SvStream* pIStm;
- SvMemoryStream* pMemStm = NULL;
- BYTE* pData = NULL;
+ USHORT nColors;
+ SvStream* pIStm;
+ SvMemoryStream* pMemStm = NULL;
+ BYTE* pData = NULL;
if( nBitCount <= 8 )
{
@@ -196,24 +196,24 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
if( ZCOMPRESS == aHeader.nCompression )
{
- ZCodec aCodec;
+ ZCodec aCodec;
sal_uInt32 nCodedSize, nUncodedSize;
- ULONG nCodedPos;
+ ULONG nCodedPos;
// read coding information
rIStm >> nCodedSize >> nUncodedSize >> aHeader.nCompression;
pData = (BYTE*) rtl_allocateMemory( nUncodedSize );
-
+
// decode buffer
nCodedPos = rIStm.Tell();
aCodec.BeginCompression();
aCodec.Read( rIStm, pData, nUncodedSize );
aCodec.EndCompression();
-
+
// skip unread bytes from coded buffer
rIStm.SeekRel( nCodedSize - ( rIStm.Tell() - nCodedPos ) );
-
- // set decoded bytes to memory stream,
+
+ // set decoded bytes to memory stream,
// from which we will read the bitmap data
pIStm = pMemStm = new SvMemoryStream;
pMemStm->SetBuffer( (char*) pData, nUncodedSize, FALSE, nUncodedSize );
@@ -244,13 +244,13 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
Fraction( 1000, aHeader.nYPelsPerMeter ) );
aNewBmp.SetPrefMapMode( aMapMode );
- aNewBmp.SetPrefSize( Size( aHeader.nWidth, aHeader.nHeight ) );
+ aNewBmp.SetPrefSize( Size( aHeader.nWidth, abs(aHeader.nHeight) ) );
}
}
if( pData )
rtl_freeMemory( pData );
-
+
delete pMemStm;
aNewBmp.ReleaseAccess( pAcc );
@@ -266,9 +266,9 @@ BOOL Bitmap::ImplReadDIB( SvStream& rIStm, Bitmap& rBmp, ULONG nOffset )
BOOL Bitmap::ImplReadDIBFileHeader( SvStream& rIStm, ULONG& rOffset )
{
- UINT32 nTmp32;
- UINT16 nTmp16 = 0;
- BOOL bRet = FALSE;
+ UINT32 nTmp32;
+ UINT16 nTmp16 = 0;
+ BOOL bRet = FALSE;
rIStm >> nTmp16;
@@ -365,7 +365,7 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
else
{
rIStm >> rHeader.nWidth;
- rIStm >> rHeader.nHeight;
+ rIStm >> rHeader.nHeight; //rHeader.nHeight=abs(rHeader.nHeight);
rIStm >> rHeader.nPlanes;
rIStm >> rHeader.nBitCount;
rIStm >> rHeader.nCompression;
@@ -390,7 +390,7 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
if ( rHeader.nWidth < 0 )
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
-
+
// #144105# protect a little against damaged files
if( rHeader.nSizeImage > ( 16 * static_cast< sal_uInt32 >( rHeader.nWidth * rHeader.nHeight ) ) )
rHeader.nSizeImage = 0;
@@ -402,9 +402,9 @@ BOOL Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader, sal
BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL bQuad )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
- BitmapColor aPalColor;
+ const USHORT nColors = rAcc.GetPaletteEntryCount();
+ const ULONG nPalSize = nColors * ( bQuad ? 4UL : 3UL );
+ BitmapColor aPalColor;
BYTE* pEntries = new BYTE[ nPalSize ];
rIStm.Read( pEntries, nPalSize );
@@ -432,12 +432,12 @@ BOOL Bitmap::ImplReadDIBPalette( SvStream& rIStm, BitmapWriteAccess& rAcc, BOOL
BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWriteAccess& rAcc, sal_Bool bTopDown )
{
const ULONG nAlignedWidth = AlignedWidth4Bytes( rHeader.nWidth * rHeader.nBitCount );
- UINT32 nRMask = 0;
- UINT32 nGMask = 0;
- UINT32 nBMask = 0;
- BOOL bNative;
- BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
- BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
+ UINT32 nRMask = 0;
+ UINT32 nGMask = 0;
+ UINT32 nBMask = 0;
+ BOOL bNative;
+ BOOL bTCMask = ( rHeader.nBitCount == 16 ) || ( rHeader.nBitCount == 32 );
+ BOOL bRLE = ( RLE_8 == rHeader.nCompression && rHeader.nBitCount == 8 ) ||
( RLE_4 == rHeader.nCompression && rHeader.nBitCount == 4 );
// Is native format?
@@ -461,7 +461,13 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
if( rHeader.nColsUsed && rHeader.nBitCount > 8 )
rIStm.SeekRel( rHeader.nColsUsed * ( ( rHeader.nSize != DIBCOREHEADERSIZE ) ? 4 : 3 ) );
- rIStm.Read( rAcc.GetBuffer(), rHeader.nHeight * nAlignedWidth );
+ if ( rHeader.nHeight > 0 )
+ rIStm.Read( rAcc.GetBuffer(), rHeader.nHeight * nAlignedWidth );
+ else
+ {
+ for( int i = abs(rHeader.nHeight)-1; i >= 0; i-- )
+ rIStm.Read( ((char*)rAcc.GetBuffer()) + (nAlignedWidth*i), nAlignedWidth );
+ }
}
else
{
@@ -503,9 +509,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
}
else
{
- const long nWidth = rHeader.nWidth;
- const long nHeight = rHeader.nHeight;
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ const long nWidth = rHeader.nWidth;
+ const long nHeight = abs(rHeader.nHeight);
+ BYTE* pBuf = new BYTE[ nAlignedWidth ];
// true color DIB's can have a (optimization) palette
if( rHeader.nColsUsed && rHeader.nBitCount > 8 )
@@ -514,13 +520,13 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
const long nI = bTopDown ? 1 : -1;
long nY = bTopDown ? 0 : nHeight - 1;
long nCount = nHeight;
-
+
switch( rHeader.nBitCount )
{
case( 1 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ BYTE* pTmp;
+ BYTE cTmp;
for( ; nCount--; nY += nI )
{
@@ -543,8 +549,8 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 4 ):
{
- BYTE* pTmp;
- BYTE cTmp;
+ BYTE* pTmp;
+ BYTE cTmp;
for( ; nCount--; nY += nI )
{
@@ -567,7 +573,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 8 ):
{
- BYTE* pTmp;
+ BYTE* pTmp;
for( ; nCount--; nY += nI )
{
@@ -581,9 +587,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 16 ):
{
- ColorMask aMask( nRMask, nGMask, nBMask );
+ ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT16* pTmp16;
+ UINT16* pTmp16;
for( ; nCount--; nY += nI )
{
@@ -601,7 +607,7 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 24 ):
{
BitmapColor aPixelColor;
- BYTE* pTmp;
+ BYTE* pTmp;
for( ; nCount--; nY += nI )
{
@@ -620,9 +626,9 @@ BOOL Bitmap::ImplReadDIBBits( SvStream& rIStm, DIBInfoHeader& rHeader, BitmapWri
case( 32 ):
{
- ColorMask aMask( nRMask, nGMask, nBMask );
+ ColorMask aMask( nRMask, nGMask, nBMask );
BitmapColor aColor;
- UINT32* pTmp32;
+ UINT32* pTmp32;
for( ; nCount--; nY += nI )
{
@@ -650,14 +656,14 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
{
DBG_ASSERT( mpImpBmp, "Empty Bitmaps can't be saved" );
- const Size aSizePix( GetSizePixel() );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ BOOL bRet = FALSE;
if( mpImpBmp && aSizePix.Width() && aSizePix.Height() )
{
- BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- const ULONG nOldPos = rOStm.Tell();
+ BitmapReadAccess* pAcc = ( (Bitmap*) this)->AcquireReadAccess();
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ const ULONG nOldPos = rOStm.Tell();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -690,12 +696,12 @@ BOOL Bitmap::Write( SvStream& rOStm, BOOL bCompressed, BOOL bFileHeader ) const
BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompressed ) const
{
- const MapMode aMapPixel( MAP_PIXEL );
- DIBInfoHeader aHeader;
- ULONG nImageSizePos;
- ULONG nEndPos;
- sal_uInt32 nCompression = 0;
- BOOL bRet = FALSE;
+ const MapMode aMapPixel( MAP_PIXEL );
+ DIBInfoHeader aHeader;
+ ULONG nImageSizePos;
+ ULONG nEndPos;
+ sal_uInt32 nCompression = 0;
+ BOOL bRet = FALSE;
aHeader.nSize = DIBINFOHEADERSIZE;
aHeader.nWidth = rAcc.Width();
@@ -706,7 +712,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
{
aHeader.nBitCount = ( rAcc.GetScanlineFormat() == BMP_FORMAT_16BIT_TC_LSB_MASK ) ? 16 : 32;
aHeader.nSizeImage = rAcc.Height() * rAcc.GetScanlineSize();
-
+
nCompression = BITFIELDS;
}
else
@@ -723,7 +729,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
const UINT16 nBitCount( sal::static_int_cast<UINT16>(rAcc.GetBitCount()) );
aHeader.nBitCount = discretizeBitcount( nBitCount );
- aHeader.nSizeImage = rAcc.Height() *
+ aHeader.nSizeImage = rAcc.Height() *
AlignedWidth4Bytes( rAcc.Width()*aHeader.nBitCount );
if( bCompressed )
@@ -737,7 +743,7 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
nCompression = COMPRESS_NONE;
}
- if( ( rOStm.GetCompressMode() & COMPRESSMODE_ZBITMAP ) &&
+ if( ( rOStm.GetCompressMode() & COMPRESSMODE_ZBITMAP ) &&
( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_40 ) )
{
aHeader.nCompression = ZCOMPRESS;
@@ -753,10 +759,10 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// MapMode is integer-based, and suffers from roundoffs,
// especially if maPrefSize is small. Trying to circumvent
// that by performing part of the math in floating point.
- const Size aScale100000(
+ const Size aScale100000(
OutputDevice::LogicToLogic( Size(100000L,
- 100000L),
- MAP_100TH_MM,
+ 100000L),
+ MAP_100TH_MM,
maPrefMapMode ) );
const double fBmpWidthM((double)maPrefSize.Width() / aScale100000.Width() );
const double fBmpHeightM((double)maPrefSize.Height() / aScale100000.Height() );
@@ -788,15 +794,15 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
if( aHeader.nCompression == ZCOMPRESS )
{
- ZCodec aCodec;
- SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
- ULONG nCodedPos = rOStm.Tell(), nLastPos;
- sal_uInt32 nCodedSize, nUncodedSize;
+ ZCodec aCodec;
+ SvMemoryStream aMemStm( aHeader.nSizeImage + 4096, 65535 );
+ ULONG nCodedPos = rOStm.Tell(), nLastPos;
+ sal_uInt32 nCodedSize, nUncodedSize;
// write uncoded data palette
if( aHeader.nColsUsed )
ImplWriteDIBPalette( aMemStm, rAcc );
-
+
// write uncoded bits
bRet = ImplWriteDIBBits( aMemStm, rAcc, nCompression, aHeader.nSizeImage );
@@ -805,12 +811,12 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
// seek over compress info
rOStm.SeekRel( 12 );
-
+
// write compressed data
aCodec.BeginCompression( 3 );
aCodec.Write( rOStm, (BYTE*) aMemStm.GetData(), nUncodedSize );
aCodec.EndCompression();
-
+
// update compress info ( coded size, uncoded size, uncoded compression )
nCodedSize = ( nLastPos = rOStm.Tell() ) - nCodedPos - 12;
rOStm.Seek( nCodedPos );
@@ -840,9 +846,9 @@ BOOL Bitmap::ImplWriteDIB( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bCompre
BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
+ UINT32 nPalCount = ( rAcc.HasPalette() ? rAcc.GetPaletteEntryCount() :
isBitfieldCompression( rAcc.GetScanlineFormat() ) ? 3UL : 0UL );
- UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
+ UINT32 nOffset = 14 + DIBINFOHEADERSIZE + nPalCount * 4UL;
rOStm << (UINT16) 0x4D42;
rOStm << (UINT32) ( nOffset + ( rAcc.Height() * rAcc.GetScanlineSize() ) );
@@ -857,11 +863,11 @@ BOOL Bitmap::ImplWriteDIBFileHeader( SvStream& rOStm, BitmapReadAccess& rAcc )
BOOL Bitmap::ImplWriteDIBPalette( SvStream& rOStm, BitmapReadAccess& rAcc )
{
- const USHORT nColors = rAcc.GetPaletteEntryCount();
- const ULONG nPalSize = nColors * 4UL;
- BYTE* pEntries = new BYTE[ nPalSize ];
- BYTE* pTmpEntry = pEntries;
- BitmapColor aPalColor;
+ const USHORT nColors = rAcc.GetPaletteEntryCount();
+ const ULONG nPalSize = nColors * 4UL;
+ BYTE* pEntries = new BYTE[ nPalSize ];
+ BYTE* pTmpEntry = pEntries;
+ BitmapColor aPalColor;
for( USHORT i = 0; i < nColors; i++ )
{
@@ -886,8 +892,8 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
{
if( BITFIELDS == nCompression )
{
- const ColorMask& rMask = rAcc.GetColorMask();
- SVBT32 aVal32;
+ const ColorMask& rMask = rAcc.GetColorMask();
+ SVBT32 aVal32;
UInt32ToSVBT32( rMask.GetRedMask(), aVal32 );
rOStm.Write( (BYTE*) aVal32, 4UL );
@@ -924,9 +930,9 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
// #i59239# discretize bitcount for aligned width to 1,4,8,24
// (other cases are not written below)
const USHORT nBitCount( sal::static_int_cast<USHORT>(rAcc.GetBitCount()) );
- const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
+ const ULONG nAlignedWidth = AlignedWidth4Bytes( rAcc.Width() *
discretizeBitcount(nBitCount));
- BOOL bNative = FALSE;
+ BOOL bNative = FALSE;
switch( rAcc.GetScanlineFormat() )
{
@@ -950,11 +956,11 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
rOStm.Write( rAcc.GetBuffer(), nAlignedWidth * rAcc.Height() );
else
{
- const long nWidth = rAcc.Width();
- const long nHeight = rAcc.Height();
- BYTE* pBuf = new BYTE[ nAlignedWidth ];
- BYTE* pTmp;
- BYTE cTmp;
+ const long nWidth = rAcc.Width();
+ const long nHeight = rAcc.Height();
+ BYTE* pBuf = new BYTE[ nAlignedWidth ];
+ BYTE* pTmp;
+ BYTE cTmp;
switch( nBitCount )
{
@@ -1060,14 +1066,14 @@ BOOL Bitmap::ImplWriteDIBBits( SvStream& rOStm, BitmapReadAccess& rAcc,
void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
BitmapWriteAccess& rAcc, BOOL bRLE4 )
{
- Scanline pRLE = pBuffer;
- long nY = rHeader.nHeight - 1L;
- const ULONG nWidth = rAcc.Width();
- ULONG nCountByte;
- ULONG nRunByte;
- ULONG nX = 0UL;
- BYTE cTmp;
- BOOL bEndDecoding = FALSE;
+ Scanline pRLE = pBuffer;
+ long nY = abs(rHeader.nHeight) - 1L;
+ const ULONG nWidth = rAcc.Width();
+ ULONG nCountByte;
+ ULONG nRunByte;
+ ULONG nX = 0UL;
+ BYTE cTmp;
+ BOOL bEndDecoding = FALSE;
do
{
@@ -1084,7 +1090,7 @@ void Bitmap::ImplDecodeRLE( BYTE* pBuffer, DIBInfoHeader& rHeader,
for( ULONG i = 0UL; i < nCountByte; i++ )
{
cTmp = *pRLE++;
-
+
if( nX < nWidth )
rAcc.SetPixel( nY, nX++, cTmp >> 4 );
@@ -1166,15 +1172,15 @@ BOOL Bitmap::ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, BOOL bRLE4 )
{
const ULONG nWidth = rAcc.Width();
const ULONG nHeight = rAcc.Height();
- ULONG nX;
- ULONG nSaveIndex;
- ULONG nCount;
- ULONG nBufCount;
- BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
- BYTE* pTmp;
- BYTE cPix;
- BYTE cLast;
- BOOL bFound;
+ ULONG nX;
+ ULONG nSaveIndex;
+ ULONG nCount;
+ ULONG nBufCount;
+ BYTE* pBuf = new BYTE[ ( nWidth << 1 ) + 2 ];
+ BYTE* pTmp;
+ BYTE cPix;
+ BYTE cLast;
+ BOOL bFound;
for ( long nY = nHeight - 1L; nY >= 0L; nY-- )
{
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 9e2a21b43e37..b10ea4a2d1bf 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,36 +40,36 @@
// - Defines -
// -----------
-#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
-
-#define CALC_ERRORS \
- nTemp = p1T[nX++] >> 12; \
- nBErr = MinMax( nTemp, 0, 255 ); \
- nBErr = nBErr - FloydIndexMap[ nBC = FloydMap[nBErr] ]; \
- nTemp = p1T[nX++] >> 12; \
- nGErr = MinMax( nTemp, 0, 255 ); \
- nGErr = nGErr - FloydIndexMap[ nGC = FloydMap[nGErr] ]; \
- nTemp = p1T[nX] >> 12; \
- nRErr = MinMax( nTemp, 0, 255 ); \
+#define RGB15( _def_cR, _def_cG, _def_cB ) (((ULONG)(_def_cR)<<10UL)|((ULONG)(_def_cG)<<5UL)|(ULONG)(_def_cB))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+
+#define CALC_ERRORS \
+ nTemp = p1T[nX++] >> 12; \
+ nBErr = MinMax( nTemp, 0, 255 ); \
+ nBErr = nBErr - FloydIndexMap[ nBC = FloydMap[nBErr] ]; \
+ nTemp = p1T[nX++] >> 12; \
+ nGErr = MinMax( nTemp, 0, 255 ); \
+ nGErr = nGErr - FloydIndexMap[ nGC = FloydMap[nGErr] ]; \
+ nTemp = p1T[nX] >> 12; \
+ nRErr = MinMax( nTemp, 0, 255 ); \
nRErr = nRErr - FloydIndexMap[ nRC = FloydMap[nRErr] ];
-#define CALC_TABLES3 \
- p2T[nX++] += FloydError3[nBErr]; \
- p2T[nX++] += FloydError3[nGErr]; \
+#define CALC_TABLES3 \
+ p2T[nX++] += FloydError3[nBErr]; \
+ p2T[nX++] += FloydError3[nGErr]; \
p2T[nX++] += FloydError3[nRErr];
-#define CALC_TABLES5 \
- p2T[nX++] += FloydError5[nBErr]; \
- p2T[nX++] += FloydError5[nGErr]; \
+#define CALC_TABLES5 \
+ p2T[nX++] += FloydError5[nBErr]; \
+ p2T[nX++] += FloydError5[nGErr]; \
p2T[nX++] += FloydError5[nRErr];
-#define CALC_TABLES7 \
- p1T[++nX] += FloydError7[nBErr]; \
- p2T[nX++] += FloydError1[nBErr]; \
- p1T[nX] += FloydError7[nGErr]; \
- p2T[nX++] += FloydError1[nGErr]; \
- p1T[nX] += FloydError7[nRErr]; \
+#define CALC_TABLES7 \
+ p1T[++nX] += FloydError7[nBErr]; \
+ p2T[nX++] += FloydError1[nBErr]; \
+ p1T[nX] += FloydError7[nGErr]; \
+ p2T[nX++] += FloydError1[nGErr]; \
+ p1T[nX] += FloydError7[nRErr]; \
p2T[nX] += FloydError1[nRErr];
// -----------
@@ -244,12 +244,12 @@ long FloydIndexMap[6] =
void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
{
- double fVal = 3.125;
- const double fVal16 = fVal / 16.;
- long i, j, k, l;
- USHORT pMtx[ 16 ][ 16 ];
- USHORT nMax = 0;
- static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
+ double fVal = 3.125;
+ const double fVal16 = fVal / 16.;
+ long i, j, k, l;
+ USHORT pMtx[ 16 ][ 16 ];
+ USHORT nMax = 0;
+ static BYTE pMagic[4][4] = { { 0, 14, 3, 13, },
{11, 5, 8, 6, },
{12, 2, 15, 1, },
{7, 9, 4, 10 } };
@@ -274,8 +274,8 @@ void ImplCreateDitherMatrix( BYTE (*pDitherMatrix)[16][16] )
BOOL Bitmap::Convert( BmpConversion eConversion )
{
- const USHORT nBitCount = GetBitCount();
- BOOL bRet = FALSE;
+ const USHORT nBitCount = GetBitCount();
+ BOOL bRet = FALSE;
switch( eConversion )
{
@@ -364,20 +364,20 @@ BOOL Bitmap::Convert( BmpConversion eConversion )
BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
@@ -420,8 +420,8 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -437,21 +437,21 @@ BOOL Bitmap::ImplMakeMono( BYTE cThreshold )
BOOL Bitmap::ImplMakeMonoDither()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 1 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 1 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- BYTE pDitherMatrix[ 16 ][ 16 ];
+ const BitmapColor aBlack( pWriteAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const BitmapColor aWhite( pWriteAcc->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ BYTE pDitherMatrix[ 16 ][ 16 ];
ImplCreateDitherMatrix( &pDitherMatrix );
@@ -496,8 +496,8 @@ BOOL Bitmap::ImplMakeMonoDither()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -515,27 +515,27 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
{
DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- const BitmapPalette& rPal = GetGreyPalette( nGreys );
- ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
- BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
+ const BitmapPalette& rPal = GetGreyPalette( nGreys );
+ ULONG nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
+ BOOL bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
if( !bPalDiffers )
bPalDiffers = ( (BitmapPalette&) rPal != pReadAcc->GetPalette() );
if( bPalDiffers )
{
- Bitmap aNewBmp( GetSizePixel(), ( nGreys == 16 ) ? 4 : 8, &rPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), ( nGreys == 16 ) ? 4 : 8, &rPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
@@ -564,7 +564,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
const ULONG nB = *pReadScan++;
const ULONG nG = *pReadScan++;
const ULONG nR = *pReadScan++;
-
+
*pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
@@ -584,7 +584,7 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
const ULONG nR = *pReadScan++;
const ULONG nG = *pReadScan++;
const ULONG nB = *pReadScan++;
-
+
*pWriteScan++ = (BYTE) ( ( nB * 28UL + nG * 151UL + nR * 77UL ) >> nShift );
}
}
@@ -604,8 +604,8 @@ BOOL Bitmap::ImplMakeGreyscales( USHORT nGreys )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -629,24 +629,24 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- BitmapPalette aPal;
- Bitmap aNewBmp( GetSizePixel(), nBitCount, pReadAcc->HasPalette() ? &pReadAcc->GetPalette() : &aPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aPal;
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, pReadAcc->HasPalette() ? &pReadAcc->GetPalette() : &aPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pWriteAcc->HasPalette() )
{
- const USHORT nOldCount = 1 << GetBitCount();
- const BitmapPalette& rOldPal = pReadAcc->GetPalette();
+ const USHORT nOldCount = 1 << GetBitCount();
+ const BitmapPalette& rOldPal = pReadAcc->GetPalette();
aPal.SetEntryCount( 1 << nBitCount );
@@ -686,8 +686,8 @@ BOOL Bitmap::ImplConvertUp( USHORT nBitCount, Color* pExtColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -705,33 +705,33 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
{
DBG_ASSERT( nBitCount <= GetBitCount(), "New BitCount must be lower ( or equal when pExtColor is set )!" );
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- BitmapPalette aPal;
- Bitmap aNewBmp( GetSizePixel(), nBitCount, &aPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapPalette aPal;
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, &aPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const USHORT nCount = 1 << nBitCount;
- const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pWriteAcc->Height();
- Octree aOctree( *pReadAcc, pExtColor ? ( nCount - 1 ) : nCount );
+ const USHORT nCount = 1 << nBitCount;
+ const long nWidth = pWriteAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pWriteAcc->Height();
+ Octree aOctree( *pReadAcc, pExtColor ? ( nCount - 1 ) : nCount );
InverseColorMap aColorMap( aPal = aOctree.GetPalette() );
- BitmapColor aColor;
- ImpErrorQuad aErrQuad;
- ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pQLine1 = pErrQuad1;
- ImpErrorQuad* pQLine2 = 0;
- long nX, nY;
- long nYTmp = 0L;
- BYTE cIndex;
- BOOL bQ1 = TRUE;
+ BitmapColor aColor;
+ ImpErrorQuad aErrQuad;
+ ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pQLine1 = pErrQuad1;
+ ImpErrorQuad* pQLine2 = 0;
+ long nX, nY;
+ long nYTmp = 0L;
+ BYTE cIndex;
+ BOOL bQ1 = TRUE;
if( pExtColor )
{
@@ -812,8 +812,8 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -829,9 +829,9 @@ BOOL Bitmap::ImplConvertDown( USHORT nBitCount, Color* pExtColor )
BOOL Bitmap::ImplConvertGhosted()
{
- Bitmap aNewBmp;
- BitmapReadAccess* pR = AcquireReadAccess();
- BOOL bRet = FALSE;
+ Bitmap aNewBmp;
+ BitmapReadAccess* pR = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pR )
{
@@ -872,7 +872,7 @@ BOOL Bitmap::ImplConvertGhosted()
for( long nX = 0; nX < nWidth; nX++ )
{
const BitmapColor aOld( pR->GetPixel( nY, nX ) );
- pW->SetPixel( nY, nX, BitmapColor( ( aOld.GetRed() >> 1 ) | 0x80,
+ pW->SetPixel( nY, nX, BitmapColor( ( aOld.GetRed() >> 1 ) | 0x80,
( aOld.GetGreen() >> 1 ) | 0x80,
( aOld.GetBlue() >> 1 ) | 0x80 ) );
@@ -889,8 +889,8 @@ BOOL Bitmap::ImplConvertGhosted()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -926,8 +926,8 @@ BOOL Bitmap::Scale( const double& rScaleX, const double& rScaleY, ULONG nScaleFl
BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
{
- const Size aSize( GetSizePixel() );
- BOOL bRet;
+ const Size aSize( GetSizePixel() );
+ BOOL bRet;
if( aSize.Width() && aSize.Height() )
{
@@ -945,27 +945,27 @@ BOOL Bitmap::Scale( const Size& rNewSize, ULONG nScaleFlag )
BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
{
- const Size aSizePix( GetSizePixel() );
- const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
- const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
+ const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
+ BOOL bRet = FALSE;
if( nNewWidth && nNewHeight )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( Size( nNewWidth, nNewHeight ), GetBitCount(), &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( Size( nNewWidth, nNewHeight ), GetBitCount(), &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pReadAcc && pWriteAcc )
{
- const long nScanlineSize = pWriteAcc->GetScanlineSize();
- const long nNewWidth1 = nNewWidth - 1L;
- const long nNewHeight1 = nNewHeight - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
- long* pLutX = new long[ nNewWidth ];
- long* pLutY = new long[ nNewHeight ];
- long nX, nY, nMapY, nActY = 0L;
+ const long nScanlineSize = pWriteAcc->GetScanlineSize();
+ const long nNewWidth1 = nNewWidth - 1L;
+ const long nNewHeight1 = nNewHeight - 1L;
+ const long nWidth1 = pReadAcc->Width() - 1L;
+ const long nHeight1 = pReadAcc->Height() - 1L;
+ long* pLutX = new long[ nNewWidth ];
+ long* pLutY = new long[ nNewHeight ];
+ long nX, nY, nMapY, nActY = 0L;
if( nNewWidth1 && nNewHeight1 )
{
@@ -1013,32 +1013,32 @@ BOOL Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY )
BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY )
{
- const Size aSizePix( GetSizePixel() );
- const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
- const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
- BOOL bRet = FALSE;
+ const Size aSizePix( GetSizePixel() );
+ const long nNewWidth = FRound( aSizePix.Width() * rScaleX );
+ const long nNewHeight = FRound( aSizePix.Height() * rScaleY );
+ BOOL bRet = FALSE;
if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) )
{
- BitmapColor aCol0;
- BitmapColor aCol1;
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- long nWidth = pReadAcc->Width();
- long nHeight = pReadAcc->Height();
- Bitmap aNewBmp( Size( nNewWidth, nHeight ), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- long* pLutInt;
- long* pLutFrac;
- long nX, nY;
- long lXB0, lXB1, lXG0, lXG1, lXR0, lXR1;
- double fTemp;
- long nTemp;
+ BitmapColor aCol0;
+ BitmapColor aCol1;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ long nWidth = pReadAcc->Width();
+ long nHeight = pReadAcc->Height();
+ Bitmap aNewBmp( Size( nNewWidth, nHeight ), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ long* pLutInt;
+ long* pLutFrac;
+ long nX, nY;
+ long lXB0, lXB1, lXG0, lXG1, lXR0, lXR1;
+ double fTemp;
+ long nTemp;
if( pReadAcc && pWriteAcc )
{
- const long nNewWidth1 = nNewWidth - 1L;
- const long nWidth1 = pReadAcc->Width() - 1L;
- const double fRevScaleX = (double) nWidth1 / nNewWidth1;
+ const long nNewWidth1 = nNewWidth - 1L;
+ const long nWidth1 = pReadAcc->Width() - 1L;
+ const double fRevScaleX = (double) nWidth1 / nNewWidth1;
pLutInt = new long[ nNewWidth ];
pLutFrac = new long[ nNewWidth ];
@@ -1140,9 +1140,9 @@ BOOL Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY
if( pReadAcc && pWriteAcc )
{
- const long nNewHeight1 = nNewHeight - 1L;
- const long nHeight1 = pReadAcc->Height() - 1L;
- const double fRevScaleY = (double) nHeight1 / nNewHeight1;
+ const long nNewHeight1 = nNewHeight - 1L;
+ const long nHeight1 = pReadAcc->Height() - 1L;
+ const double fRevScaleY = (double) nHeight1 / nNewHeight1;
pLutInt = new long[ nNewHeight ];
pLutFrac = new long[ nNewHeight ];
@@ -1269,16 +1269,16 @@ BOOL Bitmap::Dither( ULONG nDitherFlags )
BOOL Bitmap::ImplDitherMatrix()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 8 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pReadAcc && pWriteAcc )
{
- const ULONG nWidth = pReadAcc->Width();
- const ULONG nHeight = pReadAcc->Height();
- BitmapColor aIndex( (BYTE) 0 );
+ const ULONG nWidth = pReadAcc->Width();
+ const ULONG nHeight = pReadAcc->Height();
+ BitmapColor aIndex( (BYTE) 0 );
if( pReadAcc->HasPalette() )
{
@@ -1286,11 +1286,11 @@ BOOL Bitmap::ImplDitherMatrix()
{
for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
- const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixel( nY, nX ) ) );
+ const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
@@ -1303,11 +1303,11 @@ BOOL Bitmap::ImplDitherMatrix()
{
for( ULONG nX = 0UL, nModY = ( nY & 0x0FUL ) << 4UL; nX < nWidth; nX++ )
{
- const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
- const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
- const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
- const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
- const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
+ const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) );
+ const ULONG nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ];
+ const ULONG nR = ( nVCLLut[ aCol.GetRed() ] + nD ) >> 16UL;
+ const ULONG nG = ( nVCLLut[ aCol.GetGreen() ] + nD ) >> 16UL;
+ const ULONG nB = ( nVCLLut[ aCol.GetBlue() ] + nD ) >> 16UL;
aIndex.SetIndex( (BYTE) ( nVCLRLut[ nR ] + nVCLGLut[ nG ] + nVCLBLut[ nB ] ) );
pWriteAcc->SetPixel( nY, nX, aIndex );
@@ -1323,8 +1323,8 @@ BOOL Bitmap::ImplDitherMatrix()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1339,34 +1339,34 @@ BOOL Bitmap::ImplDitherMatrix()
BOOL Bitmap::ImplDitherFloyd()
{
- const Size aSize( GetSizePixel() );
- BOOL bRet = FALSE;
+ const Size aSize( GetSizePixel() );
+ BOOL bRet = FALSE;
if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 8 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pReadAcc && pWriteAcc )
{
- BitmapColor aColor;
- long nWidth = pReadAcc->Width();
- long nWidth1 = nWidth - 1L;
- long nHeight = pReadAcc->Height();
- long nX;
- long nW = nWidth * 3L;
- long nW2 = nW - 3L;
- long nRErr, nGErr, nBErr;
- long nRC, nGC, nBC;
- long nTemp;
- long nZ;
- long* p1 = new long[ nW ];
- long* p2 = new long[ nW ];
- long* p1T = p1;
- long* p2T = p2;
- long* pTmp;
- BOOL bPal = pReadAcc->HasPalette();
+ BitmapColor aColor;
+ long nWidth = pReadAcc->Width();
+ long nWidth1 = nWidth - 1L;
+ long nHeight = pReadAcc->Height();
+ long nX;
+ long nW = nWidth * 3L;
+ long nW2 = nW - 3L;
+ long nRErr, nGErr, nBErr;
+ long nRC, nGC, nBC;
+ long nTemp;
+ long nZ;
+ long* p1 = new long[ nW ];
+ long* p2 = new long[ nW ];
+ long* p1T = p1;
+ long* p2T = p2;
+ long* pTmp;
+ BOOL bPal = pReadAcc->HasPalette();
pTmp = p2T;
@@ -1463,8 +1463,8 @@ BOOL Bitmap::ImplDitherFloyd()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aPrefSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aPrefSize( maPrefSize );
*this = aNewBmp;
@@ -1480,26 +1480,26 @@ BOOL Bitmap::ImplDitherFloyd()
BOOL Bitmap::ImplDitherFloyd16()
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ BOOL bRet = FALSE;
if( pReadAcc && pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nWidth1 = nWidth - 1L;
- const long nHeight = pWriteAcc->Height();
- BitmapColor aColor;
- BitmapColor aBestCol;
- ImpErrorQuad aErrQuad;
- ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
- ImpErrorQuad* pQLine1 = pErrQuad1;
- ImpErrorQuad* pQLine2 = 0;
- long nX, nY;
- long nYTmp = 0L;
- BOOL bQ1 = TRUE;
+ const long nWidth = pWriteAcc->Width();
+ const long nWidth1 = nWidth - 1L;
+ const long nHeight = pWriteAcc->Height();
+ BitmapColor aColor;
+ BitmapColor aBestCol;
+ ImpErrorQuad aErrQuad;
+ ImpErrorQuad* pErrQuad1 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pErrQuad2 = new ImpErrorQuad[ nWidth ];
+ ImpErrorQuad* pQLine1 = pErrQuad1;
+ ImpErrorQuad* pQLine2 = 0;
+ long nX, nY;
+ long nYTmp = 0L;
+ BOOL bQ1 = TRUE;
for( nY = 0L; nY < Min( nHeight, 2L ); nY++, nYTmp++ )
for( nX = 0L, pQLine2 = !nY ? pErrQuad1 : pErrQuad2; nX < nWidth; nX++ )
@@ -1555,8 +1555,8 @@ BOOL Bitmap::ImplDitherFloyd16()
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -1594,11 +1594,11 @@ BOOL Bitmap::ReduceColors( USHORT nColorCount, BmpReduce eReduce )
BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
{
- Bitmap aNewBmp;
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ Bitmap aNewBmp;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ const USHORT nColCount = Min( nColorCount, (USHORT) 256 );
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount <= 2 )
nBitCount = 1;
@@ -1609,9 +1609,9 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
if( pRAcc )
{
- Octree aOct( *pRAcc, nColCount );
- const BitmapPalette& rPal = aOct.GetPalette();
- BitmapWriteAccess* pWAcc;
+ Octree aOct( *pRAcc, nColCount );
+ const BitmapPalette& rPal = aOct.GetPalette();
+ BitmapWriteAccess* pWAcc;
aNewBmp = Bitmap( GetSizePixel(), nBitCount, &rPal );
pWAcc = aNewBmp.AcquireWriteAccess();
@@ -1643,8 +1643,8 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1658,8 +1658,8 @@ BOOL Bitmap::ImplReduceSimple( USHORT nColorCount )
struct PopularColorCount
{
- sal_uInt32 mnIndex;
- sal_uInt32 mnCount;
+ sal_uInt32 mnIndex;
+ sal_uInt32 mnCount;
};
// ------------------------------------------------------------------------
@@ -1670,11 +1670,11 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
if( ( (PopularColorCount*) p1 )->mnCount < ( (PopularColorCount*) p2 )->mnCount )
nRet = 1;
- else if( ( (PopularColorCount*) p1 )->mnCount == ( (PopularColorCount*) p2 )->mnCount )
+ else if( ( (PopularColorCount*) p1 )->mnCount == ( (PopularColorCount*) p2 )->mnCount )
nRet = 0;
else
nRet = -1;
-
+
return nRet;
}
@@ -1682,9 +1682,9 @@ extern "C" int __LOADONCALLAPI ImplPopularCmpFnc( const void* p1, const void* p2
BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount > 256 )
nColCount = 256;
@@ -1696,17 +1696,17 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( pRAcc )
{
- const sal_uInt32 nValidBits = 4;
- const sal_uInt32 nRightShiftBits = 8 - nValidBits;
- const sal_uInt32 nLeftShiftBits1 = nValidBits;
- const sal_uInt32 nLeftShiftBits2 = nValidBits << 1;
- const sal_uInt32 nColorsPerComponent = 1 << nValidBits;
- const sal_uInt32 nColorOffset = 256 / nColorsPerComponent;
- const sal_uInt32 nTotalColors = nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
- PopularColorCount* pCountTable = new PopularColorCount[ nTotalColors ];
- long nX, nY, nR, nG, nB, nIndex;
+ const sal_uInt32 nValidBits = 4;
+ const sal_uInt32 nRightShiftBits = 8 - nValidBits;
+ const sal_uInt32 nLeftShiftBits1 = nValidBits;
+ const sal_uInt32 nLeftShiftBits2 = nValidBits << 1;
+ const sal_uInt32 nColorsPerComponent = 1 << nValidBits;
+ const sal_uInt32 nColorOffset = 256 / nColorsPerComponent;
+ const sal_uInt32 nTotalColors = nColorsPerComponent * nColorsPerComponent * nColorsPerComponent;
+ const long nWidth = pRAcc->Width();
+ const long nHeight = pRAcc->Height();
+ PopularColorCount* pCountTable = new PopularColorCount[ nTotalColors ];
+ long nX, nY, nR, nG, nB, nIndex;
rtl_zeroMemory( pCountTable, nTotalColors * sizeof( PopularColorCount ) );
@@ -1730,7 +1730,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) rCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
}
}
@@ -1743,8 +1743,8 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
pCountTable[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
- ( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
+ ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ].mnCount++;
}
}
}
@@ -1752,22 +1752,22 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
BitmapPalette aNewPal( nColCount );
qsort( pCountTable, nTotalColors, sizeof( PopularColorCount ), ImplPopularCmpFnc );
-
+
for( USHORT n = 0; n < nColCount; n++ )
{
const PopularColorCount& rPop = pCountTable[ n ];
- aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
+ aNewPal[ n ] = BitmapColor( (BYTE) ( ( rPop.mnIndex >> nLeftShiftBits2 ) << nRightShiftBits ),
(BYTE) ( ( ( rPop.mnIndex >> nLeftShiftBits1 ) & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ),
(BYTE) ( ( rPop.mnIndex & ( nColorsPerComponent - 1 ) ) << nRightShiftBits ) );
}
- Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
- BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), nBitCount, &aNewPal );
+ BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
if( pWAcc )
{
- BitmapColor aDstCol( (BYTE) 0 );
- BYTE* pIndexMap = new BYTE[ nTotalColors ];
+ BitmapColor aDstCol( (BYTE) 0 );
+ BYTE* pIndexMap = new BYTE[ nTotalColors ];
for( nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
for( nG = 0; nG < 256; nG += nColorOffset )
@@ -1782,7 +1782,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor& rCol = pRAcc->GetPaletteColor( pRAcc->GetPixel( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) rCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) rCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) rCol.GetBlue() ) >> nRightShiftBits ) ] );
pWAcc->SetPixel( nY, nX, aDstCol );
}
@@ -1796,7 +1796,7 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
{
const BitmapColor aCol( pRAcc->GetPixel( nY, nX ) );
aDstCol.SetIndex( pIndexMap[ ( ( ( (sal_uInt32) aCol.GetRed() ) >> nRightShiftBits ) << nLeftShiftBits2 ) |
- ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
+ ( ( ( (sal_uInt32) aCol.GetGreen() ) >> nRightShiftBits ) << nLeftShiftBits1 ) |
( ( (sal_uInt32) aCol.GetBlue() ) >> nRightShiftBits ) ] );
pWAcc->SetPixel( nY, nX, aDstCol );
}
@@ -1813,8 +1813,8 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1829,9 +1829,9 @@ BOOL Bitmap::ImplReducePopular( USHORT nColCount )
BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
{
- BitmapReadAccess* pRAcc = AcquireReadAccess();
- USHORT nBitCount;
- BOOL bRet = FALSE;
+ BitmapReadAccess* pRAcc = AcquireReadAccess();
+ USHORT nBitCount;
+ BOOL bRet = FALSE;
if( nColCount < 17 )
nBitCount = 4;
@@ -1846,16 +1846,16 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( pRAcc )
{
- Bitmap aNewBmp( GetSizePixel(), nBitCount );
- BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), nBitCount );
+ BitmapWriteAccess* pWAcc = aNewBmp.AcquireWriteAccess();
if( pWAcc )
{
- const ULONG nSize = 32768UL * sizeof( ULONG );
- ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
- const long nWidth = pWAcc->Width();
- const long nHeight = pWAcc->Height();
- long nIndex = 0L;
+ const ULONG nSize = 32768UL * sizeof( ULONG );
+ ULONG* pColBuf = (ULONG*) rtl_allocateMemory( nSize );
+ const long nWidth = pWAcc->Width();
+ const long nHeight = pWAcc->Height();
+ long nIndex = 0L;
memset( (HPBYTE) pColBuf, 0, nSize );
@@ -1885,7 +1885,7 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// create palette via median cut
BitmapPalette aPal( pWAcc->GetPaletteEntryCount() );
- ImplMedianCut( pColBuf, aPal, 0, 31, 0, 31, 0, 31,
+ ImplMedianCut( pColBuf, aPal, 0, 31, 0, 31, 0, 31,
nColCount, nWidth * nHeight, nIndex );
// do mapping of colors to palette
@@ -1904,8 +1904,8 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
maPrefMapMode = aMap;
@@ -1918,19 +1918,19 @@ BOOL Bitmap::ImplReduceMedian( USHORT nColCount )
// ------------------------------------------------------------------------
-void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
+void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
long nR1, long nR2, long nG1, long nG2, long nB1, long nB2,
long nColors, long nPixels, long& rIndex )
{
if( !nPixels )
return;
- BitmapColor aCol;
- const long nRLen = nR2 - nR1;
- const long nGLen = nG2 - nG1;
- const long nBLen = nB2 - nB1;
- long nR, nG, nB;
- ULONG* pBuf = pColBuf;
+ BitmapColor aCol;
+ const long nRLen = nR2 - nR1;
+ const long nGLen = nG2 - nG1;
+ const long nBLen = nB2 - nB1;
+ long nR, nG, nB;
+ ULONG* pBuf = pColBuf;
if( !nRLen && !nGLen && !nBLen )
{
@@ -1973,9 +1973,9 @@ void Bitmap::ImplMedianCut( ULONG* pColBuf, BitmapPalette& rPal,
}
else
{
- const long nTest = ( nPixels >> 1 );
- long nPixOld = 0;
- long nPixNew = 0;
+ const long nTest = ( nPixels >> 1 );
+ long nPixOld = 0;
+ long nPixNew = 0;
if( nBLen > nGLen && nBLen > nRLen )
{
@@ -2073,7 +2073,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
BOOL bRet = FALSE;
// nothing to do => return quickly
- if( !nLuminancePercent && !nContrastPercent &&
+ if( !nLuminancePercent && !nContrastPercent &&
!nChannelRPercent && !nChannelGPercent && !nChannelBPercent &&
( fGamma == 1.0 ) && !bInvert )
{
@@ -2085,15 +2085,15 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
if( pAcc )
{
- BitmapColor aCol;
- const long nW = pAcc->Width();
- const long nH = pAcc->Height();
- BYTE* cMapR = new BYTE[ 256 ];
- BYTE* cMapG = new BYTE[ 256 ];
- BYTE* cMapB = new BYTE[ 256 ];
- long nX, nY;
- double fM, fROff, fGOff, fBOff, fOff;
-
+ BitmapColor aCol;
+ const long nW = pAcc->Width();
+ const long nH = pAcc->Height();
+ BYTE* cMapR = new BYTE[ 256 ];
+ BYTE* cMapG = new BYTE[ 256 ];
+ BYTE* cMapB = new BYTE[ 256 ];
+ long nX, nY;
+ double fM, fROff, fGOff, fBOff, fOff;
+
// calculate slope
if( nContrastPercent >= 0 )
fM = 128.0 / ( 128.0 - 1.27 * MinMax( nContrastPercent, 0L, 100L ) );
@@ -2141,7 +2141,7 @@ BOOL Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
for( USHORT i = 0, nCount = pAcc->GetPaletteEntryCount(); i < nCount; i++ )
{
- const BitmapColor& rCol = pAcc->GetPaletteColor( i );
+ const BitmapColor& rCol = pAcc->GetPaletteColor( i );
aNewCol.SetRed( cMapR[ rCol.GetRed() ] );
aNewCol.SetGreen( cMapG[ rCol.GetGreen() ] );
aNewCol.SetBlue( cMapB[ rCol.GetBlue() ] );
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index b64bcd8fe540..00d8abd59197 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,13 +37,13 @@
// - Defines -
// -----------
-#define S2(a,b) { register long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
-#define MN3(a,b,c) S2(a,b); S2(a,c);
-#define MX3(a,b,c) S2(b,c); S2(a,c);
-#define MNMX3(a,b,c) MX3(a,b,c); S2(a,b);
-#define MNMX4(a,b,c,d) S2(a,b); S2(c,d); S2(a,c); S2(b,d);
-#define MNMX5(a,b,c,d,e) S2(a,b); S2(c,d); MN3(a,c,e); MX3(b,d,e);
-#define MNMX6(a,b,c,d,e,f) S2(a,d); S2(b,e); S2(c,f); MN3(a,b,c); MX3(d,e,f);
+#define S2(a,b) { register long t; if( ( t = b - a ) < 0 ) { a += t; b -= t; } }
+#define MN3(a,b,c) S2(a,b); S2(a,c);
+#define MX3(a,b,c) S2(b,c); S2(a,c);
+#define MNMX3(a,b,c) MX3(a,b,c); S2(a,b);
+#define MNMX4(a,b,c,d) S2(a,b); S2(c,d); S2(a,c); S2(b,d);
+#define MNMX5(a,b,c,d,e) S2(a,b); S2(c,d); MN3(a,c,e); MX3(b,d,e);
+#define MNMX6(a,b,c,d,e,f) S2(a,d); S2(b,e); S2(c,f); MN3(a,b,c); MX3(d,e,f);
// ----------
// - Bitmap -
@@ -110,30 +110,30 @@ BOOL Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, cons
BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
- long* pColm = new long[ nWidth2 ];
- long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pRowTmp1 = pColRow1;
- BitmapColor* pRowTmp2 = pColRow2;
- BitmapColor* pRowTmp3 = pColRow3;
- BitmapColor* pColor;
- long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
- long (*pKoeff)[ 256 ] = new long[ 9 ][ 256 ];
- long* pTmp;
+ const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ long* pColm = new long[ nWidth2 ];
+ long* pRows = new long[ nHeight2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pRowTmp1 = pColRow1;
+ BitmapColor* pRowTmp2 = pColRow2;
+ BitmapColor* pRowTmp3 = pColRow3;
+ BitmapColor* pColor;
+ long nY, nX, i, nSumR, nSumG, nSumB, nMatrixVal, nTmp;
+ long (*pKoeff)[ 256 ] = new long[ 9 ][ 256 ];
+ long* pTmp;
// create LUT of products of matrix value and possible color component values
for( nY = 0; nY < 9; nY++ )
@@ -143,13 +143,13 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
// create column LUT
for( i = 0; i < nWidth2; i++ )
pColm[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pColm[ nWidth + 1 ] = pColm[ nWidth ];
// create row LUT
for( i = 0; i < nHeight2; i++ )
pRows[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pRows[ nHeight + 1 ] = pRows[ nHeight ];
// read first three rows of bitmap color
@@ -240,8 +240,8 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -257,42 +257,42 @@ BOOL Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor,
BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 24 );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 24 );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
- const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
- long* pColm = new long[ nWidth2 ];
- long* pRows = new long[ nHeight2 ];
- BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
- BitmapColor* pRowTmp1 = pColRow1;
- BitmapColor* pRowTmp2 = pColRow2;
- BitmapColor* pRowTmp3 = pColRow3;
- BitmapColor* pColor;
- long nY, nX, i;
- long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
- long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
- long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
+ const long nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
+ const long nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
+ long* pColm = new long[ nWidth2 ];
+ long* pRows = new long[ nHeight2 ];
+ BitmapColor* pColRow1 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow2 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pColRow3 = (BitmapColor*) new BYTE[ sizeof( BitmapColor ) * nWidth2 ];
+ BitmapColor* pRowTmp1 = pColRow1;
+ BitmapColor* pRowTmp2 = pColRow2;
+ BitmapColor* pRowTmp3 = pColRow3;
+ BitmapColor* pColor;
+ long nY, nX, i;
+ long nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
+ long nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
+ long nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
// create column LUT
for( i = 0; i < nWidth2; i++ )
pColm[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pColm[ nWidth + 1 ] = pColm[ nWidth ];
// create row LUT
for( i = 0; i < nHeight2; i++ )
pRows[ i ] = ( i > 0 ) ? ( i - 1 ) : 0;
-
+
pRows[ nHeight + 1 ] = pRows[ nHeight ];
// read first three rows of bitmap color
@@ -314,7 +314,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
nR1 = ( pColor = pRowTmp1 + nX )->GetRed(), nG1 = pColor->GetGreen(), nB1 = pColor->GetBlue();
nR2 = ( ++pColor )->GetRed(), nG2 = pColor->GetGreen(), nB2 = pColor->GetBlue();
nR3 = ( ++pColor )->GetRed(), nG3 = pColor->GetGreen(), nB3 = pColor->GetBlue();
-
+
nR4 = ( pColor = pRowTmp2 + nX )->GetRed(), nG4 = pColor->GetGreen(), nB4 = pColor->GetBlue();
nR5 = ( ++pColor )->GetRed(), nG5 = pColor->GetGreen(), nB5 = pColor->GetBlue();
nR6 = ( ++pColor )->GetRed(), nG6 = pColor->GetGreen(), nB6 = pColor->GetBlue();
@@ -322,7 +322,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
nR7 = ( pColor = pRowTmp3 + nX )->GetRed(), nG7 = pColor->GetGreen(), nB7 = pColor->GetBlue();
nR8 = ( ++pColor )->GetRed(), nG8 = pColor->GetGreen(), nB8 = pColor->GetBlue();
nR9 = ( ++pColor )->GetRed(), nG9 = pColor->GetGreen(), nB9 = pColor->GetBlue();
-
+
MNMX6( nR1, nR2, nR3, nR4, nR5, nR6 );
MNMX5( nR7, nR2, nR3, nR4, nR5 );
MNMX4( nR8, nR2, nR3, nR4 );
@@ -337,7 +337,7 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
MNMX5( nB7, nB2, nB3, nB4, nB5 );
MNMX4( nB8, nB2, nB3, nB4 );
MNMX3( nB9, nB2, nB3 );
-
+
// set destination color
pWriteAcc->SetPixel( nY, nX, BitmapColor( (BYTE) nR2, (BYTE) nG2, (BYTE) nB2 ) );
}
@@ -371,8 +371,8 @@ BOOL Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Lin
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -395,29 +395,29 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
bRet = FALSE;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
-
+
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
- const long nMask211 = -2, nMask221 = 0, nMask231 = 2;
- const long nMask311 = -1, nMask321 = 0, nMask331 = 1;
- const long nMask112 = 1, nMask122 = 2, nMask132 = 1;
- const long nMask212 = 0, nMask222 = 0, nMask232 = 0;
- const long nMask312 = -1, nMask322 = -2, nMask332 = -1;
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
- long* pHMap = new long[ nWidth + 2 ];
- long* pVMap = new long[ nHeight + 2 ];
- long nX, nY, nSum1, nSum2;
+ BitmapColor aGrey( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ const long nMask111 = -1, nMask121 = 0, nMask131 = 1;
+ const long nMask211 = -2, nMask221 = 0, nMask231 = 2;
+ const long nMask311 = -1, nMask321 = 0, nMask331 = 1;
+ const long nMask112 = 1, nMask122 = 2, nMask132 = 1;
+ const long nMask212 = 0, nMask222 = 0, nMask232 = 0;
+ const long nMask312 = -1, nMask322 = -2, nMask332 = -1;
+ long nGrey11, nGrey12, nGrey13;
+ long nGrey21, nGrey22, nGrey23;
+ long nGrey31, nGrey32, nGrey33;
+ long* pHMap = new long[ nWidth + 2 ];
+ long* pVMap = new long[ nHeight + 2 ];
+ long nX, nY, nSum1, nSum2;
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -498,8 +498,8 @@ BOOL Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link*
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -523,33 +523,33 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
bRet = FALSE;
BitmapReadAccess* pReadAcc = AcquireReadAccess();
-
+
if( pReadAcc )
{
- Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &pReadAcc->GetPalette() );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aGrey( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- long nGrey11, nGrey12, nGrey13;
- long nGrey21, nGrey22, nGrey23;
- long nGrey31, nGrey32, nGrey33;
- double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ BitmapColor aGrey( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ long nGrey11, nGrey12, nGrey13;
+ long nGrey21, nGrey22, nGrey23;
+ long nGrey31, nGrey32, nGrey33;
+ double fAzim = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
( pFilterParam->maEmbossAngles.mnAzimuthAngle100 * 0.01 ) : 0.0 ) * F_PI180;
- double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
+ double fElev = ( ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_EMBOSS_GREY ) ?
( pFilterParam->maEmbossAngles.mnElevationAngle100 * 0.01 ) : 90.0 ) * F_PI180;
- long* pHMap = new long[ nWidth + 2 ];
- long* pVMap = new long[ nHeight + 2 ];
- long nX, nY, nNx, nNy, nDotL;
- const long nLx = FRound( cos( fAzim ) * cos( fElev ) * 255.0 );
- const long nLy = FRound( sin( fAzim ) * cos( fElev ) * 255.0 );
- const long nLz = FRound( sin( fElev ) * 255.0 );
- const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
- const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
- const BYTE cLz = (BYTE) VOS_BOUND( nLz, 0, 255 );
+ long* pHMap = new long[ nWidth + 2 ];
+ long* pVMap = new long[ nHeight + 2 ];
+ long nX, nY, nNx, nNy, nDotL;
+ const long nLx = FRound( cos( fAzim ) * cos( fElev ) * 255.0 );
+ const long nLy = FRound( sin( fAzim ) * cos( fElev ) * 255.0 );
+ const long nLz = FRound( sin( fElev ) * 255.0 );
+ const long nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
+ const long nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
+ const BYTE cLz = (BYTE) VOS_BOUND( nLz, 0, 255 );
// fill mapping tables
pHMap[ 0 ] = 0;
@@ -588,7 +588,7 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
const double fGrey = nDotL / sqrt( (double)(nNx * nNx + nNy * nNy + nZ2) );
aGrey.SetIndex( (BYTE) VOS_BOUND( fGrey, 0, 255 ) );
}
-
+
pWriteAcc->SetPixel( nY, nX, aGrey );
if( nX < ( nWidth - 1 ) )
@@ -612,8 +612,8 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -630,12 +630,12 @@ BOOL Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*p
BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BOOL bRet = FALSE;
- BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
-
+ BOOL bRet = FALSE;
+ BitmapWriteAccess* pWriteAcc = AcquireWriteAccess();
+
if( pWriteAcc )
{
- const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
+ const BYTE cThreshold = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SOLARIZE ) ?
pFilterParam->mcSolarGreyThreshold : 128;
if( pWriteAcc->HasPalette() )
@@ -653,16 +653,16 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
}
else
{
- BitmapColor aCol;
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ BitmapColor aCol;
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
for( long nY = 0; nY < nHeight ; nY++ )
{
for( long nX = 0; nX < nWidth; nX++ )
{
aCol = pWriteAcc->GetPixel( nY, nX );
-
+
if( aCol.GetLuminance() >= cThreshold )
pWriteAcc->SetPixel( nY, nX, aCol.Invert() );
}
@@ -680,43 +680,43 @@ BOOL Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pPr
BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- BitmapReadAccess* pReadAcc = AcquireReadAccess();
- BOOL bRet = FALSE;
-
+ BitmapReadAccess* pReadAcc = AcquireReadAccess();
+ BOOL bRet = FALSE;
+
if( pReadAcc )
{
- long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
+ long nSepiaPercent = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_SEPIA ) ?
pFilterParam->mcSolarGreyThreshold : 10;
- const long nSepia = 10000 - 100 * VOS_BOUND( nSepiaPercent, 0, 100 );
- BitmapPalette aSepiaPal( 256 );
+ const long nSepia = 10000 - 100 * VOS_BOUND( nSepiaPercent, 0, 100 );
+ BitmapPalette aSepiaPal( 256 );
DBG_ASSERT( nSepiaPercent <= 100, "Bitmap::ImplSepia(): sepia value out of range; defaulting to 100%" );
for( USHORT i = 0; i < 256; i++ )
{
- BitmapColor& rCol = aSepiaPal[ i ];
- const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
+ BitmapColor& rCol = aSepiaPal[ i ];
+ const BYTE cSepiaValue = (BYTE) ( ( nSepia * i ) / 10000 );
rCol.SetRed( (BYTE) i );
rCol.SetGreen( cSepiaValue );
rCol.SetBlue( cSepiaValue );
}
- Bitmap aNewBmp( GetSizePixel(), 8, &aSepiaPal );
- BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
+ Bitmap aNewBmp( GetSizePixel(), 8, &aSepiaPal );
+ BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess();
if( pWriteAcc )
{
- BitmapColor aCol( (BYTE) 0 );
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
+ BitmapColor aCol( (BYTE) 0 );
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
if( pReadAcc->HasPalette() )
{
for( long nY = 0; nY < nHeight ; nY++ )
{
- const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
- BYTE* pIndexMap = new BYTE[ nPalCount ];
+ const USHORT nPalCount = pReadAcc->GetPaletteEntryCount();
+ BYTE* pIndexMap = new BYTE[ nPalCount ];
for( USHORT i = 0; i < nPalCount; i++ )
pIndexMap[ i ] = pReadAcc->GetPaletteColor( i ).GetLuminance();
@@ -750,8 +750,8 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = aNewBmp;
@@ -767,11 +767,11 @@ BOOL Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgr
BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ )
{
- ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ ULONG nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileWidth : 4;
- ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
+ ULONG nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ?
pFilterParam->maMosaicTileSize.mnTileHeight : 4;
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( !nTileWidth )
nTileWidth = 1;
@@ -781,9 +781,9 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( nTileWidth > 1 || nTileHeight > 1 )
{
- Bitmap* pNewBmp;
- BitmapReadAccess* pReadAcc;
- BitmapWriteAccess* pWriteAcc;
+ Bitmap* pNewBmp;
+ BitmapReadAccess* pReadAcc;
+ BitmapWriteAccess* pWriteAcc;
if( GetBitCount() > 8 )
{
@@ -796,14 +796,14 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
pReadAcc = AcquireReadAccess();
pWriteAcc = pNewBmp->AcquireWriteAccess();
}
-
+
if( pReadAcc && pWriteAcc )
{
- BitmapColor aCol;
- long nWidth = pReadAcc->Width();
- long nHeight = pReadAcc->Height();
- long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
- double fArea_1;
+ BitmapColor aCol;
+ long nWidth = pReadAcc->Width();
+ long nHeight = pReadAcc->Height();
+ long nX, nY, nX1, nX2, nY1, nY2, nSumR, nSumG, nSumB;
+ double fArea_1;
nY1 = 0; nY2 = nTileHeight - 1;
@@ -816,7 +816,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( nX2 >= nWidth )
nX2 = nWidth - 1;
-
+
fArea_1 = 1.0 / ( ( nX2 - nX1 + 1 ) * ( nY2 - nY1 + 1 ) );
if( !pNewBmp )
@@ -904,8 +904,8 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
if( bRet )
{
- const MapMode aMap( maPrefMapMode );
- const Size aSize( maPrefSize );
+ const MapMode aMap( maPrefMapMode );
+ const Size aSize( maPrefSize );
*this = *pNewBmp;
@@ -918,7 +918,7 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
}
else
bRet = TRUE;
-
+
return bRet;
}
@@ -926,8 +926,8 @@ BOOL Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProg
struct PopArtEntry
{
- sal_uInt32 mnIndex;
- sal_uInt32 mnCount;
+ sal_uInt32 mnIndex;
+ sal_uInt32 mnCount;
};
// ------------------------------------------------------------------------
@@ -938,11 +938,11 @@ extern "C" int __LOADONCALLAPI ImplPopArtCmpFnc( const void* p1, const void* p2
if( ( (PopArtEntry*) p1 )->mnCount < ( (PopArtEntry*) p2 )->mnCount )
nRet = 1;
- else if( ( (PopArtEntry*) p1 )->mnCount == ( (PopArtEntry*) p2 )->mnCount )
+ else if( ( (PopArtEntry*) p1 )->mnCount == ( (PopArtEntry*) p2 )->mnCount )
nRet = 0;
else
nRet = -1;
-
+
return nRet;
}
@@ -960,11 +960,11 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
if( pWriteAcc )
{
- const long nWidth = pWriteAcc->Width();
- const long nHeight = pWriteAcc->Height();
- const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
- ULONG n;
- PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
+ const long nWidth = pWriteAcc->Width();
+ const long nHeight = pWriteAcc->Height();
+ const ULONG nEntryCount = 1 << pWriteAcc->GetBitCount();
+ ULONG n;
+ PopArtEntry* pPopArtTable = new PopArtEntry[ nEntryCount ];
for( n = 0; n < nEntryCount; n++ )
{
@@ -980,7 +980,7 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
// sort table
qsort( pPopArtTable, nEntryCount, sizeof( PopArtEntry ), ImplPopArtCmpFnc );
-
+
// get last used entry
ULONG nFirstEntry;
ULONG nLastEntry = 0;
@@ -993,7 +993,7 @@ BOOL Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*p
const BitmapColor aFirstCol( pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ 0 ].mnIndex) ) );
for( nFirstEntry = 0; nFirstEntry < nLastEntry; nFirstEntry++ )
{
- pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
+ pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry ].mnIndex),
pWriteAcc->GetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nFirstEntry + 1 ].mnIndex) ) );
}
pWriteAcc->SetPaletteColor( sal::static_int_cast<USHORT>(pPopArtTable[ nLastEntry ].mnIndex), aFirstCol );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 38402af626c2..cfa9e4c9ad0d 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,25 +52,25 @@
BitmapEx::BitmapEx() :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
}
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) :
- aBitmap ( rBitmapEx.aBitmap ),
- aMask ( rBitmapEx.aMask ),
- aBitmapSize ( rBitmapEx.aBitmapSize ),
- aTransparentColor ( rBitmapEx.aTransparentColor ),
- eTransparent ( rBitmapEx.eTransparent ),
- bAlpha ( rBitmapEx.bAlpha )
+ aBitmap ( rBitmapEx.aBitmap ),
+ aMask ( rBitmapEx.aMask ),
+ aBitmapSize ( rBitmapEx.aBitmapSize ),
+ aTransparentColor ( rBitmapEx.aTransparentColor ),
+ eTransparent ( rBitmapEx.eTransparent ),
+ bAlpha ( rBitmapEx.bAlpha )
{
}
BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
if( rBitmapEx.IsEmpty() )
return;
@@ -84,7 +84,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
}
else if( rBitmapEx.IsTransparent() )
aMask = Bitmap( aSize, rBitmapEx.aMask.GetBitCount() );
-
+
Rectangle aDestRect( Point( 0, 0 ), aSize );
Rectangle aSrcRect( aSrc, aSize );
CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
@@ -94,21 +94,21 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) :
BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
- static ImplImageTreeSingletonRef aImageTree;
- ResMgr* pResMgr = NULL;
+ static ImplImageTreeSingletonRef aImageTree;
+ ResMgr* pResMgr = NULL;
ResMgr::GetResourceSkipHeader( rResId.SetRT( RSC_BITMAP ), &pResMgr );
pResMgr->ReadLong();
pResMgr->ReadLong();
-
+
const String aFileName( pResMgr->ReadString() );
::rtl::OUString aCurrentSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyleName();
-
+
if( !aImageTree->loadImage( aFileName, aCurrentSymbolsStyle, *this ) )
{
-#ifdef DBG_UTIL
+#ifdef DBG_UTIL
ByteString aErrorStr( "BitmapEx::BitmapEx( const ResId& rResId ): could not load image <" );
DBG_ERROR( ( ( aErrorStr += ByteString( aFileName, RTL_TEXTENCODING_ASCII_US ) ) += '>' ).GetBuffer() );
#endif
@@ -118,21 +118,21 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp ) :
- aBitmap ( rBmp ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
+ aBitmap ( rBmp ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
eTransparent( TRANSPARENT_NONE ),
- bAlpha ( FALSE )
+ bAlpha ( FALSE )
{
}
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
- aBitmap ( rBmp ),
- aMask ( rMask ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ aBitmap ( rBmp ),
+ aMask ( rMask ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
+ bAlpha ( FALSE )
{
DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
@@ -148,18 +148,18 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
- aBitmap ( rBmp ),
- aMask ( rAlphaMask.ImplGetBitmap() ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
- bAlpha ( !rAlphaMask ? FALSE : TRUE )
+ aBitmap ( rBmp ),
+ aMask ( rAlphaMask.ImplGetBitmap() ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ eTransparent ( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
+ bAlpha ( !rAlphaMask ? FALSE : TRUE )
{
DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
// #i75531# the workaround below can go when
// X11SalGraphics::drawAlphaBitmap()'s render acceleration
- // can handle the bitmap depth mismatch directly
+ // can handle the bitmap depth mismatch directly
if( aBitmap.GetBitCount() < aMask.GetBitCount() )
aBitmap.Convert( BMP_CONVERSION_24BIT );
}
@@ -167,11 +167,11 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const AlphaMask& rAlphaMask ) :
// ------------------------------------------------------------------
BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) :
- aBitmap ( rBmp ),
- aBitmapSize ( aBitmap.GetSizePixel() ),
- aTransparentColor ( rTransparentColor ),
- eTransparent ( TRANSPARENT_BITMAP ),
- bAlpha ( FALSE )
+ aBitmap ( rBmp ),
+ aBitmapSize ( aBitmap.GetSizePixel() ),
+ aTransparentColor ( rTransparentColor ),
+ eTransparent ( TRANSPARENT_BITMAP ),
+ bAlpha ( FALSE )
{
aMask = aBitmap.CreateMask( aTransparentColor );
@@ -303,7 +303,7 @@ Bitmap BitmapEx::GetBitmap( const Color* pTransReplaceColor ) const
BitmapEx BitmapEx::GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const
{
BitmapEx aRet;
-
+
if( BMP_COLOR_HIGHCONTRAST == eColorMode )
{
aRet = *this;
@@ -314,7 +314,7 @@ BitmapEx BitmapEx::GetColorTransformedBitmapEx( BmpColorMode eColorMode ) const
{
aRet = *this;
aRet.aBitmap = aRet.aBitmap.GetColorTransformedBitmap( eColorMode );
-
+
if( !aRet.aMask.IsEmpty() )
{
aRet.aMask.CombineSimple( aRet.aBitmap, BMP_COMBINE_OR );
@@ -370,8 +370,8 @@ ULONG BitmapEx::GetSizeBytes() const
ULONG BitmapEx::GetChecksum() const
{
- sal_uInt32 nCrc = aBitmap.GetChecksum();
- SVBT32 aBT32;
+ sal_uInt32 nCrc = aBitmap.GetChecksum();
+ SVBT32 aBT32;
UInt32ToSVBT32( (long) eTransparent, aBT32 );
nCrc = rtl_crc32( nCrc, aBT32, 4 );
@@ -617,8 +617,8 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
else
{
- sal_uInt8 cBlack = 0;
- AlphaMask* pAlpha = new AlphaMask( GetSizePixel(), &cBlack );
+ sal_uInt8 cBlack = 0;
+ AlphaMask* pAlpha = new AlphaMask( GetSizePixel(), &cBlack );
aMask = pAlpha->ImplGetBitmap();
delete pAlpha;
@@ -646,7 +646,7 @@ BOOL BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc,
}
else if( IsAlpha() )
{
- sal_uInt8 cBlack = 0;
+ sal_uInt8 cBlack = 0;
const AlphaMask aAlphaSrc( pBmpExSrc->GetSizePixel(), &cBlack );
aMask.CopyPixel( rRectDst, rRectSrc, &aAlphaSrc.ImplGetBitmap() );
@@ -858,8 +858,8 @@ SvStream& operator>>( SvStream& rIStm, BitmapEx& rBitmapEx )
if( !rIStm.GetError() )
{
const ULONG nStmPos = rIStm.Tell();
- UINT32 nMagic1 = 0;
- UINT32 nMagic2 = 0;
+ UINT32 nMagic1 = 0;
+ UINT32 nMagic2 = 0;
rIStm >> nMagic1 >> nMagic2;
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index c963ea32542e..a123253f0eb6 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,11 +38,11 @@
// --------------------
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
- mpBuffer ( NULL ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL ),
- mbModify ( bModify )
+ mpBuffer ( NULL ),
+ mpScanBuf ( NULL ),
+ mFncGetPixel ( NULL ),
+ mFncSetPixel ( NULL ),
+ mbModify ( bModify )
{
ImplCreate( rBitmap );
}
@@ -50,11 +50,11 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ) :
// ------------------------------------------------------------------
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
- mpBuffer ( NULL ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL ),
- mbModify ( FALSE )
+ mpBuffer ( NULL ),
+ mpScanBuf ( NULL ),
+ mFncGetPixel ( NULL ),
+ mFncSetPixel ( NULL ),
+ mbModify ( FALSE )
{
ImplCreate( rBitmap );
}
@@ -105,8 +105,8 @@ void BitmapReadAccess::ImplCreate( Bitmap& rBitmap )
if( mpBuffer )
{
- const long nHeight = mpBuffer->mnHeight;
- Scanline pTmpLine = mpBuffer->mpBits;
+ const long nHeight = mpBuffer->mnHeight;
+ Scanline pTmpLine = mpBuffer->mpBits;
mpScanBuf = new Scanline[ nHeight ];
maColorMask = mpBuffer->maColorMask;
@@ -265,13 +265,13 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
if( nLeftOverBits != 0 ) // else there is really nothing to do
{
const sal_uInt32 nBytes = (nLeftOverBits + 7U) >> 3U;
- sal_uInt8 nMask;
-
+ sal_uInt8 nMask;
+
if( bMsb )
nMask = static_cast<sal_uInt8>(0xffU << (nLeftOverBits & 3UL));
else
nMask = static_cast<sal_uInt8>(0xffU >> (nLeftOverBits & 3UL));
-
+
BYTE* pLastBytes = (BYTE*)GetBuffer() + ( nScanSize - nBytes );
for( sal_uInt32 i = 0; i < nHeight; i++, pLastBytes += nScanSize )
{
@@ -283,8 +283,8 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
}
else if( nBits & 0x1f )
{
- sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
- BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
+ sal_uInt32 nMask = 0xffffffff << ( ( nScanSize << 3 ) - nBits );
+ BYTE* pLast4Bytes = (BYTE*) GetBuffer() + ( nScanSize - 4 );
#ifdef OSL_LITENDIAN
nMask = SWAPLONG( nMask );
@@ -393,22 +393,22 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
switch( nFormat )
{
- case( BMP_FORMAT_1BIT_MSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_MSB_PAL; break;
- case( BMP_FORMAT_1BIT_LSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_LSB_PAL; break;
- case( BMP_FORMAT_4BIT_MSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_MSN_PAL; break;
- case( BMP_FORMAT_4BIT_LSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_LSN_PAL; break;
- case( BMP_FORMAT_8BIT_PAL ): pFncGetPixel = GetPixelFor_8BIT_PAL; break;
- case( BMP_FORMAT_8BIT_TC_MASK ): pFncGetPixel = GetPixelFor_8BIT_TC_MASK; break;
- case( BMP_FORMAT_16BIT_TC_MSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_MSB_MASK; break;
- case( BMP_FORMAT_16BIT_TC_LSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_LSB_MASK; break;
- case( BMP_FORMAT_24BIT_TC_BGR ): pFncGetPixel = GetPixelFor_24BIT_TC_BGR; break;
- case( BMP_FORMAT_24BIT_TC_RGB ): pFncGetPixel = GetPixelFor_24BIT_TC_RGB; break;
- case( BMP_FORMAT_24BIT_TC_MASK ): pFncGetPixel = GetPixelFor_24BIT_TC_MASK; break;
- case( BMP_FORMAT_32BIT_TC_ABGR ): pFncGetPixel = GetPixelFor_32BIT_TC_ABGR; break;
- case( BMP_FORMAT_32BIT_TC_ARGB ): pFncGetPixel = GetPixelFor_32BIT_TC_ARGB; break;
- case( BMP_FORMAT_32BIT_TC_BGRA ): pFncGetPixel = GetPixelFor_32BIT_TC_BGRA; break;
- case( BMP_FORMAT_32BIT_TC_RGBA ): pFncGetPixel = GetPixelFor_32BIT_TC_RGBA; break;
- case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
+ case( BMP_FORMAT_1BIT_MSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_MSB_PAL; break;
+ case( BMP_FORMAT_1BIT_LSB_PAL ): pFncGetPixel = GetPixelFor_1BIT_LSB_PAL; break;
+ case( BMP_FORMAT_4BIT_MSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_MSN_PAL; break;
+ case( BMP_FORMAT_4BIT_LSN_PAL ): pFncGetPixel = GetPixelFor_4BIT_LSN_PAL; break;
+ case( BMP_FORMAT_8BIT_PAL ): pFncGetPixel = GetPixelFor_8BIT_PAL; break;
+ case( BMP_FORMAT_8BIT_TC_MASK ): pFncGetPixel = GetPixelFor_8BIT_TC_MASK; break;
+ case( BMP_FORMAT_16BIT_TC_MSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_MSB_MASK; break;
+ case( BMP_FORMAT_16BIT_TC_LSB_MASK ): pFncGetPixel = GetPixelFor_16BIT_TC_LSB_MASK; break;
+ case( BMP_FORMAT_24BIT_TC_BGR ): pFncGetPixel = GetPixelFor_24BIT_TC_BGR; break;
+ case( BMP_FORMAT_24BIT_TC_RGB ): pFncGetPixel = GetPixelFor_24BIT_TC_RGB; break;
+ case( BMP_FORMAT_24BIT_TC_MASK ): pFncGetPixel = GetPixelFor_24BIT_TC_MASK; break;
+ case( BMP_FORMAT_32BIT_TC_ABGR ): pFncGetPixel = GetPixelFor_32BIT_TC_ABGR; break;
+ case( BMP_FORMAT_32BIT_TC_ARGB ): pFncGetPixel = GetPixelFor_32BIT_TC_ARGB; break;
+ case( BMP_FORMAT_32BIT_TC_BGRA ): pFncGetPixel = GetPixelFor_32BIT_TC_BGRA; break;
+ case( BMP_FORMAT_32BIT_TC_RGBA ): pFncGetPixel = GetPixelFor_32BIT_TC_RGBA; break;
+ case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
default:
pFncGetPixel = NULL;
@@ -436,7 +436,7 @@ void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
if( ( GetScanlineFormat() == rReadAcc.GetScanlineFormat() ) &&
( GetScanlineSize() == rReadAcc.GetScanlineSize() ) )
{
- const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
+ const long nHeight = Min( mpBuffer->mnHeight, rReadAcc.Height() );
const ULONG nCount = nHeight * mpBuffer->mnScanlineSize;
memcpy( mpBuffer->mpBits, rReadAcc.GetBuffer(), nCount );
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 436c165d3bb5..f9f5247aff57 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,7 +79,7 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
BYTE& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
+ ( nX & 1 ) ? ( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) ) :
( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
}
@@ -96,7 +96,7 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
BYTE& rByte = pScanline[ nX >> 1 ];
- ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
+ ( nX & 1 ) ? ( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) ) :
( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
}
@@ -110,7 +110,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _8BIT_PAL )
// ------------------------------------------------------------------
IMPL_FORMAT_SETPIXEL_NOMASK( _8BIT_PAL )
-{
+{
pScanline[ nX ] = rBitmapColor.GetIndex();
}
@@ -284,7 +284,7 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_BGRA )
// ------------------------------------------------------------------
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_BGRA )
-{
+{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetBlue();
*pScanline++ = rBitmapColor.GetGreen();
*pScanline++ = rBitmapColor.GetRed();
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index a89015d12351..30f86a3539d0 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ void BitmapWriteAccess::SetLineColor()
void BitmapWriteAccess::SetLineColor( const Color& rColor )
{
delete mpLineColor;
-
+
if( rColor.GetTransparency() == 255 )
mpLineColor = NULL;
else
@@ -61,12 +61,12 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
Color BitmapWriteAccess::GetLineColor() const
{
Color aRet;
-
+
if( mpLineColor )
aRet = (const Color&) *mpLineColor;
else
aRet.SetTransparency( 255 );
-
+
return aRet;
}
@@ -83,7 +83,7 @@ void BitmapWriteAccess::SetFillColor()
void BitmapWriteAccess::SetFillColor( const Color& rColor )
{
delete mpFillColor;
-
+
if( rColor.GetTransparency() == 255 )
mpFillColor = NULL;
else
@@ -95,7 +95,7 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
Color BitmapWriteAccess::GetFillColor() const
{
Color aRet;
-
+
if( mpFillColor )
aRet = (const Color&) *mpFillColor;
else
@@ -118,9 +118,9 @@ void BitmapWriteAccess::Erase( const Color& rColor )
return;
// use the canonical method to clear the bitmap
- BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor( *mpFillColor ) : NULL;
- const Point aPoint;
- const Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
+ BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor( *mpFillColor ) : NULL;
+ const Point aPoint;
+ const Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
SetFillColor( rColor );
FillRect( aRect );
@@ -134,17 +134,17 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
if( mpLineColor )
{
- const BitmapColor& rLineColor = *mpLineColor;
- long nX, nY;
-
+ const BitmapColor& rLineColor = *mpLineColor;
+ long nX, nY;
+
if ( rStart.X() == rEnd.X() )
{
// vertikale Line
const long nEndY = rEnd.Y();
-
+
nX = rStart.X();
nY = rStart.Y();
-
+
if ( nEndY > nY )
{
for (; nY <= nEndY; nY++ )
@@ -160,10 +160,10 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
// horizontale Line
const long nEndX = rEnd.X();
-
+
nX = rStart.X();
nY = rStart.Y();
-
+
if ( nEndX > nX )
{
for (; nX <= nEndX; nX++ )
@@ -177,13 +177,13 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
else
{
- const long nDX = labs( rEnd.X() - rStart.X() );
- const long nDY = labs( rEnd.Y() - rStart.Y() );
- long nX1;
- long nY1;
- long nX2;
- long nY2;
-
+ const long nDX = labs( rEnd.X() - rStart.X() );
+ const long nDY = labs( rEnd.Y() - rStart.Y() );
+ long nX1;
+ long nY1;
+ long nX2;
+ long nY2;
+
if ( nDX >= nDY )
{
if ( rStart.X() < rEnd.X() )
@@ -200,22 +200,22 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nX2 = rStart.X();
nY2 = rStart.Y();
}
-
- const long nDYX = ( nDY - nDX ) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
- BOOL bPos = nY1 < nY2;
-
+
+ const long nDYX = ( nDY - nDX ) << 1;
+ const long nDY2 = nDY << 1;
+ long nD = nDY2 - nDX;
+ BOOL bPos = nY1 < nY2;
+
for ( nX = nX1, nY = nY1; nX <= nX2; nX++ )
{
SetPixel( nY, nX, rLineColor );
-
+
if ( nD < 0 )
nD += nDY2;
else
{
nD += nDYX;
-
+
if ( bPos )
nY++;
else
@@ -239,22 +239,22 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
nX2 = rStart.X();
nY2 = rStart.Y();
}
-
- const long nDYX = ( nDX - nDY ) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
- BOOL bPos = nX1 < nX2;
-
+
+ const long nDYX = ( nDX - nDY ) << 1;
+ const long nDY2 = nDX << 1;
+ long nD = nDY2 - nDY;
+ BOOL bPos = nX1 < nX2;
+
for ( nX = nX1, nY = nY1; nY <= nY2; nY++ )
{
SetPixel( nY, nX, rLineColor );
-
+
if ( nD < 0 )
nD += nDY2;
else
{
nD += nDYX;
-
+
if ( bPos )
nX++;
else
@@ -272,19 +272,19 @@ void BitmapWriteAccess::FillRect( const Rectangle& rRect )
{
if( mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Point aPoint;
- Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
+ const BitmapColor& rFillColor = *mpFillColor;
+ Point aPoint;
+ Rectangle aRect( aPoint, maBitmap.GetSizePixel() );
aRect.Intersection( rRect );
if( !aRect.IsEmpty() )
{
- const long nStartX = rRect.Left();
- const long nStartY = rRect.Top();
- const long nEndX = rRect.Right();
- const long nEndY = rRect.Bottom();
-
+ const long nStartX = rRect.Left();
+ const long nStartY = rRect.Top();
+ const long nEndX = rRect.Right();
+ const long nEndY = rRect.Bottom();
+
for( long nY = nStartY; nY <= nEndY; nY++ )
for( long nX = nStartX; nX <= nEndX; nX++ )
SetPixel( nY, nX, rFillColor );
@@ -298,7 +298,7 @@ void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
{
if( mpFillColor )
FillRect( rRect );
-
+
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
DrawLine( rRect.TopLeft(), rRect.TopRight() );
@@ -316,9 +316,9 @@ void BitmapWriteAccess::FillPolygon( const Polygon& rPoly )
if( nSize && mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Region aRegion( rPoly );
- Rectangle aRect;
+ const BitmapColor& rFillColor = *mpFillColor;
+ Region aRegion( rPoly );
+ Rectangle aRect;
aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
@@ -363,16 +363,16 @@ void BitmapWriteAccess::FillPolyPolygon( const PolyPolygon& rPolyPoly )
if( nCount && mpFillColor )
{
- const BitmapColor& rFillColor = *mpFillColor;
- Region aRegion( rPolyPoly );
- Rectangle aRect;
+ const BitmapColor& rFillColor = *mpFillColor;
+ Region aRegion( rPolyPoly );
+ Rectangle aRect;
aRegion.Intersect( Rectangle( Point(), Size( Width(), Height() ) ) );
if( !aRegion.IsEmpty() )
{
RegionHandle aRegHandle( aRegion.BeginEnumRects() );
-
+
while( aRegion.GetNextEnumRect( aRegHandle, aRect ) )
for( long nY = aRect.Top(), nEndY = aRect.Bottom(); nY <= nEndY; nY++ )
for( long nX = aRect.Left(), nEndX = aRect.Right(); nX <= nEndX; nX++ )
@@ -389,13 +389,13 @@ void BitmapWriteAccess::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
{
if( mpFillColor )
FillPolyPolygon( rPolyPoly );
-
+
if( mpLineColor && ( !mpFillColor || ( *mpFillColor != *mpLineColor ) ) )
{
for( USHORT n = 0, nCount = rPolyPoly.Count(); n < nCount; )
{
- const Polygon& rPoly = rPolyPoly[ n++ ];
- const USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = rPolyPoly[ n++ ];
+ const USHORT nSize = rPoly.GetSize();
if( nSize )
{
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index d949f519d197..8295a353ae23 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,12 +50,12 @@ namespace vcl {
class BmpTransporter :
public cppu::WeakImplHelper1< com::sun::star::awt::XBitmap >
{
- Sequence<sal_Int8> m_aBM;
- com::sun::star::awt::Size m_aSize;
+ Sequence<sal_Int8> m_aBM;
+ com::sun::star::awt::Size m_aSize;
public:
BmpTransporter( const Bitmap& rBM );
virtual ~BmpTransporter();
-
+
virtual com::sun::star::awt::Size SAL_CALL getSize() throw();
virtual Sequence< sal_Int8 > SAL_CALL getDIB() throw();
virtual Sequence< sal_Int8 > SAL_CALL getMaskDIB() throw();
@@ -67,7 +67,7 @@ class BmpConverter :
public:
BmpConverter();
virtual ~BmpConverter();
-
+
virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() throw();
virtual void SAL_CALL setValue( const OUString& rProperty, const Any& rValue )
throw( UnknownPropertyException );
@@ -75,7 +75,7 @@ public:
throw( UnknownPropertyException );
virtual sal_Bool SAL_CALL hasMethod( const OUString& rName ) throw();
virtual sal_Bool SAL_CALL hasProperty( const OUString& rProp ) throw();
-
+
virtual Any SAL_CALL invoke( const OUString& rFunction,
const Sequence< Any >& rParams,
Sequence< sal_Int16 >& rOutParamIndex,
@@ -168,10 +168,10 @@ Any SAL_CALL BmpConverter::invoke(
{
switch( nTargetDepth )
{
- case 1: aBM.Convert( BMP_CONVERSION_1BIT_THRESHOLD );break;
- case 4: aBM.ReduceColors( BMP_CONVERSION_4BIT_COLORS );break;
- case 8: aBM.ReduceColors( BMP_CONVERSION_8BIT_COLORS );break;
- case 24: aBM.Convert( BMP_CONVERSION_24BIT );break;
+ case 1: aBM.Convert( BMP_CONVERSION_1BIT_THRESHOLD );break;
+ case 4: aBM.ReduceColors( BMP_CONVERSION_4BIT_COLORS );break;
+ case 8: aBM.ReduceColors( BMP_CONVERSION_8BIT_COLORS );break;
+ case 24: aBM.Convert( BMP_CONVERSION_24BIT );break;
}
}
xBM = new BmpTransporter( aBM );
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index e6c94ba0475e..496f0c7cdb67 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -538,7 +538,7 @@ inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
case BMP_FORMAT_32BIT_TC_RGBA:
return ImplConvertToBitmap<BMP_FORMAT_32BIT_TC_RGBA>( aSrcType, rDst, rSrc );
}
-
+
#ifdef DEBUG
static int nNotAccelerated = 0;
if( rSrc.mnWidth * rSrc.mnHeight >= 4000 )
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index b11b9ab822f4..c19b3016f4ad 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ using namespace com::sun::star::container;
#define SETTINGS_CONFIGNODE "VCL/Settings"
/*
- * SettingsConfigItem::get
+ * SettingsConfigItem::get
*/
SettingsConfigItem* SettingsConfigItem::get()
@@ -103,10 +103,10 @@ void SettingsConfigItem::Commit()
String aName( aKeyName );
aName.Append( '/' );
aName.Append( String( it->first ) );
- pValues[nIndex].Name = aName;
- pValues[nIndex].Handle = 0;
+ pValues[nIndex].Name = aName;
+ pValues[nIndex].Handle = 0;
pValues[nIndex].Value <<= it->second;
- pValues[nIndex].State = PropertyState_DIRECT_VALUE;
+ pValues[nIndex].State = PropertyState_DIRECT_VALUE;
nIndex++;
}
ReplaceSetProperties( aKeyName, aValues );
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 8ba963bc4718..9b0ffac6f154 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
#include <vcl/cvtgrf.hxx>
// --------------
-// - Callback -
+// - Callback -
// --------------
// --------------------
@@ -66,8 +66,8 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
{
if( ( nInFormat == CVT_SVM ) || ( nInFormat == CVT_BMP ) )
{
- SvMemoryStream aIStm;
- Graphic aGraphic;
+ SvMemoryStream aIStm;
+ Graphic aGraphic;
aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
aIStm >> aGraphic;
@@ -77,7 +77,7 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
SvMemoryStream aOStm( 64535, 64535 );
mpConvertData = new ConvertData( aGraphic, aOStm, nOutFormat );
-
+
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
{
nRetBufSize = aOStm.Seek( STREAM_SEEK_TO_END );
@@ -91,15 +91,15 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
}
else if( ( nOutFormat == CVT_SVM ) || ( nOutFormat == CVT_BMP ) )
{
- SvMemoryStream aIStm;
+ SvMemoryStream aIStm;
aIStm.SetBuffer( (char*) pInBuffer, nInBufSize, FALSE, nInBufSize );
mpConvertData = new ConvertData( Graphic(), aIStm, nInFormat );
-
+
if( maFilterHdl.IsSet() && maFilterHdl.Call( mpConvertData ) )
{
- SvMemoryStream aOStm( 645535, 64535 );
- Graphic& rGraphic = mpConvertData->maGraphic;
+ SvMemoryStream aOStm( 645535, 64535 );
+ Graphic& rGraphic = mpConvertData->maGraphic;
if( ( rGraphic.GetType() == GRAPHIC_BITMAP ) && ( CVT_SVM == nOutFormat ) )
{
@@ -135,13 +135,13 @@ ULONG GraphicConverter::ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nIn
ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nFormat )
{
- GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
+ ULONG nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
- ConvertData aData( rGraphic, rIStm, nFormat );
-
+ ConvertData aData( rGraphic, rIStm, nFormat );
+
if( pCvt->GetFilterHdl().Call( &aData ) )
{
rGraphic = aData.maGraphic;
@@ -150,7 +150,7 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
else if( rIStm.GetError() )
nRet = rIStm.GetError();
}
-
+
return nRet;
}
@@ -158,18 +158,18 @@ ULONG GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, ULONG nForma
ULONG GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, ULONG nFormat )
{
- GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
- ULONG nRet = ERRCODE_IO_GENERAL;
+ GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
+ ULONG nRet = ERRCODE_IO_GENERAL;
if( pCvt && pCvt->GetFilterHdl().IsSet() )
{
- ConvertData aData( rGraphic, rOStm, nFormat );
-
+ ConvertData aData( rGraphic, rOStm, nFormat );
+
if( pCvt->GetFilterHdl().Call( &aData ) )
nRet = ERRCODE_NONE;
else if( rOStm.GetError() )
nRet = rOStm.GetError();
}
-
+
return nRet;
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index af98e402f158..a8fbb58de509 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,7 +74,7 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
- INT32 nSize;
+ INT32 nSize;
rIStm >> nSize;
rPoly = Polygon( (USHORT) nSize );
@@ -88,7 +88,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
Polygon aPoly;
- INT32 nPolyCount;
+ INT32 nPolyCount;
rIStm >> nPolyCount;
@@ -103,9 +103,9 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
- const USHORT nPoly = rPolyPoly.Count();
- USHORT nPoints = 0;
- USHORT n;
+ const USHORT nPoly = rPolyPoly.Count();
+ USHORT nPoints = 0;
+ USHORT n;
for( n = 0; n < nPoly; n++ )
nPoints = sal::static_int_cast<USHORT>(nPoints + rPolyPoly[ n ].GetSize());
@@ -161,12 +161,12 @@ void ImplWriteColor( SvStream& rOStm, const Color& rColor )
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
- Point aOrg;
- INT32 nXNum;
- INT32 nXDenom;
- INT32 nYNum;
- INT32 nYDenom;
- INT16 nUnit;
+ Point aOrg;
+ INT32 nXNum;
+ INT32 nXDenom;
+ INT32 nYNum;
+ INT32 nYDenom;
+ INT16 nUnit;
rIStm >> nUnit >> aOrg >> nXNum >> nXDenom >> nYNum >> nYDenom;
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
@@ -244,8 +244,8 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, INT16 nStyle )
void ImplWriteFont( SvStream& rOStm, const Font& rFont,
rtl_TextEncoding& rActualCharSet )
{
- char aName[32];
- short nWeight;
+ char aName[32];
+ short nWeight;
ByteString aByteName( rFont.GetName(), rOStm.GetStreamCharSet() );
strncpy( aName, aByteName.GetBuffer(), 32 );
@@ -313,8 +313,8 @@ sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString )
xub_StrLen i, nStringLen = rString.Len();
if ( nStringLen )
{
- sal_uInt32 nSize = ( nStringLen << 1 ) + 4;
- sal_uInt16 nType = GDI_UNICODE_COMMENT;
+ sal_uInt32 nSize = ( nStringLen << 1 ) + 4;
+ sal_uInt16 nType = GDI_UNICODE_COMMENT;
rOStm << nType << nSize;
for ( i = 0; i < nStringLen; i++ )
@@ -333,12 +333,12 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, String& rStri
sal_uInt32 nOld = rIStm.Tell();
if ( nStrmPos )
{
- sal_uInt16 nType;
- sal_uInt32 nActionSize;
+ sal_uInt16 nType;
+ sal_uInt32 nActionSize;
xub_StrLen nStringLen;
-
+
rIStm.Seek( nStrmPos );
- rIStm >> nType
+ rIStm >> nType
>> nActionSize;
nStringLen = sal::static_int_cast<xub_StrLen>(( nActionSize - 4 ) >> 1);
@@ -400,14 +400,14 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
if((bOnlyWhenCurve && nAllFlagCount) || (!bOnlyWhenCurve && nAllPointCount))
{
rOStm << (INT16) GDI_EXTENDEDPOLYGON_ACTION;
-
+
const sal_Int32 nActionSize(
- 4 + // Action size
- 2 + // PolygonCount
- (nAllPolygonCount * 2) + // Points per polygon
- (nAllPointCount << 3) + // Points themselves
- nAllPolygonCount + // Bool if (when poly has points) it has flags, too
- nAllFlagCount); // Flags themselves
+ 4 + // Action size
+ 2 + // PolygonCount
+ (nAllPolygonCount * 2) + // Points per polygon
+ (nAllPointCount << 3) + // Points themselves
+ nAllPolygonCount + // Bool if (when poly has points) it has flags, too
+ nAllFlagCount); // Flags themselves
rOStm << nActionSize;
rOStm << (sal_uInt16)nAllPolygonCount;
@@ -508,26 +508,26 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, ULONG nConvertMod
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
- const ULONG nPos = rIStm.Tell();
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ const ULONG nPos = rIStm.Tell();
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- char aCode[ 5 ];
- Size aPrefSz;
- INT16 nSize;
- INT16 nVersion;
+ char aCode[ 5 ];
+ Size aPrefSz;
+ INT16 nSize;
+ INT16 nVersion;
// read header
- rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
- rIStm >> nSize; // Size
- rIStm >> nVersion; // Version
- rIStm >> aPrefSz.Width(); // PrefSize.Width()
- rIStm >> aPrefSz.Height(); // PrefSize.Height()
+ rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
+ rIStm >> nSize; // Size
+ rIStm >> nVersion; // Version
+ rIStm >> aPrefSz.Width(); // PrefSize.Width()
+ rIStm >> aPrefSz.Height(); // PrefSize.Height()
// check header-magic and version
if( rIStm.GetError()
- || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
+ || ( memcmp( aCode, "SVGDI", sizeof( aCode ) ) != 0 )
|| ( nVersion != 200 ) )
{
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
@@ -536,28 +536,28 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
return;
}
- LineInfo aLineInfo( LINE_NONE, 0 );
- Stack aLIStack;
- VirtualDevice aFontVDev;
- rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- BOOL bFatLine = FALSE;
+ LineInfo aLineInfo( LINE_NONE, 0 );
+ Stack aLIStack;
+ VirtualDevice aFontVDev;
+ rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
+ BOOL bFatLine = FALSE;
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
- Polygon aActionPoly;
- Rectangle aRect;
- Point aPt, aPt1;
- Size aSz;
- Color aActionColor;
- INT32 nTmp, nTmp1, nActionSize;
- INT32 nActions;
- INT16 nType;
+ Polygon aActionPoly;
+ Rectangle aRect;
+ Point aPt, aPt1;
+ Size aSz;
+ Color aActionColor;
+ INT32 nTmp, nTmp1, nActionSize;
+ INT32 nActions;
+ INT16 nType;
- sal_uInt32 nUnicodeCommentStreamPos = 0;
- INT32 nUnicodeCommentActionNumber = 0;
+ sal_uInt32 nUnicodeCommentStreamPos = 0;
+ INT32 nUnicodeCommentActionNumber = 0;
- ImplReadMapMode( rIStm, aMapMode ); // MapMode
- rIStm >> nActions; // Action count
+ ImplReadMapMode( rIStm, aMapMode ); // MapMode
+ rIStm >> nActions; // Action count
rMtf.SetPrefSize( aPrefSz );
rMtf.SetPrefMapMode( aMapMode );
@@ -566,7 +566,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
for( INT32 i = 0L; i < nActions; i++ )
{
rIStm >> nType;
- sal_Int32 nActBegin = rIStm.Tell();
+ sal_Int32 nActBegin = rIStm.Tell();
rIStm >> nActionSize;
DBG_ASSERT( ( nType <= 33 ) || ( nType >= 1024 ), "Unknown GDIMetaAction while converting!" );
@@ -643,7 +643,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
rMtf.ReplaceAction(
new MetaPolyLineAction(
- aInputPolyPolygon.GetObject(0),
+ aInputPolyPolygon.GetObject(0),
pPolyLineAction->GetLineInfo()),
nLastPolygonAction);
pPolyLineAction->Delete();
@@ -833,12 +833,12 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FONT_ACTION ):
{
- Font aFont;
- char aName[ 32 ];
- INT32 nWidth, nHeight;
- INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
- INT16 nCharOrient, nLineOrient;
- BOOL bItalic, bOutline, bShadow, bTransparent;
+ Font aFont;
+ char aName[ 32 ];
+ INT32 nWidth, nHeight;
+ INT16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout;
+ INT16 nCharOrient, nLineOrient;
+ BOOL bItalic, bOutline, bShadow, bTransparent;
ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor );
ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor );
@@ -867,7 +867,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
eActualCharSet = aFont.GetCharSet();
if ( eActualCharSet == RTL_TEXTENCODING_DONTKNOW )
eActualCharSet = gsl_getSystemTextEncoding();
-
+
rMtf.AddAction( new MetaFontAction( aFont ) );
rMtf.AddAction( new MetaTextAlignAction( aFont.GetAlign() ) );
rMtf.AddAction( new MetaTextColorAction( aFont.GetColor() ) );
@@ -880,9 +880,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXT_ACTION ):
{
- ByteString aByteStr;
- INT32 nIndex, nLen;
-
+ ByteString aByteStr;
+ INT32 nIndex, nLen;
+
rIStm >> aPt >> nIndex >> nLen >> nTmp;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
{
@@ -898,9 +898,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTARRAY_ACTION ):
{
- ByteString aByteStr;
- sal_Int32* pDXAry = NULL;
- INT32 nIndex, nLen, nAryLen;
+ ByteString aByteStr;
+ sal_Int32* pDXAry = NULL;
+ INT32 nIndex, nLen, nAryLen;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nAryLen;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_UINT16 - 1 ) ) )
@@ -925,7 +925,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int32* pTmpAry = new sal_Int32[nStrLen];
aFontVDev.GetTextArray( aStr, pTmpAry, (USHORT) nIndex, (USHORT) nLen );
-
+
// now, the difference between the
// last and the second last DX array
// is the advancement for the last
@@ -959,8 +959,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_STRETCHTEXT_ACTION ):
{
- ByteString aByteStr;
- INT32 nIndex, nLen, nWidth;
+ ByteString aByteStr;
+ INT32 nIndex, nLen, nWidth;
rIStm >> aPt >> nIndex >> nLen >> nTmp >> nWidth;
if ( nTmp && ( static_cast< sal_uInt32 >( nTmp ) < ( SAL_MAX_INT16 - 1 ) ) )
@@ -995,8 +995,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_BITMAPSCALEPART_ACTION ):
{
- Bitmap aBmp;
- Size aSz2;
+ Bitmap aBmp;
+ Size aSz2;
rIStm >> aPt >> aSz >> aPt1 >> aSz2 >> aBmp;
rMtf.AddAction( new MetaBmpScalePartAction( aPt, aSz, aPt1, aSz2, aBmp ) );
@@ -1043,10 +1043,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_CLIPREGION_ACTION ):
{
- Region aRegion;
- INT16 nRegType;
- INT16 bIntersect;
- BOOL bClip = FALSE;
+ Region aRegion;
+ INT16 nRegType;
+ INT16 bIntersect;
+ BOOL bClip = FALSE;
rIStm >> nRegType >> bIntersect;
ImplReadRect( rIStm, aRect );
@@ -1077,7 +1077,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( 3 ):
{
PolyPolygon aPolyPoly;
- INT32 nPolyCount;
+ INT32 nPolyCount;
rIStm >> nPolyCount;
@@ -1116,8 +1116,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_RASTEROP_ACTION ):
{
- RasterOp eRasterOp;
- INT16 nRasterOp;
+ RasterOp eRasterOp;
+ INT16 nRasterOp;
rIStm >> nRasterOp;
@@ -1173,15 +1173,15 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_GRADIENT_ACTION ):
{
- Color aStartCol;
- Color aEndCol;
- INT16 nStyle;
- INT16 nAngle;
- INT16 nBorder;
- INT16 nOfsX;
- INT16 nOfsY;
- INT16 nIntensityStart;
- INT16 nIntensityEnd;
+ Color aStartCol;
+ Color aEndCol;
+ INT16 nStyle;
+ INT16 nAngle;
+ INT16 nBorder;
+ INT16 nOfsX;
+ INT16 nOfsY;
+ INT16 nIntensityStart;
+ INT16 nIntensityEnd;
ImplReadRect( rIStm, aRect );
rIStm >> nStyle;
@@ -1204,8 +1204,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TRANSPARENT_COMMENT ):
{
PolyPolygon aPolyPoly;
- INT32 nFollowingActionCount;
- INT16 nTrans;
+ INT32 nFollowingActionCount;
+ INT16 nTrans;
rIStm >> aPolyPoly >> nTrans >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1220,10 +1220,10 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_FLOATTRANSPARENT_COMMENT ):
{
GDIMetaFile aMtf;
- Point aPos;
- Size aSize;
- Gradient aGradient;
- INT32 nFollowingActionCount;
+ Point aPos;
+ Size aSize;
+ Gradient aGradient;
+ INT32 nFollowingActionCount;
rIStm >> aMtf >> aPos >> aSize >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1238,8 +1238,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_HATCH_COMMENT ):
{
PolyPolygon aPolyPoly;
- Hatch aHatch;
- INT32 nFollowingActionCount;
+ Hatch aHatch;
+ INT32 nFollowingActionCount;
rIStm >> aPolyPoly >> aHatch >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1253,9 +1253,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_REFPOINT_COMMENT ):
{
- Point aRefPoint;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ Point aRefPoint;
+ BOOL bSet;
+ INT32 nFollowingActionCount;
rIStm >> aRefPoint >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1275,9 +1275,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINECOLOR_COMMENT ):
{
- Color aColor;
- BOOL bSet;
- INT32 nFollowingActionCount;
+ Color aColor;
+ BOOL bSet;
+ INT32 nFollowingActionCount;
rIStm >> aColor >> bSet >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1291,11 +1291,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_TEXTLINE_COMMENT ):
{
- Point aStartPt;
- long nWidth;
+ Point aStartPt;
+ long nWidth;
sal_uInt32 nStrikeout;
sal_uInt32 nUnderline;
- INT32 nFollowingActionCount;
+ INT32 nFollowingActionCount;
rIStm >> aStartPt >> nWidth >> nStrikeout >> nUnderline >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1313,8 +1313,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_GRADIENTEX_COMMENT ):
{
PolyPolygon aPolyPoly;
- Gradient aGradient;
- INT32 nFollowingActionCount;
+ Gradient aGradient;
+ INT32 nFollowingActionCount;
rIStm >> aPolyPoly >> aGradient >> nFollowingActionCount;
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -1328,11 +1328,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_COMMENT_COMMENT ):
{
- ByteString aComment;
- sal_Int32 nValue;
- sal_uInt32 nDataSize;
- BYTE* pData;
- INT32 nFollowingActionCount;
+ ByteString aComment;
+ sal_Int32 nValue;
+ sal_uInt32 nDataSize;
+ BYTE* pData;
+ INT32 nFollowingActionCount;
rIStm >> aComment >> nValue >> nDataSize;
@@ -1379,24 +1379,24 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
- ULONG nPos;
- ULONG nCountPos;
- Font aSaveFont;
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
- const Size aPrefSize( rMtf.GetPrefSize() );
- BOOL bRop_0_1 = FALSE;
- VirtualDevice aSaveVDev;
- Color aLineCol( COL_BLACK );
- Stack aLineColStack;
+ ULONG nPos;
+ ULONG nCountPos;
+ Font aSaveFont;
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ rtl_TextEncoding eActualCharSet = gsl_getSystemTextEncoding();
+ const Size aPrefSize( rMtf.GetPrefSize() );
+ BOOL bRop_0_1 = FALSE;
+ VirtualDevice aSaveVDev;
+ Color aLineCol( COL_BLACK );
+ Stack aLineColStack;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
//MagicCode schreiben
rOStm << "SVGDI"; // Kennung
nPos = rOStm.Tell();
- rOStm << (INT16) 42; // HeaderSize
- rOStm << (INT16) 200; // VERSION
+ rOStm << (INT16) 42; // HeaderSize
+ rOStm << (INT16) 200; // VERSION
rOStm << (INT32) aPrefSize.Width();
rOStm << (INT32) aPrefSize.Height();
ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() );
@@ -1497,12 +1497,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
nCount += 3;
-
+
if(bLineJoin)
{
nCount += 1;
}
-
+
if(bLineDashDot)
{
nCount += 1;
@@ -1576,10 +1576,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_CHORD_ACTION ):
{
- MetaChordAction* pAct = (MetaChordAction*) pAction;
- Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
+ MetaChordAction* pAct = (MetaChordAction*) pAction;
+ Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
pAct->GetEndPoint(), POLY_CHORD );
- const USHORT nPoints = aChordPoly.GetSize();
+ const USHORT nPoints = aChordPoly.GetSize();
rOStm << (INT16) GDI_POLYGON_ACTION;
rOStm << (INT32) ( 8 + ( nPoints << 3 ) );
@@ -1651,13 +1651,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
ImplWritePopAction( rOStm );
nCount += 3;
-
+
if(bLineJoin)
{
nCount += 1;
}
}
-
+
if(bLineDashDot)
{
nCount += 1;
@@ -1683,7 +1683,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm << aSimplePoly[ n ];
nCount++;
-
+
const PolyPolygon aPolyPolygon(pAct->GetPolygon());
if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true))
{
@@ -1697,7 +1697,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() );
nCount++;
-
+
if(ImplWriteExtendedPolyPolygonAction(rOStm, pAct->GetPolyPolygon(), true))
{
nCount++;
@@ -1708,9 +1708,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXT_ACTION ):
{
MetaTextAction* pAct = (MetaTextAction*) pAction;
- String aUniText( pAct->GetText() );
- ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ String aUniText( pAct->GetText() );
+ ByteString aText( aUniText, rActualCharSet );
+ const ULONG nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1728,13 +1728,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTARRAY_ACTION ):
{
- MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
- ByteString aText( pAct->GetText(), rActualCharSet );
- String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
- ULONG nAryLen;
- ULONG nLen = pAct->GetLen();
- const ULONG nTextLen = aText.Len();
- sal_Int32* pDXArray = pAct->GetDXArray();
+ MetaTextArrayAction* pAct = (MetaTextArrayAction*)pAction;
+ ByteString aText( pAct->GetText(), rActualCharSet );
+ String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
+ ULONG nAryLen;
+ ULONG nLen = pAct->GetLen();
+ const ULONG nTextLen = aText.Len();
+ sal_Int32* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1750,7 +1750,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
if( !pDXArray || !nLen )
nAryLen = 0;
else
- nAryLen = nLen; // #105987# Write out all of DX array
+ nAryLen = nLen; // #105987# Write out all of DX array
rOStm << (INT16) GDI_TEXTARRAY_ACTION;
rOStm << (INT32) ( 28 + ( nLen + 1 ) + ( nAryLen * 4 ) );
@@ -1770,10 +1770,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_STRETCHTEXT_ACTION ):
{
- MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
- String aUniText( pAct->GetText() );
- ByteString aText( aUniText, rActualCharSet );
- const ULONG nStrLen = aText.Len();
+ MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
+ String aUniText( pAct->GetText() );
+ ByteString aText( aUniText, rActualCharSet );
+ const ULONG nStrLen = aText.Len();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
nCount++;
@@ -1832,8 +1832,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEX_ACTION ):
{
- MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAP_ACTION;
rOStm << (INT32) 12;
@@ -1845,8 +1845,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEXSCALE_ACTION ):
{
- MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAPSCALE_ACTION;
rOStm << (INT32) 20;
@@ -1860,7 +1860,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_BMPEXSCALEPART_ACTION ):
{
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
- const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
+ const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
rOStm << (INT16) GDI_BITMAPSCALEPART_ACTION;
rOStm << (INT32) 36;
@@ -1876,7 +1876,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- const Gradient& rGrad = pAct->GetGradient();
+ const Gradient& rGrad = pAct->GetGradient();
rOStm << (INT16) GDI_GRADIENT_ACTION;
rOStm << (INT32) 46;
@@ -1897,7 +1897,7 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_GRADIENTEX_ACTION ):
{
const MetaGradientExAction* pA = (MetaGradientExAction*) pAction;
- ULONG nOldPos, nNewPos;
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_GRADIENTEX_COMMENT;
@@ -1922,8 +1922,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_WALLPAPER_ACTION ):
{
- MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
- const Color& rColor = pAct->GetWallpaper().GetColor();
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ const Color& rColor = pAct->GetWallpaper().GetColor();
ImplWritePushAction( rOStm );
ImplWriteLineColor( rOStm, rColor, 1 );
@@ -1942,9 +1942,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_CLIPREGION_ACTION ):
{
- MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
- const Region& rRegion = pAct->GetRegion();
- Rectangle aClipRect;
+ MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
+ const Region& rRegion = pAct->GetRegion();
+ Rectangle aClipRect;
rOStm << (INT16) GDI_CLIPREGION_ACTION;
rOStm << (INT32) 24;
@@ -2027,8 +2027,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTFILLCOLOR_ACTION ):
{
- MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction;
- Font aSaveFont( rSaveVDev.GetFont() );
+ MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction;
+ Font aSaveFont( rSaveVDev.GetFont() );
if( pAct->IsSetting() )
aSaveFont.SetFillColor( pAct->GetColor() );
@@ -2109,9 +2109,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
switch( pAct->GetRasterOp() )
{
case( ROP_OVERPAINT ) : nRasterOp = 0; break;
- case( ROP_XOR ) : nRasterOp = 4; break;
- case( ROP_INVERT ): nRasterOp = 1; break;
- default: nRasterOp = 0; break;
+ case( ROP_XOR ) : nRasterOp = 4; break;
+ case( ROP_INVERT ): nRasterOp = 1; break;
+ default: nRasterOp = 0; break;
}
ImplWriteRasterOpAction( rOStm, nRasterOp );
@@ -2142,10 +2142,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TRANSPARENT_ACTION ):
{
- const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
- const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
- const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
- ULONG nOldPos, nNewPos;
+ const PolyPolygon& rPolyPoly = ( (MetaTransparentAction*) pAction )->GetPolyPolygon();
+ const INT16 nTrans = ( (MetaTransparentAction*) pAction )->GetTransparence();
+ const INT16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10;
+ ULONG nOldPos, nNewPos;
// write transparence comment
rOStm << (INT16) GDI_TRANSPARENT_COMMENT;
@@ -2203,12 +2203,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_FLOATTRANSPARENT_ACTION ):
{
- const MetaFloatTransparentAction* pA = (MetaFloatTransparentAction*) pAction;
- const GDIMetaFile& rTransMtf = pA->GetGDIMetaFile();
- const Point& rPos = pA->GetPoint();
- const Size& rSize = pA->GetSize();
- const Gradient& rGradient = pA->GetGradient();
- ULONG nOldPos, nNewPos;
+ const MetaFloatTransparentAction* pA = (MetaFloatTransparentAction*) pAction;
+ const GDIMetaFile& rTransMtf = pA->GetGDIMetaFile();
+ const Point& rPos = pA->GetPoint();
+ const Size& rSize = pA->GetSize();
+ const Gradient& rGradient = pA->GetGradient();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_FLOATTRANSPARENT_COMMENT;
@@ -2228,13 +2228,13 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// write actions for float transparence
- ULONG nAddCount;
- GDIMetaFile aMtf( rTransMtf );
- const Size aSrcSize( rTransMtf.GetPrefSize() );
- Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
- const double fScaleX = aSrcSize.Width() ? (double) rSize.Width() / aSrcSize.Width() : 1.0;
- const double fScaleY = aSrcSize.Height() ? (double) rSize.Height() / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
+ ULONG nAddCount;
+ GDIMetaFile aMtf( rTransMtf );
+ const Size aSrcSize( rTransMtf.GetPrefSize() );
+ Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
+ const double fScaleX = aSrcSize.Width() ? (double) rSize.Width() / aSrcSize.Width() : 1.0;
+ const double fScaleY = aSrcSize.Height() ? (double) rSize.Height() / aSrcSize.Height() : 1.0;
+ long nMoveX, nMoveY;
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
@@ -2264,10 +2264,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_HATCH_ACTION ):
{
- const MetaHatchAction* pA = (MetaHatchAction*) pAction;
- const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
- const Hatch& rHatch = pA->GetHatch();
- ULONG nOldPos, nNewPos, nAddCount;
+ const MetaHatchAction* pA = (MetaHatchAction*) pAction;
+ const PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
+ const Hatch& rHatch = pA->GetHatch();
+ ULONG nOldPos, nNewPos, nAddCount;
// write hatch comment
rOStm << (INT16) GDI_HATCH_COMMENT;
@@ -2288,8 +2288,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// write actions for hatch
- VirtualDevice aVDev;
- GDIMetaFile aTmpMtf;
+ VirtualDevice aVDev;
+ GDIMetaFile aTmpMtf;
aVDev.AddHatchActions( rPolyPoly, rHatch, aTmpMtf );
nAddCount = ImplWriteActions( rOStm, aTmpMtf, rSaveVDev, rRop_0_1, rLineCol, rLineColStack, rActualCharSet );
@@ -2309,10 +2309,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_REFPOINT_ACTION ):
{
- const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
- const Point& rRefPoint = pA->GetRefPoint();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const MetaRefPointAction* pA = (MetaRefPointAction*) pAction;
+ const Point& rRefPoint = pA->GetRefPoint();
+ const BOOL bSet = pA->IsSetting();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_REFPOINT_COMMENT;
@@ -2337,10 +2337,10 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTLINECOLOR_ACTION ):
{
- const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
- const Color& rColor = pA->GetColor();
- const BOOL bSet = pA->IsSetting();
- ULONG nOldPos, nNewPos;
+ const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
+ const Color& rColor = pA->GetColor();
+ const BOOL bSet = pA->IsSetting();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_TEXTLINECOLOR_COMMENT;
@@ -2370,12 +2370,12 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_TEXTLINE_ACTION ):
{
- const MetaTextLineAction* pA = (MetaTextLineAction*) pAction;
- const Point& rStartPt = pA->GetStartPoint();
- const long nWidth = pA->GetWidth();
- const FontStrikeout eStrikeout = pA->GetStrikeout();
- const FontUnderline eUnderline = pA->GetUnderline();
- ULONG nOldPos, nNewPos;
+ const MetaTextLineAction* pA = (MetaTextLineAction*) pAction;
+ const Point& rStartPt = pA->GetStartPoint();
+ const long nWidth = pA->GetWidth();
+ const FontStrikeout eStrikeout = pA->GetStrikeout();
+ const FontUnderline eUnderline = pA->GetUnderline();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_TEXTLINE_COMMENT;
@@ -2385,8 +2385,8 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm.SeekRel( 4 );
// write data
- rOStm << rStartPt << nWidth <<
- static_cast<sal_uInt32>(eStrikeout) <<
+ rOStm << rStartPt << nWidth <<
+ static_cast<sal_uInt32>(eStrikeout) <<
static_cast<sal_uInt32>(eUnderline);
rOStm << (INT32) 0; // number of actions that follow this comment
@@ -2405,9 +2405,9 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_COMMENT_ACTION ):
{
- const MetaCommentAction* pA = (MetaCommentAction*) pAction;
- const sal_uInt32 nDataSize = pA->GetDataSize();
- ULONG nOldPos, nNewPos;
+ const MetaCommentAction* pA = (MetaCommentAction*) pAction;
+ const sal_uInt32 nDataSize = pA->GetDataSize();
+ ULONG nOldPos, nNewPos;
// write RefPoint comment
rOStm << (INT16) GDI_COMMENT_COMMENT;
diff --git a/vcl/source/gdi/extoutdevdata.cxx b/vcl/source/gdi/extoutdevdata.cxx
index eebd6b35765b..1bda3a598b44 100644
--- a/vcl/source/gdi/extoutdevdata.cxx
+++ b/vcl/source/gdi/extoutdevdata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e26c15309c54..eec28aa88a2b 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,29 +52,29 @@ Impl_Font::Impl_Font() :
maColor( COL_TRANSPARENT ),
maFillColor( COL_TRANSPARENT )
{
- mnRefCount = 1;
- meCharSet = RTL_TEXTENCODING_DONTKNOW;
- meLanguage = LANGUAGE_DONTKNOW;
- meCJKLanguage = LANGUAGE_DONTKNOW;
- meFamily = FAMILY_DONTKNOW;
- mePitch = PITCH_DONTKNOW;
- meAlign = ALIGN_TOP;
- meWeight = WEIGHT_DONTKNOW;
- meWidthType = WIDTH_DONTKNOW;
- meItalic = ITALIC_NONE;
- meUnderline = UNDERLINE_NONE;
- meOverline = UNDERLINE_NONE;
- meStrikeout = STRIKEOUT_NONE;
- meRelief = RELIEF_NONE;
- meEmphasisMark = EMPHASISMARK_NONE;
- mnOrientation = 0;
- mnKerning = 0;
- mbWordLine = false;
- mbOutline = false;
- mbShadow = false;
- mbVertical = false;
- mbTransparent = true;
- mbConfigLookup = false;
+ mnRefCount = 1;
+ meCharSet = RTL_TEXTENCODING_DONTKNOW;
+ meLanguage = LANGUAGE_DONTKNOW;
+ meCJKLanguage = LANGUAGE_DONTKNOW;
+ meFamily = FAMILY_DONTKNOW;
+ mePitch = PITCH_DONTKNOW;
+ meAlign = ALIGN_TOP;
+ meWeight = WEIGHT_DONTKNOW;
+ meWidthType = WIDTH_DONTKNOW;
+ meItalic = ITALIC_NONE;
+ meUnderline = UNDERLINE_NONE;
+ meOverline = UNDERLINE_NONE;
+ meStrikeout = STRIKEOUT_NONE;
+ meRelief = RELIEF_NONE;
+ meEmphasisMark = EMPHASISMARK_NONE;
+ mnOrientation = 0;
+ mnKerning = 0;
+ mbWordLine = false;
+ mbOutline = false;
+ mbShadow = false;
+ mbVertical = false;
+ mbTransparent = true;
+ mbConfigLookup = false;
}
// -----------------------------------------------------------------------
@@ -86,29 +86,29 @@ Impl_Font::Impl_Font( const Impl_Font& rImplFont )
maColor( rImplFont.maColor ),
maFillColor( rImplFont.maFillColor )
{
- mnRefCount = 1;
- meCharSet = rImplFont.meCharSet;
- meLanguage = rImplFont.meLanguage;
- meCJKLanguage = rImplFont.meCJKLanguage;
- meFamily = rImplFont.meFamily;
- mePitch = rImplFont.mePitch;
- meAlign = rImplFont.meAlign;
- meWeight = rImplFont.meWeight;
- meWidthType = rImplFont.meWidthType;
- meItalic = rImplFont.meItalic;
- meUnderline = rImplFont.meUnderline;
- meOverline = rImplFont.meOverline;
- meStrikeout = rImplFont.meStrikeout;
- meRelief = rImplFont.meRelief;
- meEmphasisMark = rImplFont.meEmphasisMark;
- mnOrientation = rImplFont.mnOrientation;
- mnKerning = rImplFont.mnKerning;
- mbWordLine = rImplFont.mbWordLine;
- mbOutline = rImplFont.mbOutline;
- mbShadow = rImplFont.mbShadow;
- mbVertical = rImplFont.mbVertical;
- mbTransparent = rImplFont.mbTransparent;
- mbConfigLookup = rImplFont.mbConfigLookup;
+ mnRefCount = 1;
+ meCharSet = rImplFont.meCharSet;
+ meLanguage = rImplFont.meLanguage;
+ meCJKLanguage = rImplFont.meCJKLanguage;
+ meFamily = rImplFont.meFamily;
+ mePitch = rImplFont.mePitch;
+ meAlign = rImplFont.meAlign;
+ meWeight = rImplFont.meWeight;
+ meWidthType = rImplFont.meWidthType;
+ meItalic = rImplFont.meItalic;
+ meUnderline = rImplFont.meUnderline;
+ meOverline = rImplFont.meOverline;
+ meStrikeout = rImplFont.meStrikeout;
+ meRelief = rImplFont.meRelief;
+ meEmphasisMark = rImplFont.meEmphasisMark;
+ mnOrientation = rImplFont.mnOrientation;
+ mnKerning = rImplFont.mnKerning;
+ mbWordLine = rImplFont.mbWordLine;
+ mbOutline = rImplFont.mbOutline;
+ mbShadow = rImplFont.mbShadow;
+ mbVertical = rImplFont.mbVertical;
+ mbTransparent = rImplFont.mbTransparent;
+ mbConfigLookup = rImplFont.mbConfigLookup;
}
// -----------------------------------------------------------------------
@@ -275,9 +275,9 @@ Font::Font( const String& rFamilyName, const Size& rSize )
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
+ mpImplFont = new Impl_Font;
mpImplFont->maFamilyName= rFamilyName;
- mpImplFont->maSize = rSize;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -286,10 +286,10 @@ Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSi
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
+ mpImplFont = new Impl_Font;
mpImplFont->maFamilyName= rFamilyName;
mpImplFont->maStyleName = rStyleName;
- mpImplFont->maSize = rSize;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -298,9 +298,9 @@ Font::Font( FontFamily eFamily, const Size& rSize )
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
- mpImplFont->meFamily = eFamily;
- mpImplFont->maSize = rSize;
+ mpImplFont = new Impl_Font;
+ mpImplFont->meFamily = eFamily;
+ mpImplFont->maSize = rSize;
}
// -----------------------------------------------------------------------
@@ -756,7 +756,7 @@ void Font::Merge( const Font& rFont )
void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
{
- // #i56788# Use members directly, don't risc config access.
+ // #i56788# Use members directly, don't risc config access.
rAttrs.maName = mpImplFont->maFamilyName;
rAttrs.maStyleName = mpImplFont->maStyleName;
rAttrs.meFamily = mpImplFont->meFamily;
@@ -772,10 +772,10 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
- BOOL bTmp;
- BYTE nTmp8;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
+ BOOL bTmp;
+ BYTE nTmp8;
rIStm.ReadByteString( rImpl_Font.maFamilyName, rIStm.GetStreamCharSet() );
rIStm.ReadByteString( rImpl_Font.maStyleName, rIStm.GetStreamCharSet() );
@@ -800,10 +800,10 @@ SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
if( aCompat.GetVersion() >= 2 )
{
- rIStm >> nTmp8; rImpl_Font.meRelief = (FontRelief)nTmp8;
- rIStm >> nTmp16; rImpl_Font.meCJKLanguage = (LanguageType)nTmp16;
- rIStm >> bTmp; rImpl_Font.mbVertical = bTmp;
- rIStm >> nTmp16; rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
+ rIStm >> nTmp8; rImpl_Font.meRelief = (FontRelief)nTmp8;
+ rIStm >> nTmp16; rImpl_Font.meCJKLanguage = (LanguageType)nTmp16;
+ rIStm >> bTmp; rImpl_Font.mbVertical = bTmp;
+ rIStm >> nTmp16; rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16;
}
if( aCompat.GetVersion() >= 3 )
{
@@ -842,10 +842,10 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
rOStm << (BYTE) rImpl_Font.mnKerning;
// new in version 2
- rOStm << (BYTE) rImpl_Font.meRelief;
- rOStm << (UINT16) rImpl_Font.meCJKLanguage;
- rOStm << (BOOL) rImpl_Font.mbVertical;
- rOStm << (UINT16) rImpl_Font.meEmphasisMark;
+ rOStm << (BYTE) rImpl_Font.meRelief;
+ rOStm << (UINT16) rImpl_Font.meCJKLanguage;
+ rOStm << (BOOL) rImpl_Font.mbVertical;
+ rOStm << (UINT16) rImpl_Font.meEmphasisMark;
// new in version 3
rOStm << (UINT16) rImpl_Font.meOverline;
@@ -935,16 +935,16 @@ namespace
}
// set italic
o_rResult.SetItalic( (aInfo.italicAngle != 0) ? ITALIC_NORMAL : ITALIC_NONE );
-
+
// set pitch
o_rResult.SetPitch( (aInfo.pitch == 0) ? PITCH_VARIABLE : PITCH_FIXED );
-
+
// set style name
if( aInfo.usubfamily )
o_rResult.SetStyleName( rtl::OUString( aInfo.usubfamily ) );
else if( aInfo.subfamily )
o_rResult.SetStyleName( rtl::OUString::createFromAscii( aInfo.subfamily ) );
-
+
// cleanup
CloseTTFont( pTTF );
// success
@@ -953,13 +953,13 @@ namespace
#endif
return bResult;
}
-
+
struct WeightSearchEntry
{
const char* string;
int string_len;
FontWeight weight;
-
+
bool operator<( const WeightSearchEntry& rRight ) const
{
return rtl_str_compareIgnoreAsciiCase_WithLength( string, string_len, rRight.string, rRight.string_len ) < 0;
@@ -978,7 +978,7 @@ namespace
{ "super", 5, WEIGHT_ULTRABOLD },
{ "thin", 4, WEIGHT_THIN }
};
-
+
bool identifyType1Font( const char* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
{
bool bResult = false;
@@ -1005,7 +1005,7 @@ namespace
o_rResult.SetName( rtl::OStringToOUString( rtl::OString( pOpen+1, pClose-pOpen-1 ), RTL_TEXTENCODING_ASCII_US ) );
}
}
-
+
// parse /ItalicAngle
static const char* pItalic = "/ItalicAngle";
const char* pItalicPos = std::search( pStream, pExecPos, pItalic, pItalic+12 );
@@ -1014,7 +1014,7 @@ namespace
sal_Int32 nItalic = rtl_str_toInt32( pItalicPos+12, 10 );
o_rResult.SetItalic( (nItalic != 0) ? ITALIC_NORMAL : ITALIC_NONE );
}
-
+
// parse /Weight
static const char* pWeight = "/Weight";
const char* pWeightPos = std::search( pStream, pExecPos, pWeight, pWeight+7 );
@@ -1077,7 +1077,7 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
identifyType1Font( pStream, i_nSize, aResult );
}
}
-
+
return aResult;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 01b34286a086..22f5f374b7cd 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@
// - Defines -
// -----------
-#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
+#define GAMMA( _def_cVal, _def_InvGamma ) ((BYTE)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0L,255L))
// --------------------------
// - Color exchange structs -
@@ -54,32 +54,32 @@
struct ImplColAdjustParam
{
- BYTE* pMapR;
- BYTE* pMapG;
- BYTE* pMapB;
+ BYTE* pMapR;
+ BYTE* pMapG;
+ BYTE* pMapB;
};
struct ImplBmpAdjustParam
{
- short nLuminancePercent;
- short nContrastPercent;
- short nChannelRPercent;
- short nChannelGPercent;
- short nChannelBPercent;
- double fGamma;
- BOOL bInvert;
+ short nLuminancePercent;
+ short nContrastPercent;
+ short nChannelRPercent;
+ short nChannelGPercent;
+ short nChannelBPercent;
+ double fGamma;
+ BOOL bInvert;
};
// -----------------------------------------------------------------------------
struct ImplColConvertParam
{
- MtfConversion eConversion;
+ MtfConversion eConversion;
};
struct ImplBmpConvertParam
{
- BmpConversion eConversion;
+ BmpConversion eConversion;
};
// -----------------------------------------------------------------------------
@@ -98,22 +98,22 @@ struct ImplBmpMonoParam
struct ImplColReplaceParam
{
- ULONG* pMinR;
- ULONG* pMaxR;
- ULONG* pMinG;
- ULONG* pMaxG;
- ULONG* pMinB;
- ULONG* pMaxB;
- const Color* pDstCols;
- ULONG nCount;
+ ULONG* pMinR;
+ ULONG* pMaxR;
+ ULONG* pMinG;
+ ULONG* pMaxG;
+ ULONG* pMinB;
+ ULONG* pMaxB;
+ const Color* pDstCols;
+ ULONG nCount;
};
struct ImplBmpReplaceParam
{
- const Color* pSrcCols;
- const Color* pDstCols;
- ULONG nCount;
- const ULONG* pTols;
+ const Color* pSrcCols;
+ const Color* pDstCols;
+ ULONG nCount;
+ const ULONG* pTols;
};
@@ -123,8 +123,8 @@ struct ImplBmpReplaceParam
struct ImpLabel
{
- String aLabelName;
- ULONG nActionPos;
+ String aLabelName;
+ ULONG nActionPos;
ImpLabel( const String& rLabelName, ULONG _nActionPos ) :
aLabelName( rLabelName ),
@@ -143,14 +143,14 @@ public:
ImpLabelList( const ImpLabelList& rList );
~ImpLabelList();
- void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
- ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
- void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
- ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
- ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
- ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
- ULONG ImplGetLabelPos( const String& rLabelName );
- ULONG ImplCount() const { return Count(); }
+ void ImplInsert( ImpLabel* p ) { Insert( p, LIST_APPEND ); }
+ ImpLabel* ImplRemove( ULONG nPos ) { return (ImpLabel*) Remove( nPos ); }
+ void ImplReplace( ImpLabel* p ) { Replace( (void*)p ); }
+ ImpLabel* ImplFirst() { return (ImpLabel*) First(); }
+ ImpLabel* ImplNext() { return (ImpLabel*) Next(); }
+ ImpLabel* ImplGetLabel( ULONG nPos ) const { return (ImpLabel*) GetObject( nPos ); }
+ ULONG ImplGetLabelPos( const String& rLabelName );
+ ULONG ImplCount() const { return Count(); }
};
// ------------------------------------------------------------------------
@@ -193,29 +193,29 @@ ULONG ImpLabelList::ImplGetLabelPos( const String& rLabelName )
// ---------------
GDIMetaFile::GDIMetaFile() :
- List ( 0x3EFF, 64, 64 ),
- aPrefSize ( 1, 1 ),
- pPrev ( NULL ),
- pNext ( NULL ),
- pOutDev ( NULL ),
- pLabelList ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ List ( 0x3EFF, 64, 64 ),
+ aPrefSize ( 1, 1 ),
+ pPrev ( NULL ),
+ pNext ( NULL ),
+ pOutDev ( NULL ),
+ pLabelList ( NULL ),
+ bPause ( FALSE ),
+ bRecord ( FALSE )
{
}
// ------------------------------------------------------------------------
GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
- List ( rMtf ),
- aPrefMapMode ( rMtf.aPrefMapMode ),
- aPrefSize ( rMtf.aPrefSize ),
- aHookHdlLink ( rMtf.aHookHdlLink ),
- pPrev ( rMtf.pPrev ),
- pNext ( rMtf.pNext ),
- pOutDev ( NULL ),
- bPause ( FALSE ),
- bRecord ( FALSE )
+ List ( rMtf ),
+ aPrefMapMode ( rMtf.aPrefMapMode ),
+ aPrefSize ( rMtf.aPrefSize ),
+ aHookHdlLink ( rMtf.aHookHdlLink ),
+ pPrev ( rMtf.pPrev ),
+ pNext ( rMtf.pNext ),
+ pOutDev ( NULL ),
+ bPause ( FALSE ),
+ bRecord ( FALSE )
{
// RefCount der MetaActions erhoehen
for( void* pAct = First(); pAct; pAct = Next() )
@@ -287,7 +287,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
{
const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( this == &rMtf )
bRet = TRUE;
@@ -315,7 +315,7 @@ BOOL GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const
sal_Bool GDIMetaFile::IsEqual( const GDIMetaFile& rMtf ) const
{
const ULONG nObjCount = Count();
- BOOL bRet = FALSE;
+ BOOL bRet = FALSE;
if( this == &rMtf )
bRet = TRUE;
@@ -442,7 +442,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
{
MetaAction* pAction = GetCurAction();
const ULONG nObjCount = Count();
- ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
+ ULONG i = 0, nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
if( nPos > nObjCount )
nPos = nObjCount;
@@ -478,14 +478,14 @@ void GDIMetaFile::Play( OutputDevice* pOut, ULONG nPos )
void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
const Size& rSize, ULONG nPos )
{
- Region aDrawClipRegion;
+ Region aDrawClipRegion;
MapMode aDrawMap( GetPrefMapMode() );
- Size aDestSize( pOut->LogicToPixel( rSize ) );
+ Size aDestSize( pOut->LogicToPixel( rSize ) );
if( aDestSize.Width() && aDestSize.Height() )
{
- Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );
- GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
+ Size aTmpPrefSize( pOut->LogicToPixel( GetPrefSize(), aDrawMap ) );
+ GDIMetaFile* pMtf = pOut->GetConnectMetaFile();
if( !aTmpPrefSize.Width() )
aTmpPrefSize.Width() = aDestSize.Width();
@@ -498,7 +498,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos,
aScaleX *= aDrawMap.GetScaleX(); aDrawMap.SetScaleX( aScaleX );
aScaleY *= aDrawMap.GetScaleY(); aDrawMap.SetScaleY( aScaleY );
-
+
// #i47260# Convert logical output position to offset within
// the metafile's mapmode. Therefore, disable pixel offset on
// outdev, it's inverse mnOutOffLogicX/Y is calculated for a
@@ -777,9 +777,9 @@ BOOL GDIMetaFile::SaveStatus()
BOOL GDIMetaFile::Mirror( ULONG nMirrorFlags )
{
- const Size aOldPrefSize( GetPrefSize() );
- long nMoveX, nMoveY;
- double fScaleX, fScaleY;
+ const Size aOldPrefSize( GetPrefSize() );
+ long nMoveX, nMoveY;
+ double fScaleX, fScaleY;
BOOL bRet;
if( nMirrorFlags & MTF_MIRROR_HORZ )
@@ -815,7 +815,7 @@ void GDIMetaFile::Move( long nX, long nY )
aMapVDev.EnableOutput( FALSE );
aMapVDev.SetMapMode( GetPrefMapMode() );
-
+
for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
{
const long nType = pAct->GetType();
@@ -829,7 +829,7 @@ void GDIMetaFile::Move( long nX, long nY )
else
pModAct = pAct;
- if( ( META_MAPMODE_ACTION == nType ) ||
+ if( ( META_MAPMODE_ACTION == nType ) ||
( META_PUSH_ACTION == nType ) ||
( META_POP_ACTION == nType ) )
{
@@ -841,6 +841,49 @@ void GDIMetaFile::Move( long nX, long nY )
}
}
+void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
+{
+ const Size aBaseOffset( nX, nY );
+ Size aOffset( aBaseOffset );
+ VirtualDevice aMapVDev;
+
+ aMapVDev.EnableOutput( FALSE );
+ aMapVDev.SetReferenceDevice( nDPIX, nDPIY );
+ aMapVDev.SetMapMode( GetPrefMapMode() );
+
+ for( MetaAction* pAct = (MetaAction*) First(); pAct; pAct = (MetaAction*) Next() )
+ {
+ const long nType = pAct->GetType();
+ MetaAction* pModAct;
+
+ if( pAct->GetRefCount() > 1 )
+ {
+ Replace( pModAct = pAct->Clone(), GetCurPos() );
+ pAct->Delete();
+ }
+ else
+ pModAct = pAct;
+
+ if( ( META_MAPMODE_ACTION == nType ) ||
+ ( META_PUSH_ACTION == nType ) ||
+ ( META_POP_ACTION == nType ) )
+ {
+ pModAct->Execute( &aMapVDev );
+ if( aMapVDev.GetMapMode().GetMapUnit() == MAP_PIXEL )
+ {
+ aOffset = aMapVDev.LogicToPixel( aBaseOffset, GetPrefMapMode() );
+ MapMode aMap( aMapVDev.GetMapMode() );
+ aOffset.Width() = static_cast<long>(aOffset.Width() * (double)aMap.GetScaleX());
+ aOffset.Height() = static_cast<long>(aOffset.Height() * (double)aMap.GetScaleY());
+ }
+ else
+ aOffset = aMapVDev.LogicToLogic( aBaseOffset, GetPrefMapMode(), aMapVDev.GetMapMode() );
+ }
+
+ pModAct->Move( aOffset.Width(), aOffset.Height() );
+ }
+}
+
// ------------------------------------------------------------------------
void GDIMetaFile::Scale( double fScaleX, double fScaleY )
@@ -885,7 +928,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
{
const long nType = pAct->GetType();
- if( ( META_MAPMODE_ACTION == nType ) ||
+ if( ( META_MAPMODE_ACTION == nType ) ||
( META_PUSH_ACTION == nType ) ||
( META_POP_ACTION == nType ) )
{
@@ -919,7 +962,7 @@ Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt
// ------------------------------------------------------------------------
-Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
+Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
Polygon aRet( rPoly );
@@ -932,7 +975,7 @@ Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& r
// ------------------------------------------------------------------------
-PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt,
+PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos )
{
PolyPolygon aRet( rPolyPoly );
@@ -945,16 +988,16 @@ PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly
// ------------------------------------------------------------------------
-void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
+void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf,
const OutputDevice& rMapDev,
const PolyPolygon& rPolyPoly,
- const Gradient& rGrad )
+ const Gradient& rGrad )
{
// #105055# Generate comment, GradientEx and Gradient actions
// (within DrawGradient)
VirtualDevice aVDev( rMapDev, 0 );
aVDev.EnableOutput( FALSE );
- GDIMetaFile aGradMtf;
+ GDIMetaFile aGradMtf;
aGradMtf.Record( &aVDev );
aVDev.DrawGradient( rPolyPoly, rGrad );
@@ -983,7 +1026,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
const double fAngle = F_PI1800 * nAngle10;
const double fSin = sin( fAngle );
const double fCos = cos( fAngle );
- Rectangle aRect=Rectangle( Point(), GetPrefSize() );
+ Rectangle aRect=Rectangle( Point(), GetPrefSize() );
Polygon aPoly( aRect );
aPoly.Rotate( Point(), fSin, fCos );
@@ -992,10 +1035,10 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMapVDev.SetMapMode( GetPrefMapMode() );
const Rectangle aNewBound( aPoly.GetBoundRect() );
-
+
const Point aOrigin( GetPrefMapMode().GetOrigin().X(), GetPrefMapMode().GetOrigin().Y() );
const Size aOffset( -aNewBound.Left(), -aNewBound.Top() );
-
+
Point aRotAnchor( aOrigin );
Size aRotOffset( aOffset );
@@ -1008,8 +1051,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_PIXEL_ACTION ):
{
MetaPixelAction* pAct = (MetaPixelAction*) pAction;
- aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
- pAct->GetColor() ) );
+ aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
+ pAct->GetColor() ) );
}
break;
@@ -1023,60 +1066,60 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_LINE_ACTION ):
{
MetaLineAction* pAct = (MetaLineAction*) pAction;
- aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
+ aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
ImplGetRotatedPoint( pAct->GetEndPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetLineInfo() ) );
}
break;
-
+
case( META_RECT_ACTION ):
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ROUNDRECT_ACTION ):
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
const Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
-
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
+
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ELLIPSE_ACTION ):
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
const Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
-
- aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
+
+ aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_ARC_ACTION ):
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
const Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
+
case( META_PIE_ACTION ):
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
const Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
-
- case( META_CHORD_ACTION ):
+
+ case( META_CHORD_ACTION ):
{
MetaChordAction* pAct = (MetaChordAction*) pAction;
const Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
-
+
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
@@ -1110,14 +1153,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
aMtf.AddAction( new MetaTextArrayAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetText(), pAct->GetDXArray(), pAct->GetIndex(), pAct->GetLen() ) );
}
break;
-
+
case( META_STRETCHTEXT_ACTION ):
{
MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
@@ -1125,7 +1168,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
pAct->GetWidth(), pAct->GetText(), pAct->GetIndex(), pAct->GetLen() ) );
}
break;
-
+
case( META_TEXTLINE_ACTION ):
{
MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
@@ -1141,8 +1184,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
- aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
+ aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+ aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(),
aBmpEx ) );
}
break;
@@ -1156,7 +1199,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1168,8 +1211,8 @@ void GDIMetaFile::Rotate( long nAngle10 )
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
- aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+ aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1183,7 +1226,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aBmpEx.Crop( Rectangle( pAct->GetSrcPoint(), pAct->GetSrcSize() ) );
aBmpEx.Rotate( nAngle10, Color( COL_TRANSPARENT ) );
-
+
aMtf.AddAction( new MetaBmpExScaleAction( aBmpRect.TopLeft(), aBmpRect.GetSize(), aBmpEx ) );
}
break;
@@ -1192,7 +1235,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- ImplAddGradientEx( aMtf, aMapVDev,
+ ImplAddGradientEx( aMtf, aMapVDev,
ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetGradient() );
}
@@ -1214,17 +1257,17 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
int nBeginComments( 1 );
pAction = (MetaAction*) Next();
-
+
// skip everything, except gradientex action
while( pAction )
{
const USHORT nType = pAction->GetType();
-
+
if( META_GRADIENTEX_ACTION == nType )
{
// Add rotated gradientex
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
- ImplAddGradientEx( aMtf, aMapVDev,
+ ImplAddGradientEx( aMtf, aMapVDev,
ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetGradient() );
}
@@ -1297,11 +1340,11 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
- Hatch aHatch( pAct->GetHatch() );
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ Hatch aHatch( pAct->GetHatch() );
aHatch.SetAngle( aHatch.GetAngle() + (USHORT) nAngle10 );
- aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
+ aMtf.AddAction( new MetaHatchAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
aHatch ) );
}
break;
@@ -1317,20 +1360,20 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
aTransMtf.Rotate( nAngle10 );
- aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(),
+ aMtf.AddAction( new MetaFloatTransparentAction( aTransMtf, aMtfRect.TopLeft(), aMtfRect.GetSize(),
pAct->GetGradient() ) );
}
break;
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
- GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
@@ -1356,12 +1399,12 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_ISECTRECTCLIPREGION_ACTION ):
{
- MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
- aMtf.AddAction( new MetaISectRegionClipRegionAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+ MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
+ aMtf.AddAction( new MetaISectRegionClipRegionAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( META_ISECTREGIONCLIPREGION_ACTION ):
{
MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
const Region& rRegion = pAct->GetRegion();
@@ -1386,7 +1429,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( META_FONT_ACTION ):
{
MetaFontAction* pAct = (MetaFontAction*) pAction;
- Font aFont( pAct->GetFont() );
+ Font aFont( pAct->GetFont() );
aFont.SetOrientation( aFont.GetOrientation() + (USHORT) nAngle10 );
aMtf.AddAction( new MetaFontAction( aFont ) );
@@ -1413,7 +1456,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMtf.AddAction( pAction );
// update rotation point and offset, if necessary
- if( ( META_MAPMODE_ACTION == nActionType ) ||
+ if( ( META_MAPMODE_ACTION == nActionType ) ||
( META_PUSH_ACTION == nActionType ) ||
( META_POP_ACTION == nActionType ) )
{
@@ -1454,19 +1497,19 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
{
GDIMetaFile aMtf;
VirtualDevice aMapVDev( i_rReference );
-
+
aMapVDev.EnableOutput( FALSE );
aMapVDev.SetMapMode( GetPrefMapMode() );
-
+
std::vector<Rectangle> aClipStack( 1, Rectangle() );
std::vector<USHORT> aPushFlagStack;
-
+
Rectangle aBound;
-
+
for( MetaAction* pAction = (MetaAction*) First(); pAction; pAction = (MetaAction*) Next() )
{
const USHORT nActionType = pAction->GetType();
-
+
switch( nActionType )
{
case( META_PIXEL_ACTION ):
@@ -1478,7 +1521,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack );
}
break;
-
+
case( META_POINT_ACTION ):
{
MetaPointAction* pAct = (MetaPointAction*) pAction;
@@ -1488,7 +1531,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack );
}
break;
-
+
case( META_LINE_ACTION ):
{
MetaLineAction* pAct = (MetaLineAction*) pAction;
@@ -1498,28 +1541,28 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_RECT_ACTION ):
{
MetaRectAction* pAct = (MetaRectAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ROUNDRECT_ACTION ):
{
MetaRoundRectAction* pAct = (MetaRoundRectAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ELLIPSE_ACTION ):
{
MetaEllipseAction* pAct = (MetaEllipseAction*) pAction;
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_ARC_ACTION ):
{
MetaArcAction* pAct = (MetaArcAction*) pAction;
@@ -1528,7 +1571,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_PIE_ACTION ):
{
MetaPieAction* pAct = (MetaPieAction*) pAction;
@@ -1537,8 +1580,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
- case( META_CHORD_ACTION ):
+
+ case( META_CHORD_ACTION ):
{
MetaChordAction* pAct = (MetaChordAction*) pAction;
// FIXME: this is imprecise
@@ -1546,7 +1589,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( pAct->GetRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYLINE_ACTION ):
{
MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction;
@@ -1554,7 +1597,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYGON_ACTION ):
{
MetaPolygonAction* pAct = (MetaPolygonAction*) pAction;
@@ -1562,7 +1605,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_POLYPOLYGON_ACTION ):
{
MetaPolyPolygonAction* pAct = (MetaPolyPolygonAction*) pAction;
@@ -1570,7 +1613,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXT_ACTION ):
{
MetaTextAction* pAct = (MetaTextAction*) pAction;
@@ -1582,8 +1625,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
- case( META_TEXTARRAY_ACTION ):
+
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pAct = (MetaTextArrayAction*) pAction;
Rectangle aRect;
@@ -1595,10 +1638,10 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_STRETCHTEXT_ACTION ):
{
- MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
+ MetaStretchTextAction* pAct = (MetaStretchTextAction*) pAction;
Rectangle aRect;
// hdu said base = index
aMapVDev.GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen(),
@@ -1608,14 +1651,14 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXTLINE_ACTION ):
{
MetaTextLineAction* pAct = (MetaTextLineAction*) pAction;
// measure a test string to get ascend and descent right
static const sal_Unicode pStr[] = { 0xc4, 0x67, 0 };
String aStr( pStr );
-
+
Rectangle aRect;
aMapVDev.GetTextBoundRect( aRect, aStr, 0, 0, aStr.Len(), 0, NULL );
Point aPt( pAct->GetStartPoint() );
@@ -1624,7 +1667,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPSCALE_ACTION ):
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
@@ -1632,7 +1675,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPSCALEPART_ACTION ):
{
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
@@ -1640,7 +1683,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEXSCALE_ACTION ):
{
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
@@ -1648,7 +1691,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEXSCALEPART_ACTION ):
{
MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
@@ -1656,7 +1699,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
@@ -1664,7 +1707,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_GRADIENTEX_ACTION ):
{
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
@@ -1672,21 +1715,21 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_COMMENT_ACTION ):
{
// nothing to do
};
break;
-
+
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TRANSPARENT_ACTION ):
{
MetaTransparentAction* pAct = (MetaTransparentAction*) pAction;
@@ -1694,11 +1737,11 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
// get the bound rect of the contained metafile
Rectangle aRect( aTransMtf.GetBoundRect( i_rReference ) );
// scale the rect now on the assumption that the correct top left of the metafile
@@ -1712,22 +1755,22 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aRect.Right() = long(double(aRect.Right())*fX);
aRect.Top() = long(double(aRect.Top())*fY);
aRect.Bottom() = long(double(aRect.Bottom())*fY);
-
+
// transform the rect to current VDev state
aRect = aMapVDev.LogicToLogic( aRect, aTransMtf.GetPrefMapMode(), aMapVDev.GetMapMode() );
-
+
ImplActionBounds( aBound, aRect, aClipStack );
}
break;
-
+
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_CLIPREGION_ACTION ):
{
MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction;
@@ -1737,7 +1780,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back() = Rectangle();
}
break;
-
+
case( META_ISECTRECTCLIPREGION_ACTION ):
{
MetaISectRectClipRegionAction* pAct = (MetaISectRectClipRegionAction*) pAction;
@@ -1748,8 +1791,8 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back().Intersection( aRect );
}
break;
-
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+
+ case( META_ISECTREGIONCLIPREGION_ACTION ):
{
MetaISectRegionClipRegionAction* pAct = (MetaISectRegionClipRegionAction*) pAction;
Rectangle aRect( aMapVDev.LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev.GetMapMode(), GetPrefMapMode() ) );
@@ -1759,7 +1802,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
aClipStack.back().Intersection( aRect );
}
break;
-
+
case( META_BMP_ACTION ):
{
MetaBmpAction* pAct = (MetaBmpAction*) pAction;
@@ -1767,7 +1810,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_BMPEX_ACTION ):
{
MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
@@ -1775,7 +1818,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASK_ACTION ):
{
MetaMaskAction* pAct = (MetaMaskAction*) pAction;
@@ -1783,7 +1826,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASKSCALE_ACTION ):
{
MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
@@ -1791,7 +1834,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MASKSCALEPART_ACTION ):
{
MetaMaskScalePartAction* pAct = (MetaMaskScalePartAction*) pAction;
@@ -1799,7 +1842,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_WALLPAPER_ACTION ):
{
MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
@@ -1807,7 +1850,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_TEXTRECT_ACTION ):
{
MetaTextRectAction* pAct = (MetaTextRectAction*) pAction;
@@ -1815,7 +1858,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
ImplActionBounds( aBound, aMapVDev.LogicToLogic( aRect, aMapVDev.GetMapMode(), GetPrefMapMode() ), aClipStack );
}
break;
-
+
case( META_MOVECLIPREGION_ACTION ):
{
MetaMoveClipRegionAction* pAct = (MetaMoveClipRegionAction*) pAction;
@@ -1827,11 +1870,11 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
}
}
break;
-
+
default:
{
pAction->Execute( &aMapVDev );
-
+
if( nActionType == META_PUSH_ACTION )
{
MetaPushAction* pAct = (MetaPushAction*) pAction;
@@ -1866,9 +1909,9 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference )
Color GDIMetaFile::ImplColAdjustFnc( const Color& rColor, const void* pColParam )
{
- return Color( rColor.GetTransparency(),
- ( (const ImplColAdjustParam*) pColParam )->pMapR[ rColor.GetRed() ],
- ( (const ImplColAdjustParam*) pColParam )->pMapG[ rColor.GetGreen() ],
+ return Color( rColor.GetTransparency(),
+ ( (const ImplColAdjustParam*) pColParam )->pMapR[ rColor.GetRed() ],
+ ( (const ImplColAdjustParam*) pColParam )->pMapG[ rColor.GetGreen() ],
( (const ImplColAdjustParam*) pColParam )->pMapB[ rColor.GetBlue() ] );
}
@@ -1877,11 +1920,11 @@ Color GDIMetaFile::ImplColAdjustFnc( const Color& rColor, const void* pColParam
BitmapEx GDIMetaFile::ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmpParam )
{
- const ImplBmpAdjustParam* p = (const ImplBmpAdjustParam*) pBmpParam;
- BitmapEx aRet( rBmpEx );
+ const ImplBmpAdjustParam* p = (const ImplBmpAdjustParam*) pBmpParam;
+ BitmapEx aRet( rBmpEx );
aRet.Adjust( p->nLuminancePercent, p->nContrastPercent,
- p->nChannelRPercent, p->nChannelGPercent, p->nChannelBPercent,
+ p->nChannelRPercent, p->nChannelGPercent, p->nChannelBPercent,
p->fGamma, p->bInvert );
return aRet;
@@ -1945,17 +1988,17 @@ Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam
const ULONG nR = rColor.GetRed(), nG = rColor.GetGreen(), nB = rColor.GetBlue();
for( ULONG i = 0; i < ( (const ImplColReplaceParam*) pColParam )->nCount; i++ )
- {
- if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
+ {
+ if( ( ( (const ImplColReplaceParam*) pColParam )->pMinR[ i ] <= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxR[ i ] >= nR ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMinG[ i ] <= nG ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxG[ i ] >= nG ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMinB[ i ] <= nB ) &&
( ( (const ImplColReplaceParam*) pColParam )->pMaxB[ i ] >= nB ) )
- {
+ {
return( ( (const ImplColReplaceParam*) pColParam )->pDstCols[ i ] );
- }
- }
+ }
+ }
return rColor;
}
@@ -1964,8 +2007,8 @@ Color GDIMetaFile::ImplColReplaceFnc( const Color& rColor, const void* pColParam
BitmapEx GDIMetaFile::ImplBmpReplaceFnc( const BitmapEx& rBmpEx, const void* pBmpParam )
{
- const ImplBmpReplaceParam* p = (const ImplBmpReplaceParam*) pBmpParam;
- BitmapEx aRet( rBmpEx );
+ const ImplBmpReplaceParam* p = (const ImplBmpReplaceParam*) pBmpParam;
+ BitmapEx aRet( rBmpEx );
aRet.Replace( p->pSrcCols, p->pDstCols, p->nCount, p->pTols );
@@ -1974,7 +2017,7 @@ BitmapEx GDIMetaFile::ImplBmpReplaceFnc( const BitmapEx& rBmpEx, const void* pBm
// ------------------------------------------------------------------------
-void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
+void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pColParam,
BmpExchangeFnc pFncBmp, const void* pBmpParam )
{
GDIMetaFile aMtf;
@@ -2070,7 +2113,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_FONT_ACTION ):
{
MetaFontAction* pAct = (MetaFontAction*) pAction;
- Font aFont( pAct->GetFont() );
+ Font aFont( pAct->GetFont() );
aFont.SetColor( pFncCol( aFont.GetColor(), pColParam ) );
aFont.SetFillColor( pFncCol( aFont.GetFillColor(), pColParam ) );
@@ -2080,9 +2123,9 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_WALLPAPER_ACTION ):
{
- MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
- Wallpaper aWall( pAct->GetWallpaper() );
- const Rectangle& rRect = pAct->GetRect();
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ Wallpaper aWall( pAct->GetWallpaper() );
+ const Rectangle& rRect = pAct->GetRect();
aWall.SetColor( pFncCol( aWall.GetColor(), pColParam ) );
@@ -2113,8 +2156,8 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_BMPSCALE_ACTION ):
{
MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
- aMtf.Insert( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
+ aMtf.Insert( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
+ pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
LIST_APPEND );
}
break;
@@ -2124,7 +2167,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
aMtf.Insert( new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
pAct->GetSrcPoint(), pAct->GetSrcSize(),
- pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
+ pFncBmp( pAct->GetBitmap(), pBmpParam ).GetBitmap() ),
LIST_APPEND );
}
break;
@@ -2132,7 +2175,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_BMPEXSCALE_ACTION ):
{
MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
- aMtf.Insert( new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(),
+ aMtf.Insert( new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(),
pFncBmp( pAct->GetBitmapEx(), pBmpParam ) ),
LIST_APPEND );
}
@@ -2172,7 +2215,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_GRADIENT_ACTION ):
{
MetaGradientAction* pAct = (MetaGradientAction*) pAction;
- Gradient aGradient( pAct->GetGradient() );
+ Gradient aGradient( pAct->GetGradient() );
aGradient.SetStartColor( pFncCol( aGradient.GetStartColor(), pColParam ) );
aGradient.SetEndColor( pFncCol( aGradient.GetEndColor(), pColParam ) );
@@ -2183,7 +2226,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_GRADIENTEX_ACTION ):
{
MetaGradientExAction* pAct = (MetaGradientExAction*) pAction;
- Gradient aGradient( pAct->GetGradient() );
+ Gradient aGradient( pAct->GetGradient() );
aGradient.SetStartColor( pFncCol( aGradient.GetStartColor(), pColParam ) );
aGradient.SetEndColor( pFncCol( aGradient.GetEndColor(), pColParam ) );
@@ -2193,8 +2236,8 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_HATCH_ACTION ):
{
- MetaHatchAction* pAct = (MetaHatchAction*) pAction;
- Hatch aHatch( pAct->GetHatch() );
+ MetaHatchAction* pAct = (MetaHatchAction*) pAction;
+ Hatch aHatch( pAct->GetHatch() );
aHatch.SetColor( pFncCol( aHatch.GetColor(), pColParam ) );
aMtf.Insert( new MetaHatchAction( pAct->GetPolyPolygon(), aHatch ), LIST_APPEND );
@@ -2204,24 +2247,24 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
case( META_FLOATTRANSPARENT_ACTION ):
{
MetaFloatTransparentAction* pAct = (MetaFloatTransparentAction*) pAction;
- GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
+ GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
aTransMtf.ImplExchangeColors( pFncCol, pColParam, pFncBmp, pBmpParam );
- aMtf.Insert( new MetaFloatTransparentAction( aTransMtf,
+ aMtf.Insert( new MetaFloatTransparentAction( aTransMtf,
pAct->GetPoint(), pAct->GetSize(),
- pAct->GetGradient() ),
+ pAct->GetGradient() ),
LIST_APPEND );
}
break;
case( META_EPS_ACTION ):
{
- MetaEPSAction* pAct = (MetaEPSAction*) pAction;
- GDIMetaFile aSubst( pAct->GetSubstitute() );
+ MetaEPSAction* pAct = (MetaEPSAction*) pAction;
+ GDIMetaFile aSubst( pAct->GetSubstitute() );
aSubst.ImplExchangeColors( pFncCol, pColParam, pFncBmp, pBmpParam );
- aMtf.Insert( new MetaEPSAction( pAct->GetPoint(), pAct->GetSize(),
- pAct->GetLink(), aSubst ),
+ aMtf.Insert( new MetaEPSAction( pAct->GetPoint(), pAct->GetSize(),
+ pAct->GetLink(), aSubst ),
LIST_APPEND );
}
break;
@@ -2249,9 +2292,9 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
nChannelRPercent || nChannelGPercent || nChannelBPercent ||
( fGamma != 1.0 ) || bInvert )
{
- double fM, fROff, fGOff, fBOff, fOff;
- ImplColAdjustParam aColParam;
- ImplBmpAdjustParam aBmpParam;
+ double fM, fROff, fGOff, fBOff, fOff;
+ ImplColAdjustParam aColParam;
+ ImplBmpAdjustParam aBmpParam;
aColParam.pMapR = new BYTE[ 256 ];
aColParam.pMapG = new BYTE[ 256 ];
@@ -2266,7 +2309,7 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// total offset = luminance offset + contrast offset
fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
- // channel offset = channel offset + total offset
+ // channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
fGOff = nChannelGPercent * 2.55 + fOff;
fBOff = nChannelBPercent * 2.55 + fOff;
@@ -2321,8 +2364,8 @@ void GDIMetaFile::Convert( MtfConversion eConversion )
// nothing to do? => return quickly
if( eConversion != MTF_CONVERSION_NONE )
{
- ImplColConvertParam aColParam;
- ImplBmpConvertParam aBmpParam;
+ ImplColConvertParam aColParam;
+ ImplBmpConvertParam aBmpParam;
aColParam.eConversion = eConversion;
aBmpParam.eConversion = ( MTF_CONVERSION_1BIT_THRESHOLD == eConversion ) ? BMP_CONVERSION_1BIT_THRESHOLD : BMP_CONVERSION_8BIT_GREYS;
@@ -2354,8 +2397,8 @@ void GDIMetaFile::ReplaceColors( const Color* pSearchColors, const Color* pRepla
for( ULONG i = 0; i < nColorCount; i++ )
{
- const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
- long nVal;
+ const long nTol = pTols ? ( pTols[ i ] * 255 ) / 100 : 0;
+ long nVal;
nVal = pSearchColors[ i ].GetRed();
aColParam.pMinR[ i ] = (ULONG) Max( nVal - nTol, 0L );
@@ -2394,8 +2437,8 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
{
GDIMetaFile aRet( *this );
- ImplColMonoParam aColParam;
- ImplBmpMonoParam aBmpParam;
+ ImplColMonoParam aColParam;
+ ImplBmpMonoParam aBmpParam;
aColParam.aColor = rColor;
aBmpParam.aColor = rColor;
@@ -2409,12 +2452,12 @@ GDIMetaFile GDIMetaFile::GetMonochromeMtf( const Color& rColor ) const
ULONG GDIMetaFile::GetChecksum() const
{
- GDIMetaFile aMtf;
- SvMemoryStream aMemStm( 65535, 65535 );
- ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
- SVBT16 aBT16;
- SVBT32 aBT32;
- ULONG nCrc = 0;
+ GDIMetaFile aMtf;
+ SvMemoryStream aMemStm( 65535, 65535 );
+ ImplMetaWriteData aWriteData; aWriteData.meActualCharSet = aMemStm.GetStreamCharSet();
+ SVBT16 aBT16;
+ SVBT32 aBT32;
+ ULONG nCrc = 0;
for( ULONG i = 0, nObjCount = GetActionCount(); i < nObjCount; i++ )
{
@@ -2598,7 +2641,7 @@ ULONG GDIMetaFile::GetChecksum() const
nCrc = rtl_crc32( nCrc, aBT32, 4 );
}
break;
-
+
case( META_MASKSCALE_ACTION ):
{
MetaMaskScaleAction* pAct = (MetaMaskScaleAction*) pAction;
@@ -2704,21 +2747,21 @@ ULONG GDIMetaFile::GetSizeBytes() const
case( META_BMP_ACTION ): nSizeBytes += ( (MetaBmpAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_BMPSCALE_ACTION ): nSizeBytes += ( (MetaBmpScaleAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_BMPSCALEPART_ACTION ): nSizeBytes += ( (MetaBmpScalePartAction*) pAction )->GetBitmap().GetSizeBytes(); break;
-
+
case( META_BMPEX_ACTION ): nSizeBytes += ( (MetaBmpExAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
case( META_BMPEXSCALE_ACTION ): nSizeBytes += ( (MetaBmpExScaleAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
case( META_BMPEXSCALEPART_ACTION ): nSizeBytes += ( (MetaBmpExScalePartAction*) pAction )->GetBitmapEx().GetSizeBytes(); break;
-
+
case( META_MASK_ACTION ): nSizeBytes += ( (MetaMaskAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_MASKSCALE_ACTION ): nSizeBytes += ( (MetaMaskScaleAction*) pAction )->GetBitmap().GetSizeBytes(); break;
case( META_MASKSCALEPART_ACTION ): nSizeBytes += ( (MetaMaskScalePartAction*) pAction )->GetBitmap().GetSizeBytes(); break;
-
+
case( META_POLYLINE_ACTION ): nSizeBytes += ( ( (MetaPolyLineAction*) pAction )->GetPolygon().GetSize() * sizeof( Point ) ); break;
case( META_POLYGON_ACTION ): nSizeBytes += ( ( (MetaPolygonAction*) pAction )->GetPolygon().GetSize() * sizeof( Point ) ); break;
case( META_POLYPOLYGON_ACTION ):
{
const PolyPolygon& rPolyPoly = ( (MetaPolyPolygonAction*) pAction )->GetPolyPolygon();
-
+
for( USHORT n = 0; n < rPolyPoly.Count(); ++n )
nSizeBytes += ( rPolyPoly[ n ].GetSize() * sizeof( Point ) );
}
@@ -2727,22 +2770,22 @@ ULONG GDIMetaFile::GetSizeBytes() const
case( META_TEXT_ACTION ): nSizeBytes += ( ( (MetaTextAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
case( META_STRETCHTEXT_ACTION ): nSizeBytes += ( ( (MetaStretchTextAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
case( META_TEXTRECT_ACTION ): nSizeBytes += ( ( (MetaTextRectAction*) pAction )->GetText().Len() * sizeof( sal_Unicode ) ); break;
- case( META_TEXTARRAY_ACTION ):
+ case( META_TEXTARRAY_ACTION ):
{
MetaTextArrayAction* pTextArrayAction = (MetaTextArrayAction*) pAction;
-
+
nSizeBytes += ( pTextArrayAction->GetText().Len() * sizeof( sal_Unicode ) );
-
+
if( pTextArrayAction->GetDXArray() )
nSizeBytes += ( pTextArrayAction->GetLen() << 2 );
}
break;
-
+
default:
break;
}
}
-
+
return( nSizeBytes );
}
@@ -2752,9 +2795,9 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
{
if( !rIStm.GetError() )
{
- char aId[ 7 ];
- ULONG nStmPos = rIStm.Tell();
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ char aId[ 7 ];
+ ULONG nStmPos = rIStm.Tell();
+ USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -2765,10 +2808,10 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if ( !strcmp( aId, "VCLMTF" ) )
{
// new format
- VersionCompat* pCompat;
- MetaAction* pAction;
- UINT32 nStmCompressMode = 0;
- UINT32 nCount = 0;
+ VersionCompat* pCompat;
+ MetaAction* pAction;
+ UINT32 nStmCompressMode = 0;
+ UINT32 nCount = 0;
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -2839,9 +2882,9 @@ SvStream& GDIMetaFile::Read( SvStream& rIStm )
SvStream& GDIMetaFile::Write( SvStream& rOStm )
{
- VersionCompat* pCompat;
- const UINT32 nStmCompressMode = rOStm.GetCompressMode();
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ VersionCompat* pCompat;
+ const UINT32 nStmCompressMode = rOStm.GetCompressMode();
+ USHORT nOldFormat = rOStm.GetNumberFormatInt();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rOStm.Write( "VCLMTF", 6 );
@@ -2873,21 +2916,21 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm )
// ------------------------------------------------------------------------
BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
- BitmapEx& rBmpEx,
+ BitmapEx& rBmpEx,
const BitmapEx* pOverlay,
const Rectangle* pOverlayRect ) const
{
// the implementation is provided by KA
// initialization seems to be complicated but is used to avoid rounding errors
- VirtualDevice aVDev;
+ VirtualDevice aVDev;
const Point aNullPt;
const Point aTLPix( aVDev.LogicToPixel( aNullPt, GetPrefMapMode() ) );
const Point aBRPix( aVDev.LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) );
Size aDrawSize( aVDev.LogicToPixel( GetPrefSize(), GetPrefMapMode() ) );
- Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
- Point aPosPix;
-
+ Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
+ Point aPosPix;
+
if ( !rBmpEx.IsEmpty() )
rBmpEx.SetEmpty();
@@ -2912,23 +2955,23 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aSizePix.Width() = nMaximumExtent;
aSizePix.Height() = FRound( nMaximumExtent / fWH );
}
-
+
aDrawSize.Width() = FRound( ( static_cast< double >( aDrawSize.Width() ) * aSizePix.Width() ) / aOldSizePix.Width() );
aDrawSize.Height() = FRound( ( static_cast< double >( aDrawSize.Height() ) * aSizePix.Height() ) / aOldSizePix.Height() );
}
-
- Size aFullSize;
- Point aBackPosPix;
- Rectangle aOverlayRect;
+
+ Size aFullSize;
+ Point aBackPosPix;
+ Rectangle aOverlayRect;
// calculate addigtional positions and sizes if an overlay image is used
if ( pOverlay )
{
aFullSize = Size( nMaximumExtent, nMaximumExtent );
aOverlayRect = Rectangle( aNullPt, aFullSize );
-
+
aOverlayRect.Intersection( pOverlayRect ? *pOverlayRect : Rectangle( aNullPt, pOverlay->GetSizePixel() ) );
-
+
if ( !aOverlayRect.IsEmpty() )
aBackPosPix = Point( ( nMaximumExtent - aSizePix.Width() ) >> 1, ( nMaximumExtent - aSizePix.Height() ) >> 1 );
else
@@ -2939,36 +2982,36 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aFullSize = aSizePix;
pOverlay = NULL;
}
-
+
// draw image(s) into VDev and get resulting image
if ( aVDev.SetOutputSizePixel( aFullSize ) )
{
// draw metafile into VDev
const_cast<GDIMetaFile *>(this)->WindStart();
const_cast<GDIMetaFile *>(this)->Play( &aVDev, aBackPosPix, aDrawSize );
-
+
// draw overlay if neccessary
if ( pOverlay )
aVDev.DrawBitmapEx( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), *pOverlay );
-
+
// get paint bitmap
Bitmap aBmp( aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() ) );
-
+
// assure that we have a true color image
if ( aBmp.GetBitCount() != 24 )
aBmp.Convert( BMP_CONVERSION_24BIT );
-
+
// create resulting mask bitmap with metafile output set to black
GDIMetaFile aMonchromeMtf( GetMonochromeMtf( COL_BLACK ) );
aVDev.DrawWallpaper( Rectangle( aNullPt, aSizePix ), Wallpaper( Color( COL_WHITE ) ) );
aMonchromeMtf.WindStart();
aMonchromeMtf.Play( &aVDev, aBackPosPix, aDrawSize );
-
+
// watch for overlay mask
if ( pOverlay )
{
Bitmap aOverlayMergeBmp( aVDev.GetBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize() ) );
-
+
// create ANDed resulting mask at overlay area
if ( pOverlay->IsTransparent() )
aVDev.DrawBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), pOverlay->GetMask() );
@@ -2977,14 +3020,14 @@ BOOL GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent,
aVDev.SetLineColor( COL_BLACK );
aVDev.SetFillColor( COL_BLACK );
aVDev.DrawRect( aOverlayRect);
- }
-
+ }
+
aOverlayMergeBmp.CombineSimple( aVDev.GetBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize() ), BMP_COMBINE_AND );
aVDev.DrawBitmap( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), aOverlayMergeBmp );
}
-
+
rBmpEx = BitmapEx( aBmp, aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() ) );
}
-
+
return !rBmpEx.IsEmpty();
}
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 60ad94a63273..5562e4424b0f 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,11 +45,11 @@
// -----------
GfxLink::GfxLink() :
- meType ( GFX_LINK_TYPE_NONE ),
- mpBuf ( NULL ),
- mpSwap ( NULL ),
- mnBufSize ( 0 ),
- mnUserId ( 0UL ),
+ meType ( GFX_LINK_TYPE_NONE ),
+ mpBuf ( NULL ),
+ mpSwap ( NULL ),
+ mnBufSize ( 0 ),
+ mnUserId ( 0UL ),
mpImpData ( new ImpGfxLink )
{
}
@@ -82,7 +82,7 @@ GfxLink::GfxLink( BYTE* pBuf, sal_uInt32 nSize, GfxLinkType nType, BOOL bOwns )
mpBuf = new ImpBuffer( nSize );
memcpy( mpBuf->mpBuffer, pBuf, nSize );
}
- else
+ else
mpBuf = NULL;
}
@@ -131,7 +131,7 @@ sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
sal_uInt32 nDestSize = rGfxLink.GetDataSize();
if ( pSource && pDest && ( nSourceSize == nDestSize ) )
{
- bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
+ bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
}
else if ( ( pSource == 0 ) && ( pDest == 0 ) )
bIsEqual = sal_True;
@@ -190,7 +190,7 @@ const BYTE* GfxLink::GetData() const
// ------------------------------------------------------------------------
-const Size& GfxLink::GetPrefSize() const
+const Size& GfxLink::GetPrefSize() const
{
return mpImpData->maPrefSize;
}
@@ -244,8 +244,8 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
if( pData )
{
- SvMemoryStream aMemStm;
- ULONG nCvtType;
+ SvMemoryStream aMemStm;
+ ULONG nCvtType;
aMemStm.SetBuffer( (char*) pData, mnBufSize, FALSE, mnBufSize );
@@ -258,7 +258,7 @@ BOOL GfxLink::LoadNative( Graphic& rGraphic )
case( GFX_LINK_TYPE_NATIVE_WMF ): nCvtType = CVT_WMF; break;
case( GFX_LINK_TYPE_NATIVE_MET ): nCvtType = CVT_MET; break;
case( GFX_LINK_TYPE_NATIVE_PCT ): nCvtType = CVT_PCT; break;
-
+
default: nCvtType = CVT_UNKNOWN; break;
}
@@ -300,7 +300,7 @@ void GfxLink::SwapIn()
if( IsSwappedOut() )
{
mpBuf = new ImpBuffer( mpSwap->GetData() );
-
+
if( !( --mpSwap->mnRefCount ) )
delete mpSwap;
@@ -328,15 +328,15 @@ BOOL GfxLink::ExportNative( SvStream& rOStream ) const
SvStream& operator<<( SvStream& rOStream, const GfxLink& rGfxLink )
{
VersionCompat* pCompat = new VersionCompat( rOStream, STREAM_WRITE, 2 );
-
+
// Version 1
rOStream << (UINT16) rGfxLink.GetType() << rGfxLink.GetDataSize() << rGfxLink.GetUserId();
-
+
// Version 2
- rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
-
+ rOStream << rGfxLink.GetPrefSize() << rGfxLink.GetPrefMapMode();
+
delete pCompat;
-
+
if( rGfxLink.GetDataSize() )
{
if( rGfxLink.IsSwappedOut() )
@@ -354,12 +354,12 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
{
Size aSize;
MapMode aMapMode;
- sal_uInt32 nSize;
- sal_uInt32 nUserId;
- UINT16 nType;
- BYTE* pBuf;
- bool bMapAndSizeValid( false );
- VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
+ sal_uInt32 nSize;
+ sal_uInt32 nUserId;
+ UINT16 nType;
+ BYTE* pBuf;
+ bool bMapAndSizeValid( false );
+ VersionCompat* pCompat = new VersionCompat( rIStream, STREAM_READ );
// Version 1
rIStream >> nType >> nSize >> nUserId;
@@ -369,12 +369,12 @@ SvStream& operator>>( SvStream& rIStream, GfxLink& rGfxLink)
rIStream >> aSize >> aMapMode;
bMapAndSizeValid = true;
}
-
+
delete pCompat;
pBuf = new BYTE[ nSize ];
rIStream.Read( pBuf, nSize );
-
+
rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, TRUE );
rGfxLink.SetUserId( nUserId );
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 9856e2213d85..185625e3ceff 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -290,8 +290,8 @@ BOOL Gradient::operator==( const Gradient& rGradient ) const
SvStream& operator>>( SvStream& rIStm, Impl_Gradient& rImpl_Gradient )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImpl_Gradient.meStyle = (GradientStyle) nTmp16;
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 790c3d43bb85..770a3d521f22 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -260,9 +260,9 @@ Graphic::Graphic( const GDIMetaFile& rMtf )
Graphic::Graphic( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic )
{
- uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
- uno::Reference< lang::XTypeProvider > xProv( rxGraphic, uno::UNO_QUERY );
- const ::Graphic* pGraphic = ( ( xTunnel.is() && xProv.is() ) ?
+ uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
+ uno::Reference< lang::XTypeProvider > xProv( rxGraphic, uno::UNO_QUERY );
+ const ::Graphic* pGraphic = ( ( xTunnel.is() && xProv.is() ) ?
reinterpret_cast< ::Graphic* >( xTunnel->getSomething( xProv->getImplementationId() ) ) :
NULL );
@@ -471,8 +471,8 @@ uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const
if( xProv.is() )
{
- uno::Sequence< beans::PropertyValue > aLoadProps( 1 );
- ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "private:memorygraphic/" ) );
+ uno::Sequence< beans::PropertyValue > aLoadProps( 1 );
+ ::rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM( "private:memorygraphic/" ) );
aLoadProps[ 0 ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aLoadProps[ 0 ].Value <<= ( aURL += ::rtl::OUString::valueOf( reinterpret_cast< sal_Int64 >( this ) ) );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 83c0cd628cdb..00e29b3281f4 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@ static ::rtl::OString polyToString( const Polygon& rPoly )
aStr += ",";
aStr += ::rtl::OString::valueOf( static_cast< double >( rPoly[nVertex].getY() ) );
aStr += ") ";
- }
+ }
return aStr;
}
@@ -118,7 +118,7 @@ SvtGraphicFill::Transform::Transform()
{
matrix[0] = 1.0; matrix[1] = 0.0; matrix[2] = 0.0;
matrix[3] = 0.0; matrix[4] = 1.0; matrix[5] = 0.0;
-}
+}
////////////////////////////////////////////////////////////////////////////
@@ -132,18 +132,18 @@ SvtGraphicStroke::SvtGraphicStroke() :
maJoinType(),
mfMiterLimit( 3.0 ),
maDashArray()
-{
-}
-
-SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
- const PolyPolygon& rStartArrow,
- const PolyPolygon& rEndArrow,
- double fTransparency,
- double fStrokeWidth,
- CapType aCap,
- JoinType aJoin,
- double fMiterLimit,
- const DashArray& rDashArray ) :
+{
+}
+
+SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
+ const PolyPolygon& rStartArrow,
+ const PolyPolygon& rEndArrow,
+ double fTransparency,
+ double fStrokeWidth,
+ CapType aCap,
+ JoinType aJoin,
+ double fMiterLimit,
+ const DashArray& rDashArray ) :
maPath( rPath ),
maStartArrow( rStartArrow ),
maEndArrow( rEndArrow ),
@@ -207,7 +207,7 @@ void SvtGraphicStroke::getDashArray( DashArray& rDashArray ) const
aStr += polyToString( maPath );
aStr += "trans: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
+ aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
aStr += " width: ";
aStr += ::rtl::OString::valueOf( static_cast< double >(getStrokeWidth()) );
aStr += " cap: ";
@@ -321,7 +321,7 @@ void SvtGraphicStroke::setDashArray( const DashArray& rDashArray )
SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
-
+
rClass.maPath.Write( rOStm );
rClass.maStartArrow.Write( rOStm );
rClass.maEndArrow.Write( rOStm );
@@ -344,7 +344,7 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicStroke& rClass )
SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
{
VersionCompat aCompat( rIStm, STREAM_READ );
-
+
rClass.maPath.Read( rIStm );
rClass.maStartArrow.Read( rIStm );
rClass.maEndArrow.Read( rIStm );
@@ -363,7 +363,7 @@ SvStream& operator>>( SvStream& rIStm, SvtGraphicStroke& rClass )
size_t i;
for(i=0; i<rClass.maDashArray.size(); ++i)
rIStm >> rClass.maDashArray[i];
-
+
return rIStm;
}
@@ -387,20 +387,20 @@ SvtGraphicFill::SvtGraphicFill() :
{
}
-SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath,
- Color aFillColor,
- double fTransparency,
- FillRule aFillRule,
- FillType aFillType,
- const Transform& aFillTransform,
- bool bTiling,
- HatchType aHatchType,
- Color aHatchColor,
- GradientType aGradientType,
- Color aGradient1stColor,
- Color aGradient2ndColor,
- int aGradientStepCount,
- const Graphic& aFillGraphic ) :
+SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath,
+ Color aFillColor,
+ double fTransparency,
+ FillRule aFillRule,
+ FillType aFillType,
+ const Transform& aFillTransform,
+ bool bTiling,
+ HatchType aHatchType,
+ Color aHatchColor,
+ GradientType aGradientType,
+ Color aGradient1stColor,
+ Color aGradient2ndColor,
+ int aGradientStepCount,
+ const Graphic& aFillGraphic ) :
maPath( rPath ),
maFillColor( aFillColor ),
mfTransparency( fTransparency ),
@@ -501,7 +501,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
aStr += "fill";
aStr += colorToString( getFillColor() );
aStr += " trans: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
+ aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
aStr += " rule: ";
switch( getFillRule() )
{
@@ -544,7 +544,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
aStr += " transform: [ ";
int i;
for(i=0; i<Transform::MatrixSize; ++i)
- aStr += ::rtl::OString::valueOf( maFillTransform.matrix[i] );
+ aStr += ::rtl::OString::valueOf( maFillTransform.matrix[i] );
aStr += " ] ";
aStr += " hatch: ";
@@ -605,15 +605,15 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
switch( maFillGraphic.GetType() )
{
case GRAPHIC_BITMAP:
- aStr += "bitmap";
+ aStr += "bitmap";
break;
case GRAPHIC_GDIMETAFILE:
- aStr += "metafile";
+ aStr += "metafile";
break;
case GRAPHIC_DEFAULT:
- aStr += "default";
+ aStr += "default";
break;
default:
@@ -622,7 +622,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
}
aStr += " of ";
- aStr += ::rtl::OString::valueOf( static_cast< sal_Int32 >(maFillGraphic.GetSizeBytes()) );
+ aStr += ::rtl::OString::valueOf( static_cast< sal_Int32 >(maFillGraphic.GetSizeBytes()) );
aStr += " bytes";
}
@@ -702,7 +702,7 @@ void SvtGraphicFill::setGraphic( const Graphic& rGraphic )
SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
-
+
rClass.maPath.Write( rOStm );
rOStm << rClass.maFillColor;
rOStm << rClass.mfTransparency;
@@ -731,7 +731,7 @@ SvStream& operator<<( SvStream& rOStm, const SvtGraphicFill& rClass )
SvStream& operator>>( SvStream& rIStm, SvtGraphicFill& rClass )
{
VersionCompat aCompat( rIStm, STREAM_READ );
-
+
rClass.maPath.Read( rIStm );
rIStm >> rClass.maFillColor;
rIStm >> rClass.mfTransparency;
diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx
index 3a8b51bf3022..5da6ea57135d 100644
--- a/vcl/source/gdi/hatch.cxx
+++ b/vcl/source/gdi/hatch.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,22 +41,22 @@ DBG_NAME( Hatch )
// --------------
ImplHatch::ImplHatch() :
- mnRefCount ( 1 ),
- maColor ( COL_BLACK ),
- meStyle ( HATCH_SINGLE ),
- mnDistance ( 1 ),
- mnAngle ( 0 )
+ mnRefCount ( 1 ),
+ maColor ( COL_BLACK ),
+ meStyle ( HATCH_SINGLE ),
+ mnDistance ( 1 ),
+ mnAngle ( 0 )
{
}
// -----------------------------------------------------------------------
ImplHatch::ImplHatch( const ImplHatch& rImplHatch ) :
- mnRefCount ( 1 ),
- maColor ( rImplHatch.maColor ),
- meStyle ( rImplHatch.meStyle ),
- mnDistance ( rImplHatch.mnDistance ),
- mnAngle ( rImplHatch.mnAngle )
+ mnRefCount ( 1 ),
+ maColor ( rImplHatch.maColor ),
+ meStyle ( rImplHatch.meStyle ),
+ mnDistance ( rImplHatch.mnDistance ),
+ mnAngle ( rImplHatch.mnAngle )
{
}
@@ -113,7 +113,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch )
if( !( --mpImplHatch->mnRefCount ) )
delete mpImplHatch;
-
+
mpImplHatch = rHatch.mpImplHatch;
return *this;
}
@@ -185,8 +185,8 @@ void Hatch::SetAngle( USHORT nAngle10 )
SvStream& operator>>( SvStream& rIStm, ImplHatch& rImplHatch )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplHatch.meStyle = (HatchStyle) nTmp16;
rIStm >> rImplHatch.maColor >> rImplHatch.mnDistance >> rImplHatch.mnAngle;
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index e79308b2664e..0893718669fe 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -27,9 +27,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
-
+#include <boost/scoped_ptr.hpp>
+#include <boost/scoped_array.hpp>
+
#include <rtl/logfile.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
@@ -85,8 +85,8 @@ Image::Image( const ResId& rResId ) :
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- BitmapEx aBmpEx;
- ULONG nObjMask = pResMgr->ReadLong();
+ BitmapEx aBmpEx;
+ ULONG nObjMask = pResMgr->ReadLong();
if( nObjMask & RSC_IMAGE_IMAGEBITMAP )
{
@@ -159,7 +159,7 @@ Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
DBG_CTOR( Image, NULL );
const BitmapEx aBmpEx( rBitmap, rMaskBitmap );
-
+
ImplInit( aBmpEx );
}
@@ -171,7 +171,7 @@ Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
DBG_CTOR( Image, NULL );
const BitmapEx aBmpEx( rBitmap, rColor );
-
+
ImplInit( aBmpEx );
}
@@ -181,7 +181,7 @@ Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
mpImplData( NULL )
{
DBG_CTOR( Image, NULL );
-
+
const Graphic aGraphic( rxGraphic );
ImplInit( aGraphic.GetBitmapEx() );
}
@@ -223,7 +223,7 @@ void Image::ImplInit( const BitmapEx& rBmpEx )
Size Image::GetSizePixel() const
{
DBG_CHKTHIS( Image, NULL );
-
+
Size aRet;
if( mpImplData )
@@ -248,7 +248,7 @@ Size Image::GetSizePixel() const
BitmapEx Image::GetBitmapEx() const
{
DBG_CHKTHIS( Image, NULL );
-
+
BitmapEx aRet;
if( mpImplData )
@@ -273,7 +273,7 @@ BitmapEx Image::GetBitmapEx() const
uno::Reference< graphic::XGraphic > Image::GetXGraphic() const
{
const Graphic aGraphic( GetBitmapEx() );
-
+
return aGraphic.GetXGraphic();
}
@@ -299,7 +299,7 @@ Image Image::GetColorTransformedImage( ImageColorTransform eColorTransform ) con
if( nColorCount && pSrcColors && pDstColors )
{
- aBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
+ aBmpEx.Replace( pSrcColors, pDstColors, nColorCount );
aRet = Image( aBmpEx );
}
@@ -373,7 +373,7 @@ Image& Image::operator=( const Image& rImage )
if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
delete mpImplData;
-
+
mpImplData = rImage.mpImplData;
return *this;
@@ -385,7 +385,7 @@ BOOL Image::operator==( const Image& rImage ) const
{
DBG_CHKTHIS( Image, NULL );
DBG_CHKOBJ( &rImage, Image, NULL );
-
+
bool bRet = false;
if( rImage.mpImplData == mpImplData )
@@ -405,7 +405,7 @@ BOOL Image::operator==( const Image& rImage ) const
case IMAGETYPE_IMAGE:
bRet = static_cast< ImplImageData* >( rImage.mpImplData->mpData )->IsEqual( *static_cast< ImplImageData* >( mpImplData->mpData ) );
break;
-
+
default:
bRet = false;
break;
@@ -437,30 +437,30 @@ ImageList::ImageList( const ResId& rResId ) :
RTL_LOGFILE_CONTEXT( aLog, "vcl: ImageList::ImageList( const ResId& rResId )" );
DBG_CTOR( ImageList, NULL );
-
+
rResId.SetRT( RSC_IMAGELIST );
-
+
ResMgr* pResMgr = rResId.GetResMgr();
if( pResMgr && pResMgr->GetResource( rResId ) )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nObjMask = pResMgr->ReadLong();
- const String aPrefix( pResMgr->ReadString() );
+ ULONG nObjMask = pResMgr->ReadLong();
+ const String aPrefix( pResMgr->ReadString() );
::boost::scoped_ptr< Color > spMaskColor;
if( nObjMask & RSC_IMAGE_MASKCOLOR )
spMaskColor.reset( new Color( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) ) );
-
+
pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
-
+
if( nObjMask & RSC_IMAGELIST_IDLIST )
{
for( sal_Int32 i = 0, nCount = pResMgr->ReadLong(); i < nCount; ++i )
pResMgr->ReadLong();
}
-
+
sal_Int32 nCount = pResMgr->ReadLong();
ImplInit( static_cast< USHORT >( nCount ), Size() );
@@ -479,8 +479,8 @@ ImageList::ImageList( const ResId& rResId ) :
// -----------------------------------------------------------------------
-ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
- const ::rtl::OUString& rPrefix,
+ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
+ const ::rtl::OUString& rPrefix,
const Color* ) :
mpImplData( NULL ),
mnInitSize( 1 ),
@@ -495,8 +495,8 @@ ImageList::ImageList( const ::std::vector< ::rtl::OUString >& rNameVector,
mpImplData->maPrefix = rPrefix;
for( sal_uInt32 i = 0; i < rNameVector.size(); ++i )
{
-// fprintf (stderr, "List %p [%d]: '%s'\n",
-// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "List %p [%d]: '%s'\n",
+// this, i, rtl::OUStringToOString( rNameVector[i], RTL_TEXTENCODING_UTF8 ).getStr() );
mpImplData->AddImage( rNameVector[ i ], static_cast< USHORT >( i ) + 1, BitmapEx() );
}
}
@@ -542,8 +542,8 @@ void ImageAryData::Load(const rtl::OUString &rPrefix)
BitmapEx aBmpEx;
-// fprintf (stderr, "Attempt load of '%s'\n",
-// rtl::OUStringToOString( maName, RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "Attempt load of '%s'\n",
+// rtl::OUStringToOString( maName, RTL_TEXTENCODING_UTF8 ).getStr() );
rtl::OUString aFileName = rPrefix;
aFileName += maName;
@@ -621,7 +621,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
{
USHORT nItems = sal::static_int_cast< USHORT >( rNameVector.size() );
-// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
+// fprintf (stderr, "InsertFromHorizontalStrip (1) [%d items]\n", nItems);
if (!nItems)
return;
@@ -644,7 +644,7 @@ void ImageList::InsertFromHorizontalStrip( const BitmapEx &rBitmapEx,
void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
USHORT nCount,
const Color *pMaskColor,
- const Color *pSearchColors,
+ const Color *pSearchColors,
const Color *pReplaceColors,
ULONG nColorCount)
{
@@ -658,7 +658,7 @@ void ImageList::InsertFromHorizontalBitmap( const ResId& rResId,
}
if ( nColorCount && pSearchColors && pReplaceColors )
aBmpEx.Replace( pSearchColors, pReplaceColors, nColorCount );
-
+
std::vector< rtl::OUString > aNames( nCount );
InsertFromHorizontalStrip( aBmpEx, aNames );
}
@@ -727,7 +727,7 @@ void ImageList::ReplaceImage( const ::rtl::OUString& rImageName, const Image& rI
if( nId )
{
RemoveImage( nId );
-
+
if( !mpImplData )
ImplInit( 0, rImage.GetSizePixel() );
mpImplData->AddImage( rImageName, nId, rImage.GetBitmapEx());
@@ -794,7 +794,7 @@ Image ImageList::GetImage( USHORT nId ) const
{
DBG_CHKTHIS( ImageList, NULL );
-// fprintf (stderr, "GetImage %d\n", nId);
+// fprintf (stderr, "GetImage %d\n", nId);
Image aRet;
@@ -821,13 +821,13 @@ Image ImageList::GetImage( USHORT nId ) const
Image ImageList::GetImage( const ::rtl::OUString& rImageName ) const
{
-// fprintf (stderr, "GetImage '%s'\n",
-// rtl::OUStringToOString( rImageName, RTL_TEXTENCODING_UTF8 ).getStr() );
+// fprintf (stderr, "GetImage '%s'\n",
+// rtl::OUStringToOString( rImageName, RTL_TEXTENCODING_UTF8 ).getStr() );
if( mpImplData )
{
ImageAryData *pImg = mpImplData->maNameHash[ rImageName ];
-
+
if( pImg )
{
if( pImg->IsLoadable() )
@@ -835,7 +835,7 @@ Image ImageList::GetImage( const ::rtl::OUString& rImageName ) const
return Image( pImg->maBitmapEx );
}
}
-// fprintf (stderr, "no such image\n");
+// fprintf (stderr, "no such image\n");
return Image();
}
@@ -857,7 +857,7 @@ void ImageList::Clear()
USHORT ImageList::GetImageCount() const
{
DBG_CHKTHIS( ImageList, NULL );
-
+
return mpImplData ? static_cast< USHORT >( mpImplData->maImages.size() ) : 0;
}
@@ -923,7 +923,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
DBG_CHKTHIS( ImageList, NULL );
rIds = ::std::vector< USHORT >();
-
+
if( mpImplData )
{
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
@@ -933,7 +933,7 @@ void ImageList::GetImageIds( ::std::vector< USHORT >& rIds ) const
// -----------------------------------------------------------------------
-::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
+::rtl::OUString ImageList::GetImageName( USHORT nPos ) const
{
DBG_CHKTHIS( ImageList, NULL );
@@ -952,7 +952,7 @@ void ImageList::GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const
DBG_CHKTHIS( ImageList, NULL );
rNames = ::std::vector< ::rtl::OUString >();
-
+
if( mpImplData )
{
for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ )
@@ -969,7 +969,7 @@ void ImageList::GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const
Size ImageList::GetImageSize() const
{
DBG_CHKTHIS( ImageList, NULL );
-
+
Size aRet;
if( mpImplData )
@@ -984,8 +984,8 @@ Size ImageList::GetImageSize() const
aRet = mpImplData->maImageSize = aTmp.GetSizePixel();
}
}
-// fprintf (stderr, "GetImageSize returns %d, %d\n",
-// aRet.Width(), aRet.Height());
+// fprintf (stderr, "GetImageSize returns %d, %d\n",
+// aRet.Width(), aRet.Height());
return aRet;
}
@@ -1014,7 +1014,7 @@ BOOL ImageList::operator==( const ImageList& rImageList ) const
{
DBG_CHKTHIS( ImageList, NULL );
DBG_CHKOBJ( &rImageList, ImageList, NULL );
-
+
bool bRet = false;
if( rImageList.mpImplData == mpImplData )
diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx
index d97999311751..28984c1943af 100644
--- a/vcl/source/gdi/imagerepository.cxx
+++ b/vcl/source/gdi/imagerepository.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 7762087dc605..a19eb46e8761 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,20 +41,20 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz,
ULONG nExtraData,
OutputDevice* pFirstFrameOutDev ) :
- mpParent ( pParent ),
- mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
- mnExtraData ( nExtraData ),
- maPt ( rPt ),
- maSz ( rSz ),
- maSzPix ( mpOut->LogicToPixel( maSz ) ),
- maClip ( mpOut->GetClipRegion() ),
- mpBackground ( new VirtualDevice ),
- mpRestore ( new VirtualDevice ),
- meLastDisposal ( DISPOSE_BACK ),
- mbPause ( FALSE ),
- mbMarked ( FALSE ),
- mbHMirr ( maSz.Width() < 0L ),
- mbVMirr ( maSz.Height() < 0L )
+ mpParent ( pParent ),
+ mpOut ( pFirstFrameOutDev ? pFirstFrameOutDev : pOut ),
+ mnExtraData ( nExtraData ),
+ maPt ( rPt ),
+ maSz ( rSz ),
+ maSzPix ( mpOut->LogicToPixel( maSz ) ),
+ maClip ( mpOut->GetClipRegion() ),
+ mpBackground ( new VirtualDevice ),
+ mpRestore ( new VirtualDevice ),
+ meLastDisposal ( DISPOSE_BACK ),
+ mbPause ( FALSE ),
+ mbMarked ( FALSE ),
+ mbHMirr ( maSz.Width() < 0L ),
+ mbVMirr ( maSz.Height() < 0L )
{
mpParent->ImplIncAnimCount();
@@ -97,7 +97,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
}
else
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
-
+
// initial drawing to actual position
ImplDrawToPos( mpParent->ImplGetCurPos() );
@@ -121,7 +121,7 @@ ImplAnimView::~ImplAnimView()
BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
{
BOOL bRet = FALSE;
-
+
if( nExtraData )
{
if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) )
@@ -138,9 +138,9 @@ BOOL ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const
void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix )
{
const Size& rAnmSize = mpParent->GetDisplaySizePixel();
- Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1L,
+ Point aPt2( rAnm.aPosPix.X() + rAnm.aSizePix.Width() - 1L,
rAnm.aPosPix.Y() + rAnm.aSizePix.Height() - 1L );
- double fFactX, fFactY;
+ double fFactX, fFactY;
// calculate x scaling
if( rAnmSize.Width() > 1L )
@@ -176,8 +176,8 @@ void ImplAnimView::ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix,
void ImplAnimView::ImplDrawToPos( ULONG nPos )
{
- VirtualDevice aVDev;
- Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
+ VirtualDevice aVDev;
+ Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL;
aVDev.SetOutputSizePixel( maSzPix, FALSE );
nPos = Min( nPos, (ULONG) mpParent->Count() - 1UL );
@@ -201,7 +201,7 @@ void ImplAnimView::ImplDrawToPos( ULONG nPos )
void ImplAnimView::ImplDraw( ULONG nPos )
{
- ImplDraw( nPos, NULL );
+ ImplDraw( nPos, NULL );
}
// ------------------------------------------------------------------------
@@ -215,13 +215,13 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
ImplSetMarked( TRUE );
else if( !mbPause )
{
- VirtualDevice* pDev;
- Point aPosPix;
- Point aBmpPosPix;
- Size aSizePix;
- Size aBmpSizePix;
- const ULONG nLastPos = mpParent->Count() - 1;
- const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
+ VirtualDevice* pDev;
+ Point aPosPix;
+ Point aBmpPosPix;
+ Size aSizePix;
+ Size aBmpSizePix;
+ const ULONG nLastPos = mpParent->Count() - 1;
+ const AnimationBitmap& rAnm = mpParent->Get( (USHORT) ( mnActPos = Min( nPos, nLastPos ) ) );
ImplGetPosSize( rAnm, aPosPix, aSizePix );
@@ -307,7 +307,7 @@ void ImplAnimView::ImplDraw( ULONG nPos, VirtualDevice* pVDev )
mpOut->SetClipRegion( *pOldClip );
delete pOldClip;
}
-
+
delete pDev;
if( mpOut->GetOutDevType() == OUTDEV_WINDOW )
@@ -334,7 +334,7 @@ void ImplAnimView::ImplRepaint()
mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
mbPause = FALSE;
- ImplDrawToPos( mnActPos );
+ ImplDrawToPos( mnActPos );
mbPause = bOldPause;
}
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index 69403c0f6928..3e472ecc50e8 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,30 +43,30 @@ class ImplAnimView
{
private:
- Animation* mpParent;
- OutputDevice* mpOut;
- long mnExtraData;
- Point maPt;
- Point maDispPt;
- Point maRestPt;
- Size maSz;
- Size maSzPix;
- Size maDispSz;
- Size maRestSz;
- MapMode maMap;
- Region maClip;
- VirtualDevice* mpBackground;
- VirtualDevice* mpRestore;
- ULONG mnActPos;
- Disposal meLastDisposal;
- BOOL mbPause;
- BOOL mbFirst;
- BOOL mbMarked;
- BOOL mbHMirr;
- BOOL mbVMirr;
+ Animation* mpParent;
+ OutputDevice* mpOut;
+ long mnExtraData;
+ Point maPt;
+ Point maDispPt;
+ Point maRestPt;
+ Size maSz;
+ Size maSzPix;
+ Size maDispSz;
+ Size maRestSz;
+ MapMode maMap;
+ Region maClip;
+ VirtualDevice* mpBackground;
+ VirtualDevice* mpRestore;
+ ULONG mnActPos;
+ Disposal meLastDisposal;
+ BOOL mbPause;
+ BOOL mbFirst;
+ BOOL mbMarked;
+ BOOL mbHMirr;
+ BOOL mbVMirr;
- void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
- void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
+ void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix );
+ void ImplDraw( ULONG nPos, VirtualDevice* pVDev );
public:
@@ -75,22 +75,22 @@ public:
OutputDevice* pFirstFrameOutDev = NULL );
~ImplAnimView();
- BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
- void ImplDrawToPos( ULONG nPos );
- void ImplDraw( ULONG nPos );
- void ImplRepaint();
- AInfo* ImplCreateAInfo() const;
+ BOOL ImplMatches( OutputDevice* pOut, long nExtraData ) const;
+ void ImplDrawToPos( ULONG nPos );
+ void ImplDraw( ULONG nPos );
+ void ImplRepaint();
+ AInfo* ImplCreateAInfo() const;
- const Point& ImplGetOutPos() const { return maPt; }
+ const Point& ImplGetOutPos() const { return maPt; }
- const Size& ImplGetOutSize() const { return maSz; }
- const Size& ImplGetOutSizePix() const { return maSzPix; }
+ const Size& ImplGetOutSize() const { return maSz; }
+ const Size& ImplGetOutSizePix() const { return maSzPix; }
- void ImplPause( BOOL bPause ) { mbPause = bPause; }
- BOOL ImplIsPause() const { return mbPause; }
+ void ImplPause( BOOL bPause ) { mbPause = bPause; }
+ BOOL ImplIsPause() const { return mbPause; }
- void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
- BOOL ImplIsMarked() const { return mbMarked; }
+ void ImplSetMarked( BOOL bMarked ) { mbMarked = bMarked; }
+ BOOL ImplIsMarked() const { return mbMarked; }
};
#endif
diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx
index 3e328b7db7a4..94d3e8af09ed 100644
--- a/vcl/source/gdi/impbmp.cxx
+++ b/vcl/source/gdi/impbmp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,12 +39,12 @@
#include <vcl/salinst.hxx>
// --------------
-// - ImpBitmap -
+// - ImpBitmap -
// --------------
ImpBitmap::ImpBitmap() :
- mnRefCount ( 1UL ),
- mnChecksum ( 0UL ),
+ mnRefCount ( 1UL ),
+ mnChecksum ( 0UL ),
mpSalBitmap ( ImplGetSVData()->mpDefInst->CreateSalBitmap() ),
maSourceSize( 0, 0 )
{
@@ -64,7 +64,7 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap )
}
// -----------------------------------------------------------------------
-
+
BOOL ImpBitmap::ImplCreate( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal )
{
maSourceSize = rSize;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 397a5d6b704a..888266ea72f1 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,17 +51,17 @@
// - Defines -
// -----------
-#define GRAPHIC_MAXPARTLEN 256000L
-#define GRAPHIC_MTFTOBMP_MAXEXT 2048
-#define GRAPHIC_STREAMBUFSIZE 8192UL
-
-#define SYS_WINMETAFILE 0x00000003L
-#define SYS_WNTMETAFILE 0x00000004L
-#define SYS_OS2METAFILE 0x00000005L
-#define SYS_MACMETAFILE 0x00000006L
+#define GRAPHIC_MAXPARTLEN 256000L
+#define GRAPHIC_MTFTOBMP_MAXEXT 2048
+#define GRAPHIC_STREAMBUFSIZE 8192UL
-#define GRAPHIC_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'G', 'R', 'F', '5' ))
-#define NATIVE_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'N', 'A', 'T', '5' ))
+#define SYS_WINMETAFILE 0x00000003L
+#define SYS_WNTMETAFILE 0x00000004L
+#define SYS_OS2METAFILE 0x00000005L
+#define SYS_MACMETAFILE 0x00000006L
+
+#define GRAPHIC_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'G', 'R', 'F', '5' ))
+#define NATIVE_FORMAT_50 static_cast<sal_uInt32>(COMPAT_FORMAT( 'N', 'A', 'T', '5' ))
// ---------------
// - ImpSwapFile -
@@ -69,8 +69,8 @@
struct ImpSwapFile
{
- INetURLObject aSwapURL;
- ULONG nRefCount;
+ INetURLObject aSwapURL;
+ ULONG nRefCount;
};
// -----------------
@@ -133,33 +133,33 @@ Size GraphicReader::GetPreviewSize() const
// --------------
ImpGraphic::ImpGraphic() :
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_NONE ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_NONE ),
mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
- maMetaFile ( rImpGraphic.maMetaFile ),
- maEx ( rImpGraphic.maEx ),
- mpContext ( NULL ),
- mpSwapFile ( rImpGraphic.mpSwapFile ),
- meType ( rImpGraphic.meType ),
- maDocFileURLStr ( rImpGraphic.maDocFileURLStr ),
- mnDocFilePos ( rImpGraphic.mnDocFilePos ),
+ maMetaFile ( rImpGraphic.maMetaFile ),
+ maEx ( rImpGraphic.maEx ),
+ mpContext ( NULL ),
+ mpSwapFile ( rImpGraphic.mpSwapFile ),
+ meType ( rImpGraphic.meType ),
+ maDocFileURLStr ( rImpGraphic.maDocFileURLStr ),
+ mnDocFilePos ( rImpGraphic.mnDocFilePos ),
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
- mnRefCount ( 1UL ),
- mbSwapOut ( rImpGraphic.mbSwapOut ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( rImpGraphic.mbSwapOut ),
+ mbSwapUnderway ( FALSE )
{
if( mpSwapFile )
mpSwapFile->nRefCount++;
@@ -181,68 +181,68 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
- maEx ( rBitmap ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( !rBitmap ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rBitmap ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( !rBitmap ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
- maEx ( rBitmapEx ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( !rBitmapEx ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rBitmapEx ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( !rBitmapEx ? GRAPHIC_NONE : GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
- maEx ( rAnimation.GetBitmapEx() ),
- mpAnimation ( new Animation( rAnimation ) ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_BITMAP ),
- mnDocFilePos ( 0UL ),
+ maEx ( rAnimation.GetBitmapEx() ),
+ mpAnimation ( new Animation( rAnimation ) ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_BITMAP ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
// ------------------------------------------------------------------------
ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
- maMetaFile ( rMtf ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
- meType ( GRAPHIC_GDIMETAFILE ),
- mnDocFilePos ( 0UL ),
+ maMetaFile ( rMtf ),
+ mpAnimation ( NULL ),
+ mpContext ( NULL ),
+ mpSwapFile ( NULL ),
+ mpGfxLink ( NULL ),
+ meType ( GRAPHIC_GDIMETAFILE ),
+ mnDocFilePos ( 0UL ),
mnSizeBytes ( 0UL ),
- mnRefCount ( 1UL ),
- mbSwapOut ( FALSE ),
- mbSwapUnderway ( FALSE )
+ mnRefCount ( 1UL ),
+ mbSwapOut ( FALSE ),
+ mbSwapUnderway ( FALSE )
{
}
@@ -487,7 +487,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
if( meType == GRAPHIC_BITMAP )
{
const BitmapEx& rRetBmpEx = ( mpAnimation ? mpAnimation->GetBitmapEx() : maEx );
- const Color aReplaceColor( COL_WHITE );
+ const Color aReplaceColor( COL_WHITE );
aRetBmp = rRetBmpEx.GetBitmap( &aReplaceColor );
@@ -496,26 +496,26 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
}
else if( ( meType != GRAPHIC_DEFAULT ) && ImplIsSupportedGraphic() )
{
- // use corner points of graphic to determine the pixel
+ // use corner points of graphic to determine the pixel
// extent of the graphic (rounding errors are possible else)
- VirtualDevice aVDev;
+ VirtualDevice aVDev;
const Point aNullPt;
const Point aTLPix( aVDev.LogicToPixel( aNullPt, maMetaFile.GetPrefMapMode() ) );
const Point aBRPix( aVDev.LogicToPixel( Point( maMetaFile.GetPrefSize().Width() - 1, maMetaFile.GetPrefSize().Height() - 1 ), maMetaFile.GetPrefMapMode() ) );
Size aDrawSize( aVDev.LogicToPixel( maMetaFile.GetPrefSize(), maMetaFile.GetPrefMapMode() ) );
- Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
+ Size aSizePix( labs( aBRPix.X() - aTLPix.X() ) + 1, labs( aBRPix.Y() - aTLPix.Y() ) + 1 );
if(rParameters.getSizePixel().Width() && rParameters.getSizePixel().Height())
{
- aDrawSize.Width() = FRound((double)rParameters.getSizePixel().Width() *
+ aDrawSize.Width() = FRound((double)rParameters.getSizePixel().Width() *
(double)aDrawSize.Width() / (double)aSizePix.Width());
- aDrawSize.Height() = FRound((double)rParameters.getSizePixel().Height() *
+ aDrawSize.Height() = FRound((double)rParameters.getSizePixel().Height() *
(double)aDrawSize.Height() / (double)aSizePix.Height());
aSizePix = rParameters.getSizePixel();
}
- if( aSizePix.Width() && aSizePix.Height() && !rParameters.getUnlimitedSize()
+ if( aSizePix.Width() && aSizePix.Height() && !rParameters.getUnlimitedSize()
&& (aSizePix.Width() > GRAPHIC_MTFTOBMP_MAXEXT || aSizePix.Height() > GRAPHIC_MTFTOBMP_MAXEXT))
{
const Size aOldSizePix( aSizePix );
@@ -536,7 +536,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters)
{
aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_ENABLE_B2DDRAW);
}
-
+
if(rParameters.getSnapHorVerLines())
{
aVDev.SetAntialiasing(aVDev.GetAntialiasing() | ANTIALIASING_PIXELSNAPHAIRLINE);
@@ -736,7 +736,7 @@ ULONG ImpGraphic::ImplGetSizeBytes() const
if( meType == GRAPHIC_BITMAP )
{
mnSizeBytes = mpAnimation ? mpAnimation->GetSizeBytes() : maEx.GetSizeBytes();
- }
+ }
else if( meType == GRAPHIC_GDIMETAFILE )
{
mnSizeBytes = maMetaFile.GetSizeBytes();
@@ -920,20 +920,20 @@ ULONG ImpGraphic::ImplGetDocFilePos() const
BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
{
- MapMode aMapMode;
- Size aSize;
- const ULONG nStartPos = rIStm.Tell();
- sal_uInt32 nId;
- ULONG nHeaderLen;
- long nType;
- long nLen;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
- BOOL bRet = FALSE;
+ MapMode aMapMode;
+ Size aSize;
+ const ULONG nStartPos = rIStm.Tell();
+ sal_uInt32 nId;
+ ULONG nHeaderLen;
+ long nType;
+ long nLen;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BOOL bRet = FALSE;
if( !mbSwapUnderway )
{
- const String aTempURLStr( maDocFileURLStr );
- const ULONG nTempPos = mnDocFilePos;
+ const String aTempURLStr( maDocFileURLStr );
+ const ULONG nTempPos = mnDocFilePos;
ImplClear();
@@ -1022,8 +1022,8 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
}
else
{
- ::utl::TempFile aTempFile;
- const INetURLObject aTmpURL( aTempFile.GetURL() );
+ ::utl::TempFile aTempFile;
+ const INetURLObject aTmpURL( aTempFile.GetURL() );
if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() )
{
@@ -1031,9 +1031,9 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
if( pOStm )
{
- ULONG nFullLen = nHeaderLen + nLen;
- ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
- BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
+ ULONG nFullLen = nHeaderLen + nLen;
+ ULONG nPartLen = Min( nFullLen, (ULONG) GRAPHIC_MAXPARTLEN );
+ BYTE* pBuffer = (BYTE*) rtl_allocateMemory( nPartLen );
pOStm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1101,7 +1101,7 @@ BOOL ImpGraphic::ImplReadEmbedded( SvStream& rIStm, BOOL bSwap )
else if( meType >= SYS_WINMETAFILE && meType <= SYS_MACMETAFILE )
{
Graphic aSysGraphic;
- ULONG nCvtType;
+ ULONG nCvtType;
switch( sal::static_int_cast<ULONG>(meType) )
{
@@ -1146,10 +1146,10 @@ BOOL ImpGraphic::ImplWriteEmbedded( SvStream& rOStm )
if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() )
{
- const MapMode aMapMode( ImplGetPrefMapMode() );
- const Size aSize( ImplGetPrefSize() );
- const USHORT nOldFormat = rOStm.GetNumberFormatInt();
- ULONG nDataFieldPos;
+ const MapMode aMapMode( ImplGetPrefMapMode() );
+ const Size aSize( ImplGetPrefSize() );
+ const USHORT nOldFormat = rOStm.GetNumberFormatInt();
+ ULONG nDataFieldPos;
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1227,8 +1227,8 @@ BOOL ImpGraphic::ImplSwapOut()
{
if( !maDocFileURLStr.Len() )
{
- ::utl::TempFile aTempFile;
- const INetURLObject aTmpURL( aTempFile.GetURL() );
+ ::utl::TempFile aTempFile;
+ const INetURLObject aTmpURL( aTempFile.GetURL() );
if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() )
{
@@ -1419,7 +1419,7 @@ BOOL ImpGraphic::ImplIsSwapOut() const
// ------------------------------------------------------------------------
-void ImpGraphic::ImplSetLink( const GfxLink& rGfxLink )
+void ImpGraphic::ImplSetLink( const GfxLink& rGfxLink )
{
delete mpGfxLink;
mpGfxLink = new GfxLink( rGfxLink );
@@ -1504,7 +1504,7 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
{
if( !rIStm.GetError() )
{
- const ULONG nStmPos1 = rIStm.Tell();
+ const ULONG nStmPos1 = rIStm.Tell();
sal_uInt32 nTmp;
if ( !rImpGraphic.mbSwapUnderway )
@@ -1514,16 +1514,16 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
rIStm >> nTmp;
// if there is no more data, avoid further expensive
- // reading which will create VDevs and other stuff, just to
+ // reading which will create VDevs and other stuff, just to
// read nothing. CAUTION: Eof is only true AFTER reading another
// byte, a speciality of SvMemoryStream (!)
if(!rIStm.GetError() && !rIStm.IsEof())
{
if( NATIVE_FORMAT_50 == nTmp )
{
- Graphic aGraphic;
- GfxLink aLink;
- VersionCompat* pCompat;
+ Graphic aGraphic;
+ GfxLink aLink;
+ VersionCompat* pCompat;
// read compat info
pCompat = new VersionCompat( rIStm, STREAM_READ );
@@ -1560,8 +1560,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
}
else
{
- BitmapEx aBmpEx;
- const USHORT nOldFormat = rIStm.GetNumberFormatInt();
+ BitmapEx aBmpEx;
+ const USHORT nOldFormat = rIStm.GetNumberFormatInt();
rIStm.SeekRel( -4 );
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1569,8 +1569,8 @@ SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() )
{
- UINT32 nMagic1(0), nMagic2(0);
- ULONG nActPos = rIStm.Tell();
+ UINT32 nMagic1(0), nMagic2(0);
+ ULONG nActPos = rIStm.Tell();
rIStm >> nMagic1 >> nMagic2;
rIStm.Seek( nActPos );
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 476ac3ca44a9..0e03ee7ac7ac 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +40,9 @@
// - Defines -
// -----------
-#define IMPSYSIMAGEITEM_MASK ( 0x01 )
-#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
-#define DISA_ALL ( 0xffff )
+#define IMPSYSIMAGEITEM_MASK ( 0x01 )
+#define IMPSYSIMAGEITEM_ALPHA ( 0x02 )
+#define DISA_ALL ( 0xffff )
// ----------------
// - ImageAryData -
@@ -253,9 +253,9 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
void ImplImageBmp::Expand( USHORT nGrowSize )
{
- const ULONG nDX = nGrowSize * maSize.Width();
- const USHORT nOldSize = mnSize;
- BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
+ const ULONG nDX = nGrowSize * maSize.Width();
+ const USHORT nOldSize = mnSize;
+ BYTE* pNewAry = new BYTE[ mnSize = sal::static_int_cast<USHORT>(mnSize+nGrowSize) ];
maBmpEx.Expand( nDX, 0UL );
@@ -357,8 +357,8 @@ void ImplImageBmp::ColorTransform( BmpColorMode eColorMode )
BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
{
- const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
- BitmapEx aRet;
+ const Bitmap aNewBmp( Size( nPosCount * maSize.Width(), maSize.Height() ), maBmpEx.GetBitmap().GetBitCount() );
+ BitmapEx aRet;
if( maBmpEx.IsAlpha() )
{
// initialize target bitmap with an empty alpha mask
@@ -373,7 +373,7 @@ BitmapEx ImplImageBmp::GetBitmapEx( USHORT nPosCount, USHORT* pPosAry ) const
for( USHORT i = 0; i < nPosCount; i++ )
{
const Point aSrcPos( pPosAry[ i ] * maSize.Width(), 0L );
- const Point aPos( i * maSize.Width(), 0L );
+ const Point aPos( i * maSize.Width(), 0L );
const Rectangle aSrcRect( aSrcPos, maSize );
const Rectangle aDstRect( aPos, maSize );
@@ -392,7 +392,7 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
if( pOutDev->IsDeviceOutputNecessary() )
{
const Point aSrcPos( nPos * maSize.Width(), 0 );
- Size aOutSize;
+ Size aOutSize;
aOutSize = ( pSize ? *pSize : pOutDev->PixelToLogic( maSize ) );
@@ -433,15 +433,15 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev,
if( pAcc )
{
- const StyleSettings& rSettings = pOutDev->GetSettings().GetStyleSettings();
- Color aColor;
- BitmapColor aCol;
- const long nW = pAcc->Width();
- const long nH = pAcc->Height();
- BYTE* pMapR = new BYTE[ 256 ];
- BYTE* pMapG = new BYTE[ 256 ];
- BYTE* pMapB = new BYTE[ 256 ];
- long nX, nY;
+ const StyleSettings& rSettings = pOutDev->GetSettings().GetStyleSettings();
+ Color aColor;
+ BitmapColor aCol;
+ const long nW = pAcc->Width();
+ const long nH = pAcc->Height();
+ BYTE* pMapR = new BYTE[ 256 ];
+ BYTE* pMapG = new BYTE[ 256 ];
+ BYTE* pMapB = new BYTE[ 256 ];
+ long nX, nY;
if( nStyle & IMAGE_DRAW_HIGHLIGHT )
aColor = rSettings.GetHighlightColor();
@@ -604,7 +604,7 @@ void ImplImageBmp::ImplUpdateDisabledBmpEx( int nPos )
if( pBmp && pBmpAlphaMask && pGrey && pGreyAlphaMask )
{
- BitmapColor aGreyVal( 0 );
+ BitmapColor aGreyVal( 0 );
BitmapColor aGreyAlphaMaskVal( 0 );
const Point aPos( ( nPos < 0 ) ? 0 : ( nPos * maSize.Width() ), 0 );
const int nLeft = aPos.X(), nRight = nLeft + ( ( nPos < 0 ) ? aTotalSize.Width() : maSize.Width() );
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 03e4c1dbbb2a..1fce3af5b0cc 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/impprn.cxx b/vcl/source/gdi/impprn.cxx
index 5224286cdad1..9ce4cd2e7821 100644
--- a/vcl/source/gdi/impprn.cxx
+++ b/vcl/source/gdi/impprn.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,10 +51,10 @@
struct QueuePage
{
- GDIMetaFile* mpMtf;
- JobSetup* mpSetup;
- USHORT mnPage;
- BOOL mbEndJob;
+ GDIMetaFile* mpMtf;
+ JobSetup* mpSetup;
+ USHORT mnPage;
+ BOOL mbEndJob;
QueuePage() { mpMtf = NULL; mpSetup = NULL; }
~QueuePage() { delete mpMtf; if ( mpSetup ) delete mpSetup; }
@@ -76,8 +76,8 @@ ImplQPrinter::ImplQPrinter( Printer* pParent ) :
SetSelfAsQueuePrinter( TRUE );
SetPrinterProps( pParent );
SetPageQueueSize( 0 );
- mnCopyCount = pParent->mnCopyCount;
- mbCollateCopy = pParent->mbCollateCopy;
+ mnCopyCount = pParent->mnCopyCount;
+ mbCollateCopy = pParent->mbCollateCopy;
}
// -----------------------------------------------------------------------
@@ -105,8 +105,8 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
{
for( MetaAction* pAct = rPrtMtf.FirstAction(); pAct && !mbAborted; pAct = rPrtMtf.NextAction() )
{
- const ULONG nType = pAct->GetType();
- sal_Bool bExecuted = sal_False;
+ const ULONG nType = pAct->GetType();
+ sal_Bool bExecuted = sal_False;
if( nType == META_COMMENT_ACTION )
{
@@ -114,10 +114,10 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
MetaCommentAction* pComment = (MetaCommentAction*) pAct;
if( pComment->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL )
- {
+ {
pAct = rPrtMtf.NextAction();
- // if next action is a GradientEx action, execute this and
+ // if next action is a GradientEx action, execute this and
// skip actions until a XGRAD_SEQ_END comment is found
if( pAct && ( pAct->GetType() == META_GRADIENTEX_ACTION ) )
{
@@ -129,7 +129,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
{
pAct = rPrtMtf.NextAction();
}
- while( pAct &&
+ while( pAct &&
( ( pAct->GetType() != META_COMMENT_ACTION ) ||
( ( (MetaCommentAction*) pAct )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) != COMPARE_EQUAL ) ) );
@@ -137,7 +137,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
}
}
else if( pComment->GetComment().CompareIgnoreCaseToAscii( "PRNSPOOL_TRANSPARENTBITMAP_BEGIN" ) == COMPARE_EQUAL )
- {
+ {
pAct = rPrtMtf.NextAction();
if( pAct && ( pAct->GetType() == META_BMPSCALE_ACTION ) )
@@ -160,7 +160,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
{
pAct = rPrtMtf.NextAction();
}
- while( pAct &&
+ while( pAct &&
( ( pAct->GetType() != META_COMMENT_ACTION ) ||
( ( (MetaCommentAction*) pAct )->GetComment().CompareIgnoreCaseToAscii( "PRNSPOOL_TRANSPARENTBITMAP_END" ) != COMPARE_EQUAL ) ) );
@@ -180,8 +180,8 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
const Bitmap& rBmp = pBmpScaleAction->GetBitmap();
DrawBitmap( pBmpScaleAction->GetPoint(), pBmpScaleAction->GetSize(),
- GetDownsampledBitmap( pBmpScaleAction->GetSize(),
- Point(), rBmp.GetSizePixel(),
+ GetDownsampledBitmap( pBmpScaleAction->GetSize(),
+ Point(), rBmp.GetSizePixel(),
rBmp, nMaxBmpDPIX, nMaxBmpDPIY ) );
bExecuted = sal_True;
@@ -193,7 +193,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
DrawBitmap( pBmpScalePartAction->GetDestPoint(), pBmpScalePartAction->GetDestSize(),
GetDownsampledBitmap( pBmpScalePartAction->GetDestSize(),
- pBmpScalePartAction->GetSrcPoint(), pBmpScalePartAction->GetSrcSize(),
+ pBmpScalePartAction->GetSrcPoint(), pBmpScalePartAction->GetSrcSize(),
rBmp, nMaxBmpDPIX, nMaxBmpDPIY ) );
bExecuted = sal_True;
@@ -204,8 +204,8 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
const BitmapEx& rBmpEx = pBmpExScaleAction->GetBitmapEx();
DrawBitmapEx( pBmpExScaleAction->GetPoint(), pBmpExScaleAction->GetSize(),
- GetDownsampledBitmapEx( pBmpExScaleAction->GetSize(),
- Point(), rBmpEx.GetSizePixel(),
+ GetDownsampledBitmapEx( pBmpExScaleAction->GetSize(),
+ Point(), rBmpEx.GetSizePixel(),
rBmpEx, nMaxBmpDPIX, nMaxBmpDPIY ) );
bExecuted = sal_True;
@@ -217,15 +217,15 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
DrawBitmapEx( pBmpExScalePartAction->GetDestPoint(), pBmpExScalePartAction->GetDestSize(),
GetDownsampledBitmapEx( pBmpExScalePartAction->GetDestSize(),
- pBmpExScalePartAction->GetSrcPoint(), pBmpExScalePartAction->GetSrcSize(),
+ pBmpExScalePartAction->GetSrcPoint(), pBmpExScalePartAction->GetSrcSize(),
rBmpEx, nMaxBmpDPIX, nMaxBmpDPIY ) );
bExecuted = sal_True;
}
else if( nType == META_TRANSPARENT_ACTION )
{
- MetaTransparentAction* pTransAct = static_cast<MetaTransparentAction*>(pAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ MetaTransparentAction* pTransAct = static_cast<MetaTransparentAction*>(pAct);
+ USHORT nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -255,11 +255,11 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
}
else if( nType == META_FLOATTRANSPARENT_ACTION )
{
- MetaFloatTransparentAction* pFloatAction = (MetaFloatTransparentAction*) pAct;
- GDIMetaFile& rMtf = (GDIMetaFile&) pFloatAction->GetGDIMetaFile();
- MapMode aDrawMap( rMtf.GetPrefMapMode() );
- Point aDestPoint( LogicToPixel( pFloatAction->GetPoint() ) );
- Size aDestSize( LogicToPixel( pFloatAction->GetSize() ) );
+ MetaFloatTransparentAction* pFloatAction = (MetaFloatTransparentAction*) pAct;
+ GDIMetaFile& rMtf = (GDIMetaFile&) pFloatAction->GetGDIMetaFile();
+ MapMode aDrawMap( rMtf.GetPrefMapMode() );
+ Point aDestPoint( LogicToPixel( pFloatAction->GetPoint() ) );
+ Size aDestSize( LogicToPixel( pFloatAction->GetSize() ) );
if( aDestSize.Width() && aDestSize.Height() )
{
@@ -273,7 +273,7 @@ void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nM
Fraction aScaleX( aDestSize.Width(), aTmpPrefSize.Width() );
Fraction aScaleY( aDestSize.Height(), aTmpPrefSize.Height() );
-
+
aDrawMap.SetScaleX( aScaleX *= aDrawMap.GetScaleX() );
aDrawMap.SetScaleY( aScaleY *= aDrawMap.GetScaleY() );
aDrawMap.SetOrigin( PixelToLogic( aDestPoint, aDrawMap ) );
@@ -328,7 +328,7 @@ void ImplQPrinter::PrePrintPage( QueuePage* pPage )
// convert to greysacles
if( rPrinterOptions.IsConvertToGreyscales() )
{
- SetDrawMode( GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ SetDrawMode( GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
}
@@ -366,7 +366,7 @@ void ImplQPrinter::PrintPage( unsigned int nPage )
StartPage();
ImplPrintMtf( maCurPageMetaFile, mnMaxBmpDPIX, mnMaxBmpDPIY );
EndPage();
-
+
mnCurCopyCount--;
if( mnCurCopyCount == 0 )
PostPrintPage();
@@ -398,8 +398,8 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
// Druck-Job zuende?
QueuePage* pActPage = maQueue.front();
maQueue.erase( maQueue.begin() );
-
-
+
+
vcl::DeletionListener aDel( this );
if ( pActPage->mbEndJob )
{
@@ -413,7 +413,7 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
else
{
mbDestroyAllowed = FALSE;
-
+
PrePrintPage( pActPage );
USHORT nCopyCount = 1;
@@ -430,7 +430,7 @@ IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG )
}
StartPage();
-
+
if ( mbAborted )
break;
@@ -487,8 +487,8 @@ void ImplQPrinter::EndQueuePrint()
}
else
{
- QueuePage* pQueuePage = new QueuePage;
- pQueuePage->mbEndJob = TRUE;
+ QueuePage* pQueuePage = new QueuePage;
+ pQueuePage->mbEndJob = TRUE;
maQueue.push_back( pQueuePage );
}
}
@@ -498,21 +498,21 @@ void ImplQPrinter::EndQueuePrint()
bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const
{
bool bRet = false;
-
+
if( ImplGetSVData()->maGDIData.mbPrinterPullModel )
{
bRet = true;
o_rRanges.clear();
-
+
if( ! maQueue.empty() )
{
ULONG nCurPage = 0;
-
+
// get first job data
const ImplJobSetup* pLastFormat = NULL;
if( maQueue.front()->mpSetup )
pLastFormat = maQueue.front()->mpSetup->ImplGetConstData();
-
+
// begin first range
o_rRanges.push_back( 0 );
for( std::vector< QueuePage* >::const_iterator it = maQueue.begin();
@@ -549,11 +549,11 @@ bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncl
}
}
}
-
+
o_rRanges.push_back( nCurPage );
}
}
-
+
return bRet;
}
@@ -570,10 +570,10 @@ void ImplQPrinter::AbortQueuePrint()
void ImplQPrinter::AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup )
{
- QueuePage* pQueuePage = new QueuePage;
- pQueuePage->mpMtf = pPage;
- pQueuePage->mnPage = nPage;
- pQueuePage->mbEndJob = FALSE;
+ QueuePage* pQueuePage = new QueuePage;
+ pQueuePage->mpMtf = pPage;
+ pQueuePage->mnPage = nPage;
+ pQueuePage->mbEndJob = FALSE;
// ensure that the first page has a valid setup, this is needed
// in GetPaperRanges (used in pullmodel)
// caution: this depends on mnCurPage in Printer being
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 0846f5567200..5d4e29e0b909 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,16 +54,16 @@
// -----------------------------------------------------------------------------
-#define VECT_POLY_INLINE_INNER 1UL
-#define VECT_POLY_INLINE_OUTER 2UL
-#define VECT_POLY_OUTLINE_INNER 4UL
-#define VECT_POLY_OUTLINE_OUTER 8UL
+#define VECT_POLY_INLINE_INNER 1UL
+#define VECT_POLY_INLINE_OUTER 2UL
+#define VECT_POLY_OUTLINE_INNER 4UL
+#define VECT_POLY_OUTLINE_OUTER 8UL
// -----------------------------------------------------------------------------
-#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
-#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
-#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)_def_nVal));
+#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
+#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
+#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)_def_nVal));
// -----------
// - statics -
@@ -71,7 +71,7 @@
struct ChainMove { long nDX; long nDY; };
-static ChainMove aImplMove[ 8 ] = {
+static ChainMove aImplMove[ 8 ] = {
{ 1L, 0L },
{ 0L, -1L },
{ -1L, 0L },
@@ -82,7 +82,7 @@ static ChainMove aImplMove[ 8 ] = {
{ 1L, 1L }
};
-static ChainMove aImplMoveInner[ 8 ] = {
+static ChainMove aImplMoveInner[ 8 ] = {
{ 0L, 1L },
{ 1L, 0L },
{ 0L, -1L },
@@ -93,7 +93,7 @@ static ChainMove aImplMoveInner[ 8 ] = {
{ -1L, 0L }
};
-static ChainMove aImplMoveOuter[ 8 ] = {
+static ChainMove aImplMoveOuter[ 8 ] = {
{ 0L, -1L },
{ -1L, 0L },
{ 0L, 1L },
@@ -111,11 +111,11 @@ static ChainMove aImplMoveOuter[ 8 ] = {
struct ImplColorSet
{
BitmapColor maColor;
- USHORT mnIndex;
- BOOL mbSet;
+ USHORT mnIndex;
+ BOOL mbSet;
- BOOL operator<( const ImplColorSet& rSet ) const;
- BOOL operator>( const ImplColorSet& rSet ) const;
+ BOOL operator<( const ImplColorSet& rSet ) const;
+ BOOL operator>( const ImplColorSet& rSet ) const;
};
// ----------------------------------------------------------------------------
@@ -136,9 +136,9 @@ inline BOOL ImplColorSet::operator>( const ImplColorSet& rSet ) const
extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p2 )
{
- ImplColorSet* pSet1 = (ImplColorSet*) p1;
- ImplColorSet* pSet2 = (ImplColorSet*) p2;
- int nRet;
+ ImplColorSet* pSet1 = (ImplColorSet*) p1;
+ ImplColorSet* pSet2 = (ImplColorSet*) p2;
+ int nRet;
if( pSet1->mbSet && pSet2->mbSet )
{
@@ -162,32 +162,32 @@ extern "C" int __LOADONCALLAPI ImplColorSetCmpFnc( const void* p1, const void* p
class ImplPointArray
{
- Point* mpArray;
- ULONG mnSize;
- ULONG mnRealSize;
+ Point* mpArray;
+ ULONG mnSize;
+ ULONG mnRealSize;
public:
ImplPointArray();
~ImplPointArray();
- void ImplSetSize( ULONG nSize );
+ void ImplSetSize( ULONG nSize );
- ULONG ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
+ ULONG ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( ULONG nRealSize ) { mnRealSize = nRealSize; }
- inline Point& operator[]( ULONG nPos );
- inline const Point& operator[]( ULONG nPos ) const;
+ inline Point& operator[]( ULONG nPos );
+ inline const Point& operator[]( ULONG nPos ) const;
- void ImplCreatePoly( Polygon& rPoly ) const;
+ void ImplCreatePoly( Polygon& rPoly ) const;
};
// -----------------------------------------------------------------------------
ImplPointArray::ImplPointArray() :
- mpArray ( NULL ),
- mnSize ( 0UL ),
- mnRealSize ( 0UL )
+ mpArray ( NULL ),
+ mnSize ( 0UL ),
+ mnRealSize ( 0UL )
{
}
@@ -247,10 +247,10 @@ class ImplVectMap
{
private:
- Scanline mpBuf;
- Scanline* mpScan;
- long mnWidth;
- long mnHeight;
+ Scanline mpBuf;
+ Scanline* mpScan;
+ long mnWidth;
+ long mnHeight;
ImplVectMap() {};
@@ -259,27 +259,27 @@ public:
ImplVectMap( long nWidth, long nHeight );
~ImplVectMap();
- inline long Width() const { return mnWidth; }
- inline long Height() const { return mnHeight; }
+ inline long Width() const { return mnWidth; }
+ inline long Height() const { return mnHeight; }
- inline void Set( long nY, long nX, BYTE cVal );
- inline BYTE Get( long nY, long nX ) const;
+ inline void Set( long nY, long nX, BYTE cVal );
+ inline BYTE Get( long nY, long nX ) const;
- inline BOOL IsFree( long nY, long nX ) const;
- inline BOOL IsCont( long nY, long nX ) const;
- inline BOOL IsDone( long nY, long nX ) const;
+ inline BOOL IsFree( long nY, long nX ) const;
+ inline BOOL IsCont( long nY, long nX ) const;
+ inline BOOL IsDone( long nY, long nX ) const;
};
// -----------------------------------------------------------------------------
ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
- mnWidth ( nWidth ),
+ mnWidth ( nWidth ),
mnHeight( nHeight )
{
- const long nWidthAl = ( nWidth >> 2L ) + 1L;
- const long nSize = nWidthAl * nHeight;
- Scanline pTmp = mpBuf = (Scanline) rtl_allocateMemory( nSize );
+ const long nWidthAl = ( nWidth >> 2L ) + 1L;
+ const long nSize = nWidthAl * nHeight;
+ Scanline pTmp = mpBuf = (Scanline) rtl_allocateMemory( nSize );
memset( mpBuf, 0, nSize );
mpScan = (Scanline*) rtl_allocateMemory( nHeight * sizeof( Scanline ) );
@@ -299,7 +299,7 @@ ImplVectMap::~ImplVectMap()
// -----------------------------------------------------------------------------
-inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
+inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
{
const BYTE cShift = sal::static_int_cast<BYTE>(6 - ( ( nX & 3 ) << 1 ));
( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift );
@@ -307,7 +307,7 @@ inline void ImplVectMap::Set( long nY, long nX, BYTE cVal )
// -----------------------------------------------------------------------------
-inline BYTE ImplVectMap::Get( long nY, long nX ) const
+inline BYTE ImplVectMap::Get( long nY, long nX ) const
{
return sal::static_int_cast<BYTE>( ( ( mpScan[ nY ][ nX >> 2 ] ) >> ( 6 - ( ( nX & 3 ) << 1 ) ) ) & 3 );
}
@@ -341,38 +341,38 @@ class ImplChain
{
private:
- Polygon maPoly;
- Point maStartPt;
- ULONG mnArraySize;
- ULONG mnCount;
- long mnResize;
- BYTE* mpCodes;
+ Polygon maPoly;
+ Point maStartPt;
+ ULONG mnArraySize;
+ ULONG mnCount;
+ long mnResize;
+ BYTE* mpCodes;
- void ImplGetSpace();
+ void ImplGetSpace();
- void ImplCreate();
- void ImplCreateInner();
- void ImplCreateOuter();
- void ImplPostProcess( const ImplPointArray& rArr );
+ void ImplCreate();
+ void ImplCreateInner();
+ void ImplCreateOuter();
+ void ImplPostProcess( const ImplPointArray& rArr );
public:
ImplChain( ULONG nInitCount = 1024UL, long nResize = -1L );
~ImplChain();
- void ImplBeginAdd( const Point& rStartPt );
- inline void ImplAdd( BYTE nCode );
- void ImplEndAdd( ULONG nTypeFlag );
+ void ImplBeginAdd( const Point& rStartPt );
+ inline void ImplAdd( BYTE nCode );
+ void ImplEndAdd( ULONG nTypeFlag );
- const Polygon& ImplGetPoly() { return maPoly; }
+ const Polygon& ImplGetPoly() { return maPoly; }
};
// -----------------------------------------------------------------------------
ImplChain::ImplChain( ULONG nInitCount, long nResize ) :
- mnArraySize ( nInitCount ),
- mnCount ( 0UL ),
- mnResize ( nResize )
+ mnArraySize ( nInitCount ),
+ mnCount ( 0UL ),
+ mnResize ( nResize )
{
DBG_ASSERT( nInitCount && nResize, "ImplChain::ImplChain(): invalid parameters!" );
mpCodes = new BYTE[ mnArraySize ];
@@ -390,7 +390,7 @@ ImplChain::~ImplChain()
void ImplChain::ImplGetSpace()
{
const ULONG nOldArraySize = mnArraySize;
- BYTE* pNewCodes;
+ BYTE* pNewCodes;
mnArraySize = ( mnResize < 0L ) ? ( mnArraySize << 1UL ) : ( mnArraySize + (ULONG) mnResize );
pNewCodes = new BYTE[ mnArraySize ];
@@ -410,7 +410,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt )
// -----------------------------------------------------------------------------
-inline void ImplChain::ImplAdd( BYTE nCode )
+inline void ImplChain::ImplAdd( BYTE nCode )
{
if( mnCount == mnArraySize )
ImplGetSpace();
@@ -438,12 +438,12 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
USHORT i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
- const ChainMove& rMove = aImplMove[ cMove ];
- const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
-// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ const BYTE cMove = mpCodes[ i ];
+ const BYTE cNextMove = mpCodes[ i + 1 ];
+ const ChainMove& rMove = aImplMove[ cMove ];
+ const ChainMove& rMoveInner = aImplMoveInner[ cMove ];
+// Point& rPt = aArr[ nPolyPos ];
+ BOOL bDone = TRUE;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -545,12 +545,12 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
USHORT i, nPolyPos;
for( i = 0, nPolyPos = 0; i < ( mnCount - 1 ); i++ )
{
- const BYTE cMove = mpCodes[ i ];
- const BYTE cNextMove = mpCodes[ i + 1 ];
- const ChainMove& rMove = aImplMove[ cMove ];
- const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
-// Point& rPt = aArr[ nPolyPos ];
- BOOL bDone = TRUE;
+ const BYTE cMove = mpCodes[ i ];
+ const BYTE cNextMove = mpCodes[ i + 1 ];
+ const ChainMove& rMove = aImplMove[ cMove ];
+ const ChainMove& rMoveOuter = aImplMoveOuter[ cMove ];
+// Point& rPt = aArr[ nPolyPos ];
+ BOOL bDone = TRUE;
nLastX += rMove.nDX;
nLastY += rMove.nDY;
@@ -666,13 +666,13 @@ void ImplChain::ImplEndAdd( ULONG nFlag )
void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
{
- ImplPointArray aNewArr1;
- ImplPointArray aNewArr2;
- Point* pLast;
- Point* pLeast;
- ULONG nNewPos;
- ULONG nCount = rArr.ImplGetRealSize();
- ULONG n;
+ ImplPointArray aNewArr1;
+ ImplPointArray aNewArr2;
+ Point* pLast;
+ Point* pLeast;
+ ULONG nNewPos;
+ ULONG nCount = rArr.ImplGetRealSize();
+ ULONG n;
// pass 1
aNewArr1.ImplSetSize( nCount );
@@ -683,8 +683,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr )
for( n = nNewPos = 1; n < nCount; )
{
const Point& rPt = rArr[ n++ ];
- const long nX = BACK_MAP( rPt.X() );
- const long nY = BACK_MAP( rPt.Y() );
+ const long nX = BACK_MAP( rPt.X() );
+ const long nY = BACK_MAP( rPt.Y() );
if( nX != pLast->X() || nY != pLast->Y() )
{
@@ -746,19 +746,19 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
VECT_PROGRESS( pProgress, 0 );
- Bitmap* pBmp = new Bitmap( rColorBmp );
- BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess();
+ Bitmap* pBmp = new Bitmap( rColorBmp );
+ BitmapReadAccess* pRAcc = pBmp->AcquireReadAccess();
if( pRAcc )
{
- PolyPolygon aPolyPoly;
- double fPercent = 0.0;
- double fPercentStep_2 = 0.0;
- const long nWidth = pRAcc->Width();
- const long nHeight = pRAcc->Height();
- const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
- USHORT n;
- ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
+ PolyPolygon aPolyPoly;
+ double fPercent = 0.0;
+ double fPercentStep_2 = 0.0;
+ const long nWidth = pRAcc->Width();
+ const long nHeight = pRAcc->Height();
+ const USHORT nColorCount = pRAcc->GetPaletteEntryCount();
+ USHORT n;
+ ImplColorSet* pColorSet = (ImplColorSet*) new BYTE[ 256 * sizeof( ImplColorSet ) ];
memset( pColorSet, 0, 256 * sizeof( ImplColorSet ) );
rMtf.Clear();
@@ -787,10 +787,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
for( USHORT i = 0; i < n; i++ )
{
- const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
- const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
-// const BYTE cLum = aFindColor.GetLuminance();
- ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
+ const BitmapColor aBmpCol( pRAcc->GetPaletteColor( pColorSet[ i ].mnIndex ) );
+ const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() );
+// const BYTE cLum = aFindColor.GetLuminance();
+ ImplVectMap* pMap = ImplExpand( pRAcc, aFindColor );
VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) );
@@ -823,9 +823,9 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
if( rMtf.GetActionCount() )
{
- MapMode aMap( MAP_100TH_MM );
- VirtualDevice aVDev;
- const Size aLogSize1( aVDev.PixelToLogic( Size( 1, 1 ), aMap ) );
+ MapMode aMap( MAP_100TH_MM );
+ VirtualDevice aVDev;
+ const Size aLogSize1( aVDev.PixelToLogic( Size( 1, 1 ), aMap ) );
rMtf.SetPrefMapMode( aMap );
rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) );
@@ -848,10 +848,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
PolyPolygon& rPolyPoly,
ULONG nFlags, const Link* pProgress )
{
- Bitmap* pBmp = new Bitmap( rMonoBmp );
- BitmapReadAccess* pRAcc;
- ImplVectMap* pMap;
- BOOL bRet = FALSE;
+ Bitmap* pBmp = new Bitmap( rMonoBmp );
+ BitmapReadAccess* pRAcc;
+ ImplVectMap* pMap;
+ BOOL bRet = FALSE;
VECT_PROGRESS( pProgress, 10 );
@@ -887,10 +887,10 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
for( ; nCurPoly < nCount; ++nCurPoly )
{
- const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
+ const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
const sal_uInt16 nSize( rPoly.GetSize() );
- sal_uInt16 nDepth( 0 ), i( 0 );
- const bool bRight( rPoly.IsRightOrientated() );
+ sal_uInt16 nDepth( 0 ), i( 0 );
+ const bool bRight( rPoly.IsRightOrientated() );
for( ; i < nCount; ++i )
if( ( i != nCurPoly ) && rPolyPoly.GetObject( i ).IsInside( rPoly[ 0 ] ) )
@@ -900,7 +900,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) )
{
- Polygon aNewPoly( nSize );
+ Polygon aNewPoly( nSize );
sal_uInt16 nPrim( 0 ), nSec( nSize - 1 );
if( rPoly.HasFlags() )
@@ -930,7 +930,7 @@ BOOL ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp,
rPolyPoly.Remove( static_cast< USHORT >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
}
-
+
bRet = TRUE;
}
@@ -946,8 +946,8 @@ void ImplVectorizer::ImplLimitPolyPoly( PolyPolygon& rPolyPoly )
if( rPolyPoly.Count() > VECT_POLY_MAX )
{
PolyPolygon aNewPolyPoly;
- long nReduce = 0;
- USHORT nNewCount;
+ long nReduce = 0;
+ USHORT nNewCount;
do
{
@@ -981,14 +981,14 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
- const long nOldWidth = pRAcc->Width();
- const long nOldHeight = pRAcc->Height();
- const long nNewWidth = ( nOldWidth << 2L ) + 4L;
- const long nNewHeight = ( nOldHeight << 2L ) + 4L;
- const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
- long* pMapIn = new long[ Max( nOldWidth, nOldHeight ) ];
- long* pMapOut = new long[ Max( nOldWidth, nOldHeight ) ];
- long nX, nY, nTmpX, nTmpY;
+ const long nOldWidth = pRAcc->Width();
+ const long nOldHeight = pRAcc->Height();
+ const long nNewWidth = ( nOldWidth << 2L ) + 4L;
+ const long nNewHeight = ( nOldHeight << 2L ) + 4L;
+ const BitmapColor aTest( pRAcc->GetBestMatchingColor( rColor ) );
+ long* pMapIn = new long[ Max( nOldWidth, nOldHeight ) ];
+ long* pMapOut = new long[ Max( nOldWidth, nOldHeight ) ];
+ long nX, nY, nTmpX, nTmpY;
pMap = new ImplVectMap( nNewWidth, nNewHeight );
@@ -1074,8 +1074,8 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
for( long nY = 0L; nY < nHeight; nY++ )
{
- long nX = 0L;
- BOOL bInner = TRUE;
+ long nX = 0L;
+ BOOL bInner = TRUE;
while( nX < nWidth )
{
@@ -1089,8 +1089,8 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
if( pMap->IsCont( nY, nX ) )
{
// new contour
- ImplChain aChain;
- const Point aStartPt( nX++, nY );
+ ImplChain aChain;
+ const Point aStartPt( nX++, nY );
// get chain code
aChain.ImplBeginAdd( aStartPt );
@@ -1107,7 +1107,7 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
{
if( cReduce )
{
- const Rectangle aBound( rPoly.GetBoundRect() );
+ const Rectangle aBound( rPoly.GetBoundRect() );
if( aBound.GetWidth() > cReduce && aBound.GetHeight() > cReduce )
rPolyPoly.Insert( rPoly );
@@ -1137,15 +1137,15 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, B
// -----------------------------------------------------------------------------
-BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
+BOOL ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain )
{
- long nActX = rStartPt.X();
- long nActY = rStartPt.Y();
- long nTryX;
- long nTryY;
- ULONG nFound;
- ULONG nLastDir = 0UL;
- ULONG nDir;
+ long nActX = rStartPt.X();
+ long nActY = rStartPt.Y();
+ long nTryX;
+ long nTryY;
+ ULONG nFound;
+ ULONG nLastDir = 0UL;
+ ULONG nDir;
do
{
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index b21a9df2eb7a..ee95f4e73775 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,21 +42,21 @@ class ImplVectMap;
class ImplVectorizer
{
private:
-
- ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
- void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
- BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
- BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
- void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
-
-public:
+
+ ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor );
+ void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, BYTE cReduce, ULONG nFlags );
+ BOOL ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain );
+ BOOL ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const;
+ void ImplLimitPolyPoly( PolyPolygon& rPolyPoly );
+
+public:
ImplVectorizer();
~ImplVectorizer();
-
- BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
+
+ BOOL ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
BYTE cReduce, ULONG nFlags, const Link* pProgress );
- BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
+ BOOL ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly,
ULONG nFlags, const Link* pProgress );
};
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 2bc0addaa93c..15b7d2491c7a 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,44 +39,44 @@
DBG_NAME( JobSetup )
-#define JOBSET_FILEFORMAT2 3780
-#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
-#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
+#define JOBSET_FILEFORMAT2 3780
+#define JOBSET_FILE364_SYSTEM ((USHORT)0xFFFF)
+#define JOBSET_FILE605_SYSTEM ((USHORT)0xFFFE)
struct ImplOldJobSetupData
{
- char cPrinterName[64];
- char cDeviceName[32];
- char cPortName[32];
- char cDriverName[32];
+ char cPrinterName[64];
+ char cDeviceName[32];
+ char cPortName[32];
+ char cDriverName[32];
};
struct Impl364JobSetupData
{
- SVBT16 nSize;
- SVBT16 nSystem;
- SVBT32 nDriverDataLen;
- SVBT16 nOrientation;
- SVBT16 nPaperBin;
- SVBT16 nPaperFormat;
- SVBT32 nPaperWidth;
- SVBT32 nPaperHeight;
+ SVBT16 nSize;
+ SVBT16 nSystem;
+ SVBT32 nDriverDataLen;
+ SVBT16 nOrientation;
+ SVBT16 nPaperBin;
+ SVBT16 nPaperFormat;
+ SVBT32 nPaperWidth;
+ SVBT32 nPaperHeight;
};
// =======================================================================
ImplJobSetup::ImplJobSetup()
{
- mnRefCount = 1;
- mnSystem = 0;
- meOrientation = ORIENTATION_PORTRAIT;
+ mnRefCount = 1;
+ mnSystem = 0;
+ meOrientation = ORIENTATION_PORTRAIT;
meDuplexMode = DUPLEX_UNKNOWN;
- mnPaperBin = 0;
- mePaperFormat = PAPER_USER;
- mnPaperWidth = 0;
- mnPaperHeight = 0;
- mnDriverDataLen = 0;
- mpDriverData = NULL;
+ mnPaperBin = 0;
+ mePaperFormat = PAPER_USER;
+ mnPaperWidth = 0;
+ mnPaperHeight = 0;
+ mnDriverDataLen = 0;
+ mpDriverData = NULL;
}
// -----------------------------------------------------------------------
@@ -85,15 +85,15 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
maPrinterName( rJobSetup.maPrinterName ),
maDriver( rJobSetup.maDriver )
{
- mnRefCount = 1;
- mnSystem = rJobSetup.mnSystem;
- meOrientation = rJobSetup.meOrientation;
+ mnRefCount = 1;
+ mnSystem = rJobSetup.mnSystem;
+ meOrientation = rJobSetup.meOrientation;
meDuplexMode = rJobSetup.meDuplexMode;
- mnPaperBin = rJobSetup.mnPaperBin;
- mePaperFormat = rJobSetup.mePaperFormat;
- mnPaperWidth = rJobSetup.mnPaperWidth;
- mnPaperHeight = rJobSetup.mnPaperHeight;
- mnDriverDataLen = rJobSetup.mnDriverDataLen;
+ mnPaperBin = rJobSetup.mnPaperBin;
+ mePaperFormat = rJobSetup.mePaperFormat;
+ mnPaperWidth = rJobSetup.mnPaperWidth;
+ mnPaperHeight = rJobSetup.mnPaperHeight;
+ mnDriverDataLen = rJobSetup.mnDriverDataLen;
if ( rJobSetup.mpDriverData )
{
mpDriverData = (BYTE*)rtl_allocateMemory( mnDriverDataLen );
@@ -101,7 +101,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
}
else
mpDriverData = NULL;
- maValueMap = rJobSetup.maValueMap;
+ maValueMap = rJobSetup.maValueMap;
}
// -----------------------------------------------------------------------
@@ -272,18 +272,18 @@ BOOL JobSetup::operator==( const JobSetup& rJobSetup ) const
ImplJobSetup* pData1 = mpData;
ImplJobSetup* pData2 = rJobSetup.mpData;
- if ( (pData1->mnSystem == pData2->mnSystem) &&
- (pData1->maPrinterName == pData2->maPrinterName) &&
- (pData1->maDriver == pData2->maDriver) &&
- (pData1->meOrientation == pData2->meOrientation) &&
- (pData1->meDuplexMode == pData2->meDuplexMode) &&
- (pData1->mnPaperBin == pData2->mnPaperBin) &&
- (pData1->mePaperFormat == pData2->mePaperFormat) &&
- (pData1->mnPaperWidth == pData2->mnPaperWidth) &&
- (pData1->mnPaperHeight == pData2->mnPaperHeight) &&
- (pData1->mnDriverDataLen == pData2->mnDriverDataLen) &&
- (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
- (pData1->maValueMap == pData2->maValueMap)
+ if ( (pData1->mnSystem == pData2->mnSystem) &&
+ (pData1->maPrinterName == pData2->maPrinterName) &&
+ (pData1->maDriver == pData2->maDriver) &&
+ (pData1->meOrientation == pData2->meOrientation) &&
+ (pData1->meDuplexMode == pData2->meDuplexMode) &&
+ (pData1->mnPaperBin == pData2->mnPaperBin) &&
+ (pData1->mePaperFormat == pData2->mePaperFormat) &&
+ (pData1->mnPaperWidth == pData2->mnPaperWidth) &&
+ (pData1->mnPaperHeight == pData2->mnPaperHeight) &&
+ (pData1->mnDriverDataLen == pData2->mnDriverDataLen) &&
+ (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) &&
+ (pData1->maValueMap == pData2->maValueMap)
)
return TRUE;
@@ -297,7 +297,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
DBG_ASSERTWARNING( rIStream.GetVersion(), "JobSetup::>> - Solar-Version not set on rOStream" );
// Zur Zeit haben wir noch kein neues FileFormat
-// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
+// if ( rIStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
USHORT nLen;
USHORT nSystem;
@@ -318,30 +318,30 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
else
rJobSetup.mpData->mnRefCount--;
}
-
+
rtl_TextEncoding aStreamEncoding = RTL_TEXTENCODING_UTF8;
if( nSystem == JOBSET_FILE364_SYSTEM )
aStreamEncoding = rIStream.GetStreamCharSet();
-
+
rJobSetup.mpData = new ImplJobSetup;
ImplJobSetup* pJobData = rJobSetup.mpData;
pJobData->maPrinterName = UniString( pData->cPrinterName, aStreamEncoding );
- pJobData->maDriver = UniString( pData->cDriverName, aStreamEncoding );
+ pJobData->maDriver = UniString( pData->cDriverName, aStreamEncoding );
// Sind es unsere neuen JobSetup-Daten?
if ( nSystem == JOBSET_FILE364_SYSTEM ||
nSystem == JOBSET_FILE605_SYSTEM )
{
- Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
- USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
- pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
- pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
- pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
+ Impl364JobSetupData* pOldJobData = (Impl364JobSetupData*)(pTempBuf + sizeof( ImplOldJobSetupData ));
+ USHORT nOldJobDataSize = SVBT16ToShort( pOldJobData->nSize );
+ pJobData->mnSystem = SVBT16ToShort( pOldJobData->nSystem );
+ pJobData->mnDriverDataLen = SVBT32ToUInt32( pOldJobData->nDriverDataLen );
+ pJobData->meOrientation = (Orientation)SVBT16ToShort( pOldJobData->nOrientation );
pJobData->meDuplexMode = DUPLEX_UNKNOWN;
- pJobData->mnPaperBin = SVBT16ToShort( pOldJobData->nPaperBin );
- pJobData->mePaperFormat = (Paper)SVBT16ToShort( pOldJobData->nPaperFormat );
- pJobData->mnPaperWidth = (long)SVBT32ToUInt32( pOldJobData->nPaperWidth );
- pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
+ pJobData->mnPaperBin = SVBT16ToShort( pOldJobData->nPaperBin );
+ pJobData->mePaperFormat = (Paper)SVBT16ToShort( pOldJobData->nPaperFormat );
+ pJobData->mnPaperWidth = (long)SVBT32ToUInt32( pOldJobData->nPaperWidth );
+ pJobData->mnPaperHeight = (long)SVBT32ToUInt32( pOldJobData->nPaperHeight );
if ( pJobData->mnDriverDataLen )
{
BYTE* pDriverData = ((BYTE*)pOldJobData) + nOldJobDataSize;
@@ -394,7 +394,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
DBG_ASSERTWARNING( rOStream.GetVersion(), "JobSetup::<< - Solar-Version not set on rOStream" );
// Zur Zeit haben wir noch kein neues FileFormat
-// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
+// if ( rOStream.GetVersion() < JOBSET_FILEFORMAT2 )
{
USHORT nLen = 0;
if ( !rJobSetup.mpData )
@@ -405,7 +405,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
const ImplJobSetup* pJobData = rJobSetup.ImplGetConstData();
Impl364JobSetupData aOldJobData;
- USHORT nOldJobDataSize = sizeof( aOldJobData );
+ USHORT nOldJobDataSize = sizeof( aOldJobData );
ShortToSVBT16( nOldJobDataSize, aOldJobData.nSize );
ShortToSVBT16( pJobData->mnSystem, aOldJobData.nSystem );
UInt32ToSVBT32( pJobData->mnDriverDataLen, aOldJobData.nDriverDataLen );
@@ -421,7 +421,7 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
strncpy( aOldData.cPrinterName, aPrnByteName.GetBuffer(), 63 );
ByteString aDriverByteName( rJobSetup.GetDriverName(), RTL_TEXTENCODING_UTF8 );
strncpy( aOldData.cDriverName, aDriverByteName.GetBuffer(), 31 );
-// nLen = sizeof( aOldData ) + 4 + nOldJobDataSize + pJobData->mnDriverDataLen;
+// nLen = sizeof( aOldData ) + 4 + nOldJobDataSize + pJobData->mnDriverDataLen;
int nPos = rOStream.Tell();
rOStream << nLen;
rOStream << nSystem;
@@ -437,10 +437,10 @@ SvStream& operator<<( SvStream& rOStream, const JobSetup& rJobSetup )
rOStream.WriteByteString( "COMPAT_DUPLEX_MODE" ) ;
switch( pJobData->meDuplexMode )
{
- case DUPLEX_UNKNOWN: rOStream.WriteByteString( "DUPLEX_UNKNOWN" );break;
- case DUPLEX_OFF: rOStream.WriteByteString( "DUPLEX_OFF" );break;
- case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
- case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
+ case DUPLEX_UNKNOWN: rOStream.WriteByteString( "DUPLEX_UNKNOWN" );break;
+ case DUPLEX_OFF: rOStream.WriteByteString( "DUPLEX_OFF" );break;
+ case DUPLEX_SHORTEDGE: rOStream.WriteByteString( "DUPLEX_SHORTEDGE" );break;
+ case DUPLEX_LONGEDGE: rOStream.WriteByteString( "DUPLEX_LONGEDGE" );break;
}
nLen = sal::static_int_cast<USHORT>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx
index bb57a0b582e6..9056a7464066 100644
--- a/vcl/source/gdi/lineinfo.cxx
+++ b/vcl/source/gdi/lineinfo.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,14 +43,14 @@ DBG_NAME( LineInfo )
// ----------------
ImplLineInfo::ImplLineInfo() :
- mnRefCount ( 1 ),
- meStyle ( LINE_SOLID ),
- mnWidth ( 0 ),
- mnDashCount ( 0 ),
- mnDashLen ( 0 ),
- mnDotCount ( 0 ),
- mnDotLen ( 0 ),
- mnDistance ( 0 ),
+ mnRefCount ( 1 ),
+ meStyle ( LINE_SOLID ),
+ mnWidth ( 0 ),
+ mnDashCount ( 0 ),
+ mnDashLen ( 0 ),
+ mnDotCount ( 0 ),
+ mnDotLen ( 0 ),
+ mnDistance ( 0 ),
meLineJoin ( basegfx::B2DLINEJOIN_ROUND )
{
}
@@ -58,14 +58,14 @@ ImplLineInfo::ImplLineInfo() :
// -----------------------------------------------------------------------
ImplLineInfo::ImplLineInfo( const ImplLineInfo& rImplLineInfo ) :
- mnRefCount ( 1 ),
- meStyle ( rImplLineInfo.meStyle ),
- mnWidth ( rImplLineInfo.mnWidth ),
- mnDashCount ( rImplLineInfo.mnDashCount ),
- mnDashLen ( rImplLineInfo.mnDashLen ),
- mnDotCount ( rImplLineInfo.mnDotCount ),
- mnDotLen ( rImplLineInfo.mnDotLen ),
- mnDistance ( rImplLineInfo.mnDistance ),
+ mnRefCount ( 1 ),
+ meStyle ( rImplLineInfo.meStyle ),
+ mnWidth ( rImplLineInfo.mnWidth ),
+ mnDashCount ( rImplLineInfo.mnDashCount ),
+ mnDashLen ( rImplLineInfo.mnDashLen ),
+ mnDotCount ( rImplLineInfo.mnDotCount ),
+ mnDotLen ( rImplLineInfo.mnDotLen ),
+ mnDistance ( rImplLineInfo.mnDistance ),
meLineJoin ( rImplLineInfo.meLineJoin )
{
}
@@ -112,7 +112,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo )
if( !( --mpImplLineInfo->mnRefCount ) )
delete mpImplLineInfo;
-
+
mpImplLineInfo = rLineInfo.mpImplLineInfo;
return *this;
}
@@ -227,8 +227,8 @@ void LineInfo::SetLineJoin(basegfx::B2DLineJoin eLineJoin)
SvStream& operator>>( SvStream& rIStm, ImplLineInfo& rImplLineInfo )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplLineInfo.meStyle = (LineStyle) nTmp16;
rIStm >> rImplLineInfo.mnWidth;
@@ -344,15 +344,15 @@ void LineInfo::applyToB2DPolyPolygon(
if(GetWidth() > 1 && io_rLinePolyPolygon.count())
{
const double fHalfLineWidth((GetWidth() * 0.5) + 0.5);
-
+
for(sal_uInt32 a(0); a < io_rLinePolyPolygon.count(); a++)
{
o_rFillPolyPolygon.append(basegfx::tools::createAreaGeometry(
- io_rLinePolyPolygon.getB2DPolygon(a),
- fHalfLineWidth,
+ io_rLinePolyPolygon.getB2DPolygon(a),
+ fHalfLineWidth,
GetLineJoin()));
}
-
+
io_rLinePolyPolygon.clear();
}
}
diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx
index 34f0f473c7f8..c124733208f4 100644
--- a/vcl/source/gdi/mapmod.cxx
+++ b/vcl/source/gdi/mapmod.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,8 +64,8 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) :
SvStream& operator>>( SvStream& rIStm, ImplMapMode& rImplMapMode )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
rIStm >> nTmp16; rImplMapMode.meUnit = (MapUnit) nTmp16;
rIStm >> rImplMapMode.maOrigin >> rImplMapMode.maScaleX >>
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 752a4222bcb2..99db8a8e40ec 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -88,8 +88,8 @@ inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScal
#define COMPAT( _def_rIStm ) VersionCompat aCompat( ( _def_rIStm ), STREAM_READ );
#define COMPAT_VERSION() aCompat.GetVersion()
-#define WRITE_BASE_COMPAT( _def_rOStm, _def_nVer, _pWriteData ) \
- MetaAction::Write( ( _def_rOStm ), _pWriteData ); \
+#define WRITE_BASE_COMPAT( _def_rOStm, _def_nVer, _pWriteData ) \
+ MetaAction::Write( ( _def_rOStm ), _pWriteData ); \
VersionCompat aCompat( ( _def_rOStm ), STREAM_WRITE, ( _def_nVer ) );
// ========================================================================
@@ -154,7 +154,7 @@ sal_Bool MetaAction::IsEqual( const MetaAction& rMetaAction ) const
return sal_False;
else
return Compare( rMetaAction );
-}
+}
// ------------------------------------------------------------------------
@@ -175,7 +175,7 @@ void MetaAction::Read( SvStream& rIStm, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
MetaAction* pAction = NULL;
- UINT16 nType;
+ UINT16 nType;
rIStm >> nType;
@@ -258,9 +258,9 @@ IMPL_META_ACTION( Pixel, META_PIXEL_ACTION )
// ------------------------------------------------------------------------
MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
- MetaAction ( META_PIXEL_ACTION ),
- maPt ( rPt ),
- maColor ( rColor )
+ MetaAction ( META_PIXEL_ACTION ),
+ maPt ( rPt ),
+ maColor ( rColor )
{
}
@@ -327,8 +327,8 @@ IMPL_META_ACTION( Point, META_POINT_ACTION )
// ------------------------------------------------------------------------
MetaPointAction::MetaPointAction( const Point& rPt ) :
- MetaAction ( META_POINT_ACTION ),
- maPt ( rPt )
+ MetaAction ( META_POINT_ACTION ),
+ maPt ( rPt )
{
}
@@ -392,9 +392,9 @@ IMPL_META_ACTION( Line, META_LINE_ACTION )
// ------------------------------------------------------------------------
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_LINE_ACTION ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_LINE_ACTION ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -402,10 +402,10 @@ MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
const LineInfo& rLineInfo ) :
- MetaAction ( META_LINE_ACTION ),
- maLineInfo ( rLineInfo ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_LINE_ACTION ),
+ maLineInfo ( rLineInfo ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -460,8 +460,8 @@ void MetaLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maStartPt << maEndPt; // Version 1
- rOStm << maLineInfo; // Version 2
+ rOStm << maStartPt << maEndPt; // Version 1
+ rOStm << maLineInfo; // Version 2
}
// ------------------------------------------------------------------------
@@ -487,8 +487,8 @@ IMPL_META_ACTION( Rect, META_RECT_ACTION )
// ------------------------------------------------------------------------
MetaRectAction::MetaRectAction( const Rectangle& rRect ) :
- MetaAction ( META_RECT_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_RECT_ACTION ),
+ maRect ( rRect )
{
}
@@ -553,8 +553,8 @@ IMPL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
- MetaAction ( META_ROUNDRECT_ACTION ),
- maRect ( rRect ),
+ MetaAction ( META_ROUNDRECT_ACTION ),
+ maRect ( rRect ),
mnHorzRound ( nHorzRound ),
mnVertRound ( nVertRound )
{
@@ -624,8 +624,8 @@ IMPL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
// ------------------------------------------------------------------------
MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) :
- MetaAction ( META_ELLIPSE_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_ELLIPSE_ACTION ),
+ maRect ( rRect )
{
}
@@ -690,10 +690,10 @@ IMPL_META_ACTION( Arc, META_ARC_ACTION )
MetaArcAction::MetaArcAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_ARC_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_ARC_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -764,10 +764,10 @@ IMPL_META_ACTION( Pie, META_PIE_ACTION )
MetaPieAction::MetaPieAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_PIE_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_PIE_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -838,10 +838,10 @@ IMPL_META_ACTION( Chord, META_CHORD_ACTION )
MetaChordAction::MetaChordAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_CHORD_ACTION ),
- maRect ( rRect ),
- maStartPt ( rStart ),
- maEndPt ( rEnd )
+ MetaAction ( META_CHORD_ACTION ),
+ maRect ( rRect ),
+ maStartPt ( rStart ),
+ maEndPt ( rEnd )
{
}
@@ -911,17 +911,17 @@ IMPL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
// ------------------------------------------------------------------------
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYLINE_ACTION ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYLINE_ACTION ),
+ maPoly ( rPoly )
{
}
// ------------------------------------------------------------------------
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
- MetaAction ( META_POLYLINE_ACTION ),
- maLineInfo ( rLineInfo ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYLINE_ACTION ),
+ maLineInfo ( rLineInfo ),
+ maPoly ( rPoly )
{
}
@@ -976,16 +976,16 @@ sal_Bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const
void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
- WRITE_BASE_COMPAT( rOStm, 3, pData );
+ WRITE_BASE_COMPAT( rOStm, 3, pData );
Polygon aSimplePoly;
maPoly.AdaptiveSubdivide( aSimplePoly );
- rOStm << aSimplePoly; // Version 1
- rOStm << maLineInfo; // Version 2
+ rOStm << aSimplePoly; // Version 1
+ rOStm << maLineInfo; // Version 2
- sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 3
- rOStm << bHasPolyFlags;
+ sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 3
+ rOStm << bHasPolyFlags;
if ( bHasPolyFlags )
maPoly.Write( rOStm );
}
@@ -1018,8 +1018,8 @@ IMPL_META_ACTION( Polygon, META_POLYGON_ACTION )
// ------------------------------------------------------------------------
MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYGON_ACTION ),
- maPoly ( rPoly )
+ MetaAction ( META_POLYGON_ACTION ),
+ maPoly ( rPoly )
{
}
@@ -1066,11 +1066,11 @@ void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- Polygon aSimplePoly; // Version 1
+ Polygon aSimplePoly; // Version 1
maPoly.AdaptiveSubdivide( aSimplePoly );
- rOStm << aSimplePoly;
+ rOStm << aSimplePoly;
- sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 2
+ sal_uInt8 bHasPolyFlags = maPoly.HasFlags(); // Version 2
rOStm << bHasPolyFlags;
if ( bHasPolyFlags )
maPoly.Write( rOStm );
@@ -1082,9 +1082,9 @@ void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> maPoly; // Version 1
+ rIStm >> maPoly; // Version 1
- if( aCompat.GetVersion() >= 2 ) // Version 2
+ if( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt8 bHasPolyFlags;
rIStm >> bHasPolyFlags;
@@ -1100,8 +1100,8 @@ IMPL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
// ------------------------------------------------------------------------
MetaPolyPolygonAction::MetaPolyPolygonAction( const PolyPolygon& rPolyPoly ) :
- MetaAction ( META_POLYPOLYGON_ACTION ),
- maPolyPoly ( rPolyPoly )
+ MetaAction ( META_POLYPOLYGON_ACTION ),
+ maPolyPoly ( rPolyPoly )
{
}
@@ -1152,7 +1152,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
sal_uInt16 nNumberOfComplexPolygons = 0;
sal_uInt16 i, nPolyCount = maPolyPoly.Count();
- Polygon aSimplePoly; // Version 1
+ Polygon aSimplePoly; // Version 1
rOStm << nPolyCount;
for ( i = 0; i < nPolyCount; i++ )
{
@@ -1163,7 +1163,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm << aSimplePoly;
}
- rOStm << nNumberOfComplexPolygons; // Version 2
+ rOStm << nNumberOfComplexPolygons; // Version 2
for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
{
const Polygon& rPoly = maPolyPoly.GetObject( i );
@@ -1182,9 +1182,9 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
COMPAT( rIStm );
- rIStm >> maPolyPoly; // Version 1
-
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ rIStm >> maPolyPoly; // Version 1
+
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 i, nIndex, nNumberOfComplexPolygons;
rIStm >> nNumberOfComplexPolygons;
@@ -1206,11 +1206,11 @@ IMPL_META_ACTION( Text, META_TEXT_ACTION )
MetaTextAction::MetaTextAction( const Point& rPt, const XubString& rStr,
USHORT nIndex, USHORT nLen ) :
- MetaAction ( META_TEXT_ACTION ),
- maPt ( rPt ),
- maStr ( rStr ),
- mnIndex ( nIndex ),
- mnLen ( nLen )
+ MetaAction ( META_TEXT_ACTION ),
+ maPt ( rPt ),
+ maStr ( rStr ),
+ mnIndex ( nIndex ),
+ mnLen ( nLen )
{
}
@@ -1259,12 +1259,12 @@ sal_Bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maPt;
+ rOStm << maPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnIndex;
- rOStm << mnLen;
+ rOStm << mnIndex;
+ rOStm << mnLen;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1278,12 +1278,12 @@ void MetaTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maPt;
+ rIStm >> maPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1296,21 +1296,21 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
// ========================================================================
MetaTextArrayAction::MetaTextArrayAction() :
- MetaAction ( META_TEXTARRAY_ACTION ),
- mpDXAry ( NULL ),
- mnIndex ( 0 ),
- mnLen ( 0 )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ mpDXAry ( NULL ),
+ mnIndex ( 0 ),
+ mnLen ( 0 )
{
}
// ------------------------------------------------------------------------
MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
- maStartPt ( rAction.maStartPt ),
- maStr ( rAction.maStr ),
- mnIndex ( rAction.mnIndex ),
- mnLen ( rAction.mnLen )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ maStartPt ( rAction.maStartPt ),
+ maStr ( rAction.maStr ),
+ mnIndex ( rAction.mnIndex ),
+ mnLen ( rAction.mnLen )
{
if( rAction.mpDXAry )
{
@@ -1330,11 +1330,11 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const sal_Int32* pDXAry,
USHORT nIndex,
USHORT nLen ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
- maStartPt ( rStartPt ),
- maStr ( rStr ),
- mnIndex ( nIndex ),
- mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
+ MetaAction ( META_TEXTARRAY_ACTION ),
+ maStartPt ( rStartPt ),
+ maStr ( rStr ),
+ mnIndex ( nIndex ),
+ mnLen ( ( nLen == STRING_LEN ) ? rStr.Len() : nLen )
{
const ULONG nAryLen = pDXAry ? mnLen : 0;
@@ -1408,16 +1408,16 @@ void MetaTextArrayAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
const sal_uInt32 nAryLen = mpDXAry ? mnLen : 0;
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maStartPt;
+ rOStm << maStartPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnIndex;
- rOStm << mnLen;
- rOStm << nAryLen;
+ rOStm << mnIndex;
+ rOStm << mnLen;
+ rOStm << nAryLen;
for( ULONG i = 0UL; i < nAryLen; i++ )
rOStm << mpDXAry[ i ];
- sal_uInt16 j, nLen = maStr.Len(); // version 2
+ sal_uInt16 j, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( j = 0; j < nLen; j++ )
{
@@ -1435,18 +1435,18 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
delete[] mpDXAry;
COMPAT( rIStm );
- rIStm >> maStartPt;
+ rIStm >> maStartPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnIndex;
- rIStm >> mnLen;
- rIStm >> nAryLen;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
+ rIStm >> nAryLen;
if( nAryLen )
{
// #i9762#, #106172# Ensure that DX array is at least mnLen entries long
const ULONG nIntAryLen( Max(nAryLen, static_cast<sal_uInt32>(mnLen)) );
mpDXAry = new sal_Int32[ nIntAryLen ];
-
+
ULONG i;
for( i = 0UL; i < nAryLen; i++ )
rIStm >> mpDXAry[ i ];
@@ -1458,7 +1458,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
else
mpDXAry = NULL;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1477,12 +1477,12 @@ IMPL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const XubString& rStr,
USHORT nIndex, USHORT nLen ) :
- MetaAction ( META_STRETCHTEXT_ACTION ),
- maPt ( rPt ),
- maStr ( rStr ),
- mnWidth ( nWidth ),
- mnIndex ( nIndex ),
- mnLen ( nLen )
+ MetaAction ( META_STRETCHTEXT_ACTION ),
+ maPt ( rPt ),
+ maStr ( rStr ),
+ mnWidth ( nWidth ),
+ mnIndex ( nIndex ),
+ mnLen ( nLen )
{
}
@@ -1533,13 +1533,13 @@ sal_Bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const
void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maPt;
+ rOStm << maPt;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnWidth;
- rOStm << mnIndex;
- rOStm << mnLen;
+ rOStm << mnWidth;
+ rOStm << mnIndex;
+ rOStm << mnLen;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1553,13 +1553,13 @@ void MetaStretchTextAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaStretchTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maPt;
+ rIStm >> maPt;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnWidth;
- rIStm >> mnIndex;
- rIStm >> mnLen;
+ rIStm >> mnWidth;
+ rIStm >> mnIndex;
+ rIStm >> mnLen;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1577,10 +1577,10 @@ IMPL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
const XubString& rStr, USHORT nStyle ) :
- MetaAction ( META_TEXTRECT_ACTION ),
- maRect ( rRect ),
- maStr ( rStr ),
- mnStyle ( nStyle )
+ MetaAction ( META_TEXTRECT_ACTION ),
+ maRect ( rRect ),
+ maStr ( rStr ),
+ mnStyle ( nStyle )
{
}
@@ -1628,11 +1628,11 @@ sal_Bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const
void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 2, pData );
- rOStm << maRect;
+ rOStm << maRect;
rOStm.WriteByteString( maStr, pData->meActualCharSet );
- rOStm << mnStyle;
+ rOStm << mnStyle;
- sal_uInt16 i, nLen = maStr.Len(); // version 2
+ sal_uInt16 i, nLen = maStr.Len(); // version 2
rOStm << nLen;
for ( i = 0; i < nLen; i++ )
{
@@ -1646,11 +1646,11 @@ void MetaTextRectAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaTextRectAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
{
COMPAT( rIStm );
- rIStm >> maRect;
+ rIStm >> maRect;
rIStm.ReadByteString( maStr, pData->meActualCharSet );
- rIStm >> mnStyle;
+ rIStm >> mnStyle;
- if ( aCompat.GetVersion() >= 2 ) // Version 2
+ if ( aCompat.GetVersion() >= 2 ) // Version 2
{
sal_uInt16 nLen;
rIStm >> nLen;
@@ -1670,9 +1670,9 @@ MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline ) :
- MetaAction ( META_TEXTLINE_ACTION ),
- maPos ( rPos ),
- mnWidth ( nWidth ),
+ MetaAction ( META_TEXTLINE_ACTION ),
+ maPos ( rPos ),
+ mnWidth ( nWidth ),
meStrikeout ( eStrikeout ),
meUnderline ( eUnderline ),
meOverline ( eOverline )
@@ -1761,9 +1761,9 @@ IMPL_META_ACTION( Bmp, META_BMP_ACTION )
// ------------------------------------------------------------------------
MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
- MetaAction ( META_BMP_ACTION ),
- maBmp ( rBmp ),
- maPt ( rPt )
+ MetaAction ( META_BMP_ACTION ),
+ maBmp ( rBmp ),
+ maPt ( rPt )
{
}
@@ -1832,10 +1832,10 @@ IMPL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALE_ACTION ),
- maBmp ( rBmp ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_BMPSCALE_ACTION ),
+ maBmp ( rBmp ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -1909,12 +1909,12 @@ IMPL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALEPART_ACTION ),
- maBmp ( rBmp ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_BMPSCALEPART_ACTION ),
+ maBmp ( rBmp ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -1988,9 +1988,9 @@ IMPL_META_ACTION( BmpEx, META_BMPEX_ACTION )
// ------------------------------------------------------------------------
MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEX_ACTION ),
- maBmpEx ( rBmpEx ),
- maPt ( rPt )
+ MetaAction ( META_BMPEX_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maPt ( rPt )
{
}
@@ -2059,10 +2059,10 @@ IMPL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALE_ACTION ),
- maBmpEx ( rBmpEx ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_BMPEXSCALE_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -2136,12 +2136,12 @@ IMPL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALEPART_ACTION ),
- maBmpEx ( rBmpEx ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_BMPEXSCALEPART_ACTION ),
+ maBmpEx ( rBmpEx ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -2217,10 +2217,10 @@ IMPL_META_ACTION( Mask, META_MASK_ACTION )
MetaMaskAction::MetaMaskAction( const Point& rPt,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASK_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maPt ( rPt )
+ MetaAction ( META_MASK_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maPt ( rPt )
{
}
@@ -2291,11 +2291,11 @@ IMPL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALE_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maPt ( rPt ),
- maSz ( rSz )
+ MetaAction ( META_MASKSCALE_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maPt ( rPt ),
+ maSz ( rSz )
{
}
@@ -2371,13 +2371,13 @@ MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Siz
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALEPART_ACTION ),
- maBmp ( rBmp ),
- maColor ( rColor ),
- maDstPt ( rDstPt ),
- maDstSz ( rDstSz ),
- maSrcPt ( rSrcPt ),
- maSrcSz ( rSrcSz )
+ MetaAction ( META_MASKSCALEPART_ACTION ),
+ maBmp ( rBmp ),
+ maColor ( rColor ),
+ maDstPt ( rDstPt ),
+ maDstSz ( rDstSz ),
+ maSrcPt ( rSrcPt ),
+ maSrcSz ( rSrcSz )
{
}
@@ -2456,9 +2456,9 @@ IMPL_META_ACTION( Gradient, META_GRADIENT_ACTION )
// ------------------------------------------------------------------------
MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENT_ACTION ),
- maRect ( rRect ),
- maGradient ( rGradient )
+ MetaAction ( META_GRADIENT_ACTION ),
+ maRect ( rRect ),
+ maGradient ( rGradient )
{
}
@@ -2519,16 +2519,16 @@ void MetaGradientAction::Read( SvStream& rIStm, ImplMetaReadData* )
// ========================================================================
MetaGradientExAction::MetaGradientExAction() :
- MetaAction ( META_GRADIENTEX_ACTION )
+ MetaAction ( META_GRADIENTEX_ACTION )
{
}
// ------------------------------------------------------------------------
MetaGradientExAction::MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENTEX_ACTION ),
- maPolyPoly ( rPolyPoly ),
- maGradient ( rGradient )
+ MetaAction ( META_GRADIENTEX_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ maGradient ( rGradient )
{
}
@@ -2607,9 +2607,9 @@ IMPL_META_ACTION( Hatch, META_HATCH_ACTION )
// ------------------------------------------------------------------------
MetaHatchAction::MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
- MetaAction ( META_HATCH_ACTION ),
- maPolyPoly ( rPolyPoly ),
- maHatch ( rHatch )
+ MetaAction ( META_HATCH_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ maHatch ( rHatch )
{
}
@@ -2682,8 +2682,8 @@ IMPL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect,
const Wallpaper& rPaper ) :
- MetaAction ( META_WALLPAPER_ACTION ),
- maRect ( rRect ),
+ MetaAction ( META_WALLPAPER_ACTION ),
+ maRect ( rRect ),
maWallpaper ( rPaper )
{
}
@@ -2749,9 +2749,9 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, BOOL bClip ) :
- MetaAction ( META_CLIPREGION_ACTION ),
- maRegion ( rRegion ),
- mbClip ( bClip )
+ MetaAction ( META_CLIPREGION_ACTION ),
+ maRegion ( rRegion ),
+ mbClip ( bClip )
{
}
@@ -2819,8 +2819,8 @@ IMPL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) :
- MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
- maRect ( rRect )
+ MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
+ maRect ( rRect )
{
}
@@ -2884,8 +2884,8 @@ IMPL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const Region& rRegion ) :
- MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
- maRegion ( rRegion )
+ MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
+ maRegion ( rRegion )
{
}
@@ -2949,9 +2949,9 @@ IMPL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
// ------------------------------------------------------------------------
MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
- MetaAction ( META_MOVECLIPREGION_ACTION ),
- mnHorzMove ( nHorzMove ),
- mnVertMove ( nVertMove )
+ MetaAction ( META_MOVECLIPREGION_ACTION ),
+ mnHorzMove ( nHorzMove ),
+ mnVertMove ( nVertMove )
{
}
@@ -3010,9 +3010,9 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaLineColorAction::MetaLineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_LINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_LINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3068,9 +3068,9 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaFillColorAction::MetaFillColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_FILLCOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_FILLCOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3126,8 +3126,8 @@ IMPL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextColorAction::MetaTextColorAction( const Color& rColor ) :
- MetaAction ( META_TEXTCOLOR_ACTION ),
- maColor ( rColor )
+ MetaAction ( META_TEXTCOLOR_ACTION ),
+ maColor ( rColor )
{
}
@@ -3177,9 +3177,9 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_TEXTFILLCOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_TEXTFILLCOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3235,9 +3235,9 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_TEXTLINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_TEXTLINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3293,9 +3293,9 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
// ------------------------------------------------------------------------
MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, BOOL bSet ) :
- MetaAction ( META_OVERLINECOLOR_ACTION ),
- maColor ( rColor ),
- mbSet ( bSet )
+ MetaAction ( META_OVERLINECOLOR_ACTION ),
+ maColor ( rColor ),
+ mbSet ( bSet )
{
}
@@ -3351,8 +3351,8 @@ IMPL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
// ------------------------------------------------------------------------
MetaTextAlignAction::MetaTextAlignAction( TextAlign aAlign ) :
- MetaAction ( META_TEXTALIGN_ACTION ),
- maAlign ( aAlign )
+ MetaAction ( META_TEXTALIGN_ACTION ),
+ maAlign ( aAlign )
{
}
@@ -3404,8 +3404,8 @@ IMPL_META_ACTION( MapMode, META_MAPMODE_ACTION )
// ------------------------------------------------------------------------
MetaMapModeAction::MetaMapModeAction( const MapMode& rMapMode ) :
- MetaAction ( META_MAPMODE_ACTION ),
- maMapMode ( rMapMode )
+ MetaAction ( META_MAPMODE_ACTION ),
+ maMapMode ( rMapMode )
{
}
@@ -3465,15 +3465,15 @@ IMPL_META_ACTION( Font, META_FONT_ACTION )
// ------------------------------------------------------------------------
MetaFontAction::MetaFontAction( const Font& rFont ) :
- MetaAction ( META_FONT_ACTION ),
- maFont ( rFont )
+ MetaAction ( META_FONT_ACTION ),
+ maFont ( rFont )
{
// #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
// we change the textencoding to RTL_TEXTENCODING_UNICODE here, which seems
- // to be the right way; changing the textencoding at other sources
+ // to be the right way; changing the textencoding at other sources
// is too dangerous at the moment
if( ( ( maFont.GetName().SearchAscii( "StarSymbol" ) != STRING_NOTFOUND )
- || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) )
+ || ( maFont.GetName().SearchAscii( "OpenSymbol" ) != STRING_NOTFOUND ) )
&& ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
{
maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
@@ -3542,8 +3542,8 @@ IMPL_META_ACTION( Push, META_PUSH_ACTION )
// ------------------------------------------------------------------------
MetaPushAction::MetaPushAction( USHORT nFlags ) :
- MetaAction ( META_PUSH_ACTION ),
- mnFlags ( nFlags )
+ MetaAction ( META_PUSH_ACTION ),
+ mnFlags ( nFlags )
{
}
@@ -3627,8 +3627,8 @@ IMPL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
// ------------------------------------------------------------------------
MetaRasterOpAction::MetaRasterOpAction( RasterOp eRasterOp ) :
- MetaAction ( META_RASTEROP_ACTION ),
- meRasterOp ( eRasterOp )
+ MetaAction ( META_RASTEROP_ACTION ),
+ meRasterOp ( eRasterOp )
{
}
@@ -3680,9 +3680,9 @@ IMPL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
// ------------------------------------------------------------------------
MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, USHORT nTransPercent ) :
- MetaAction ( META_TRANSPARENT_ACTION ),
- maPolyPoly ( rPolyPoly ),
- mnTransPercent ( nTransPercent )
+ MetaAction ( META_TRANSPARENT_ACTION ),
+ maPolyPoly ( rPolyPoly ),
+ mnTransPercent ( nTransPercent )
{
}
@@ -3764,11 +3764,11 @@ IMPL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
MetaFloatTransparentAction::MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rGradient ) :
- MetaAction ( META_FLOATTRANSPARENT_ACTION ),
- maMtf ( rMtf ),
- maPoint ( rPos ),
- maSize ( rSize ),
- maGradient ( rGradient )
+ MetaAction ( META_FLOATTRANSPARENT_ACTION ),
+ maMtf ( rMtf ),
+ maPoint ( rPos ),
+ maSize ( rSize ),
+ maGradient ( rGradient )
{
}
@@ -3822,7 +3822,7 @@ sal_Bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) co
void MetaFloatTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
WRITE_BASE_COMPAT( rOStm, 1, pData );
-
+
maMtf.Write( rOStm );
rOStm << maPoint << maSize << maGradient;
}
@@ -3843,11 +3843,11 @@ IMPL_META_ACTION( EPS, META_EPS_ACTION )
MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
- MetaAction ( META_EPS_ACTION ),
- maGfxLink ( rGfxLink ),
- maSubst ( rSubst ),
- maPoint ( rPoint ),
- maSize ( rSize )
+ MetaAction ( META_EPS_ACTION ),
+ maGfxLink ( rGfxLink ),
+ maSubst ( rSubst ),
+ maPoint ( rPoint ),
+ maSize ( rSize )
{
}
@@ -3923,9 +3923,9 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
// ------------------------------------------------------------------------
MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, BOOL bSet ) :
- MetaAction ( META_REFPOINT_ACTION ),
- maRefPoint ( rRefPoint ),
- mbSet ( bSet )
+ MetaAction ( META_REFPOINT_ACTION ),
+ maRefPoint ( rRefPoint ),
+ mbSet ( bSet )
{
}
@@ -3975,8 +3975,8 @@ void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
// ========================================================================
MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
- MetaAction ( META_COMMENT_ACTION ),
- mnValue ( nValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ mnValue ( nValue )
{
ImplInitDynamicData( NULL, 0UL );
}
@@ -3984,9 +3984,9 @@ MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
- MetaAction ( META_COMMENT_ACTION ),
- maComment ( rAct.maComment ),
- mnValue ( rAct.mnValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ maComment ( rAct.maComment ),
+ mnValue ( rAct.mnValue )
{
ImplInitDynamicData( rAct.mpData, rAct.mnDataSize );
}
@@ -3994,9 +3994,9 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nValue, const BYTE* pData, sal_uInt32 nDataSize ) :
- MetaAction ( META_COMMENT_ACTION ),
- maComment ( rComment ),
- mnValue ( nValue )
+ MetaAction ( META_COMMENT_ACTION ),
+ maComment ( rComment ),
+ mnValue ( nValue )
{
ImplInitDynamicData( pData, nDataSize );
}
@@ -4004,8 +4004,8 @@ MetaCommentAction::MetaCommentAction( const ByteString& rComment, sal_Int32 nVal
// ------------------------------------------------------------------------
MetaCommentAction::MetaCommentAction( const BYTE* pData, sal_uInt32 nDataSize ) :
- MetaAction ( META_COMMENT_ACTION ),
- mnValue ( 0L )
+ MetaAction ( META_COMMENT_ACTION ),
+ mnValue ( 0L )
{
ImplInitDynamicData( pData, nDataSize );
}
@@ -4060,8 +4060,8 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
- SvMemoryStream aDest;
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
if ( bPathStroke )
{
SvtGraphicStroke aStroke;
@@ -4078,7 +4078,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
aMemStm >> aFill;
PolyPolygon aPath;
aFill.getPath( aPath );
- aPath.Scale( nXMove, nYMove );
+ aPath.Move( nXMove, nYMove );
aFill.setPath( aPath );
aDest << aFill;
}
@@ -4102,8 +4102,8 @@ void MetaCommentAction::Scale( double fXScale, double fYScale )
sal_Bool bPathStroke = maComment.Equals( "XPATHSTROKE_SEQ_BEGIN" );
if ( bPathStroke || maComment.Equals( "XPATHFILL_SEQ_BEGIN" ) )
{
- SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
- SvMemoryStream aDest;
+ SvMemoryStream aMemStm( (void*)mpData, mnDataSize, STREAM_READ );
+ SvMemoryStream aDest;
if ( bPathStroke )
{
SvtGraphicStroke aStroke;
@@ -4178,7 +4178,7 @@ IMPL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
// ------------------------------------------------------------------------
MetaLayoutModeAction::MetaLayoutModeAction( sal_uInt32 nLayoutMode ) :
- MetaAction ( META_LAYOUTMODE_ACTION ),
+ MetaAction ( META_LAYOUTMODE_ACTION ),
mnLayoutMode( nLayoutMode )
{
}
@@ -4229,7 +4229,7 @@ IMPL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
// ------------------------------------------------------------------------
MetaTextLanguageAction::MetaTextLanguageAction( LanguageType eTextLanguage ) :
- MetaAction ( META_TEXTLANGUAGE_ACTION ),
+ MetaAction ( META_TEXTLANGUAGE_ACTION ),
meTextLanguage( eTextLanguage )
{
}
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index 325146b6be8a..ab9153e24836 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -236,12 +236,12 @@ BOOL FontMetric::operator==( const FontMetric& rMetric ) const
CmapResult::CmapResult( bool bSymbolic,
const sal_uInt32* pRangeCodes, int nRangeCount,
const int* pStartGlyphs, const USHORT* pExtraGlyphIds )
-: mpRangeCodes( pRangeCodes)
-, mpStartGlyphs( pStartGlyphs)
-, mpGlyphIds( pExtraGlyphIds)
-, mnRangeCount( nRangeCount)
-, mbSymbolic( bSymbolic)
-, mbRecoded( false)
+: mpRangeCodes( pRangeCodes)
+, mpStartGlyphs( pStartGlyphs)
+, mpGlyphIds( pExtraGlyphIds)
+, mnRangeCount( nRangeCount)
+, mbSymbolic( bSymbolic)
+, mbRecoded( false)
{}
// =======================================================================
@@ -298,8 +298,8 @@ ImplFontCharMap* ImplFontCharMap::GetDefaultMap( bool bSymbols)
int nCodesCount = sizeof(aDefaultUnicodeRanges) / sizeof(*pRangeCodes);
if( bSymbols )
{
- pRangeCodes = aDefaultSymbolRanges;
- nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes);
+ pRangeCodes = aDefaultSymbolRanges;
+ nCodesCount = sizeof(aDefaultSymbolRanges) / sizeof(*pRangeCodes);
}
CmapResult aDefaultCR( bSymbols, pRangeCodes, nCodesCount/2 );
@@ -377,7 +377,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
// return -1 if the object doesn't know the glyph ids
if( !mpStartGlyphs )
return -1;
-
+
// return 0 if the unicode doesn't have a matching glyph
int nRange = ImplFindRangeIndex( cChar );
// check that we are inside any range
@@ -393,7 +393,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
// check that we are inside a range
if( (nRange & 1) != 0 )
return 0;
-
+
// get glyph index directly or indirectly
int nGlyphIndex = cChar - mpRangeCodes[ nRange ];
const int nStartIndex = mpStartGlyphs[ nRange/2 ];
@@ -533,7 +533,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
{
rResult.mpRangeCodes = NULL;
rResult.mpStartGlyphs= NULL;
- rResult.mpGlyphIds = NULL;
+ rResult.mpGlyphIds = NULL;
rResult.mnRangeCount = 0;
rResult.mbRecoded = false;
rResult.mbSymbolic = false;
@@ -803,7 +803,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
*(pOut++) = *(it++);
}
- // update the result struct
+ // update the result struct
rResult.mpRangeCodes = pCodePairs;
rResult.mpStartGlyphs = pStartGlyphs;
rResult.mnRangeCount = nRangeCount;
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 0660728fc8a5..5270014e9d80 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -297,7 +297,7 @@ void Octree::GetPalIndex( PNODE pNode )
InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
nBits( 8 - OCTREE_BITS )
{
- ULONG* cdp;
+ ULONG* cdp;
BYTE* crgbp;
const ULONG nColorMax = 1 << OCTREE_BITS;
const ULONG xsqr = 1 << ( nBits << 1 );
@@ -315,9 +315,9 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
for( ULONG nIndex = 0; nIndex < nColors; nIndex++ )
{
const BitmapColor& rColor = rPal[ (USHORT) nIndex ];
- const BYTE cRed = rColor.GetRed();
- const BYTE cGreen = rColor.GetGreen();
- const BYTE cBlue = rColor.GetBlue();
+ const BYTE cRed = rColor.GetRed();
+ const BYTE cGreen = rColor.GetGreen();
+ const BYTE cBlue = rColor.GetBlue();
rdist = cRed - x2;
gdist = cGreen - x2;
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index ce3ece7e1e5b..f4a421189305 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ void OldStylePrintAdaptor::StartPage()
mpData->maPages.back().maPageSize.Width = aPaperSize.getWidth();
mpData->maPages.back().maPageSize.Height = aPaperSize.getHeight();
getPrinter()->SetConnectMetaFile( &mpData->maPages.back().maPage );
-
+
// copy state into metafile
boost::shared_ptr<Printer> pPrinter( getPrinter() );
pPrinter->SetMapMode( pPrinter->GetMapMode() );
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index a011e4ee4a92..7038b2952cd2 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,7 +103,7 @@ const char* ImplDbgCheckOutputDevice( const void* pObj )
// =======================================================================
-#define OUTDEV_POLYPOLY_STACKBUF 32
+#define OUTDEV_POLYPOLY_STACKBUF 32
// =======================================================================
@@ -224,14 +224,14 @@ bool OutputDevice::ImplSelectClipRegion( const Region& rRegion, SalGraphics* pGr
return true;
}
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ULONG nRectCount;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
- BOOL bClipRegion = TRUE;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ULONG nRectCount;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
+ BOOL bClipRegion = TRUE;
const BOOL bClipDeviceBounds( !pOutDev->GetPDFWriter()
&& pOutDev->GetOutDevType() != OUTDEV_PRINTER );
@@ -336,36 +336,36 @@ void OutputDevice::ImplDrawPolyPolygon( USHORT nPoly, const PolyPolygon& rPolyPo
if(!nPoly)
return;
- sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
- PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
- BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
- sal_uInt32* pPointAry;
- PCONSTSALPOINT* pPointAryAry;
- const BYTE** pFlagAryAry;
- USHORT i = 0, j = 0, last = 0;
- BOOL bHaveBezier = sal_False;
+ sal_uInt32 aStackAry1[OUTDEV_POLYPOLY_STACKBUF];
+ PCONSTSALPOINT aStackAry2[OUTDEV_POLYPOLY_STACKBUF];
+ BYTE* aStackAry3[OUTDEV_POLYPOLY_STACKBUF];
+ sal_uInt32* pPointAry;
+ PCONSTSALPOINT* pPointAryAry;
+ const BYTE** pFlagAryAry;
+ USHORT i = 0, j = 0, last = 0;
+ BOOL bHaveBezier = sal_False;
if ( nPoly > OUTDEV_POLYPOLY_STACKBUF )
{
- pPointAry = new sal_uInt32[nPoly];
- pPointAryAry = new PCONSTSALPOINT[nPoly];
- pFlagAryAry = new const BYTE*[nPoly];
+ pPointAry = new sal_uInt32[nPoly];
+ pPointAryAry = new PCONSTSALPOINT[nPoly];
+ pFlagAryAry = new const BYTE*[nPoly];
}
else
{
- pPointAry = aStackAry1;
- pPointAryAry = aStackAry2;
- pFlagAryAry = (const BYTE**)aStackAry3;
+ pPointAry = aStackAry1;
+ pPointAryAry = aStackAry2;
+ pFlagAryAry = (const BYTE**)aStackAry3;
}
do
{
- const Polygon& rPoly = rPolyPoly.GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = rPolyPoly.GetObject( i );
+ USHORT nSize = rPoly.GetSize();
if ( nSize )
{
- pPointAry[j] = nSize;
+ pPointAry[j] = nSize;
pPointAryAry[j] = (PCONSTSALPOINT)rPoly.GetConstPointAry();
pFlagAryAry[j] = rPoly.GetConstFlagAry();
- last = i;
+ last = i;
if( pFlagAryAry[j] )
bHaveBezier = sal_True;
@@ -428,81 +428,81 @@ OutputDevice::OutputDevice() :
{
DBG_CTOR( OutputDevice, ImplDbgCheckOutputDevice );
- mpGraphics = NULL;
- mpUnoGraphicsList = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
- mpMetaFile = NULL;
- mpFontEntry = NULL;
- mpFontCache = NULL;
- mpFontList = NULL;
- mpGetDevFontList = NULL;
- mpGetDevSizeList = NULL;
- mpObjStack = NULL;
- mpOutDevData = NULL;
- mpPDFWriter = NULL;
- mpAlphaVDev = NULL;
- mpExtOutDevData = NULL;
- mnOutOffX = 0;
- mnOutOffY = 0;
- mnOutWidth = 0;
- mnOutHeight = 0;
- mnDPIX = 0;
- mnDPIY = 0;
- mnTextOffX = 0;
- mnTextOffY = 0;
- mnOutOffOrigX = 0;
- mnOutOffLogicX = 0;
- mnOutOffOrigY = 0;
- mnOutOffLogicY = 0;
- mnEmphasisAscent = 0;
- mnEmphasisDescent = 0;
- mnDrawMode = 0;
+ mpGraphics = NULL;
+ mpUnoGraphicsList = NULL;
+ mpPrevGraphics = NULL;
+ mpNextGraphics = NULL;
+ mpMetaFile = NULL;
+ mpFontEntry = NULL;
+ mpFontCache = NULL;
+ mpFontList = NULL;
+ mpGetDevFontList = NULL;
+ mpGetDevSizeList = NULL;
+ mpObjStack = NULL;
+ mpOutDevData = NULL;
+ mpPDFWriter = NULL;
+ mpAlphaVDev = NULL;
+ mpExtOutDevData = NULL;
+ mnOutOffX = 0;
+ mnOutOffY = 0;
+ mnOutWidth = 0;
+ mnOutHeight = 0;
+ mnDPIX = 0;
+ mnDPIY = 0;
+ mnTextOffX = 0;
+ mnTextOffY = 0;
+ mnOutOffOrigX = 0;
+ mnOutOffLogicX = 0;
+ mnOutOffOrigY = 0;
+ mnOutOffLogicY = 0;
+ mnEmphasisAscent = 0;
+ mnEmphasisDescent = 0;
+ mnDrawMode = 0;
mnTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if( Application::GetSettings().GetLayoutRTL() ) //#i84553# tip BiDi preference to RTL
mnTextLayoutMode = TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_TEXTORIGIN_LEFT;
- meOutDevType = OUTDEV_DONTKNOW;
+ meOutDevType = OUTDEV_DONTKNOW;
meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW;
- mbMap = FALSE;
- mbMapIsDefault = TRUE;
- mbClipRegion = FALSE;
- mbBackground = FALSE;
- mbOutput = TRUE;
- mbDevOutput = FALSE;
- mbOutputClipped = FALSE;
- maTextColor = Color( COL_BLACK );
- maOverlineColor = Color( COL_TRANSPARENT );
- meTextAlign = maFont.GetAlign();
- meRasterOp = ROP_OVERPAINT;
- mnAntialiasing = 0;
+ mbMap = FALSE;
+ mbMapIsDefault = TRUE;
+ mbClipRegion = FALSE;
+ mbBackground = FALSE;
+ mbOutput = TRUE;
+ mbDevOutput = FALSE;
+ mbOutputClipped = FALSE;
+ maTextColor = Color( COL_BLACK );
+ maOverlineColor = Color( COL_TRANSPARENT );
+ meTextAlign = maFont.GetAlign();
+ meRasterOp = ROP_OVERPAINT;
+ mnAntialiasing = 0;
meTextLanguage = 0; // TODO: get default from configuration?
- mbLineColor = TRUE;
- mbFillColor = TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
- mbClipRegionSet = FALSE;
- mbKerning = FALSE;
- mbNewFont = TRUE;
- mbTextLines = FALSE;
- mbTextSpecial = FALSE;
- mbRefPoint = FALSE;
+ mbLineColor = TRUE;
+ mbFillColor = TRUE;
+ mbInitLineColor = TRUE;
+ mbInitFillColor = TRUE;
+ mbInitFont = TRUE;
+ mbInitTextColor = TRUE;
+ mbInitClipRegion = TRUE;
+ mbClipRegionSet = FALSE;
+ mbKerning = FALSE;
+ mbNewFont = TRUE;
+ mbTextLines = FALSE;
+ mbTextSpecial = FALSE;
+ mbRefPoint = FALSE;
mbEnableRTL = FALSE; // mirroring must be explicitly allowed (typically for windows only)
// struct ImplMapRes
- maMapRes.mnMapOfsX = 0;
- maMapRes.mnMapOfsY = 0;
- maMapRes.mnMapScNumX = 1;
- maMapRes.mnMapScNumY = 1;
- maMapRes.mnMapScDenomX = 1;
- maMapRes.mnMapScDenomY = 1;
+ maMapRes.mnMapOfsX = 0;
+ maMapRes.mnMapOfsY = 0;
+ maMapRes.mnMapScNumX = 1;
+ maMapRes.mnMapScNumY = 1;
+ maMapRes.mnMapScDenomX = 1;
+ maMapRes.mnMapScDenomY = 1;
// struct ImplThresholdRes
- maThresRes.mnThresLogToPixX = 0;
- maThresRes.mnThresLogToPixY = 0;
- maThresRes.mnThresPixToLogX = 0;
- maThresRes.mnThresPixToLogY = 0;
+ maThresRes.mnThresLogToPixX = 0;
+ maThresRes.mnThresLogToPixY = 0;
+ maThresRes.mnThresPixToLogX = 0;
+ maThresRes.mnThresPixToLogY = 0;
}
// -----------------------------------------------------------------------
@@ -600,7 +600,7 @@ void OutputDevice::EnableRTL( BOOL bEnable )
Window* pWin = dynamic_cast<Window*>(this);
if( pWin )
pWin->StateChanged( STATE_CHANGE_MIRRORING );
-
+
if( mpAlphaVDev )
mpAlphaVDev->EnableRTL( bEnable );
}
@@ -633,12 +633,12 @@ void OutputDevice::ImplReMirror( Rectangle &rRect ) const
}
void OutputDevice::ImplReMirror( Region &rRegion ) const
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
Region aMirroredRegion;
bRegionRect = rRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -662,11 +662,11 @@ int OutputDevice::ImplGetGraphics() const
if ( mpGraphics )
return TRUE;
- mbInitLineColor = TRUE;
- mbInitFillColor = TRUE;
- mbInitFont = TRUE;
- mbInitTextColor = TRUE;
- mbInitClipRegion = TRUE;
+ mbInitLineColor = TRUE;
+ mbInitFillColor = TRUE;
+ mbInitFont = TRUE;
+ mbInitTextColor = TRUE;
+ mbInitClipRegion = TRUE;
ImplSVData* pSVData = ImplGetSVData();
if ( meOutDevType == OUTDEV_WINDOW )
@@ -920,9 +920,9 @@ void OutputDevice::ImplReleaseGraphics( BOOL bRelease )
}
}
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = NULL;
+ mpPrevGraphics = NULL;
+ mpNextGraphics = NULL;
}
// -----------------------------------------------------------------------
@@ -1040,7 +1040,7 @@ void OutputDevice::ImplInitClipRegion()
if ( GetOutDevType() == OUTDEV_WINDOW )
{
Window* pWindow = (Window*)this;
- Region aRegion;
+ Region aRegion;
// Hintergrund-Sicherung zuruecksetzen
if ( pWindow->mpWindowImpl->mpFrameData->mpFirstBackWin )
@@ -1107,16 +1107,16 @@ void OutputDevice::ImplSetClipRegion( const Region* pRegion )
{
if ( mbClipRegion )
{
- maRegion = Region( REGION_NULL );
- mbClipRegion = FALSE;
- mbInitClipRegion = TRUE;
+ maRegion = Region( REGION_NULL );
+ mbClipRegion = FALSE;
+ mbInitClipRegion = TRUE;
}
}
else
{
- maRegion = *pRegion;
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ maRegion = *pRegion;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
}
}
@@ -1145,8 +1145,8 @@ namespace
return 0x80000000;
if(a >= 0)
return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
+ int q = -(-a / b); // quotient
+ int r = -a % b; // remainder
if(r)
q--;
return q;
@@ -1158,7 +1158,7 @@ namespace
return 0x80000000;
if(a >= 0)
return a % b;
- int r = -a % b; // remainder
+ int r = -a % b; // remainder
if(r)
r = b - r;
return r;
@@ -1171,8 +1171,8 @@ namespace
a += - 1 + b;
if(a >= 0)
return a / b;
- int q = -(-a / b); // quotient
- int r = -a % b; // remainder
+ int q = -(-a / b); // quotient
+ int r = -a % b; // remainder
if(r)
q--;
return q;
@@ -1947,8 +1947,8 @@ void OutputDevice::IntersectClipRegion( const Rectangle& rRect )
Rectangle aRect = LogicToPixel( rRect );
maRegion.Intersect( aRect );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
if( mpAlphaVDev )
mpAlphaVDev->IntersectClipRegion( rRect );
@@ -1971,8 +1971,8 @@ void OutputDevice::IntersectClipRegion( const Region& rRegion )
Region aRegion = LogicToPixel( rRegion );
maRegion.Intersect( aRegion );
- mbClipRegion = TRUE;
- mbInitClipRegion = TRUE;
+ mbClipRegion = TRUE;
+ mbInitClipRegion = TRUE;
}
if( mpAlphaVDev )
@@ -2291,7 +2291,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt )
ImplInitLineColor();
// #i101598# support AA and snap for lines, too
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor())
@@ -2332,7 +2332,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
const LineInfo& rInfo,
basegfx::B2DPolyPolygon aLinePolyPolygon)
{
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -2388,19 +2388,19 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
// #i110768# When area geometry has to be created, do not
// use the fallback bezier decomposition inside createAreaGeometry,
// but one that is at least as good as ImplSubdivideBezier was.
- // There, Polygon::AdaptiveSubdivide was used with default parameter
+ // There, Polygon::AdaptiveSubdivide was used with default parameter
// 1.0 as quality index.
aLinePolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0);
}
-
+
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
aFillPolyPolygon.append(basegfx::tools::createAreaGeometry(
- aLinePolyPolygon.getB2DPolygon(a),
- fHalfLineWidth,
+ aLinePolyPolygon.getB2DPolygon(a),
+ fHalfLineWidth,
rInfo.GetLineJoin()));
}
-
+
aLinePolyPolygon.clear();
}
@@ -2429,8 +2429,8 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
if(aFillPolyPolygon.count())
{
- const Color aOldLineColor( maLineColor );
- const Color aOldFillColor( maFillColor );
+ const Color aOldLineColor( maLineColor );
+ const Color aOldFillColor( maFillColor );
SetLineColor();
ImplInitLineColor();
@@ -2438,7 +2438,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
ImplInitFillColor();
bool bDone(false);
-
+
if(bTryAA)
{
bDone = mpGraphics->DrawPolyPolygon(aFillPolyPolygon, 0.0, this);
@@ -2452,7 +2452,7 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
mpGraphics->DrawPolygon(aPolygon.GetSize(), (const SalPoint*)aPolygon.GetConstPointAry(), this);
}
}
-
+
SetFillColor( aOldFillColor );
SetLineColor( aOldLineColor );
}
@@ -2585,7 +2585,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
if ( mbInitLineColor )
ImplInitLineColor();
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -2650,7 +2650,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo
// #i101491#
// Try direct Fallback to B2D-Version of DrawPolyLine
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& LINE_SOLID == rLineInfo.GetStyle())
{
DrawPolyLine( rPoly.getB2DPolygon(), (double)rLineInfo.GetWidth(), rLineInfo.GetLineJoin());
@@ -2673,7 +2673,7 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI
Polygon aPoly = ImplLogicToDevicePixel( rPoly );
// #100127# LineInfo is not curve-safe, subdivide always
- //
+ //
// What shall this mean? It's wrong to subdivide here when the
// polygon is a fat line. In that case, the painted geometry
// WILL be much different.
@@ -2718,7 +2718,7 @@ void OutputDevice::ImpDrawPolyLineWithLineInfo(const Polygon& rPoly, const LineI
aPoly = ImplSubdivideBezier( aPoly );
nPoints = aPoly.GetSize();
}
-
+
mpGraphics->DrawPolyLine(nPoints, (const SalPoint*)aPoly.GetConstPointAry(), this);
}
@@ -2758,7 +2758,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
ImplInitFillColor();
// use b2dpolygon drawing if possible
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -2848,7 +2848,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
ImplInitFillColor();
// use b2dpolygon drawing if possible
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -2971,7 +2971,7 @@ void OutputDevice::ImpDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPo
if( mbInitFillColor )
ImplInitFillColor();
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& (IsLineColor() || IsFillColor()))
@@ -3025,7 +3025,7 @@ bool OutputDevice::ImpTryDrawPolyLineDirect(
{
const basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation();
basegfx::B2DVector aB2DLineWidth(1.0, 1.0);
-
+
// transform the line width if used
if( fLineWidth != 0.0 )
{
@@ -3035,8 +3035,8 @@ bool OutputDevice::ImpTryDrawPolyLineDirect(
// transform the polygon
basegfx::B2DPolygon aB2DPolygon(rB2DPolygon);
aB2DPolygon.transform(aTransform);
-
- if((mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
+
+ if((mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE)
&& aB2DPolygon.count() < 1000)
{
// #i98289#, #i101491#
@@ -3093,7 +3093,7 @@ void OutputDevice::DrawPolyLine(
if( mbInitLineColor )
ImplInitLineColor();
- const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp()
&& IsLineColor());
@@ -3108,7 +3108,7 @@ void OutputDevice::DrawPolyLine(
// no output yet; fallback to geometry decomposition and use filled polygon paint
// when line is fat and not too complex. ImpDrawPolyPolygonWithB2DPolyPolygon
// will do internal needed AA checks etc.
- if(fLineWidth >= 2.5
+ if(fLineWidth >= 2.5
&& rB2DPolygon.count()
&& rB2DPolygon.count() <= 1000)
{
@@ -3256,8 +3256,8 @@ void OutputDevice::Pop()
if( mpMetaFile )
mpMetaFile->AddAction( new MetaPopAction() );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- ImplObjStack* pData = mpObjStack;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ ImplObjStack* pData = mpObjStack;
mpMetaFile = NULL;
if ( !pData )
diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index bea307a4c38d..25bf06586809 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,23 +65,23 @@ DBG_NAMEEX( OutputDevice )
// - Defines -
// -----------
-#define OUTDEV_INIT() \
-{ \
- if ( !IsDeviceOutputNecessary() ) \
- return; \
+#define OUTDEV_INIT() \
+{ \
+ if ( !IsDeviceOutputNecessary() ) \
+ return; \
\
- if ( !mpGraphics ) \
- if ( !ImplGetGraphics() ) \
- return; \
+ if ( !mpGraphics ) \
+ if ( !ImplGetGraphics() ) \
+ return; \
\
- if ( mbInitClipRegion ) \
- ImplInitClipRegion(); \
+ if ( mbInitClipRegion ) \
+ ImplInitClipRegion(); \
\
- if ( mbOutputClipped ) \
- return; \
+ if ( mbOutputClipped ) \
+ return; \
}
-#define TwoRect SalTwoRect
+#define TwoRect SalTwoRect
// -------------
// - externals -
@@ -116,13 +116,13 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
}
if( ( rTwoRect.mnSrcX < 0 ) || ( rTwoRect.mnSrcX >= rSizePix.Width() ) ||
- ( rTwoRect.mnSrcY < 0 ) || ( rTwoRect.mnSrcY >= rSizePix.Height() ) ||
+ ( rTwoRect.mnSrcY < 0 ) || ( rTwoRect.mnSrcY >= rSizePix.Height() ) ||
( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rSizePix.Width() ) ||
( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rSizePix.Height() ) )
{
- const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
+ const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ),
Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) );
- Rectangle aCropRect( aSourceRect );
+ Rectangle aCropRect( aSourceRect );
aCropRect.Intersection( Rectangle( Point(), rSizePix ) );
@@ -130,8 +130,8 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
rTwoRect.mnSrcWidth = rTwoRect.mnSrcHeight = rTwoRect.mnDestWidth = rTwoRect.mnDestHeight = 0;
else
{
- const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? (double) ( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
- const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? (double) ( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
+ const double fFactorX = ( rTwoRect.mnSrcWidth > 1 ) ? (double) ( rTwoRect.mnDestWidth - 1 ) / ( rTwoRect.mnSrcWidth - 1 ) : 0.0;
+ const double fFactorY = ( rTwoRect.mnSrcHeight > 1 ) ? (double) ( rTwoRect.mnDestHeight - 1 ) / ( rTwoRect.mnSrcHeight - 1 ) : 0.0;
const long nDstX1 = rTwoRect.mnDestX + FRound( fFactorX * ( aCropRect.Left() - rTwoRect.mnSrcX ) );
const long nDstY1 = rTwoRect.mnDestY + FRound( fFactorY * ( aCropRect.Top() - rTwoRect.mnSrcY ) );
@@ -156,8 +156,8 @@ ULONG ImplAdjustTwoRect( TwoRect& rTwoRect, const Size& rSizePix )
void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoidPosAry )
{
- TwoRect* pPosAry = (TwoRect*)pVoidPosAry;
- SalGraphics* pGraphics2;
+ TwoRect* pPosAry = (TwoRect*)pVoidPosAry;
+ SalGraphics* pGraphics2;
if ( pPosAry->mnSrcWidth && pPosAry->mnSrcHeight && pPosAry->mnDestWidth && pPosAry->mnDestHeight )
{
@@ -200,12 +200,12 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoi
}
// #102532# Offset only has to be pseudo window offset
- Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
+ Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ),
Size( pSrcDev->mnOutWidth, pSrcDev->mnOutHeight ) );
- Rectangle aSrcRect( Point( pPosAry->mnSrcX, pPosAry->mnSrcY ),
+ Rectangle aSrcRect( Point( pPosAry->mnSrcX, pPosAry->mnSrcY ),
Size( pPosAry->mnSrcWidth, pPosAry->mnSrcHeight ) );
- const long nOldRight = aSrcRect.Right();
- const long nOldBottom = aSrcRect.Bottom();
+ const long nOldRight = aSrcRect.Right();
+ const long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -230,7 +230,7 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, void* pVoi
if( (GetOutDevType() != OUTDEV_WINDOW) && pGraphics2 && (pGraphics2->GetLayout() & SAL_LAYOUT_BIDI_RTL) )
{
SalTwoRect pPosAry2 = *pPosAry;
- pGraphics2->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev );
+ pGraphics2->mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcDev );
mpGraphics->CopyBits( &pPosAry2, pGraphics2, this, pSrcDev );
}
else
@@ -269,24 +269,24 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
- aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
- Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
- Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
+ Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ) );
- long nOldRight = aSrcRect.Right();
- long nOldBottom = aSrcRect.Bottom();
+ long nOldRight = aSrcRect.Right();
+ long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -342,12 +342,12 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = rOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnSrcWidth = rOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcX = rOutDev.ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = rOutDev.ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnSrcWidth = rOutDev.ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = rOutDev.ImplLogicHeightToDevicePixel( rSrcSize.Height() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
aPosAry.mnDestWidth = ImplLogicWidthToDevicePixel( rDestSize.Width() );
aPosAry.mnDestHeight = ImplLogicHeightToDevicePixel( rDestSize.Height() );
@@ -404,22 +404,22 @@ void OutputDevice::CopyArea( const Point& rDestPt,
OUTDEV_INIT();
TwoRect aPosAry;
- aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
+ aPosAry.mnSrcWidth = ImplLogicWidthToDevicePixel( rSrcSize.Width() );
aPosAry.mnSrcHeight = ImplLogicHeightToDevicePixel( rSrcSize.Height() );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight )
{
- aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
- aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
- aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
+ aPosAry.mnSrcX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ aPosAry.mnSrcY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ aPosAry.mnDestX = ImplLogicXToDevicePixel( rDestPt.X() );
+ aPosAry.mnDestY = ImplLogicYToDevicePixel( rDestPt.Y() );
- Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
+ Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ),
Size( mnOutWidth, mnOutHeight ) );
- Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
+ Rectangle aSrcRect( Point( aPosAry.mnSrcX, aPosAry.mnSrcY ),
Size( aPosAry.mnSrcWidth, aPosAry.mnSrcHeight ) );
- long nOldRight = aSrcRect.Right();
- long nOldBottom = aSrcRect.Bottom();
+ long nOldRight = aSrcRect.Right();
+ long nOldBottom = aSrcRect.Bottom();
if ( !aSrcRect.Intersection( aSrcOutRect ).IsEmpty() )
{
@@ -463,9 +463,9 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
- RasterOp eOldROP = GetRasterOp();
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ BOOL bOldMap = mbMap;
+ RasterOp eOldROP = GetRasterOp();
mpMetaFile = NULL;
mbMap = FALSE;
SetRasterOp( ROP_OVERPAINT );
@@ -486,12 +486,12 @@ void OutputDevice::ImplDrawFrameDev( const Point& rPt, const Point& rDevPt, cons
ImplSelectClipRegion( rRegion );
TwoRect aPosAry;
- aPosAry.mnSrcX = rDevPt.X();
- aPosAry.mnSrcY = rDevPt.Y();
- aPosAry.mnSrcWidth = rDevSize.Width();
+ aPosAry.mnSrcX = rDevPt.X();
+ aPosAry.mnSrcY = rDevPt.Y();
+ aPosAry.mnSrcWidth = rDevSize.Width();
aPosAry.mnSrcHeight = rDevSize.Height();
- aPosAry.mnDestX = rPt.X();
- aPosAry.mnDestY = rPt.Y();
+ aPosAry.mnDestX = rPt.X();
+ aPosAry.mnDestY = rPt.Y();
aPosAry.mnDestWidth = rDevSize.Width();
aPosAry.mnDestHeight = rDevSize.Height();
ImplDrawOutDevDirect( &rOutDev, &aPosAry );
@@ -591,7 +591,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
}
- else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
+ else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
@@ -661,7 +661,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
if ( nMirrFlags )
aBmp.Mirror( nMirrFlags );
-
+
/* #i75264# (corrected with #i81576#)
* sometimes a bitmap is scaled to a ridiculous size and drawn
* to a quite normal VDev, so only a very small part of
@@ -691,7 +691,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
if( aPosAry.mnDestWidth > 3*mnOutWidth && aPosAry.mnSrcWidth )
{
const double nScaleX = aPosAry.mnDestWidth/double(aPosAry.mnSrcWidth);
-
+
if( aPosAry.mnDestX + aPosAry.mnDestWidth > mnOutWidth )
{
aPosAry.mnDestWidth = Max(long(0),mnOutWidth-aPosAry.mnDestX);
@@ -702,14 +702,14 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnSrcX -= sal::static_int_cast<long>(aPosAry.mnDestX / nScaleX);
aPosAry.mnDestX = 0;
}
-
+
aPosAry.mnSrcWidth = sal::static_int_cast<long>(aPosAry.mnDestWidth / nScaleX);
}
-
+
if( aPosAry.mnDestHeight > 3*mnOutHeight && aPosAry.mnSrcHeight != 0 )
{
const double nScaleY = aPosAry.mnDestHeight/double(aPosAry.mnSrcHeight);
-
+
if( aPosAry.mnDestY + aPosAry.mnDestHeight > mnOutHeight )
{
aPosAry.mnDestHeight = Max(long(0),mnOutHeight-aPosAry.mnDestY);
@@ -720,7 +720,7 @@ void OutputDevice::ImplDrawBitmap( const Point& rDestPt, const Size& rDestSize,
aPosAry.mnSrcY -= sal::static_int_cast<long>(aPosAry.mnDestY / nScaleY);
aPosAry.mnDestY = 0;
}
-
+
aPosAry.mnSrcHeight = sal::static_int_cast<long>(aPosAry.mnDestHeight / nScaleY);
}
}
@@ -802,13 +802,13 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
DrawRect( Rectangle( rDestPt, rDestSize ) );
return;
}
- else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
+ else if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
{
if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
{
- Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
- BYTE cCmpVal;
+ Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
+ BYTE cCmpVal;
if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
@@ -948,7 +948,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnDestHeight == aPosAry.mnSrcHeight )
{
// now intersect dest rect with clip region
- aClipRegionBounds.Intersection( Rectangle( aPosAry.mnDestX,
+ aClipRegionBounds.Intersection( Rectangle( aPosAry.mnDestX,
aPosAry.mnDestY,
aPosAry.mnDestX + aPosAry.mnDestWidth - 1,
aPosAry.mnDestY + aPosAry.mnDestHeight - 1 ) );
@@ -963,7 +963,7 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
aPosAry.mnSrcY += aClipRegionBounds.Top() - aPosAry.mnDestY;
aPosAry.mnSrcWidth = aClipRegionBounds.GetWidth();
aPosAry.mnSrcHeight = aClipRegionBounds.GetHeight();
-
+
aPosAry.mnDestX = aClipRegionBounds.Left();
aPosAry.mnDestY = aClipRegionBounds.Top();
aPosAry.mnDestWidth = aClipRegionBounds.GetWidth();
@@ -971,13 +971,13 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
}
}
- mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(),
- *pMaskBmp->ImplGetSalBitmap(),
+ mpGraphics->DrawBitmap( &aPosAry, *pImpBmp->ImplGetSalBitmap(),
+ *pMaskBmp->ImplGetSalBitmap(),
this );
// #110958# Paint mask to alpha channel. Luckily, the
// black and white representation of the mask maps to
- // the alpha channel
+ // the alpha channel
// #i25167# Restrict mask painting to _opaque_ areas
// of the mask, otherwise we spoil areas where no
@@ -985,8 +985,8 @@ void OutputDevice::ImplDrawBitmapEx( const Point& rDestPt, const Size& rDestSize
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
if( mpAlphaVDev )
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
BitmapEx( aBmpEx.GetMask(),
aBmpEx.GetMask() ) );
}
@@ -1026,8 +1026,8 @@ void OutputDevice::DrawMask( const Point& rDestPt,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- PixelToLogic( aSizePix ),
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ PixelToLogic( aSizePix ),
BitmapEx( rMask, rMask ) );
}
}
@@ -1054,8 +1054,8 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
BitmapEx( rMask, rMask ) );
}
}
@@ -1083,9 +1083,9 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
// bitmap content was ever visible. Interestingly
// enough, this can be achieved by taking the mask as
// the transparency mask of itself
- mpAlphaVDev->DrawBitmapEx( rDestPt,
- rDestSize,
- rSrcPtPixel,
+ mpAlphaVDev->DrawBitmapEx( rDestPt,
+ rDestSize,
+ rSrcPtPixel,
rSrcSizePixel,
BitmapEx( rMask, rMask ) );
}
@@ -1176,10 +1176,10 @@ void OutputDevice::ImplDrawMask( const Point& rDestPt, const Size& rDestSize,
void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nStyle )
{
DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );
-
+
if( !rImage.mpImplData || ImplIsRecordLayout() )
return;
-
+
switch( rImage.mpImplData->meType )
{
case IMAGETYPE_BITMAP:
@@ -1193,7 +1193,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, USHORT nSt
if( !pData->mpImageBitmap )
{
const Size aSize( pData->maBmpEx.GetSizePixel() );
-
+
pData->mpImageBitmap = new ImplImageBmp;
pData->mpImageBitmap->Create( pData->maBmpEx, aSize.Width(), aSize.Height(), 1 );
}
@@ -1221,23 +1221,23 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize,
case IMAGETYPE_BITMAP:
DrawBitmap( rPos, rSize, *static_cast< Bitmap* >( rImage.mpImplData->mpData ) );
break;
-
+
case IMAGETYPE_IMAGE:
{
ImplImageData* pData = static_cast< ImplImageData* >( rImage.mpImplData->mpData );
-
+
if ( !pData->mpImageBitmap )
{
const Size aSize( pData->maBmpEx.GetSizePixel() );
-
+
pData->mpImageBitmap = new ImplImageBmp;
pData->mpImageBitmap->Create( pData->maBmpEx, aSize.Width(), aSize.Height(), 1 );
}
-
+
pData->mpImageBitmap->Draw( 0, this, rPos, nStyle, &rSize );
}
break;
-
+
default:
break;
}
@@ -1250,18 +1250,18 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- Bitmap aBmp;
- long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
- long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
- long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
- long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
+ Bitmap aBmp;
+ long nX = ImplLogicXToDevicePixel( rSrcPt.X() );
+ long nY = ImplLogicYToDevicePixel( rSrcPt.Y() );
+ long nWidth = ImplLogicWidthToDevicePixel( rSize.Width() );
+ long nHeight = ImplLogicHeightToDevicePixel( rSize.Height() );
if ( mpGraphics || ( (OutputDevice*) this )->ImplGetGraphics() )
{
if ( nWidth && nHeight )
{
- Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- BOOL bClipped = FALSE;
+ Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) );
+ BOOL bClipped = FALSE;
// X-Koordinate ausserhalb des Bereichs?
if ( nX < mnOutOffX )
@@ -1282,7 +1282,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const
// Breite ausserhalb des Bereichs?
if ( (nWidth + nX) > (mnOutWidth + mnOutOffX) )
{
- nWidth = mnOutOffX + mnOutWidth - nX;
+ nWidth = mnOutOffX + mnOutWidth - nX;
bClipped = TRUE;
}
@@ -1394,9 +1394,9 @@ Color OutputDevice::GetPixel( const Point& rPt ) const
if ( !mbOutputClipped )
{
- const long nX = ImplLogicXToDevicePixel( rPt.X() );
- const long nY = ImplLogicYToDevicePixel( rPt.Y() );
- const SalColor aSalCol = mpGraphics->GetPixel( nX, nY, this );
+ const long nX = ImplLogicXToDevicePixel( rPt.X() );
+ const long nY = ImplLogicYToDevicePixel( rPt.Y() );
+ const SalColor aSalCol = mpGraphics->GetPixel( nX, nY, this );
aColor.SetRed( SALCOLOR_RED( aSalCol ) );
aColor.SetGreen( SALCOLOR_GREEN( aSalCol ) );
aColor.SetBlue( SALCOLOR_BLUE( aSalCol ) );
@@ -1411,8 +1411,8 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- Color* pColors = NULL;
- const USHORT nSize = rPts.GetSize();
+ Color* pColors = NULL;
+ const USHORT nSize = rPts.GetSize();
if( nSize )
{
@@ -1427,9 +1427,9 @@ Color* OutputDevice::GetPixel( const Polygon& rPts ) const
for( USHORT i = 0; i < nSize; i++ )
{
- Color& rCol = pColors[ i ];
- const Point& rPt = rPts[ i ];
- const SalColor aSalCol( mpGraphics->GetPixel( ImplLogicXToDevicePixel( rPt.X() ),
+ Color& rCol = pColors[ i ];
+ const Point& rPt = rPts[ i ];
+ const SalColor aSalCol( mpGraphics->GetPixel( ImplLogicXToDevicePixel( rPt.X() ),
ImplLogicYToDevicePixel( rPt.Y() ) , this) );
rCol.SetRed( SALCOLOR_RED( aSalCol ) );
@@ -1488,7 +1488,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
Color aColor( rColor );
- if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
+ if( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
DRAWMODE_SETTINGSLINE ) )
{
@@ -1598,8 +1598,8 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
{
if( rColor != COL_TRANSPARENT && ! ImplIsRecordLayout() )
{
- const USHORT nSize = rPts.GetSize();
- Color* pColArray = new Color[ nSize ];
+ const USHORT nSize = rPts.GetSize();
+ Color* pColArray = new Color[ nSize ];
for( USHORT i = 0; i < nSize; i++ )
pColArray[ i ] = rColor;
@@ -1627,12 +1627,12 @@ namespace
// ------------------------------------------------------------------------
Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
- BitmapReadAccess* pP,
- BitmapReadAccess* pA,
+ BitmapReadAccess* pP,
+ BitmapReadAccess* pA,
const Rectangle& aDstRect,
- const sal_Int32 nOffY,
- const sal_Int32 nDstHeight,
- const sal_Int32 nOffX,
+ const sal_Int32 nOffY,
+ const sal_Int32 nDstHeight,
+ const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
const long* pMapX,
const long* pMapY )
@@ -1648,14 +1648,14 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
mpAlphaVDev->EnableMapMode(FALSE);
Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
- BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
+ BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess();
if( GetBitCount() <= 8 )
{
- Bitmap aDither( aBmp.GetSizePixel(), 8 );
- BitmapColor aIndex( 0 );
- BitmapReadAccess* pB = aBmp.AcquireReadAccess();
- BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
+ Bitmap aDither( aBmp.GetSizePixel(), 8 );
+ BitmapColor aIndex( 0 );
+ BitmapReadAccess* pB = aBmp.AcquireReadAccess();
+ BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
if( pB && pP && pA && pW && pAlphaW )
{
@@ -1666,7 +1666,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aSrcCol = pP->GetColor( nMapY, nMapX );
@@ -1703,12 +1703,12 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
}
else
{
- BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
+ BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
if( pP && pA && pB )
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
+ const long nMapY = pMapY[ nY ];
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1750,13 +1750,13 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp,
// ------------------------------------------------------------------------
Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
- BitmapReadAccess* pP,
- BitmapReadAccess* pA,
- const sal_Int32 nOffY,
- const sal_Int32 nDstHeight,
- const sal_Int32 nOffX,
+ BitmapReadAccess* pP,
+ BitmapReadAccess* pA,
+ const sal_Int32 nOffY,
+ const sal_Int32 nDstHeight,
+ const sal_Int32 nOffX,
const sal_Int32 nDstWidth,
- const Rectangle& aBmpRect,
+ const Rectangle& aBmpRect,
const Size& aOutSz,
const bool bHMirr,
const bool bVMirr,
@@ -1769,10 +1769,10 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
if( GetBitCount() <= 8 )
{
- Bitmap aDither( aBmp.GetSizePixel(), 8 );
- BitmapColor aIndex( 0 );
- BitmapReadAccess* pB = aBmp.AcquireReadAccess();
- BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
+ Bitmap aDither( aBmp.GetSizePixel(), 8 );
+ BitmapColor aIndex( 0 );
+ BitmapReadAccess* pB = aBmp.AcquireReadAccess();
+ BitmapWriteAccess* pW = aDither.AcquireWriteAccess();
if( pB && pP && pA && pW )
{
@@ -1783,7 +1783,7 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
for( nX = 0, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
const ULONG nD = nVCLDitherLut[ nModY | ( nOutX & 0x0FL ) ];
aDstCol = pB->GetColor( nY, nX );
@@ -1802,7 +1802,7 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
}
else
{
- BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
+ BitmapWriteAccess* pB = aBmp.AcquireWriteAccess();
bool bFastBlend = false;
if( pP && pA && pB )
@@ -1829,9 +1829,9 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1848,14 +1848,14 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
- const long nMapX = pMapX[ nX ];
- Scanline pTmp = pPScan + nMapX * 3;
+ const long nMapX = pMapX[ nX ];
+ Scanline pTmp = pPScan + nMapX * 3;
aDstCol = pB->GetPixel( nY, nX );
pB->SetPixel( nY, nX, aDstCol.Merge( pTmp[ 2 ], pTmp[ 1 ], pTmp[ 0 ],
@@ -1869,13 +1869,13 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pPScan = pP->GetScanline( nMapY );
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pPScan = pP->GetScanline( nMapY );
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
- const long nMapX = pMapX[ nX ];
+ const long nMapX = pMapX[ nX ];
Scanline pTmp = pPScan + nMapX * 3;
aDstCol = pB->GetPixel( nY, nX );
@@ -1890,8 +1890,8 @@ Bitmap OutputDevice::ImplBlend( Bitmap aBmp,
{
for( nY = 0; nY < nDstHeight; nY++ )
{
- const long nMapY = pMapY[ nY ];
- Scanline pAScan = pA->GetScanline( nMapY );
+ const long nMapY = pMapY[ nY ];
+ Scanline pAScan = pA->GetScanline( nMapY );
for( nX = 0; nX < nDstWidth; nX++ )
{
@@ -1920,10 +1920,10 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
const Point aNullPt;
- Point aOutPt( LogicToPixel( rDestPt ) );
+ Point aOutPt( LogicToPixel( rDestPt ) );
Size aOutSz( LogicToPixel( rDestSize ) );
- Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
- const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
+ Rectangle aDstRect( aNullPt, GetOutputSizePixel() );
+ const BOOL bHMirr = aOutSz.Width() < 0, bVMirr = aOutSz.Height() < 0;
if( OUTDEV_WINDOW == meOutDevType )
{
@@ -1951,7 +1951,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA");
// #i83087# Naturally, system alpha blending cannot work with
// separate alpha VDev
- if( !mpAlphaVDev && !pDisableNative && !bHMirr && !bVMirr )
+ if( !mpAlphaVDev && !pDisableNative && !bHMirr && !bVMirr )
{
Point aRelPt = aOutPt + Point( mnOutOffX, mnOutOffY );
SalTwoRect aTR = {
@@ -1969,11 +1969,11 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
Rectangle aBmpRect( aNullPt, rBmp.GetSizePixel() );
if( !bNativeAlpha
- && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
+ && !aBmpRect.Intersection( Rectangle( rSrcPtPixel, rSrcSizePixel ) ).IsEmpty() )
{
- GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
- const BOOL bOldMap = mbMap; mbMap = FALSE;
- Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
+ GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL;
+ const BOOL bOldMap = mbMap; mbMap = FALSE;
+ Bitmap aBmp( GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) );
// #109044# The generated bitmap need not necessarily be
// of aDstRect dimensions, it's internally clipped to
@@ -1984,16 +1984,16 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( aBmp.ImplGetImpBitmap() )
aDstRect.SetSize( aBmp.GetSizePixel() );
- BitmapColor aDstCol;
- const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight();
- const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight();
- const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height();
- const long nOffX = aDstRect.Left() - aOutPt.X(), nOffY = aDstRect.Top() - aOutPt.Y();
- long nX, nOutX, nY, nOutY;
- long nMirrOffX = 0;
- long nMirrOffY = 0;
- long* pMapX = new long[ nDstWidth ];
- long* pMapY = new long[ nDstHeight ];
+ BitmapColor aDstCol;
+ const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight();
+ const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight();
+ const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height();
+ const long nOffX = aDstRect.Left() - aOutPt.X(), nOffY = aDstRect.Top() - aOutPt.Y();
+ long nX, nOutX, nY, nOutY;
+ long nMirrOffX = 0;
+ long nMirrOffY = 0;
+ long* pMapX = new long[ nDstWidth ];
+ long* pMapY = new long[ nDstHeight ];
// create horizontal mapping table
if( bHMirr )
@@ -2006,7 +2006,7 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( bHMirr )
pMapX[ nX ] = nMirrOffX - pMapX[ nX ];
}
-
+
// create vertical mapping table
if( bVMirr )
nMirrOffY = ( aBmpRect.Top() << 1 ) + nSrcHeight - 1;
@@ -2019,11 +2019,11 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
pMapY[ nY ] = nMirrOffY - pMapY[ nY ];
}
- BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess();
- BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
+ BitmapReadAccess* pP = ( (Bitmap&) rBmp ).AcquireReadAccess();
+ BitmapReadAccess* pA = ( (AlphaMask&) rAlpha ).AcquireReadAccess();
DBG_ASSERT( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ||
- pA->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
+ pA->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
"OutputDevice::ImplDrawAlpha(): non-8bit alpha no longer supported!" );
// #i38887# reading from screen may sometimes fail
@@ -2056,13 +2056,13 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha,
if( mpAlphaVDev )
mpAlphaVDev = NULL;
- DrawBitmap( aDstRect.TopLeft(),
+ DrawBitmap( aDstRect.TopLeft(),
aTmp );
// #110958# Enable alpha VDev again
mpAlphaVDev = pOldVDev;
}
-
+
( (Bitmap&) rBmp ).ReleaseAccess( pP );
( (AlphaMask&) rAlpha ).ReleaseAccess( pA );
@@ -2080,17 +2080,17 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- Point aPt;
- Point aDestPt( LogicToPixel( rDestPt ) );
- Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ Point aPt;
+ Point aDestPt( LogicToPixel( rDestPt ) );
+ Size aDestSz( LogicToPixel( rDestSize ) );
+ Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
if( !rBmp.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
- Bitmap aPaint( rBmp ), aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ Bitmap aPaint( rBmp ), aMask( rMask );
+ ULONG nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2133,11 +2133,11 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
}
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
- long* pMapX = new long[ nSrcWidth + 1 ];
- long* pMapY = new long[ nSrcHeight + 1 ];
- const BOOL bOldMap = mbMap;
+ const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ long* pMapX = new long[ nSrcWidth + 1 ];
+ long* pMapY = new long[ nSrcHeight + 1 ];
+ const BOOL bOldMap = mbMap;
mbMap = FALSE;
@@ -2147,10 +2147,10 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
for( nY = 0L; nY <= nSrcHeight; nY++ )
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
-
+
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
- ImplRegionInfo aInfo;
+ ImplRegionInfo aInfo;
BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
@@ -2159,7 +2159,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
const Rectangle aBandRect( Point( nWorkX, nWorkY ), Size( nWorkWidth, nWorkHeight ) );
const Point aMapPt( pMapX[ nWorkX ], pMapY[ nWorkY ] );
const Size aMapSz( pMapX[ nWorkX + nWorkWidth ] - aMapPt.X(), pMapY[ nWorkY + nWorkHeight ] - aMapPt.Y() );
-
+
aBandBmp.Crop( aBandRect );
ImplDrawBitmap( aMapPt, aMapSz, Point(), aBandBmp.GetSizePixel(), aBandBmp, META_BMPSCALEPART_ACTION );
bRgnRect = aWorkRgn.ImplGetNextRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
@@ -2178,17 +2178,17 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel )
{
- Point aPt;
- Point aDestPt( LogicToPixel( rDestPt ) );
- Size aDestSz( LogicToPixel( rDestSize ) );
- Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
+ Point aPt;
+ Point aDestPt( LogicToPixel( rDestPt ) );
+ Size aDestSz( LogicToPixel( rDestSize ) );
+ Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel );
aSrcRect.Justify();
if( !rMask.IsEmpty() && aSrcRect.GetWidth() && aSrcRect.GetHeight() && aDestSz.Width() && aDestSz.Height() )
{
- Bitmap aMask( rMask );
- ULONG nMirrFlags = 0UL;
+ Bitmap aMask( rMask );
+ ULONG nMirrFlags = 0UL;
if( aMask.GetBitCount() > 1 )
aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
@@ -2218,12 +2218,12 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
aMask.Mirror( nMirrFlags );
// do painting
- const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
- long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
- long* pMapX = new long[ nSrcWidth + 1 ];
- long* pMapY = new long[ nSrcHeight + 1 ];
+ const long nSrcWidth = aSrcRect.GetWidth(), nSrcHeight = aSrcRect.GetHeight();
+ long nX, nY, nWorkX, nWorkY, nWorkWidth, nWorkHeight;
+ long* pMapX = new long[ nSrcWidth + 1 ];
+ long* pMapY = new long[ nSrcHeight + 1 ];
GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ const BOOL bOldMap = mbMap;
mpMetaFile = NULL;
mbMap = FALSE;
@@ -2239,10 +2239,10 @@ void OutputDevice::ImplPrintMask( const Bitmap& rMask, const Color& rMaskColor,
for( nY = 0L; nY <= nSrcHeight; nY++ )
pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight );
-
+
// walk through all rectangles of mask
Region aWorkRgn( aMask.CreateRegion( COL_BLACK, Rectangle( Point(), aMask.GetSizePixel() ) ) );
- ImplRegionInfo aInfo;
+ ImplRegionInfo aInfo;
BOOL bRgnRect = aWorkRgn.ImplGetFirstRect( aInfo, nWorkX, nWorkY, nWorkWidth, nWorkHeight );
while( bRgnRect )
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index bf1cc2728bf1..c39be173de30 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -435,7 +435,7 @@ bool ImplDirectFontSubstitution::GetFontSubstitute( int nIndex,
String& rFontName, String& rSubstFontName, USHORT& rFlags ) const
{
FontSubstList::const_iterator it = maFontSubstList.begin();
- for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
+ for( int nCount = 0; (it != maFontSubstList.end()) && (nCount++ != nIndex); ++it ) ;
if( it == maFontSubstList.end() )
return false;
@@ -563,7 +563,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
case DEFAULTFONT_CJK_SPREADSHEET:
case DEFAULTFONT_CJK_HEADING:
case DEFAULTFONT_CJK_DISPLAY:
- aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
+ aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
break;
case DEFAULTFONT_CTL_TEXT:
@@ -571,7 +571,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
case DEFAULTFONT_CTL_SPREADSHEET:
case DEFAULTFONT_CTL_HEADING:
case DEFAULTFONT_CTL_DISPLAY:
- aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
+ aFont.SetFamily( FAMILY_SYSTEM ); // don't care, but don't use font subst config later...
break;
}
@@ -659,35 +659,35 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
const char* s = "DEFAULTFONT_SANS_UNKNOWN";
switch ( nType )
{
- case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break;
- case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break;
+ case DEFAULTFONT_SANS_UNICODE: s = "DEFAULTFONT_SANS_UNICODE"; break;
+ case DEFAULTFONT_UI_SANS: s = "DEFAULTFONT_UI_SANS"; break;
- case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break;
- case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break;
- case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break;
- case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break;
+ case DEFAULTFONT_SANS: s = "DEFAULTFONT_SANS"; break;
+ case DEFAULTFONT_LATIN_HEADING: s = "DEFAULTFONT_LATIN_HEADING"; break;
+ case DEFAULTFONT_LATIN_SPREADSHEET: s = "DEFAULTFONT_LATIN_SPREADSHEET"; break;
+ case DEFAULTFONT_LATIN_DISPLAY: s = "DEFAULTFONT_LATIN_DISPLAY"; break;
- case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break;
- case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break;
- case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break;
+ case DEFAULTFONT_SERIF: s = "DEFAULTFONT_SERIF"; break;
+ case DEFAULTFONT_LATIN_TEXT: s = "DEFAULTFONT_LATIN_TEXT"; break;
+ case DEFAULTFONT_LATIN_PRESENTATION: s = "DEFAULTFONT_LATIN_PRESENTATION"; break;
- case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break;
- case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break;
- case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break;
+ case DEFAULTFONT_FIXED: s = "DEFAULTFONT_FIXED"; break;
+ case DEFAULTFONT_LATIN_FIXED: s = "DEFAULTFONT_LATIN_FIXED"; break;
+ case DEFAULTFONT_UI_FIXED: s = "DEFAULTFONT_UI_FIXED"; break;
- case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break;
+ case DEFAULTFONT_SYMBOL: s = "DEFAULTFONT_SYMBOL"; break;
- case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break;
- case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break;
- case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break;
- case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break;
- case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break;
+ case DEFAULTFONT_CJK_TEXT: s = "DEFAULTFONT_CJK_TEXT"; break;
+ case DEFAULTFONT_CJK_PRESENTATION: s = "DEFAULTFONT_CJK_PRESENTATION"; break;
+ case DEFAULTFONT_CJK_SPREADSHEET: s = "DEFAULTFONT_CJK_SPREADSHEET"; break;
+ case DEFAULTFONT_CJK_HEADING: s = "DEFAULTFONT_CJK_HEADING"; break;
+ case DEFAULTFONT_CJK_DISPLAY: s = "DEFAULTFONT_CJK_DISPLAY"; break;
- case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break;
- case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break;
- case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break;
- case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break;
- case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break;
+ case DEFAULTFONT_CTL_TEXT: s = "DEFAULTFONT_CTL_TEXT"; break;
+ case DEFAULTFONT_CTL_PRESENTATION: s = "DEFAULTFONT_CTL_PRESENTATION"; break;
+ case DEFAULTFONT_CTL_SPREADSHEET: s = "DEFAULTFONT_CTL_SPREADSHEET"; break;
+ case DEFAULTFONT_CTL_HEADING: s = "DEFAULTFONT_CTL_HEADING"; break;
+ case DEFAULTFONT_CTL_DISPLAY: s = "DEFAULTFONT_CTL_DISPLAY"; break;
}
fprintf( stderr, " OutputDevice::GetDefaultFont() Type=\"%s\" lang=%d flags=%ld FontName=\"%s\"\n",
s, eLang, nFlags,
@@ -3270,7 +3270,7 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
mnWidth = rFontSelData.mnWidth;
mnOrientation = sal::static_int_cast<short>(rFontSelData.mnOrientation);
- // intialize the used font name
+ // intialize the used font name
if( rFontSelData.mpFontData )
{
maName = rFontSelData.mpFontData->maName;
@@ -3287,7 +3287,7 @@ ImplFontMetricData::ImplFontMetricData( const ImplFontSelectData& rFontSelData )
mbKernableFont = false;
}
- // reset metrics that are usually measured for the font instance
+ // reset metrics that are usually measured for the font instance
mnAscent = 0;
mnDescent = 0;
mnIntLeading = 0;
@@ -3993,7 +3993,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
SalLayout* pLayout = ImplLayout( aStrikeoutTest, 0, nTestStrLen );
if( pLayout )
{
- nStrikeoutWidth = (pLayout->GetTextWidth() +nTestStrLen/2) / (nTestStrLen * pLayout->GetUnitsPerPixel());
+ nStrikeoutWidth = (pLayout->GetTextWidth() +nTestStrLen/2) / (nTestStrLen * pLayout->GetUnitsPerPixel());
pLayout->Release();
}
if( nStrikeoutWidth <= 0 ) // sanity check
@@ -4747,7 +4747,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
uno::Reference < i18n::XBreakIterator > xBI;
// get service provider
uno::Reference< lang::XMultiServiceFactory > xSMgr( unohelper::GetMultiServiceFactory() );
-
+
uno::Reference< linguistic2::XHyphenator > xHyph;
if( xSMgr.is() )
{
@@ -4757,7 +4757,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
xHyph = xLinguMgr->getHyphenator();
}
}
-
+
i18n::LineBreakHyphenationOptions aHyphOptions( xHyph, uno::Sequence <beans::PropertyValue>(), 1 );
i18n::LineBreakUserOptions aUserOptions;
@@ -4799,8 +4799,8 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
sal_Unicode cAlternateReplChar = 0;
sal_Unicode cAlternateExtraChar = 0;
i18n::Boundary aBoundary = xBI->getWordBoundary( aText, nBreakPos, rDefLocale, ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
- // sal_uInt16 nWordStart = nBreakPos;
- // sal_uInt16 nBreakPos_OLD = nBreakPos;
+ // sal_uInt16 nWordStart = nBreakPos;
+ // sal_uInt16 nBreakPos_OLD = nBreakPos;
sal_uInt16 nWordStart = nPos;
sal_uInt16 nWordEnd = (USHORT) aBoundary.endPos;
DBG_ASSERT( nWordEnd > nWordStart, "ImpBreakLine: Start >= End?" );
@@ -4811,7 +4811,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// #104415# May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
// DBG_ASSERT( nWordEnd >= nMaxBreakPos, "Hyph: Break?" );
String aWord( aText, nWordStart, nWordLen );
- sal_uInt16 nMinTrail = static_cast<sal_uInt16>(nWordEnd-nSoftBreak+1); //+1: Vor dem angeknacksten Buchstaben
+ sal_uInt16 nMinTrail = static_cast<sal_uInt16>(nWordEnd-nSoftBreak+1); //+1: Vor dem angeknacksten Buchstaben
uno::Reference< linguistic2::XHyphenatedWord > xHyphWord;
if (xHyph.is())
xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.Len() - nMinTrail, uno::Sequence< beans::PropertyValue >() );
@@ -4900,7 +4900,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
nW = _rLayout.GetTextWidth( rStr, nPos, nSpacePos-nPos );
}
} while( nW > nWidth );
-
+
if( nSpacePos != STRING_NOTFOUND )
{
nBreakPos = nSpacePos;
@@ -6069,7 +6069,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
for( int nFallbackLevel = 1; nFallbackLevel < MAX_FALLBACK; ++nFallbackLevel )
{
// find a font family suited for glyph fallback
-#ifndef FONTFALLBACK_HOOKS_DISABLED
+#ifndef FONTFALLBACK_HOOKS_DISABLED
// GetGlyphFallbackFont() needs a valid aFontSelData.mpFontEntry
// if the system-specific glyph fallback is active
aFontSelData.mpFontEntry = mpFontEntry; // reset the fontentry to base-level
@@ -6276,11 +6276,11 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
// but it may be totally wrong. the background color
// was typically already reset
aCol = rStyleSettings.GetFaceColor();
-
+
bHighContrastBlack = aCol.IsDark();
bHighContrastWhite = aCol.IsBright();
}
-
+
aOldTextColor = rTargetDevice.GetTextColor();
if ( rTargetDevice.IsTextFillColor() )
{
@@ -6962,7 +6962,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const XubString& rStr,
bHighContrastWhite = aCol.IsBright();
}
}
-
+
aOldTextColor = GetTextColor();
if ( IsTextFillColor() )
{
@@ -7277,7 +7277,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
if (!mpGraphics) ImplGetGraphics();
if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel);
-
+
return aSysFontData;
}
@@ -7294,7 +7294,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
*
* Export finalized glyph layout data as platform independent SystemTextLayoutData
* (see vcl/inc/vcl/sysdata.hxx)
- *
+ *
* Only parameters rStartPt and rStr are mandatory, the rest is optional
* (default values will be used)
*
@@ -7309,18 +7309,18 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
SystemTextLayoutData aSysLayoutData;
aSysLayoutData.nSize = sizeof(aSysLayoutData);
aSysLayoutData.rGlyphData.reserve( 256 );
-
+
if ( mpMetaFile ) {
if (pDXAry)
mpMetaFile->AddAction( new MetaTextArrayAction( rStartPt, rStr, pDXAry, nIndex, nLen ) );
else
mpMetaFile->AddAction( new MetaTextAction( rStartPt, rStr, nIndex, nLen ) );
}
-
+
if ( !IsDeviceOutputNecessary() ) return aSysLayoutData;
-
+
SalLayout* rLayout = ImplLayout( rStr, nIndex, nLen, rStartPt, 0, pDXAry, true );
-
+
// setup glyphs
Point aPos;
sal_GlyphId aGlyphId;
@@ -7329,7 +7329,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
{
// NOTE: Windows backend is producing unicode chars (ucs4), so on windows,
// ETO_GLYPH_INDEX is unusable, unless extra glyph conversion is made.
-
+
SystemGlyphData aGlyph;
aGlyph.index = static_cast<unsigned long> (aGlyphId & GF_IDXMASK);
aGlyph.x = aPos.X();
@@ -7344,7 +7344,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c
// Get font data
aSysLayoutData.aSysFontData = GetSysFontData(nFallbacklevel);
aSysLayoutData.orientation = rLayout->GetOrientation();
-
+
rLayout->Release();
return aSysLayoutData;
@@ -7377,9 +7377,9 @@ long OutputDevice::GetMinKashida( const Font& rFont ) const
}
// -----------------------------------------------------------------------
-xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
+xub_StrLen OutputDevice::ValidateKashidas ( const String& rTxt,
xub_StrLen nIdx, xub_StrLen nLen,
- xub_StrLen nKashCount,
+ xub_StrLen nKashCount,
const xub_StrLen* pKashidaPos,
xub_StrLen* pKashidaPosDropped ) const
{
@@ -7863,7 +7863,7 @@ BOOL OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// ignore "empty" glyphs:
if( aPolyPoly.Count() > 0 )
{
- // convert to B2DPolyPolygon
+ // convert to B2DPolyPolygon
// TODO: get rid of intermediate tool's PolyPolygon
::basegfx::B2DPolyPolygon aB2DPolyPoly = aPolyPoly.getB2DPolyPolygon();
::basegfx::B2DHomMatrix aMatrix;
@@ -7960,7 +7960,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
for( i = nUsedItems; --i >= 0; )
if( pFontData == aCache[i].mpFontData )
break;
- if( i >= 0 ) // found in cache
+ if( i >= 0 ) // found in cache
{
rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
}
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 8ad02ed2d818..6c0fef233a9e 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,8 +56,8 @@
// - Defines -
// -----------
-#define HATCH_MAXPOINTS 1024
-#define GRADIENT_DEFAULT_STEPCOUNT 0
+#define HATCH_MAXPOINTS 1024
+#define GRADIENT_DEFAULT_STEPCOUNT 0
// ----------------
// - Cmp-Function -
@@ -112,9 +112,9 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
if( pPolyPoly->Count() == 1 )
{
- const Polygon rPoly = pPolyPoly->GetObject( 0 );
- USHORT nSize = rPoly.GetSize();
-
+ const Polygon rPoly = pPolyPoly->GetObject( 0 );
+ USHORT nSize = rPoly.GetSize();
+
if( nSize >= 2 )
{
const SalPoint* pPtAry = (const SalPoint*)rPoly.GetConstPointAry();
@@ -123,17 +123,17 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
}
else if( pPolyPoly->Count() )
{
- USHORT nCount = pPolyPoly->Count();
- sal_uInt32* pPointAry = new sal_uInt32[nCount];
- PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
- USHORT i = 0;
+ USHORT nCount = pPolyPoly->Count();
+ sal_uInt32* pPointAry = new sal_uInt32[nCount];
+ PCONSTSALPOINT* pPointAryAry = new PCONSTSALPOINT[nCount];
+ USHORT i = 0;
do
{
- const Polygon& rPoly = pPolyPoly->GetObject( i );
- USHORT nSize = rPoly.GetSize();
+ const Polygon& rPoly = pPolyPoly->GetObject( i );
+ USHORT nSize = rPoly.GetSize();
if ( nSize )
{
- pPointAry[i] = nSize;
+ pPointAry[i] = nSize;
pPointAryAry[i] = (PCONSTSALPOINT)rPoly.GetConstPointAry();
i++;
}
@@ -146,7 +146,7 @@ void OutputDevice::ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const Poly
mpGraphics->DrawPolygon( *pPointAry, *pPointAryAry, this );
else
mpGraphics->DrawPolyPolygon( nCount, pPointAry, pPointAryAry, this );
-
+
delete[] pPointAry;
delete[] pPointAryAry;
}
@@ -179,26 +179,26 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
aRect.Top()--;
aRect.Right()++;
aRect.Bottom()++;
- USHORT nAngle = rGradient.GetAngle() % 3600;
- double fAngle = nAngle * F_PI1800;
- double fWidth = aRect.GetWidth();
- double fHeight = aRect.GetHeight();
- double fDX = fWidth * fabs( cos( fAngle ) ) +
+ USHORT nAngle = rGradient.GetAngle() % 3600;
+ double fAngle = nAngle * F_PI1800;
+ double fWidth = aRect.GetWidth();
+ double fHeight = aRect.GetHeight();
+ double fDX = fWidth * fabs( cos( fAngle ) ) +
fHeight * fabs( sin( fAngle ) );
- double fDY = fHeight * fabs( cos( fAngle ) ) +
+ double fDY = fHeight * fabs( cos( fAngle ) ) +
fWidth * fabs( sin( fAngle ) );
- fDX = (fDX - fWidth) * 0.5 + 0.5;
- fDY = (fDY - fHeight) * 0.5 + 0.5;
+ fDX = (fDX - fWidth) * 0.5 + 0.5;
+ fDY = (fDY - fHeight) * 0.5 + 0.5;
aRect.Left() -= (long)fDX;
aRect.Right() += (long)fDX;
aRect.Top() -= (long)fDY;
aRect.Bottom() += (long)fDY;
// Rand berechnen und Rechteck neu setzen
- Point aCenter = rRect.Center();
- Rectangle aFullRect = aRect;
- long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
- BOOL bLinear;
+ Point aCenter = rRect.Center();
+ Rectangle aFullRect = aRect;
+ long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
+ BOOL bLinear;
// Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf
if ( rGradient.GetStyle() == GRADIENT_LINEAR )
@@ -223,35 +223,35 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// Intensitaeten von Start- und Endfarbe ggf. aendern und
// Farbschrittweiten berechnen
- long nFactor;
- Color aStartCol = rGradient.GetStartColor();
- Color aEndCol = rGradient.GetEndColor();
- long nStartRed = aStartCol.GetRed();
- long nStartGreen = aStartCol.GetGreen();
- long nStartBlue = aStartCol.GetBlue();
- long nEndRed = aEndCol.GetRed();
- long nEndGreen = aEndCol.GetGreen();
- long nEndBlue = aEndCol.GetBlue();
- nFactor = rGradient.GetStartIntensity();
- nStartRed = (nStartRed * nFactor) / 100;
+ long nFactor;
+ Color aStartCol = rGradient.GetStartColor();
+ Color aEndCol = rGradient.GetEndColor();
+ long nStartRed = aStartCol.GetRed();
+ long nStartGreen = aStartCol.GetGreen();
+ long nStartBlue = aStartCol.GetBlue();
+ long nEndRed = aEndCol.GetRed();
+ long nEndGreen = aEndCol.GetGreen();
+ long nEndBlue = aEndCol.GetBlue();
+ nFactor = rGradient.GetStartIntensity();
+ nStartRed = (nStartRed * nFactor) / 100;
nStartGreen = (nStartGreen * nFactor) / 100;
- nStartBlue = (nStartBlue * nFactor) / 100;
- nFactor = rGradient.GetEndIntensity();
- nEndRed = (nEndRed * nFactor) / 100;
- nEndGreen = (nEndGreen * nFactor) / 100;
- nEndBlue = (nEndBlue * nFactor) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ nStartBlue = (nStartBlue * nFactor) / 100;
+ nFactor = rGradient.GetEndIntensity();
+ nEndRed = (nEndRed * nFactor) / 100;
+ nEndGreen = (nEndGreen * nFactor) / 100;
+ nEndBlue = (nEndBlue * nFactor) / 100;
+ long nRedSteps = nEndRed - nStartRed;
+ long nGreenSteps = nEndGreen - nStartGreen;
+ long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
// Bei nicht linearen Farbverlaeufen haben wir nur die halben Steps
// pro Farbe
if ( !bLinear )
{
- nRedSteps <<= 1;
+ nRedSteps <<= 1;
nGreenSteps <<= 1;
- nBlueSteps <<= 1;
+ nBlueSteps <<= 1;
}
// Anzahl der Schritte berechnen, falls nichts uebergeben wurde
@@ -297,29 +297,29 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
double fScanInc = (double)aRect.GetHeight() / (double)nSteps;
// Startfarbe berechnen und setzen
- UINT8 nRed;
- UINT8 nGreen;
- UINT8 nBlue;
- long nSteps2;
- long nStepsHalf = 0;
+ UINT8 nRed;
+ UINT8 nGreen;
+ UINT8 nBlue;
+ long nSteps2;
+ long nStepsHalf = 0;
if ( bLinear )
{
// Um 1 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
- nSteps2 = nSteps + 1;
- nRed = (UINT8)nStartRed;
- nGreen = (UINT8)nStartGreen;
- nBlue = (UINT8)nStartBlue;
+ nSteps2 = nSteps + 1;
+ nRed = (UINT8)nStartRed;
+ nGreen = (UINT8)nStartGreen;
+ nBlue = (UINT8)nStartBlue;
}
else
{
// Um 2 erhoeht, um die Border innerhalb der Schleife
// zeichnen zu koennen
- nSteps2 = nSteps + 2;
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
- nStepsHalf = nSteps >> 1;
+ nSteps2 = nSteps + 2;
+ nRed = (UINT8)nEndRed;
+ nGreen = (UINT8)nEndGreen;
+ nBlue = (UINT8)nEndBlue;
+ nStepsHalf = nSteps >> 1;
}
if ( bMtf )
@@ -328,8 +328,8 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
// Startpolygon erzeugen (== Borderpolygon)
- Polygon aPoly( 4 );
- Polygon aTempPoly( 2 );
+ Polygon aPoly( 4 );
+ Polygon aTempPoly( 2 );
aPoly[0] = aFullRect.TopLeft();
aPoly[1] = aFullRect.TopRight();
aPoly[2] = aRect.TopRight();
@@ -370,9 +370,9 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// fuer lineare FV
if ( bLinear )
{
- nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i)/nSteps2) );
}
// fuer radiale FV
else
@@ -384,25 +384,25 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
// on.
if ( i >= nSteps )
{
- nRed = (UINT8)nEndRed;
- nGreen = (UINT8)nEndGreen;
- nBlue = (UINT8)nEndBlue;
+ nRed = (UINT8)nEndRed;
+ nGreen = (UINT8)nEndGreen;
+ nBlue = (UINT8)nEndBlue;
}
else
{
if ( i <= nStepsHalf )
{
- nRed = ImplGetGradientColorValue( nEndRed-((nRedSteps*i)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nEndGreen-((nGreenSteps*i)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nEndBlue-((nBlueSteps*i)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nEndRed-((nRedSteps*i)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nEndGreen-((nGreenSteps*i)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nEndBlue-((nBlueSteps*i)/nSteps2) );
}
// genau die Mitte und hoeher
else
{
long i2 = i - nStepsHalf;
- nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i2)/nSteps2) );
- nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i2)/nSteps2) );
- nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i2)/nSteps2) );
+ nRed = ImplGetGradientColorValue( nStartRed+((nRedSteps*i2)/nSteps2) );
+ nGreen = ImplGetGradientColorValue( nStartGreen+((nGreenSteps*i2)/nSteps2) );
+ nBlue = ImplGetGradientColorValue( nStartBlue+((nBlueSteps*i2)/nSteps2) );
}
}
}
@@ -429,21 +429,21 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// Virtuelle Device werden auch ausgeklammert, da einige Treiber
// ansonsten zu langsam sind
PolyPolygon* pPolyPoly;
- Rectangle aRect( rRect );
- Color aStartCol( rGradient.GetStartColor() );
- Color aEndCol( rGradient.GetEndColor() );
- long nStartRed = ( (long) aStartCol.GetRed() * rGradient.GetStartIntensity() ) / 100;
- long nStartGreen = ( (long) aStartCol.GetGreen() * rGradient.GetStartIntensity() ) / 100;
- long nStartBlue = ( (long) aStartCol.GetBlue() * rGradient.GetStartIntensity() ) / 100;
- long nEndRed = ( (long) aEndCol.GetRed() * rGradient.GetEndIntensity() ) / 100;
- long nEndGreen = ( (long) aEndCol.GetGreen() * rGradient.GetEndIntensity() ) / 100;
- long nEndBlue = ( (long) aEndCol.GetBlue() * rGradient.GetEndIntensity() ) / 100;
- long nRedSteps = nEndRed - nStartRed;
- long nGreenSteps = nEndGreen - nStartGreen;
- long nBlueSteps = nEndBlue - nStartBlue;
+ Rectangle aRect( rRect );
+ Color aStartCol( rGradient.GetStartColor() );
+ Color aEndCol( rGradient.GetEndColor() );
+ long nStartRed = ( (long) aStartCol.GetRed() * rGradient.GetStartIntensity() ) / 100;
+ long nStartGreen = ( (long) aStartCol.GetGreen() * rGradient.GetStartIntensity() ) / 100;
+ long nStartBlue = ( (long) aStartCol.GetBlue() * rGradient.GetStartIntensity() ) / 100;
+ long nEndRed = ( (long) aEndCol.GetRed() * rGradient.GetEndIntensity() ) / 100;
+ long nEndGreen = ( (long) aEndCol.GetGreen() * rGradient.GetEndIntensity() ) / 100;
+ long nEndBlue = ( (long) aEndCol.GetBlue() * rGradient.GetEndIntensity() ) / 100;
+ long nRedSteps = nEndRed - nStartRed;
+ long nGreenSteps = nEndGreen - nStartGreen;
+ long nBlueSteps = nEndBlue - nStartBlue;
long nStepCount = rGradient.GetSteps();
- USHORT nAngle = rGradient.GetAngle() % 3600;
-
+ USHORT nAngle = rGradient.GetAngle() % 3600;
+
if( (meRasterOp != ROP_OVERPAINT) || (meOutDevType != OUTDEV_WINDOW) || bMtf )
pPolyPoly = new PolyPolygon( 2 );
else
@@ -451,23 +451,23 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( rGradient.GetStyle() == GRADIENT_SQUARE || rGradient.GetStyle() == GRADIENT_RECT )
{
- const double fAngle = nAngle * F_PI1800;
- const double fWidth = aRect.GetWidth();
+ const double fAngle = nAngle * F_PI1800;
+ const double fWidth = aRect.GetWidth();
const double fHeight = aRect.GetHeight();
- double fDX = fWidth * fabs( cos( fAngle ) ) + fHeight * fabs( sin( fAngle ) );
- double fDY = fHeight * fabs( cos( fAngle ) ) + fWidth * fabs( sin( fAngle ) );
+ double fDX = fWidth * fabs( cos( fAngle ) ) + fHeight * fabs( sin( fAngle ) );
+ double fDY = fHeight * fabs( cos( fAngle ) ) + fWidth * fabs( sin( fAngle ) );
fDX = ( fDX - fWidth ) * 0.5 + 0.5;
fDY = ( fDY - fHeight ) * 0.5 + 0.5;
-
+
aRect.Left() -= (long) fDX;
aRect.Right() += (long) fDX;
aRect.Top() -= (long) fDY;
aRect.Bottom() += (long) fDY;
}
-
+
Size aSize( aRect.GetSize() );
-
+
if( rGradient.GetStyle() == GRADIENT_RADIAL )
{
// Radien-Berechnung fuer Kreis
@@ -489,11 +489,11 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
}
// neue Mittelpunkte berechnen
- long nZWidth = aRect.GetWidth() * (long) rGradient.GetOfsX() / 100;
- long nZHeight = aRect.GetHeight() * (long) rGradient.GetOfsY() / 100;
- long nBorderX = (long) rGradient.GetBorder() * aSize.Width() / 100;
- long nBorderY = (long) rGradient.GetBorder() * aSize.Height() / 100;
- Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
+ long nZWidth = aRect.GetWidth() * (long) rGradient.GetOfsX() / 100;
+ long nZHeight = aRect.GetHeight() * (long) rGradient.GetOfsY() / 100;
+ long nBorderX = (long) rGradient.GetBorder() * aSize.Width() / 100;
+ long nBorderY = (long) rGradient.GetBorder() * aSize.Height() / 100;
+ Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight );
// Rand beruecksichtigen
aSize.Width() -= nBorderX;
@@ -502,7 +502,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
// Ausgaberechteck neu setzen
aRect.Left() = aCenter.X() - ( aSize.Width() >> 1 );
aRect.Top() = aCenter.Y() - ( aSize.Height() >> 1 );
-
+
aRect.SetSize( aSize );
long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() );
@@ -526,7 +526,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
nStepCount = nMinRect / nInc;
}
-
+
// minimal drei Schritte und maximal die Anzahl der Farbunterschiede
long nSteps = Max( nStepCount, 2L );
long nCalcSteps = Abs( nRedSteps );
@@ -549,7 +549,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
double fScanBottom = aRect.Bottom();
double fScanInc = (double) nMinRect / (double) nSteps * 0.5;
UINT8 nRed = (UINT8) nStartRed, nGreen = (UINT8) nStartGreen, nBlue = (UINT8) nStartBlue;
- bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
+ bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output
if( bMtf )
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), TRUE ) );
@@ -557,7 +557,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) );
if( pPolyPoly )
- {
+ {
pPolyPoly->Insert( aPoly = rRect );
pPolyPoly->Insert( aPoly );
}
@@ -640,7 +640,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( pPolyPoly )
{
const Polygon& rPoly = pPolyPoly->GetObject( 1 );
-
+
if( !rPoly.GetBoundRect().IsEmpty() )
{
// #107349# Paint last polygon with end color only if loop
@@ -693,7 +693,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80 );
}
@@ -719,14 +719,14 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
-
+
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
+ aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
( aStartCol.GetGreen() >> 1 ) | 0x80,
( aStartCol.GetBlue() >> 1 ) | 0x80 );
- aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
+ aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
( aEndCol.GetGreen() >> 1 ) | 0x80,
( aEndCol.GetBlue() >> 1 ) | 0x80 );
}
@@ -740,7 +740,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
-
+
// Rechteck in Pixel umrechnen
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
aRect.Justify();
@@ -768,7 +768,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( mbInitClipRegion )
ImplInitClipRegion();
-
+
if ( !mbOutputClipped )
{
// Gradienten werden ohne Umrandung gezeichnet
@@ -777,7 +777,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
mpGraphics->SetLineColor();
mbInitLineColor = TRUE;
}
-
+
mbInitFillColor = TRUE;
// calculate step count if neccessary
@@ -811,7 +811,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbInitClipRegion )
ImplInitClipRegion();
-
+
if( mbOutputClipped )
return;
@@ -834,7 +834,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80 );
}
@@ -849,7 +849,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mpMetaFile )
{
- const Rectangle aRect( rPolyPoly.GetBoundRect() );
+ const Rectangle aRect( rPolyPoly.GetBoundRect() );
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
@@ -863,7 +863,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const BOOL bOldOutput = IsOutputEnabled();
+ const BOOL bOldOutput = IsOutputEnabled();
EnableOutput( FALSE );
Push( PUSH_RASTEROP );
@@ -897,14 +897,14 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
-
+
if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
{
- aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
+ aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
( aStartCol.GetGreen() >> 1 ) | 0x80,
( aStartCol.GetBlue() >> 1 ) | 0x80 );
- aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
+ aEndCol = Color( ( aEndCol.GetRed() >> 1 ) | 0x80,
( aEndCol.GetGreen() >> 1 ) | 0x80,
( aEndCol.GetBlue() >> 1 ) | 0x80 );
}
@@ -915,7 +915,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( OUTDEV_PRINTER == meOutDevType || ImplGetSVData()->maGDIData.mbNoXORClipping )
{
- const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() )
{
@@ -931,7 +931,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( mbInitClipRegion )
ImplInitClipRegion();
-
+
if( !mbOutputClipped )
{
PolyPolygon aClipPolyPoly( ImplLogicToDevicePixel( rPolyPoly ) );
@@ -942,7 +942,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
mpGraphics->SetLineColor();
mbInitLineColor = TRUE;
}
-
+
mbInitFillColor = TRUE;
// calculate step count if neccessary
@@ -959,29 +959,29 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
}
else
{
- const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- const Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
+ const PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ const Rectangle aBoundRect( aPolyPoly.GetBoundRect() );
Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
aDstRect.Intersection( aBoundRect );
if( OUTDEV_WINDOW == meOutDevType )
{
const Region aPaintRgn( ( (Window*) this )->GetPaintRegion() );
-
+
if( !aPaintRgn.IsNull() )
aDstRect.Intersection( LogicToPixel( aPaintRgn ).GetBoundRect() );
}
if( !aDstRect.IsEmpty() )
{
- VirtualDevice* pVDev;
- const Size aDstSize( aDstRect.GetSize() );
+ VirtualDevice* pVDev;
+ const Size aDstSize( aDstRect.GetSize() );
if( HasAlpha() )
{
- // #110958# Pay attention to alpha VDevs here, otherwise,
+ // #110958# Pay attention to alpha VDevs here, otherwise,
// background will be wrong: Temp VDev has to have alpha, too.
pVDev = new VirtualDevice( *this, 0, GetAlphaBitCount() > 1 ? 0 : 1 );
}
@@ -993,8 +993,8 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if( pVDev->SetOutputSizePixel( aDstSize) )
{
- MapMode aVDevMap;
- const BOOL bOldMap = mbMap;
+ MapMode aVDevMap;
+ const BOOL bOldMap = mbMap;
EnableMapMode( FALSE );
@@ -1039,8 +1039,8 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
// Wenn Rechteck leer ist, brauchen wir nichts machen
if ( !aRect.IsEmpty() )
{
- Gradient aGradient( rGradient );
- GDIMetaFile* pOldMtf = mpMetaFile;
+ Gradient aGradient( rGradient );
+ GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
@@ -1077,7 +1077,7 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
Hatch aHatch( rHatch );
- if ( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
+ if ( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
DRAWMODE_SETTINGSLINE ) )
{
@@ -1099,8 +1099,8 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
if ( mnDrawMode & DRAWMODE_GHOSTEDLINE )
{
- aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
- ( aColor.GetGreen() >> 1 ) | 0x80,
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ ( aColor.GetGreen() >> 1 ) | 0x80,
( aColor.GetBlue() >> 1 ) | 0x80);
}
@@ -1123,10 +1123,10 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
return;
if( rPolyPoly.Count() )
- {
- PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- BOOL bOldMap = mbMap;
+ {
+ PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ BOOL bOldMap = mbMap;
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
@@ -1153,11 +1153,11 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
- PolyPolygon aPolyPoly( rPolyPoly );
+ PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME | POLY_OPTIMIZE_CLOSE );
if( aPolyPoly.Count() )
- {
+ {
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
@@ -1173,12 +1173,12 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r
void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, BOOL bMtf )
{
- Rectangle aRect( rPolyPoly.GetBoundRect() );
- const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
- const long nWidth = ImplDevicePixelToLogicWidth( Max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
- Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
- Point aPt1, aPt2, aEndPt1;
- Size aInc;
+ Rectangle aRect( rPolyPoly.GetBoundRect() );
+ const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 );
+ const long nWidth = ImplDevicePixelToLogicWidth( Max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) );
+ Point* pPtBuffer = new Point[ HATCH_MAXPOINTS ];
+ Point aPt1, aPt2, aEndPt1;
+ Size aInc;
// Single hatch
aRect.Left() -= nLogPixelWidth; aRect.Top() -= nLogPixelWidth; aRect.Right() += nLogPixelWidth; aRect.Bottom() += nLogPixelWidth;
@@ -1225,9 +1225,9 @@ void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHa
void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHORT nAngle10,
Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 )
{
- Point aRef;
- long nAngle = nAngle10 % 1800;
- long nOffset = 0;
+ Point aRef;
+ long nAngle = nAngle10 % 1800;
+ long nOffset = 0;
if( nAngle > 900 )
nAngle -= 1800;
@@ -1266,10 +1266,10 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
}
else if( nAngle >= -450 && nAngle <= 450 )
{
- const double fAngle = F_PI1800 * labs( nAngle );
- const double fTan = tan( fAngle );
- const long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
- long nPY;
+ const double fAngle = F_PI1800 * labs( nAngle );
+ const double fTan = tan( fAngle );
+ const long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
+ long nPY;
rInc = Size( 0, nDist = FRound( nDist / cos( fAngle ) ) );
@@ -1300,8 +1300,8 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
{
const double fAngle = F_PI1800 * labs( nAngle );
const double fTan = tan( fAngle );
- const long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
- long nPX;
+ const long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
+ long nPX;
rInc = Size( nDist = FRound( nDist / sin( fAngle ) ), 0 );
@@ -1335,8 +1335,8 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, USHO
void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly,
Point* pPtBuffer, BOOL bMtf )
{
- double fX, fY;
- long nAdd, nPCounter = 0;
+ double fX, fY;
+ long nAdd, nPCounter = 0;
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
@@ -1344,7 +1344,7 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( rPoly.GetSize() > 1 )
{
- Line aCurSegment( rPoly[ 0 ], Point() );
+ Line aCurSegment( rPoly[ 0 ], Point() );
for( long i = 1, nCount = rPoly.GetSize(); i <= nCount; i++ )
{
@@ -1353,25 +1353,25 @@ void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPol
if( rLine.Intersection( aCurSegment, fX, fY ) )
{
- if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
+ if( ( fabs( fX - aCurSegment.GetStart().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetStart().Y() ) <= 0.0000001 ) )
{
- const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
- const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
- const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
+ const Line aPrevSegment( rPoly[ (USHORT)( ( i > 1 ) ? ( i - 2 ) : ( nCount - 1 ) ) ], aCurSegment.GetStart() );
+ const double fPrevDistance = rLine.GetDistance( aPrevSegment.GetStart() );
+ const double fCurDistance = rLine.GetDistance( aCurSegment.GetEnd() );
- if( ( fPrevDistance <= 0.0 && fCurDistance > 0.0 ) ||
+ if( ( fPrevDistance <= 0.0 && fCurDistance > 0.0 ) ||
( fPrevDistance > 0.0 && fCurDistance < 0.0 ) )
{
nAdd = 1;
}
}
- else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
+ else if( ( fabs( fX - aCurSegment.GetEnd().X() ) <= 0.0000001 ) &&
( fabs( fY - aCurSegment.GetEnd().Y() ) <= 0.0000001 ) )
{
const Line aNextSegment( aCurSegment.GetEnd(), rPoly[ (USHORT)( ( i + 1 ) % nCount ) ] );
- if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
+ if( ( fabs( rLine.GetDistance( aNextSegment.GetEnd() ) ) <= 0.0000001 ) &&
( rLine.GetDistance( aCurSegment.GetStart() ) > 0.0 ) )
{
nAdd = 1;
diff --git a/vcl/source/gdi/outdev5.cxx b/vcl/source/gdi/outdev5.cxx
index d42723215c55..ce540a3f8b0f 100644
--- a/vcl/source/gdi/outdev5.cxx
+++ b/vcl/source/gdi/outdev5.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,7 +95,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
if ( aRoundRectPoly.GetSize() >= 2 )
{
const SalPoint* pPtAry = (const SalPoint*) aRoundRectPoly.GetConstPointAry();
-
+
if ( !mbFillColor )
mpGraphics->DrawPolyLine( aRoundRectPoly.GetSize(), pPtAry, this );
else
@@ -117,7 +117,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaEllipseAction( rRect ) );
- if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
+ if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() )
return;
Rectangle aRect( ImplLogicToDevicePixel( rRect ) );
@@ -190,9 +190,9 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
if ( aArcPoly.GetSize() >= 2 )
{
@@ -237,9 +237,9 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
if ( aPiePoly.GetSize() >= 2 )
{
@@ -291,9 +291,9 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
if ( mbInitLineColor )
ImplInitLineColor();
- const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
- const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
+ const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
+ const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
+ Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
if ( aChordPoly.GetSize() >= 2 )
{
diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx
index 5b8d228bb141..0b0274bfceb6 100644
--- a/vcl/source/gdi/outdev6.cxx
+++ b/vcl/source/gdi/outdev6.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,18 +79,18 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, ULONG nF
if( mbOutputClipped )
return;
- const long nDistX = Max( rDist.Width(), 1L );
- const long nDistY = Max( rDist.Height(), 1L );
- long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
- long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
- const long nRight = aDstRect.Right();
- const long nBottom = aDstRect.Bottom();
- const long nStartX = ImplLogicXToDevicePixel( nX );
- const long nEndX = ImplLogicXToDevicePixel( nRight );
- const long nStartY = ImplLogicYToDevicePixel( nY );
- const long nEndY = ImplLogicYToDevicePixel( nBottom );
- long nHorzCount = 0L;
- long nVertCount = 0L;
+ const long nDistX = Max( rDist.Width(), 1L );
+ const long nDistY = Max( rDist.Height(), 1L );
+ long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX );
+ long nY = ( rRect.Top() >= aDstRect.Top() ) ? rRect.Top() : ( rRect.Top() + ( ( aDstRect.Top() - rRect.Top() ) / nDistY ) * nDistY );
+ const long nRight = aDstRect.Right();
+ const long nBottom = aDstRect.Bottom();
+ const long nStartX = ImplLogicXToDevicePixel( nX );
+ const long nEndX = ImplLogicXToDevicePixel( nRight );
+ const long nStartY = ImplLogicYToDevicePixel( nY );
+ const long nEndY = ImplLogicYToDevicePixel( nBottom );
+ long nHorzCount = 0L;
+ long nVertCount = 0L;
::com::sun::star::uno::Sequence< sal_Int32 > aVertBuf;
::com::sun::star::uno::Sequence< sal_Int32 > aHorzBuf;
@@ -182,7 +182,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
if( mbInitFillColor )
ImplInitFillColor();
- if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+ if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
&& mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
&& ROP_OVERPAINT == GetRasterOp() )
{
@@ -193,7 +193,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
// transform the polygon into device space and ensure it is closed
aB2DPolyPolygon.transform( aTransform );
aB2DPolyPolygon.setClosed( true );
-
+
bool bDrawnOk = true;
if( IsFillColor() )
bDrawnOk = mpGraphics->DrawPolyPolygon( aB2DPolyPolygon, fTransparency, this );
@@ -210,7 +210,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
if( bDrawnOk )
{
-#if 0
+#if 0
// MetaB2DPolyPolygonAction is not implemented yet:
// according to AW adding it is very dangerous since there is a lot
// of code that uses the metafile actions directly and unless every
@@ -278,7 +278,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
// try hard to draw it directly, because the emulation layers are slower
if( !pDisableNative
- && mpGraphics->supportsOperation( OutDevSupport_B2DDraw )
+ && mpGraphics->supportsOperation( OutDevSupport_B2DDraw )
#if defined UNX && ! defined QUARTZ
&& GetBitCount() > 8
#endif
@@ -351,11 +351,11 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
return;
}
- Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
- const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
- const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
- long nMove;
- const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
+ Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() );
+ const Size aDPISize( LogicToPixel( Size( 1, 1 ), MAP_INCH ) );
+ const long nBaseExtent = Max( FRound( aDPISize.Width() / 300. ), 1L );
+ long nMove;
+ const USHORT nTrans = ( nTransparencePercent < 13 ) ? 0 :
( nTransparencePercent < 38 ) ? 25 :
( nTransparencePercent < 63 ) ? 50 :
( nTransparencePercent < 88 ) ? 75 : 100;
@@ -406,10 +406,10 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
}
else
{
- PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
- Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
- Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
+ Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
+ Point aPoint;
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
aDstRect.Intersection( aPolyRect );
@@ -434,25 +434,25 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( 1 )
{
if ( mbInitClipRegion )
- ImplInitClipRegion();
+ ImplInitClipRegion();
if ( mbInitLineColor )
ImplInitLineColor();
if ( mbInitFillColor )
ImplInitFillColor();
-
+
Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() );
Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) );
if( !mbOutputClipped )
{
- bDrawn = mpGraphics->DrawAlphaRect(
- aPixelRect.Left(), aPixelRect.Top(),
+ bDrawn = mpGraphics->DrawAlphaRect(
+ aPixelRect.Left(), aPixelRect.Top(),
// #i98405# use methods with small g, else one pixel too much will be painted.
// This is because the source is a polygon which when painted would not paint
- // the rightmost and lowest pixel line(s), so use one pixel less for the
+ // the rightmost and lowest pixel line(s), so use one pixel less for the
// rectangle, too.
aPixelRect.getWidth(), aPixelRect.getHeight(),
- sal::static_int_cast<sal_uInt8>(nTransparencePercent),
+ sal::static_int_cast<sal_uInt8>(nTransparencePercent),
this );
}
else
@@ -462,9 +462,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
if( !bDrawn )
{
- VirtualDevice aVDev( *this, 1 );
- const Size aDstSz( aDstRect.GetSize() );
- const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
+ VirtualDevice aVDev( *this, 1 );
+ const Size aDstSz( aDstRect.GetSize() );
+ const BYTE cTrans = (BYTE) MinMax( FRound( nTransparencePercent * 2.55 ), 0, 255 );
if( aDstRect.Left() || aDstRect.Top() )
aPolyPoly.Move( -aDstRect.Left(), -aDstRect.Top() );
@@ -479,30 +479,30 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
aVDev.SetFillColor( COL_BLACK );
aVDev.DrawPolyPolygon( aPolyPoly );
- Bitmap aPaint( GetBitmap( aDstRect.TopLeft(), aDstSz ) );
- Bitmap aPolyMask( aVDev.GetBitmap( Point(), aDstSz ) );
+ Bitmap aPaint( GetBitmap( aDstRect.TopLeft(), aDstSz ) );
+ Bitmap aPolyMask( aVDev.GetBitmap( Point(), aDstSz ) );
// #107766# check for non-empty bitmaps before accessing them
if( !!aPaint && !!aPolyMask )
{
- BitmapWriteAccess* pW = aPaint.AcquireWriteAccess();
- BitmapReadAccess* pR = aPolyMask.AcquireReadAccess();
+ BitmapWriteAccess* pW = aPaint.AcquireWriteAccess();
+ BitmapReadAccess* pR = aPolyMask.AcquireReadAccess();
if( pW && pR )
{
- BitmapColor aPixCol;
- const BitmapColor aFillCol( GetFillColor() );
- const BitmapColor aWhite( pR->GetBestMatchingColor( Color( COL_WHITE ) ) );
- const BitmapColor aBlack( pR->GetBestMatchingColor( Color( COL_BLACK ) ) );
- const long nWidth = pW->Width(), nHeight = pW->Height();
- const long nR = aFillCol.GetRed(), nG = aFillCol.GetGreen(), nB = aFillCol.GetBlue();
- long nX, nY;
+ BitmapColor aPixCol;
+ const BitmapColor aFillCol( GetFillColor() );
+ const BitmapColor aWhite( pR->GetBestMatchingColor( Color( COL_WHITE ) ) );
+ const BitmapColor aBlack( pR->GetBestMatchingColor( Color( COL_BLACK ) ) );
+ const long nWidth = pW->Width(), nHeight = pW->Height();
+ const long nR = aFillCol.GetRed(), nG = aFillCol.GetGreen(), nB = aFillCol.GetBlue();
+ long nX, nY;
if( aPaint.GetBitCount() <= 8 )
{
- const BitmapPalette& rPal = pW->GetPalette();
- const USHORT nCount = rPal.GetEntryCount();
- BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
+ const BitmapPalette& rPal = pW->GetPalette();
+ const USHORT nCount = rPal.GetEntryCount();
+ BitmapColor* pMap = (BitmapColor*) new BYTE[ nCount * sizeof( BitmapColor ) ];
for( USHORT i = 0; i < nCount; i++ )
{
@@ -517,9 +517,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
for( nY = 0; nY < nHeight; nY++ )
{
- Scanline pWScan = pW->GetScanline( nY );
- Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ Scanline pWScan = pW->GetScanline( nY );
+ Scanline pRScan = pR->GetScanline( nY );
+ BYTE cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan++ )
{
@@ -550,9 +550,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly,
for( nY = 0; nY < nHeight; nY++ )
{
- Scanline pWScan = pW->GetScanline( nY );
- Scanline pRScan = pR->GetScanline( nY );
- BYTE cBit = 128;
+ Scanline pWScan = pW->GetScanline( nY );
+ Scanline pRScan = pR->GetScanline( nY );
+ BYTE cBit = 128;
for( nX = 0; nX < nWidth; nX++, cBit >>= 1, pWScan += 3 )
{
@@ -649,10 +649,10 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
}
else
{
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
- Point aPoint;
- Rectangle aDstRect( aPoint, GetOutputSizePixel() );
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) );
+ Point aPoint;
+ Rectangle aDstRect( aPoint, GetOutputSizePixel() );
mpMetaFile = NULL;
aDstRect.Intersection( aOutRect );
@@ -696,7 +696,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// copy MapMode state and disable for buffer
const bool bBufferMapModeEnabled(pVDev->IsMapModeEnabled());
pVDev->EnableMapMode(false);
-
+
// copy content from original to buffer
pVDev->DrawOutDev(
aPoint, pVDev->GetOutputSizePixel(), // dest
@@ -727,15 +727,15 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
}
else
{
- Bitmap aPaint, aMask;
- AlphaMask aAlpha;
- MapMode aMap( GetMapMode() );
- Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
- const BOOL bOldMap = mbMap;
+ Bitmap aPaint, aMask;
+ AlphaMask aAlpha;
+ MapMode aMap( GetMapMode() );
+ Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) );
+ const BOOL bOldMap = mbMap;
aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) );
pVDev->SetMapMode( aMap );
- const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
+ const BOOL bVDevOldMap = pVDev->IsMapModeEnabled();
// create paint bitmap
( (GDIMetaFile&) rMtf ).WindStart();
@@ -807,16 +807,16 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- BitmapEx aBmpEx;
- const BitmapEx* pCached = rWallpaper.ImplGetImpWallpaper()->ImplGetCachedBitmap();
- Point aPos;
- Size aSize;
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- const WallpaperStyle eStyle = rWallpaper.GetStyle();
- const BOOL bOldMap = mbMap;
- BOOL bDrawn = FALSE;
- BOOL bDrawGradientBackground = FALSE;
- BOOL bDrawColorBackground = FALSE;
+ BitmapEx aBmpEx;
+ const BitmapEx* pCached = rWallpaper.ImplGetImpWallpaper()->ImplGetCachedBitmap();
+ Point aPos;
+ Size aSize;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ const WallpaperStyle eStyle = rWallpaper.GetStyle();
+ const BOOL bOldMap = mbMap;
+ BOOL bDrawn = FALSE;
+ BOOL bDrawGradientBackground = FALSE;
+ BOOL bDrawColorBackground = FALSE;
if( pCached )
aBmpEx = *pCached;
@@ -946,10 +946,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
default:
{
- const long nRight = nX + nWidth - 1L;
- const long nBottom = nY + nHeight - 1L;
- long nFirstX;
- long nFirstY;
+ const long nRight = nX + nWidth - 1L;
+ const long nBottom = nY + nHeight - 1L;
+ long nFirstX;
+ long nFirstY;
if( eStyle == WALLPAPER_TILE )
{
@@ -962,10 +962,10 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
nFirstY = aPos.Y() + ( ( aSize.Height() - nBmpHeight ) >> 1 );
}
- const long nOffX = ( nFirstX - nX ) % nBmpWidth;
- const long nOffY = ( nFirstY - nY ) % nBmpHeight;
- long nStartX = nX + nOffX;
- long nStartY = nY + nOffY;
+ const long nOffX = ( nFirstX - nX ) % nBmpWidth;
+ const long nOffY = ( nFirstY - nY ) % nBmpHeight;
+ long nStartX = nX + nOffX;
+ long nStartY = nY + nOffY;
if( nOffX > 0L )
nStartX -= nBmpWidth;
@@ -987,11 +987,11 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY,
// optimized for non-transparent bitmaps
if( bDrawColorBackground )
{
- const Size aBmpSize( aBmpEx.GetSizePixel() );
- const Point aTmpPoint;
+ const Size aBmpSize( aBmpEx.GetSizePixel() );
+ const Point aTmpPoint;
const Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() );
const Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) );
- Rectangle aWorkRect;
+ Rectangle aWorkRect;
aWorkRect = Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L );
aWorkRect.Justify();
@@ -1050,9 +1050,9 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY,
long nWidth, long nHeight,
const Wallpaper& rWallpaper )
{
- Rectangle aBound;
- GDIMetaFile* pOldMetaFile = mpMetaFile;
- const BOOL bOldMap = mbMap;
+ Rectangle aBound;
+ GDIMetaFile* pOldMetaFile = mpMetaFile;
+ const BOOL bOldMap = mbMap;
BOOL bNeedGradient = TRUE;
/*
@@ -1130,7 +1130,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect,
rWallpaper );
}
}
-
+
if( mpAlphaVDev )
mpAlphaVDev->DrawWallpaper( rRect, rWallpaper );
}
@@ -1141,20 +1141,20 @@ void OutputDevice::Erase()
{
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
-
- BOOL bNativeOK = FALSE;
+
+ BOOL bNativeOK = FALSE;
if( meOutDevType == OUTDEV_WINDOW )
{
Window* pWindow = static_cast<Window*>(this);
- ControlPart aCtrlPart = pWindow->ImplGetWindowImpl()->mnNativeBackground;
+ ControlPart aCtrlPart = pWindow->ImplGetWindowImpl()->mnNativeBackground;
if( aCtrlPart != 0 && ! pWindow->IsControlBackground() )
{
ImplControlValue aControlValue;
Point aGcc3WorkaroundTemporary;
Rectangle aCtrlRegion( aGcc3WorkaroundTemporary, GetOutputSizePixel() );
ControlState nState = 0;
-
- if( pWindow->IsEnabled() ) nState |= CTRL_STATE_ENABLED;
+
+ if( pWindow->IsEnabled() ) nState |= CTRL_STATE_ENABLED;
bNativeOK = pWindow->DrawNativeControl( CTRL_WINDOW_BACKGROUND, aCtrlPart, aCtrlRegion,
nState, aControlValue, rtl::OUString() );
}
@@ -1211,7 +1211,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
if( mbOutputClipped )
return bDrawn;
- Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
+ Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) );
if( !aRect.IsEmpty() )
{
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 521f4d7ea62d..986988e8a4be 100644
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -292,7 +292,7 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
aTestRegion.Intersect( rControlRegion );
if( aTestRegion == rControlRegion )
nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed
-
+
BOOL bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
return bRet;
@@ -332,7 +332,7 @@ BOOL OutputDevice::DrawNativeControlText(ControlType nType,
Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
BOOL bRet = mpGraphics->DrawNativeControlText(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this );
-
+
return bRet;
}
@@ -365,7 +365,7 @@ BOOL OutputDevice::GetNativeControlRegion( ControlType nType,
rNativeContentRegion, this );
if( bRet )
{
- // transform back native regions
+ // transform back native regions
rNativeBoundingRegion = ImplDevicePixelToLogic( rNativeBoundingRegion );
rNativeContentRegion = ImplDevicePixelToLogic( rNativeContentRegion );
}
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index 189ba4c29e59..bc30058806a7 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,7 +65,7 @@ DBG_NAMEEX( Region )
// =======================================================================
static long aImplNumeratorAry[MAP_PIXEL+1] =
- { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 };
+ { 1, 1, 5, 50, 1, 1, 1, 1, 1, 1, 1 };
static long aImplDenominatorAry[MAP_PIXEL+1] =
{ 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1 };
@@ -116,10 +116,10 @@ static Fraction ImplMakeFraction( long nN1, long nN2, long nD1, long nD2 )
// -----------------------------------------------------------------------
// Fraction.GetNumerator()
-// Fraction.GetDenominator() > 0
-// rOutRes.nPixPerInch? > 0
+// Fraction.GetDenominator() > 0
+// rOutRes.nPixPerInch? > 0
// rMapRes.nMapScNum?
-// rMapRes.nMapScDenom? > 0
+// rMapRes.nMapScDenom? > 0
static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
const ImplMapRes& rMapRes,
@@ -133,9 +133,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
- long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
- ULONG nDenomX = rMapRes.mnMapScDenomX;
- long nProductX = nDPIX * rMapRes.mnMapScNumX;
+ long nDenomHalfX = rMapRes.mnMapScDenomX / 2;
+ ULONG nDenomX = rMapRes.mnMapScDenomX;
+ long nProductX = nDPIX * rMapRes.mnMapScNumX;
if ( !nProductX )
rThresRes.mnThresLogToPixX = LONG_MAX;
@@ -158,9 +158,9 @@ static void ImplCalcBigIntThreshold( long nDPIX, long nDPIY,
else
{
// Schwellenwerte fuer BigInt Arithmetik berechnen
- long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
- ULONG nDenomY = rMapRes.mnMapScDenomY;
- long nProductY = nDPIY * rMapRes.mnMapScNumY;
+ long nDenomHalfY = rMapRes.mnMapScDenomY / 2;
+ ULONG nDenomY = rMapRes.mnMapScDenomY;
+ long nProductY = nDPIY * rMapRes.mnMapScNumY;
if ( !nProductY )
rThresRes.mnThresLogToPixY = LONG_MAX;
@@ -205,16 +205,16 @@ static void ImplCalcMapResolution( const MapMode& rMapMode,
rMapRes.mnMapScDenomY = 254;
break;
case MAP_MM:
- rMapRes.mnMapScNumX = 5; // 10
- rMapRes.mnMapScDenomX = 127; // 254
- rMapRes.mnMapScNumY = 5; // 10
- rMapRes.mnMapScDenomY = 127; // 254
+ rMapRes.mnMapScNumX = 5; // 10
+ rMapRes.mnMapScDenomX = 127; // 254
+ rMapRes.mnMapScNumY = 5; // 10
+ rMapRes.mnMapScDenomY = 127; // 254
break;
case MAP_CM:
- rMapRes.mnMapScNumX = 50; // 100
- rMapRes.mnMapScDenomX = 127; // 254
- rMapRes.mnMapScNumY = 50; // 100
- rMapRes.mnMapScDenomY = 127; // 254
+ rMapRes.mnMapScNumX = 50; // 100
+ rMapRes.mnMapScDenomX = 127; // 254
+ rMapRes.mnMapScNumY = 50; // 100
+ rMapRes.mnMapScDenomY = 127; // 254
break;
case MAP_1000TH_INCH:
rMapRes.mnMapScNumX = 1;
@@ -688,8 +688,8 @@ Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -732,7 +732,7 @@ PolyPolygon OutputDevice::ImplLogicToDevicePixel( const PolyPolygon& rLogicPolyP
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -813,12 +813,12 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const
// -----------------------------------------------------------------------
-void OutputDevice::EnableMapMode( BOOL bEnable )
-{
- mbMap = (bEnable != 0);
+void OutputDevice::EnableMapMode( BOOL bEnable )
+{
+ mbMap = (bEnable != 0);
if( mpAlphaVDev )
- mpAlphaVDev->EnableMapMode( bEnable );
+ mpAlphaVDev->EnableMapMode( bEnable );
}
// -----------------------------------------------------------------------
@@ -832,12 +832,12 @@ void OutputDevice::SetMapMode()
if ( mbMap || !maMapMode.IsDefault() )
{
- mbMap = FALSE;
- maMapMode = MapMode();
+ mbMap = FALSE;
+ maMapMode = MapMode();
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = TRUE;
+ mbInitFont = TRUE;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -853,7 +853,7 @@ void OutputDevice::SetMapMode()
}
if( mpAlphaVDev )
- mpAlphaVDev->SetMapMode();
+ mpAlphaVDev->SetMapMode();
}
// -----------------------------------------------------------------------
@@ -889,14 +889,14 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
if ( (rNewMapMode.GetMapUnit() == maMapMode.GetMapUnit()) &&
(rNewMapMode.GetScaleX() == maMapMode.GetScaleX()) &&
(rNewMapMode.GetScaleY() == maMapMode.GetScaleY()) &&
- (bOldMap == mbMap) )
+ (bOldMap == mbMap) )
{
// Offset setzen
Point aOrigin = rNewMapMode.GetOrigin();
maMapRes.mnMapOfsX = aOrigin.X();
maMapRes.mnMapOfsY = aOrigin.Y();
maMapMode = rNewMapMode;
-
+
// #i75163#
ImplInvalidateViewTransform();
@@ -904,12 +904,12 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
}
if ( !bOldMap && bRelMap )
{
- maMapRes.mnMapScNumX = 1;
- maMapRes.mnMapScNumY = 1;
- maMapRes.mnMapScDenomX = mnDPIX;
- maMapRes.mnMapScDenomY = mnDPIY;
- maMapRes.mnMapOfsX = 0;
- maMapRes.mnMapOfsY = 0;
+ maMapRes.mnMapScNumX = 1;
+ maMapRes.mnMapScNumY = 1;
+ maMapRes.mnMapScDenomX = mnDPIX;
+ maMapRes.mnMapScDenomY = mnDPIY;
+ maMapRes.mnMapOfsX = 0;
+ maMapRes.mnMapOfsY = 0;
}
// Neue MapMode-Aufloesung berechnen
@@ -937,8 +937,8 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode )
maMapMode = rNewMapMode;
// create new objects (clip region werden nicht neu skaliert)
- mbNewFont = TRUE;
- mbInitFont = TRUE;
+ mbNewFont = TRUE;
+ mbInitFont = TRUE;
if ( GetOutDevType() == OUTDEV_WINDOW )
{
if ( ((Window*)this)->mpWindowImpl->mpCursor )
@@ -1102,22 +1102,22 @@ basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation() const
basegfx::B2DHomMatrix OutputDevice::GetViewTransformation( const MapMode& rMapMode ) const
{
// #i82615#
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
-
+
basegfx::B2DHomMatrix aTransform;
const double fScaleFactorX((double)mnDPIX * (double)aMapRes.mnMapScNumX / (double)aMapRes.mnMapScDenomX);
const double fScaleFactorY((double)mnDPIY * (double)aMapRes.mnMapScNumY / (double)aMapRes.mnMapScDenomY);
const double fZeroPointX(((double)aMapRes.mnMapOfsX * fScaleFactorX) + (double)mnOutOffOrigX);
const double fZeroPointY(((double)aMapRes.mnMapOfsY * fScaleFactorY) + (double)mnOutOffOrigY);
-
+
aTransform.set(0, 0, fScaleFactorX);
aTransform.set(1, 1, fScaleFactorY);
aTransform.set(0, 2, fZeroPointX);
aTransform.set(1, 2, fZeroPointY);
-
+
return aTransform;
}
@@ -1209,8 +1209,8 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
if ( !mbMap )
return rLogicPoly;
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1243,7 +1243,7 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly ) cons
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1284,7 +1284,7 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rLogicRegion;
- Region aRegion;
+ Region aRegion;
const ImplRegion& rImplRegion = *rLogicRegion.ImplGetImplRegion();
const PolyPolygon* pPolyPoly = rImplRegion.mpPolyPoly;
const basegfx::B2DPolyPolygon* pB2DPolyPoly = rImplRegion.mpB2DPolyPoly;
@@ -1300,12 +1300,12 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
}
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1332,8 +1332,8 @@ Point OutputDevice::LogicToPixel( const Point& rLogicPt,
return rLogicPt;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Point( ImplLogicToPixel( rLogicPt.X() + aMapRes.mnMapOfsX, mnDPIX,
@@ -1355,8 +1355,8 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize,
return rLogicSize;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Size( ImplLogicToPixel( rLogicSize.Width(), mnDPIX,
@@ -1378,8 +1378,8 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
return rLogicRect;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX,
@@ -1408,12 +1408,12 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
return rLogicPoly;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rLogicPoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rLogicPoly.GetSize();
Polygon aPoly( rLogicPoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1431,7 +1431,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
aThresRes.mnThresLogToPixY )+mnOutOffOrigY;
aPoly[i] = aPt;
}
-
+
return aPoly;
}
@@ -1447,7 +1447,7 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly,
return rLogicPolyPoly;
PolyPolygon aPolyPoly( rLogicPolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1491,19 +1491,19 @@ Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rLogicRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rLogicRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rLogicRegion.ImplGetImplRegion()->mpPolyPoly;
if( pPolyPoly )
aRegion = Region( LogicToPixel( *pPolyPoly, rMapMode ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rLogicRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1586,8 +1586,8 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
if ( !mbMap )
return rDevicePoly;
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1620,7 +1620,7 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1661,19 +1661,19 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
if ( !mbMap || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rDeviceRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
if ( pPolyPoly )
aRegion = Region( PixelToLogic( *pPolyPoly ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1701,8 +1701,8 @@ Point OutputDevice::PixelToLogic( const Point& rDevicePt,
return rDevicePt;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Point( ImplPixelToLogic( rDevicePt.X(), mnDPIX,
@@ -1725,8 +1725,8 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize,
return rDeviceSize;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Size( ImplPixelToLogic( rDeviceSize.Width(), mnDPIX,
@@ -1749,8 +1749,8 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
return rDeviceRect;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX,
@@ -1780,12 +1780,12 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
return rDevicePoly;
// MapMode-Aufloesung berechnen und Umrechnen
- ImplMapRes aMapRes;
- ImplThresholdRes aThresRes;
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
- USHORT i;
- USHORT nPoints = rDevicePoly.GetSize();
+ USHORT i;
+ USHORT nPoints = rDevicePoly.GetSize();
Polygon aPoly( rDevicePoly );
// Pointer auf das Point-Array holen (Daten werden kopiert)
@@ -1819,7 +1819,7 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly,
return rDevicePolyPoly;
PolyPolygon aPolyPoly( rDevicePolyPoly );
- USHORT nPoly = aPolyPoly.Count();
+ USHORT nPoly = aPolyPoly.Count();
for( USHORT i = 0; i < nPoly; i++ )
{
Polygon& rPoly = aPolyPoly[i];
@@ -1863,19 +1863,19 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
if ( rMapMode.IsDefault() || (eType == REGION_EMPTY) || (eType == REGION_NULL) )
return rDeviceRegion;
- Region aRegion;
- PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+ Region aRegion;
+ PolyPolygon* pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
if ( pPolyPoly )
aRegion = Region( PixelToLogic( *pPolyPoly, rMapMode ) );
else
{
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- ImplRegionInfo aInfo;
- BOOL bRegionRect;
+ long nX;
+ long nY;
+ long nWidth;
+ long nHeight;
+ ImplRegionInfo aInfo;
+ BOOL bRegionRect;
aRegion.ImplBeginAddRect();
bRegionRect = rDeviceRegion.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
@@ -1893,83 +1893,83 @@ Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
// -----------------------------------------------------------------------
-#define ENTER0( rSource, pMapModeSource, pMapModeDest ) \
- if ( !pMapModeSource ) \
- pMapModeSource = &maMapMode; \
- if ( !pMapModeDest ) \
- pMapModeDest = &maMapMode; \
- if ( *pMapModeSource == *pMapModeDest ) \
+#define ENTER0( rSource, pMapModeSource, pMapModeDest ) \
+ if ( !pMapModeSource ) \
+ pMapModeSource = &maMapMode; \
+ if ( !pMapModeDest ) \
+ pMapModeDest = &maMapMode; \
+ if ( *pMapModeSource == *pMapModeDest ) \
return rSource
// -----------------------------------------------------------------------
-#define ENTER1( rSource, pMapModeSource, pMapModeDest ) \
- ENTER0( rSource, pMapModeSource, pMapModeDest ); \
+#define ENTER1( rSource, pMapModeSource, pMapModeDest ) \
+ ENTER0( rSource, pMapModeSource, pMapModeDest ); \
\
- ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+ ImplMapRes aMapResSource; \
+ ImplMapRes aMapResDest; \
\
- if ( !mbMap || pMapModeSource != &maMapMode ) \
- { \
- if ( pMapModeSource->GetMapUnit() == MAP_RELATIVE ) \
- aMapResSource = maMapRes; \
- ImplCalcMapResolution( *pMapModeSource, \
- mnDPIX, mnDPIY, aMapResSource ); \
- } \
- else \
- aMapResSource = maMapRes; \
- if ( !mbMap || pMapModeDest != &maMapMode ) \
- { \
- if ( pMapModeDest->GetMapUnit() == MAP_RELATIVE ) \
- aMapResDest = maMapRes; \
- ImplCalcMapResolution( *pMapModeDest, \
- mnDPIX, mnDPIY, aMapResDest ); \
- } \
- else \
+ if ( !mbMap || pMapModeSource != &maMapMode ) \
+ { \
+ if ( pMapModeSource->GetMapUnit() == MAP_RELATIVE ) \
+ aMapResSource = maMapRes; \
+ ImplCalcMapResolution( *pMapModeSource, \
+ mnDPIX, mnDPIY, aMapResSource ); \
+ } \
+ else \
+ aMapResSource = maMapRes; \
+ if ( !mbMap || pMapModeDest != &maMapMode ) \
+ { \
+ if ( pMapModeDest->GetMapUnit() == MAP_RELATIVE ) \
+ aMapResDest = maMapRes; \
+ ImplCalcMapResolution( *pMapModeDest, \
+ mnDPIX, mnDPIY, aMapResDest ); \
+ } \
+ else \
aMapResDest = maMapRes
// -----------------------------------------------------------------------
-#define ENTER2( eUnitSource, eUnitDest ) \
- DBG_ASSERT( eUnitSource != MAP_SYSFONT \
- && eUnitSource != MAP_APPFONT \
- && eUnitSource != MAP_RELATIVE, \
+#define ENTER2( eUnitSource, eUnitDest ) \
+ DBG_ASSERT( eUnitSource != MAP_SYSFONT \
+ && eUnitSource != MAP_APPFONT \
+ && eUnitSource != MAP_RELATIVE, \
"Source MapUnit nicht erlaubt" ); \
- DBG_ASSERT( eUnitDest != MAP_SYSFONT \
- && eUnitDest != MAP_APPFONT \
- && eUnitDest != MAP_RELATIVE, \
+ DBG_ASSERT( eUnitDest != MAP_SYSFONT \
+ && eUnitDest != MAP_APPFONT \
+ && eUnitDest != MAP_RELATIVE, \
"Destination MapUnit nicht erlaubt" ); \
- DBG_ASSERTWARNING( eUnitSource != MAP_PIXEL, \
+ DBG_ASSERTWARNING( eUnitSource != MAP_PIXEL, \
"MAP_PIXEL mit 72dpi angenaehert" ); \
- DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \
+ DBG_ASSERTWARNING( eUnitDest != MAP_PIXEL, \
"MAP_PIXEL mit 72dpi angenaehert" )
// -----------------------------------------------------------------------
-#define ENTER3( eUnitSource, eUnitDest ) \
- long nNumerator = 1; \
- long nDenominator = 1; \
- DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \
- DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \
- if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \
- { \
- nNumerator = aImplNumeratorAry[eUnitSource] * \
- aImplDenominatorAry[eUnitDest]; \
- nDenominator = aImplNumeratorAry[eUnitDest] * \
- aImplDenominatorAry[eUnitSource]; \
+#define ENTER3( eUnitSource, eUnitDest ) \
+ long nNumerator = 1; \
+ long nDenominator = 1; \
+ DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit"); \
+ DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit"); \
+ if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) ) \
+ { \
+ nNumerator = aImplNumeratorAry[eUnitSource] * \
+ aImplDenominatorAry[eUnitDest]; \
+ nDenominator = aImplNumeratorAry[eUnitDest] * \
+ aImplDenominatorAry[eUnitSource]; \
} \
- if ( eUnitSource == MAP_PIXEL ) \
- nDenominator *= 72; \
- else if( eUnitDest == MAP_PIXEL ) \
+ if ( eUnitSource == MAP_PIXEL ) \
+ nDenominator *= 72; \
+ else if( eUnitDest == MAP_PIXEL ) \
nNumerator *= 72
// -----------------------------------------------------------------------
-#define ENTER4( rMapModeSource, rMapModeDest ) \
- ImplMapRes aMapResSource; \
- ImplMapRes aMapResDest; \
+#define ENTER4( rMapModeSource, rMapModeDest ) \
+ ImplMapRes aMapResSource; \
+ ImplMapRes aMapResDest; \
\
- ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
+ ImplCalcMapResolution( rMapModeSource, 72, 72, aMapResSource ); \
ImplCalcMapResolution( rMapModeDest, 72, 72, aMapResDest )
// -----------------------------------------------------------------------
@@ -2114,8 +2114,8 @@ static long fn3( const long n1, const long n2, const long n3 )
} // of if
else
{
- long n4 = n1 * n2;
- const long n3_2 = n3 / 2;
+ long n4 = n1 * n2;
+ const long n3_2 = n3 / 2;
if( n4 < 0 )
{
@@ -2217,7 +2217,7 @@ Point OutputDevice::LogicToLogic( const Point& rPtSource,
return rPtSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2253,7 +2253,7 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource,
return rSzSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2287,7 +2287,7 @@ basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPoly
return rPolySource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
basegfx::B2DHomMatrix aTransform;
@@ -2332,7 +2332,7 @@ basegfx::B2DPolyPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolyPolygo
return rPolySource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
basegfx::B2DHomMatrix aTransform;
@@ -2377,7 +2377,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
return rRectSource;
MapUnit eUnitSource = rMapModeSource.GetMapUnit();
- MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
ENTER2( eUnitSource, eUnitDest );
if ( rMapModeSource.mpImplMapMode->mbSimple &&
@@ -2470,7 +2470,7 @@ long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit )
// Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung
// von Fensterposition benutzt wird
- nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX;
+ nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX;
nX += nX >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomX/2) :
-((pFrameData->maMapUnitRes.mnMapScDenomX-1)/2);
nX /= pFrameData->maMapUnitRes.mnMapScDenomX;
@@ -2497,7 +2497,7 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit )
// Es wird kein BigInt gebraucht, da diese Funktion nur zur Umrechnung
// von Fensterposition benutzt wird
- nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY;
+ nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY;
nY += nY >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomY/2) :
-((pFrameData->maMapUnitRes.mnMapScDenomY-1)/2);
nY /= pFrameData->maMapUnitRes.mnMapScDenomY;
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 046bc4a8951d..ca5d716f8540 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,31 +69,31 @@ struct PDFExtOutDevDataSync
EndGroupGfxLink
};
- sal_uInt32 nIdx;
- Action eAct;
+ sal_uInt32 nIdx;
+ Action eAct;
};
struct GlobalSyncData
{
- std::deque< PDFExtOutDevDataSync::Action > mActions;
- std::deque< MapMode > mParaMapModes;
- std::deque< Rectangle > mParaRects;
- std::deque< sal_Int32 > mParaInts;
- std::deque< sal_uInt32 > mParauInts;
- std::deque< rtl::OUString > mParaOUStrings;
- std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
- std::deque< PDFNote > mParaPDFNotes;
- std::deque< PDFWriter::PageTransition > mParaPageTransitions;
+ std::deque< PDFExtOutDevDataSync::Action > mActions;
+ std::deque< MapMode > mParaMapModes;
+ std::deque< Rectangle > mParaRects;
+ std::deque< sal_Int32 > mParaInts;
+ std::deque< sal_uInt32 > mParauInts;
+ std::deque< rtl::OUString > mParaOUStrings;
+ std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
+ std::deque< PDFNote > mParaPDFNotes;
+ std::deque< PDFWriter::PageTransition > mParaPageTransitions;
sal_Int32 GetMappedId();
sal_Int32 GetMappedStructId( sal_Int32 );
- sal_Int32 mCurId;
- std::vector< sal_Int32 > mParaIds;
- std::vector< sal_Int32 > mStructIdMap;
+ sal_Int32 mCurId;
+ std::vector< sal_Int32 > mParaIds;
+ std::vector< sal_Int32 > mStructIdMap;
- sal_Int32 mCurrentStructElement;
- std::vector< sal_Int32 > mStructParents;
+ sal_Int32 mCurrentStructElement;
+ std::vector< sal_Int32 > mStructParents;
GlobalSyncData() :
mCurId ( 0 ),
mCurrentStructElement( 0 )
@@ -118,7 +118,7 @@ sal_Int32 GlobalSyncData::GetMappedId()
nLinkId = mParaIds[ nLinkId ];
else
nLinkId = -1;
-
+
DBG_ASSERT( nLinkId >= 0, "unmapped id in GlobalSyncData" );
}
@@ -272,19 +272,19 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
struct PageSyncData
{
- std::deque< PDFExtOutDevDataSync > mActions;
- std::deque< Rectangle > mParaRects;
- std::deque< sal_Int32 > mParaInts;
- std::deque< rtl::OUString > mParaOUStrings;
- std::deque< PDFWriter::StructElement > mParaStructElements;
- std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
- std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
- std::deque< Graphic > mGraphics;
+ std::deque< PDFExtOutDevDataSync > mActions;
+ std::deque< Rectangle > mParaRects;
+ std::deque< sal_Int32 > mParaInts;
+ std::deque< rtl::OUString > mParaOUStrings;
+ std::deque< PDFWriter::StructElement > mParaStructElements;
+ std::deque< PDFWriter::StructAttribute > mParaStructAttributes;
+ std::deque< PDFWriter::StructAttributeValue > mParaStructAttributeValues;
+ std::deque< Graphic > mGraphics;
std::deque< ::boost::shared_ptr< PDFWriter::AnyWidget > >
mControls;
- GlobalSyncData* mpGlobalData;
+ GlobalSyncData* mpGlobalData;
- sal_Bool mbGroupIgnoreGDIMtfActions;
+ sal_Bool mbGroupIgnoreGDIMtfActions;
PageSyncData( GlobalSyncData* pGlobal ) : mbGroupIgnoreGDIMtfActions ( sal_False ) { mpGlobalData = pGlobal; }
@@ -301,7 +301,7 @@ void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDa
if ( pMtf )
aSync.nIdx = pMtf->GetActionCount();
else
- aSync.nIdx = 0x7fffffff; // sync not possible
+ aSync.nIdx = 0x7fffffff; // sync not possible
mActions.push_back( aSync );
}
sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData )
@@ -376,7 +376,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
break;
case PDFExtOutDevDataSync::BeginGroup :
{
- /* first determining if this BeginGroup is starting a GfxLink,
+ /* first determining if this BeginGroup is starting a GfxLink,
by searching for a EndGroup or a EndGroupGfxLink */
mbGroupIgnoreGDIMtfActions = sal_False;
std::deque< PDFExtOutDevDataSync >::iterator aBeg = mActions.begin();
@@ -426,7 +426,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
{
sal_Bool bClippingNeeded = ( aOutputRect != aVisibleOutputRect ) && !aVisibleOutputRect.IsEmpty();
- GfxLink aGfxLink( aGraphic.GetLink() );
+ GfxLink aGfxLink( aGraphic.GetLink() );
if ( aGfxLink.GetType() == GFX_LINK_TYPE_NATIVE_JPG )
{
if ( bClippingNeeded )
@@ -479,17 +479,17 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
TYPEINIT1(PDFExtOutDevData,ExtOutDevData);
PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
- mrOutDev ( rOutDev ),
- mbTaggedPDF ( sal_False ),
- mbExportNotes ( sal_True ),
- mbTransitionEffects ( sal_True ),
+ mrOutDev ( rOutDev ),
+ mbTaggedPDF ( sal_False ),
+ mbExportNotes ( sal_True ),
+ mbTransitionEffects ( sal_True ),
mbUseLosslessCompression( sal_True ),
- mbReduceImageResolution ( sal_False ),
+ mbReduceImageResolution ( sal_False ),
mbExportNDests ( sal_False ),
- mnFormsFormat ( 0 ),
- mnPage ( -1 ),
- mpPageSyncData ( NULL ),
- mpGlobalSyncData ( new GlobalSyncData() )
+ mnFormsFormat ( 0 ),
+ mnPage ( -1 ),
+ mpPageSyncData ( NULL ),
+ mpGlobalSyncData ( new GlobalSyncData() )
{
mpPageSyncData = new PageSyncData( mpGlobalSyncData );
}
@@ -611,7 +611,7 @@ void PDFExtOutDevData::PlayGlobalActions( PDFWriter& rWriter )
//--->i56629
sal_Int32 PDFExtOutDevData::CreateNamedDest(const String& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
- mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
+ mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateNamedDest );
mpGlobalSyncData->mParaOUStrings.push_back( sDestName );
mpGlobalSyncData->mParaRects.push_back( rRect );
mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
@@ -783,10 +783,10 @@ void PDFExtOutDevData::EndGroup()
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroup );
}
-void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
- BYTE nTransparency,
- const Rectangle& rOutputRect,
- const Rectangle& rVisibleOutputRect )
+void PDFExtOutDevData::EndGroup( const Graphic& rGraphic,
+ BYTE nTransparency,
+ const Rectangle& rOutputRect,
+ const Rectangle& rVisibleOutputRect )
{
mpPageSyncData->PushAction( mrOutDev, PDFExtOutDevDataSync::EndGroupGfxLink );
mpPageSyncData->mGraphics.push_back( rGraphic );
diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx
index 507ede81ef24..38e8583f4d5b 100644
--- a/vcl/source/gdi/pdffontcache.cxx
+++ b/vcl/source/gdi/pdffontcache.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/pdffontcache.hxx b/vcl/source/gdi/pdffontcache.hxx
index 06ffff86b070..8ded4e82d255 100644
--- a/vcl/source/gdi/pdffontcache.hxx
+++ b/vcl/source/gdi/pdffontcache.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,10 +42,10 @@ namespace vcl
sal_IntPtr m_nFontId;
int m_nMagic;
bool m_bVertical;
-
+
FontIdentifier( const ImplFontData*, bool bVertical );
FontIdentifier() : m_nFontId(0), m_nMagic(0), m_bVertical( false ) {}
-
+
bool operator==( const FontIdentifier& rRight ) const
{
return m_nFontId == rRight.m_nFontId &&
@@ -65,15 +65,15 @@ namespace vcl
Ucs2UIntMap m_aGlyphIdToIndex;
};
typedef std::map< FontIdentifier, sal_uInt32 > FontToIndexMap;
-
+
std::vector< FontData > m_aFonts;
FontToIndexMap m_aFontToIndex;
-
+
FontData& getFont( const ImplFontData*, bool bVertical );
public:
PDFFontCache() {}
~PDFFontCache() {}
-
+
sal_Int32 getGlyphWidth( const ImplFontData*, sal_GlyphId, bool bVertical, SalGraphics* );
};
}
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 5dcce25a0315..1f93a6a8105c 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 7b7f3bbcb4d3..eb989cdc4c72 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -106,11 +106,11 @@ void doTestCode()
rtl::OUString aTestFile( RTL_CONSTASCII_USTRINGPARAM( "file://" ) );
aTestFile += rtl::OUString( pHome, strlen( pHome ), RTL_TEXTENCODING_MS_1252 );
aTestFile += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/pdf_export_test.pdf" ) );
-
+
PDFWriter::PDFWriterContext aContext;
- aContext.URL = aTestFile;
- aContext.Version = PDFWriter::PDF_1_4;
- aContext.Tagged = true;
+ aContext.URL = aTestFile;
+ aContext.Version = PDFWriter::PDF_1_4;
+ aContext.Tagged = true;
aContext.InitialPage = 2;
PDFWriter aWriter( aContext );
@@ -211,7 +211,7 @@ void doTestCode()
aWriter.BeginStructureElement( PDFWriter::Caption );
aWriter.DrawText( Point( 4500, 9000 ), String( RTL_CONSTASCII_USTRINGPARAM( "Some drawing stuff inside the structure" ) ) );
aWriter.EndStructureElement();
-
+
// test clipping
basegfx::B2DPolyPolygon aClip;
basegfx::B2DPolygon aClipPoly;
@@ -222,7 +222,7 @@ void doTestCode()
aClipPoly.setClosed( true );
//aClipPoly.flip();
aClip.append( aClipPoly );
-
+
aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
aWriter.SetClipRegion( aClip );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
@@ -679,7 +679,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
appendHex( (sal_Int8)pStr[i], aBuffer );
}
}
-
+
OString aFullName( aBuffer.makeStringAndClear() );
/* #i82785# create hierarchical fields down to the for each dot in i_rName */
@@ -752,7 +752,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
}
}
} while( nTokenIndex != -1 );
-
+
// insert widget into its hierarchy field
if( aDomain.getLength() )
{
@@ -768,7 +768,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
}
}
}
-
+
if( aPartialName.getLength() == 0 )
{
// how funny, an empty field name
@@ -784,7 +784,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr
if( ! m_aContext.AllowDuplicateFieldNames )
{
std::hash_map<OString, sal_Int32, OStringHash>::iterator it = m_aFieldNameMap.find( aFullName );
-
+
if( it != m_aFieldNameMap.end() ) // not unique
{
std::hash_map< OString, sal_Int32, OStringHash >::const_iterator check_it;
@@ -822,11 +822,11 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer, sal_Int32
while( nDiv-- )
nFactor *= 10;
- sal_Int32 nInt = nValue / nFactor;
+ sal_Int32 nInt = nValue / nFactor;
rBuffer.append( nInt );
if( nFactor > 1 )
{
- sal_Int32 nDecimal = nValue % nFactor;
+ sal_Int32 nDecimal = nValue % nFactor;
if( nDecimal )
{
rBuffer.append( '.' );
@@ -917,7 +917,7 @@ static void appendNonStrokingColor( const Color& rColor, OStringBuffer& rBuffer
// TODO: use basegfx matrix class instead or derive from it
namespace vcl // TODO: use anonymous namespace to keep this class local
{
-/* for sparse matrices of the form (2D linear transformations)
+/* for sparse matrices of the form (2D linear transformations)
* f[0] f[1] 0
* f[2] f[3] 0
* f[4] f[5] 1
@@ -1378,7 +1378,7 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
m_pWriter->getReferenceDevice(),
rPoint ) );
- sal_Int32 nValue = aPoint.X();
+ sal_Int32 nValue = aPoint.X();
if( bNeg )
nValue = -nValue;
@@ -1386,7 +1386,7 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
rBuffer.append( ' ' );
- nValue = pointToPixel(getHeight()) - aPoint.Y();
+ nValue = pointToPixel(getHeight()) - aPoint.Y();
if( bNeg )
nValue = -nValue;
@@ -1395,13 +1395,13 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const
{
- double fValue = pixelToPoint(rPoint.getX());
+ double fValue = pixelToPoint(rPoint.getX());
appendDouble( fValue, rBuffer, nLog10Divisor );
rBuffer.append( ' ' );
- fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
+ fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
appendDouble( fValue, rBuffer, nLog10Divisor );
}
@@ -1427,10 +1427,10 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
m_pWriter->m_aMapMode,
m_pWriter->getReferenceDevice(),
rRect.GetSize() );
- rRect.Left() = aLL.X();
- rRect.Right() = aLL.X() + aSize.Width();
- rRect.Top() = pointToPixel(getHeight()) - aLL.Y();
- rRect.Bottom() = rRect.Top() + aSize.Height();
+ rRect.Left() = aLL.X();
+ rRect.Right() = aLL.X() + aSize.Width();
+ rRect.Top() = pointToPixel(getHeight()) - aLL.Y();
+ rRect.Bottom() = rRect.Top() + aSize.Height();
}
void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
@@ -1509,7 +1509,7 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
if( i != nPoints || aPoly.isClosed() )
{
sal_uInt32 nCurPoint = i % nPoints;
- sal_uInt32 nLastPoint = i-1;
+ sal_uInt32 nLastPoint = i-1;
basegfx::B2DPoint aPoint( aPoly.getB2DPoint( nCurPoint ) );
if( aPoly.isNextControlPointUsed( nLastPoint ) &&
aPoly.isPrevControlPointUsed( nCurPoint ) )
@@ -1592,7 +1592,7 @@ void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer&
Size aSize( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
m_pWriter->m_aMapMode,
m_pWriter->getReferenceDevice(),
- Size( 1000, 1000 ) ) );
+ Size( 1000, 1000 ) ) );
if( pOutLength )
*pOutLength = (sal_Int32)(fLength*(double)(bVertical ? aSize.Height() : aSize.Width())/1000.0);
fLength *= pixelToPoint((double)(bVertical ? aSize.Height() : aSize.Width()) / 1000.0);
@@ -1730,16 +1730,16 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext )
#endif
m_aContext = rContext;
m_aStructure.push_back( PDFStructureElement() );
- m_aStructure[0].m_nOwnElement = 0;
- m_aStructure[0].m_nParentElement = 0;
+ m_aStructure[0].m_nOwnElement = 0;
+ m_aStructure[0].m_nParentElement = 0;
Font aFont;
aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Times" ) ) );
aFont.SetSize( Size( 0, 12 ) );
GraphicsState aState;
- aState.m_aMapMode = m_aMapMode;
- aState.m_aFont = aFont;
+ aState.m_aMapMode = m_aMapMode;
+ aState.m_aFont = aFont;
m_aGraphicsStack.push_front( aState );
oslFileError aError = osl_openFile( m_aContext.URL.pData, &m_aFile, osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -1812,12 +1812,12 @@ PDFWriterImpl::~PDFWriterImpl()
void PDFWriterImpl::setDocInfo( const PDFDocInfo& rInfo )
{
- m_aDocInfo.Title = rInfo.Title;
- m_aDocInfo.Author = rInfo.Author;
- m_aDocInfo.Subject = rInfo.Subject;
- m_aDocInfo.Keywords = rInfo.Keywords;
- m_aDocInfo.Creator = rInfo.Creator;
- m_aDocInfo.Producer = rInfo.Producer;
+ m_aDocInfo.Title = rInfo.Title;
+ m_aDocInfo.Author = rInfo.Author;
+ m_aDocInfo.Subject = rInfo.Subject;
+ m_aDocInfo.Keywords = rInfo.Keywords;
+ m_aDocInfo.Creator = rInfo.Creator;
+ m_aDocInfo.Producer = rInfo.Producer;
//build the document id
rtl::OString aInfoValuesOut;
@@ -2230,20 +2230,20 @@ void PDFWriterImpl::getFontMetric( ImplFontSelectData* pSelect, ImplFontMetricDa
return;
const BuiltinFont* pBuiltinFont = pFD->GetBuiltinFont();
- pMetric->mnOrientation = sal::static_int_cast<short>(pSelect->mnOrientation);
- pMetric->meFamily = pBuiltinFont->m_eFamily;
- pMetric->mePitch = pBuiltinFont->m_ePitch;
- pMetric->meWeight = pBuiltinFont->m_eWeight;
- pMetric->meItalic = pBuiltinFont->m_eItalic;
- pMetric->mbSymbolFlag = pFD->IsSymbolFont();
- pMetric->mnWidth = pSelect->mnHeight;
- pMetric->mnAscent = ( pSelect->mnHeight * +pBuiltinFont->m_nAscent + 500 ) / 1000;
- pMetric->mnDescent = ( pSelect->mnHeight * -pBuiltinFont->m_nDescent + 500 ) / 1000;
- pMetric->mnIntLeading = 0;
- pMetric->mnExtLeading = 0;
- pMetric->mnSlant = 0;
- pMetric->mbScalableFont = true;
- pMetric->mbDevice = true;
+ pMetric->mnOrientation = sal::static_int_cast<short>(pSelect->mnOrientation);
+ pMetric->meFamily = pBuiltinFont->m_eFamily;
+ pMetric->mePitch = pBuiltinFont->m_ePitch;
+ pMetric->meWeight = pBuiltinFont->m_eWeight;
+ pMetric->meItalic = pBuiltinFont->m_eItalic;
+ pMetric->mbSymbolFlag = pFD->IsSymbolFont();
+ pMetric->mnWidth = pSelect->mnHeight;
+ pMetric->mnAscent = ( pSelect->mnHeight * +pBuiltinFont->m_nAscent + 500 ) / 1000;
+ pMetric->mnDescent = ( pSelect->mnHeight * -pBuiltinFont->m_nDescent + 500 ) / 1000;
+ pMetric->mnIntLeading = 0;
+ pMetric->mnExtLeading = 0;
+ pMetric->mnSlant = 0;
+ pMetric->mbScalableFont = true;
+ pMetric->mbDevice = true;
}
// -----------------------------------------------------------------------
@@ -2516,24 +2516,24 @@ const sal_Char* PDFWriterImpl::getAttributeTag( PDFWriter::StructAttribute eAttr
// fill maps once
if( aAttributeStrings.empty() )
{
- aAttributeStrings[ PDFWriter::Placement ] = "Placement";
- aAttributeStrings[ PDFWriter::WritingMode ] = "WritingMode";
- aAttributeStrings[ PDFWriter::SpaceBefore ] = "SpaceBefore";
- aAttributeStrings[ PDFWriter::SpaceAfter ] = "SpaceAfter";
- aAttributeStrings[ PDFWriter::StartIndent ] = "StartIndent";
- aAttributeStrings[ PDFWriter::EndIndent ] = "EndIndent";
- aAttributeStrings[ PDFWriter::TextIndent ] = "TextIndent";
- aAttributeStrings[ PDFWriter::TextAlign ] = "TextAlign";
- aAttributeStrings[ PDFWriter::Width ] = "Width";
- aAttributeStrings[ PDFWriter::Height ] = "Height";
- aAttributeStrings[ PDFWriter::BlockAlign ] = "BlockAlign";
- aAttributeStrings[ PDFWriter::InlineAlign ] = "InlineAlign";
- aAttributeStrings[ PDFWriter::LineHeight ] = "LineHeight";
- aAttributeStrings[ PDFWriter::BaselineShift ] = "BaselineShift";
- aAttributeStrings[ PDFWriter::TextDecorationType ] = "TextDecorationType";
- aAttributeStrings[ PDFWriter::ListNumbering ] = "ListNumbering";
- aAttributeStrings[ PDFWriter::RowSpan ] = "RowSpan";
- aAttributeStrings[ PDFWriter::ColSpan ] = "ColSpan";
+ aAttributeStrings[ PDFWriter::Placement ] = "Placement";
+ aAttributeStrings[ PDFWriter::WritingMode ] = "WritingMode";
+ aAttributeStrings[ PDFWriter::SpaceBefore ] = "SpaceBefore";
+ aAttributeStrings[ PDFWriter::SpaceAfter ] = "SpaceAfter";
+ aAttributeStrings[ PDFWriter::StartIndent ] = "StartIndent";
+ aAttributeStrings[ PDFWriter::EndIndent ] = "EndIndent";
+ aAttributeStrings[ PDFWriter::TextIndent ] = "TextIndent";
+ aAttributeStrings[ PDFWriter::TextAlign ] = "TextAlign";
+ aAttributeStrings[ PDFWriter::Width ] = "Width";
+ aAttributeStrings[ PDFWriter::Height ] = "Height";
+ aAttributeStrings[ PDFWriter::BlockAlign ] = "BlockAlign";
+ aAttributeStrings[ PDFWriter::InlineAlign ] = "InlineAlign";
+ aAttributeStrings[ PDFWriter::LineHeight ] = "LineHeight";
+ aAttributeStrings[ PDFWriter::BaselineShift ] = "BaselineShift";
+ aAttributeStrings[ PDFWriter::TextDecorationType ] = "TextDecorationType";
+ aAttributeStrings[ PDFWriter::ListNumbering ] = "ListNumbering";
+ aAttributeStrings[ PDFWriter::RowSpan ] = "RowSpan";
+ aAttributeStrings[ PDFWriter::ColSpan ] = "ColSpan";
aAttributeStrings[ PDFWriter::LinkAnnotation ] = "LinkAnnotation";
}
@@ -2554,32 +2554,32 @@ const sal_Char* PDFWriterImpl::getAttributeValueTag( PDFWriter::StructAttributeV
if( aValueStrings.empty() )
{
- aValueStrings[ PDFWriter::NONE ] = "None";
- aValueStrings[ PDFWriter::Block ] = "Block";
- aValueStrings[ PDFWriter::Inline ] = "Inline";
- aValueStrings[ PDFWriter::Before ] = "Before";
- aValueStrings[ PDFWriter::After ] = "After";
- aValueStrings[ PDFWriter::Start ] = "Start";
- aValueStrings[ PDFWriter::End ] = "End";
- aValueStrings[ PDFWriter::LrTb ] = "LrTb";
- aValueStrings[ PDFWriter::RlTb ] = "RlTb";
- aValueStrings[ PDFWriter::TbRl ] = "TbRl";
- aValueStrings[ PDFWriter::Center ] = "Center";
- aValueStrings[ PDFWriter::Justify ] = "Justify";
- aValueStrings[ PDFWriter::Auto ] = "Auto";
- aValueStrings[ PDFWriter::Middle ] = "Middle";
- aValueStrings[ PDFWriter::Normal ] = "Normal";
- aValueStrings[ PDFWriter::Underline ] = "Underline";
- aValueStrings[ PDFWriter::Overline ] = "Overline";
- aValueStrings[ PDFWriter::LineThrough ] = "LineThrough";
- aValueStrings[ PDFWriter::Disc ] = "Disc";
- aValueStrings[ PDFWriter::Circle ] = "Circle";
- aValueStrings[ PDFWriter::Square ] = "Square";
- aValueStrings[ PDFWriter::Decimal ] = "Decimal";
- aValueStrings[ PDFWriter::UpperRoman ] = "UpperRoman";
- aValueStrings[ PDFWriter::LowerRoman ] = "LowerRoman";
- aValueStrings[ PDFWriter::UpperAlpha ] = "UpperAlpha";
- aValueStrings[ PDFWriter::LowerAlpha ] = "LowerAlpha";
+ aValueStrings[ PDFWriter::NONE ] = "None";
+ aValueStrings[ PDFWriter::Block ] = "Block";
+ aValueStrings[ PDFWriter::Inline ] = "Inline";
+ aValueStrings[ PDFWriter::Before ] = "Before";
+ aValueStrings[ PDFWriter::After ] = "After";
+ aValueStrings[ PDFWriter::Start ] = "Start";
+ aValueStrings[ PDFWriter::End ] = "End";
+ aValueStrings[ PDFWriter::LrTb ] = "LrTb";
+ aValueStrings[ PDFWriter::RlTb ] = "RlTb";
+ aValueStrings[ PDFWriter::TbRl ] = "TbRl";
+ aValueStrings[ PDFWriter::Center ] = "Center";
+ aValueStrings[ PDFWriter::Justify ] = "Justify";
+ aValueStrings[ PDFWriter::Auto ] = "Auto";
+ aValueStrings[ PDFWriter::Middle ] = "Middle";
+ aValueStrings[ PDFWriter::Normal ] = "Normal";
+ aValueStrings[ PDFWriter::Underline ] = "Underline";
+ aValueStrings[ PDFWriter::Overline ] = "Overline";
+ aValueStrings[ PDFWriter::LineThrough ] = "LineThrough";
+ aValueStrings[ PDFWriter::Disc ] = "Disc";
+ aValueStrings[ PDFWriter::Circle ] = "Circle";
+ aValueStrings[ PDFWriter::Square ] = "Square";
+ aValueStrings[ PDFWriter::Decimal ] = "Decimal";
+ aValueStrings[ PDFWriter::UpperRoman ] = "UpperRoman";
+ aValueStrings[ PDFWriter::LowerRoman ] = "LowerRoman";
+ aValueStrings[ PDFWriter::UpperAlpha ] = "UpperAlpha";
+ aValueStrings[ PDFWriter::LowerAlpha ] = "LowerAlpha";
}
std::map< PDFWriter::StructAttributeValue, const char* >::const_iterator it =
@@ -3075,19 +3075,19 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
Int32Vector aGlyphWidths;
Ucs2UIntMap aUnicodeMap;
m_pReferenceDevice->mpGraphics->GetGlyphWidths( pFont, false, aGlyphWidths, aUnicodeMap );
-
+
OUString aTmpName;
osl_createTempFile( NULL, NULL, &aTmpName.pData );
sal_Int32 pGlyphIDs[ 256 ];
sal_uInt8 pEncoding[ 256 ];
sal_Ucs pUnicodes[ 256 ];
sal_Int32 pDuWidths[ 256 ];
-
+
memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
memset( pEncoding, 0, sizeof( pEncoding ) );
memset( pUnicodes, 0, sizeof( pUnicodes ) );
memset( pDuWidths, 0, sizeof( pDuWidths ) );
-
+
for( sal_Ucs c = 32; c < 256; c++ )
{
pUnicodes[c] = c;
@@ -3096,7 +3096,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
pWidths[ c ] = aGlyphWidths[ aUnicodeMap[ c ] ];
}
-
+
m_pReferenceDevice->mpGraphics->CreateFontSubset( aTmpName, pFont, pGlyphIDs, pEncoding, pDuWidths, 256, aInfo );
osl_removeFile( aTmpName.pData );
}
@@ -3136,12 +3136,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const ImplFontDa
aLine.append( " 0 R>>\n"
"endobj\n\n" );
writeBuffer( aLine.getStr(), aLine.getLength() );
-
- nFontObject = nObject;
+
+ nFontObject = nObject;
aRet[ rEmbed.m_nNormalFontID ] = nObject;
}
}
-
+
return aRet;
}
@@ -3222,7 +3222,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
}
-
+
FontSubsetInfo aInfo;
sal_Int32 pWidths[256];
const unsigned char* pFontData = NULL;
@@ -3245,13 +3245,13 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
if( pFontData[nIndex+1] == 0x03 )
break;
sal_Int32 nBytes =
- ((sal_Int32)pFontData[nIndex+2]) |
- ((sal_Int32)pFontData[nIndex+3]) << 8 |
- ((sal_Int32)pFontData[nIndex+4]) << 16 |
+ ((sal_Int32)pFontData[nIndex+2]) |
+ ((sal_Int32)pFontData[nIndex+3]) << 8 |
+ ((sal_Int32)pFontData[nIndex+4]) << 16 |
((sal_Int32)pFontData[nIndex+5]) << 24;
nIndex += nBytes+6;
}
-
+
// search for eexec
// TODO: use getPfbSegmentLengths() if possible to skip the search thingies below
nIndex = 0;
@@ -3261,7 +3261,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
do
{
while( nIndex < nFontLen-4 &&
- ( pFontData[nIndex] != 'e' ||
+ ( pFontData[nIndex] != 'e' ||
pFontData[nIndex+1] != 'e' ||
pFontData[nIndex+2] != 'x' ||
pFontData[nIndex+3] != 'e' ||
@@ -3276,7 +3276,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
// this should end the ascii part
if( nIndex > nFontLen-5 )
throw FontException();
-
+
nEndAsciiIndex = nIndex+4;
// now count backwards until we can account for 512 '0'
// which is the endmarker of the (hopefully) binary data
@@ -3294,19 +3294,19 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
// if all fonts complied
if( pFontData[nIndex] == '0' )
nFound++;
- else if( nFound > 0 &&
- pFontData[nIndex] != '\r' &&
- pFontData[nIndex] != '\t' &&
- pFontData[nIndex] != '\n' &&
+ else if( nFound > 0 &&
+ pFontData[nIndex] != '\r' &&
+ pFontData[nIndex] != '\t' &&
+ pFontData[nIndex] != '\n' &&
pFontData[nIndex] != ' ' )
break;
}
nIndex--;
}
-
+
if( nIndex < 1 || nIndex <= nEndAsciiIndex )
throw FontException();
-
+
// nLength3 is the rest of the file - excluding any section headers
// nIndex now points to the first of the 512 '0' characters marking the
// fixed content portion
@@ -3327,7 +3327,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
}
-
+
// there may be whitespace to ignore before the 512 '0'
while( pFontData[nIndex] == '\r' || pFontData[nIndex] == '\n' )
{
@@ -3341,7 +3341,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
}
nEndBinaryIndex = nIndex;
-
+
// search for beginning of binary section
nBeginBinaryIndex = nEndAsciiIndex;
do
@@ -3350,10 +3350,10 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
for( it = aSections.begin(); it != aSections.end() && (nBeginBinaryIndex < *it || nBeginBinaryIndex > ((*it) + 5) ); ++it )
;
} while( nBeginBinaryIndex < nEndBinaryIndex &&
- ( pFontData[nBeginBinaryIndex] == '\r' ||
- pFontData[nBeginBinaryIndex] == '\n' ||
+ ( pFontData[nBeginBinaryIndex] == '\r' ||
+ pFontData[nBeginBinaryIndex] == '\n' ||
it != aSections.end() ) );
-
+
// it seems to be vital to copy the exact whitespace between binary data
// and eexec, else a invalid font results. so make nEndAsciiIndex
// always immediate in front of nBeginBinaryIndex
@@ -3362,11 +3362,11 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
;
if( it != aSections.end() )
nEndAsciiIndex = (*it)-1;
-
+
nLength1 = nEndAsciiIndex+1; // including the last character
for( it = aSections.begin(); it != aSections.end() && *it < nEndAsciiIndex; ++it )
nLength1 -= 6; // decrease by pfb section size
-
+
// if the first four bytes are all ascii hex characters, then binary data
// has to be converted to real binary data
for( nIndex = 0; nIndex < 4 &&
@@ -3409,7 +3409,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
DBG_ASSERT( !(nLength2 & 1), "uneven number of hex chars in binary pfa section" );
nLength2 /= 2;
}
-
+
// now we can actually write the font stream !
#if OSL_DEBUG_LEVEL > 1
{
@@ -3440,13 +3440,13 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"stream\n" );
if( !writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
sal_uInt64 nBeginStreamPos = 0;
osl_getFilePos( m_aFile, &nBeginStreamPos );
-
+
beginCompression();
checkAndEnableStreamEncryption( nStreamObject );
-
+
// write ascii section
if( aSections.begin() == aSections.end() )
{
@@ -3470,7 +3470,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
if( ! writeBuffer( pFontData+nIndex, nEndAsciiIndex-nIndex+1 ) )
throw FontException();
}
-
+
// write binary section
if( ! bConvertHexData )
{
@@ -3505,7 +3505,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
boost::shared_array<unsigned char> pWriteBuffer( new unsigned char[ nLength2 ] );
rtl_zeroMemory( pWriteBuffer.get(), nLength2 );
int nWriteIndex = 0;
-
+
int nNextSectionIndex = 0;
for( it = aSections.begin(); it != aSections.end() && *it < nBeginBinaryIndex; ++it )
;
@@ -3565,17 +3565,17 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
endCompression();
disableStreamEncryption();
-
-
+
+
sal_uInt64 nEndStreamPos = 0;
osl_getFilePos( m_aFile, &nEndStreamPos );
-
+
// and finally close the stream
aLine.setLength( 0 );
aLine.append( "\nendstream\nendobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
// write stream length object
aLine.setLength( 0 );
if( ! updateObject( nStreamLengthObject ) )
@@ -3601,21 +3601,21 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
aErrorComment.append( sal_Int32(pFont->GetWeight()) );
emitComment( aErrorComment.getStr() );
}
-
+
if( nStreamObject )
// write font descriptor
nFontDescriptor = emitFontDescriptor( pFont, aInfo, 0, nStreamObject );
-
+
if( nFontDescriptor )
{
if( pEncoding )
nToUnicodeStream = createToUnicodeCMap( nEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, sizeof(nEncoding)/sizeof(nEncoding[0]) );
-
+
// write font object
sal_Int32 nObject = createObject();
if( ! updateObject( nObject ) )
throw FontException();
-
+
OStringBuffer aLine( 1024 );
aLine.append( nObject );
aLine.append( " 0 obj\n"
@@ -3644,11 +3644,11 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"endobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
nFontObject = nObject;
-
+
aRet[ rEmbed.m_nNormalFontID ] = nObject;
-
+
// write additional encodings
for( std::list< EmbedEncoding >::iterator enc_it = rEmbed.m_aExtendedEncodings.begin(); enc_it != rEmbed.m_aExtendedEncodings.end(); ++enc_it )
{
@@ -3657,7 +3657,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
sal_Int32 nEncObject = createObject();
if( ! updateObject( nEncObject ) )
throw FontException();
-
+
OutputDevice* pRef = getReferenceDevice();
pRef->Push( PUSH_FONT | PUSH_MAPMODE );
pRef->SetMapMode( MapMode( MAP_PIXEL ) );
@@ -3667,7 +3667,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
aFont.SetPitch( pFont->GetPitch() );
pRef->SetFont( aFont );
pRef->ImplNewFont();
-
+
aLine.setLength( 0 );
aLine.append( nEncObject );
aLine.append( " 0 obj\n"
@@ -3683,7 +3683,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
pEncToUnicodeIndex[nEncoded] = static_cast<sal_Int32>(aUnicodes.size());
aUnicodes.push_back( nEncodedCodes[nEncoded] );
pUnicodesPerGlyph[nEncoded] = 1;
-
+
aLine.append( " /" );
aLine.append( str_it->m_aName );
if( !((++nEncoded) & 15) )
@@ -3691,18 +3691,18 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
}
aLine.append( "]>>\n"
"endobj\n\n" );
-
+
pRef->Pop();
-
+
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
nToUnicodeStream = createToUnicodeCMap( nEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, nEncoded );
-
+
nObject = createObject();
if( ! updateObject( nObject ) )
throw FontException();
-
+
aLine.setLength( 0 );
aLine.append( nObject );
aLine.append( " 0 obj\n"
@@ -3735,7 +3735,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
"endobj\n\n" );
if( ! writeBuffer( aLine.getStr(), aLine.getLength() ) )
throw FontException();
-
+
aRet[ enc_it->m_nFontID ] = nObject;
}
}
@@ -3746,7 +3746,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont
endCompression();
disableStreamEncryption();
}
-
+
if( pFontData )
m_pReferenceDevice->mpGraphics->FreeEmbedFontData( pFontData, nFontLen );
@@ -3972,11 +3972,11 @@ bool PDFWriterImpl::emitFonts()
{
if( ! m_pReferenceDevice->ImplGetGraphics() )
return false;
-
+
OStringBuffer aLine( 1024 );
-
+
std::map< sal_Int32, sal_Int32 > aFontIDToObject;
-
+
OUString aTmpName;
osl_createTempFile( NULL, NULL, &aTmpName.pData );
for( FontSubsetData::iterator it = m_aSubsets.begin(); it != m_aSubsets.end(); ++it )
@@ -3993,7 +3993,7 @@ bool PDFWriterImpl::emitFonts()
int nGlyphs = 1;
// fill arrays and prepare encoding index map
sal_Int32 nToUnicodeStream = 0;
-
+
rtl_zeroMemory( pGlyphIDs, sizeof( pGlyphIDs ) );
rtl_zeroMemory( pEncoding, sizeof( pEncoding ) );
rtl_zeroMemory( pUnicodesPerGlyph, sizeof( pUnicodesPerGlyph ) );
@@ -4001,10 +4001,10 @@ bool PDFWriterImpl::emitFonts()
for( FontEmitMapping::iterator fit = lit->m_aMapping.begin(); fit != lit->m_aMapping.end();++fit )
{
sal_uInt8 nEnc = fit->second.getGlyphId();
-
+
DBG_ASSERT( pGlyphIDs[nEnc] == 0 && pEncoding[nEnc] == 0, "duplicate glyph" );
DBG_ASSERT( nEnc <= lit->m_aMapping.size(), "invalid glyph encoding" );
-
+
pGlyphIDs[ nEnc ] = fit->first;
pEncoding[ nEnc ] = nEnc;
pEncToUnicodeIndex[ nEnc ] = static_cast<sal_Int32>(aUnicodes.size());
@@ -4031,7 +4031,7 @@ bool PDFWriterImpl::emitFonts()
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_End, 0 ) ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( aFontFile, &nLength1 ) ) );
CHECK_RETURN( (osl_File_E_None == osl_setFilePos( aFontFile, osl_Pos_Absolut, 0 ) ) );
-
+
#if OSL_DEBUG_LEVEL > 1
{
OStringBuffer aLine1( " PDFWriterImpl::emitFonts" );
@@ -4051,17 +4051,17 @@ bool PDFWriterImpl::emitFonts()
"/Filter/FlateDecode"
#endif
"/Length1 " );
-
+
sal_uInt64 nStartPos = 0;
if( aSubsetInfo.m_nFontType == FontSubsetInfo::SFNT_TTF )
{
aLine.append( (sal_Int32)nLength1 );
-
+
aLine.append( ">>\n"
"stream\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos ) ) );
-
+
// copy font file
beginCompression();
checkAndEnableStreamEncryption( nFontStream );
@@ -4083,7 +4083,7 @@ bool PDFWriterImpl::emitFonts()
else if( (aSubsetInfo.m_nFontType & FontSubsetInfo::TYPE1_PFB) != 0 ) // TODO: also support PFA?
{
boost::shared_array<unsigned char> pBuffer( new unsigned char[ nLength1 ] );
-
+
sal_uInt64 nBytesRead = 0;
CHECK_RETURN( (osl_File_E_None == osl_readFile( aFontFile, pBuffer.get(), nLength1, &nBytesRead ) ) );
DBG_ASSERT( nBytesRead==nLength1, "PDF-FontSubset read incomplete!" );
@@ -4098,12 +4098,12 @@ bool PDFWriterImpl::emitFonts()
aLine.append( (sal_Int32)aSegmentLengths[1] );
aLine.append( "/Length3 " );
aLine.append( (sal_Int32)aSegmentLengths[2] );
-
+
aLine.append( ">>\n"
"stream\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nStartPos ) ) );
-
+
// emit PFB-sections without section headers
beginCompression();
checkAndEnableStreamEncryption( nFontStream );
@@ -4116,19 +4116,19 @@ bool PDFWriterImpl::emitFonts()
fprintf( stderr, "PDF: CreateFontSubset result in not yet supported format=%d\n",aSubsetInfo.m_nFontType);
aLine.append( "0 >>\nstream\n" );
}
-
+
endCompression();
disableStreamEncryption();
// close the file
osl_closeFile( aFontFile );
-
+
sal_uInt64 nEndPos = 0;
CHECK_RETURN( (osl_File_E_None == osl_getFilePos( m_aFile, &nEndPos ) ) );
// end the stream
aLine.setLength( 0 );
aLine.append( "\nendstream\nendobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
// emit stream length object
CHECK_RETURN( updateObject( nStreamLengthObject ) );
aLine.setLength( 0 );
@@ -4137,18 +4137,18 @@ bool PDFWriterImpl::emitFonts()
aLine.append( (sal_Int64)(nEndPos-nStartPos) );
aLine.append( "\nendobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
// write font descriptor
sal_Int32 nFontDescriptor = emitFontDescriptor( it->first, aSubsetInfo, lit->m_nFontID, nFontStream );
-
+
if( nToUnicodeStream )
nToUnicodeStream = createToUnicodeCMap( pEncoding, &aUnicodes[0], pUnicodesPerGlyph, pEncToUnicodeIndex, nGlyphs );
-
+
sal_Int32 nFontObject = createObject();
CHECK_RETURN( updateObject( nFontObject ) );
aLine.setLength( 0 );
aLine.append( nFontObject );
-
+
aLine.append( " 0 obj\n" );
aLine.append( ((aSubsetInfo.m_nFontType & FontSubsetInfo::ANY_TYPE1) != 0) ?
"<</Type/Font/Subtype/Type1/BaseFont/" :
@@ -4178,7 +4178,7 @@ bool PDFWriterImpl::emitFonts()
aLine.append( ">>\n"
"endobj\n\n" );
CHECK_RETURN( writeBuffer( aLine.getStr(), aLine.getLength() ) );
-
+
aFontIDToObject[ lit->m_nFontID ] = nFontObject;
}
else
@@ -4199,7 +4199,7 @@ bool PDFWriterImpl::emitFonts()
}
}
osl_removeFile( aTmpName.pData );
-
+
// emit embedded fonts
for( FontEmbedData::iterator eit = m_aEmbeddedFonts.begin(); eit != m_aEmbeddedFonts.end(); ++eit )
{
@@ -4246,7 +4246,7 @@ bool PDFWriterImpl::emitFonts()
}
appendBuiltinFontsToDict( aFontDict );
aFontDict.append( "\n>>\nendobj\n\n" );
-
+
CHECK_RETURN( updateObject( getFontDictObject() ) );
CHECK_RETURN( writeBuffer( aFontDict.getStr(), aFontDict.getLength() ) );
return true;
@@ -4428,8 +4428,8 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer )
}
- const PDFDest& rDest = m_aDests[ nDestID ];
- const PDFPage& rDestPage = m_aPages[ rDest.m_nPage ];
+ const PDFDest& rDest = m_aDests[ nDestID ];
+ const PDFPage& rDestPage = m_aPages[ rDest.m_nPage ];
rBuffer.append( '[' );
rBuffer.append( rDestPage.m_nPageObject );
@@ -4488,7 +4488,7 @@ bool PDFWriterImpl::emitLinkAnnotations()
int nAnnots = m_aLinks.size();
for( int i = 0; i < nAnnots; i++ )
{
- const PDFLink& rLink = m_aLinks[i];
+ const PDFLink& rLink = m_aLinks[i];
if( ! updateObject( rLink.m_nObject ) )
continue;
@@ -4699,7 +4699,7 @@ bool PDFWriterImpl::emitNoteAnnotations()
int nAnnots = m_aNotes.size();
for( int i = 0; i < nAnnots; i++ )
{
- const PDFNoteEntry& rNote = m_aNotes[i];
+ const PDFNoteEntry& rNote = m_aNotes[i];
if( ! updateObject( rNote.m_nObject ) )
return false;
@@ -4904,9 +4904,9 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
sal_Int32 nDelta = aFont.GetHeight()/4;
if( nDelta < 1 )
nDelta = 1;
- rIntern.m_aRect.Left() += nDelta;
- rIntern.m_aRect.Top() += nDelta;
- rIntern.m_aRect.Right() -= nDelta;
+ rIntern.m_aRect.Left() += nDelta;
+ rIntern.m_aRect.Top() += nDelta;
+ rIntern.m_aRect.Right() -= nDelta;
rIntern.m_aRect.Bottom()-= nDelta;
}
}
@@ -4944,7 +4944,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
aDA.append( ' ' );
m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetHeight() ), aDA );
aDA.append( " Tf" );
-
+
/* create an empty appearance stream, let the viewer create
the appearance at runtime. This is because AR5 seems to
paint the widget appearance always, and a dynamically created
@@ -5070,10 +5070,10 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
Rectangle aCheckRect, aTextRect;
if( rWidget.ButtonIsLeft )
{
- aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5083,17 +5083,17 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
else
{
- aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5103,10 +5103,10 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left();
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left();
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
setLineColor( Color( COL_BLACK ) );
setFillColor( Color( COL_TRANSPARENT ) );
@@ -5195,10 +5195,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
Rectangle aCheckRect, aTextRect;
if( rWidget.ButtonIsLeft )
{
- aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Left() + nDelta;
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5208,17 +5208,17 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left() + aCheckRect.GetWidth()+5*nDelta;
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
else
{
- aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
- aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
- aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
- aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
+ aCheckRect.Left() = rBox.m_aRect.Right() - nDelta - aFontSize.Height();
+ aCheckRect.Top() = rBox.m_aRect.Top() + (rBox.m_aRect.GetHeight()-aFontSize.Height())/2;
+ aCheckRect.Right() = aCheckRect.Left() + aFontSize.Height();
+ aCheckRect.Bottom() = aCheckRect.Top() + aFontSize.Height();
// #i74206# handle small controls without text area
while( aCheckRect.GetWidth() > rBox.m_aRect.GetWidth() && aCheckRect.GetWidth() > nDelta )
@@ -5228,10 +5228,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
aCheckRect.Bottom() -= nDelta - (nDelta/2);
}
- aTextRect.Left() = rBox.m_aRect.Left();
- aTextRect.Top() = rBox.m_aRect.Top();
- aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
- aTextRect.Bottom() = rBox.m_aRect.Bottom();
+ aTextRect.Left() = rBox.m_aRect.Left();
+ aTextRect.Top() = rBox.m_aRect.Top();
+ aTextRect.Right() = aTextRect.Left() + rBox.m_aRect.GetWidth() - aCheckRect.GetWidth()-6*nDelta;
+ aTextRect.Bottom() = rBox.m_aRect.Bottom();
}
setLineColor( Color( COL_BLACK ) );
setFillColor( Color( COL_TRANSPARENT ) );
@@ -5276,10 +5276,10 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
writeBuffer( aDA.getStr(), aDA.getLength() );
setFillColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ) );
setLineColor( Color( COL_TRANSPARENT ) );
- aCheckRect.Left() += 3*nDelta;
- aCheckRect.Top() += 3*nDelta;
- aCheckRect.Bottom() -= 3*nDelta;
- aCheckRect.Right() -= 3*nDelta;
+ aCheckRect.Left() += 3*nDelta;
+ aCheckRect.Top() += 3*nDelta;
+ aCheckRect.Bottom() -= 3*nDelta;
+ aCheckRect.Right() -= 3*nDelta;
drawEllipse( aCheckRect );
writeBuffer( "\nEMC\n", 5 );
endRedirect();
@@ -6644,7 +6644,7 @@ void PDFWriterImpl::sortWidgets()
namespace vcl {
class PDFStreamIf :
- public cppu::WeakImplHelper1< com::sun::star::io::XOutputStream >
+ public cppu::WeakImplHelper1< com::sun::star::io::XOutputStream >
{
PDFWriterImpl* m_pWriter;
bool m_bWrite;
@@ -6790,10 +6790,10 @@ sal_Int32 PDFWriterImpl::getSystemFont( const Font& i_rFont )
m_aSystemFonts[ pDevFont ] = EmbedFont();
m_aSystemFonts[ pDevFont ].m_nNormalFontID = nFontID;
}
-
+
getReferenceDevice()->Pop();
getReferenceDevice()->ImplNewFont();
-
+
return nFontID;
}
@@ -7524,14 +7524,14 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const String& rText, bool bT
// write eventual emphasis marks
if( m_aCurrentPDFState.m_aFont.GetEmphasisMark() & EMPHASISMARK_STYLE )
{
- PolyPolygon aEmphPoly;
- Rectangle aEmphRect1;
- Rectangle aEmphRect2;
- long nEmphYOff;
- long nEmphWidth;
- long nEmphHeight;
- BOOL bEmphPolyLine;
- FontEmphasisMark nEmphMark;
+ PolyPolygon aEmphPoly;
+ Rectangle aEmphRect1;
+ Rectangle aEmphRect2;
+ long nEmphYOff;
+ long nEmphWidth;
+ long nEmphHeight;
+ BOOL bEmphPolyLine;
+ FontEmphasisMark nEmphMark;
push( PUSH_ALL );
@@ -7720,7 +7720,7 @@ void PDFWriterImpl::drawText( const Rectangle& rRect, const String& rOrigStr, US
Point aPos = rRect.TopLeft();
- long nTextHeight = m_pReferenceDevice->GetTextHeight();
+ long nTextHeight = m_pReferenceDevice->GetTextHeight();
xub_StrLen nMnemonicPos = STRING_NOTFOUND;
String aStr = rOrigStr;
@@ -7930,9 +7930,9 @@ void PDFWriterImpl::drawWaveLine( const Point& rStart, const Point& rStop, sal_I
void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
appendStrokingColor( aColor, aLine );
aLine.append( "\n" );
@@ -8000,10 +8000,10 @@ void PDFWriterImpl::drawWaveTextLine( OStringBuffer& aLine, long nWidth, FontUnd
void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
+ long nLinePos2 = 0;
if ( eTextLine > UNDERLINE_BOLDWAVE )
eTextLine = UNDERLINE_SINGLE;
@@ -8169,10 +8169,10 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon
void PDFWriterImpl::drawStrikeoutLine( OStringBuffer& aLine, long nWidth, FontStrikeout eStrikeout, Color aColor )
{
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- long nLineHeight = 0;
- long nLinePos = 0;
- long nLinePos2 = 0;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ long nLineHeight = 0;
+ long nLinePos = 0;
+ long nLinePos2 = 0;
if ( eStrikeout > STRIKEOUT_X )
eStrikeout = STRIKEOUT_SINGLE;
@@ -8277,13 +8277,13 @@ void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout
updateGraphicsState();
// note: units in pFontEntry are ref device pixel
- ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
- Color aUnderlineColor = m_aCurrentPDFState.m_aTextLineColor;
- Color aOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
- Color aStrikeoutColor = m_aCurrentPDFState.m_aFont.GetColor();
- bool bStrikeoutDone = false;
- bool bUnderlineDone = false;
- bool bOverlineDone = false;
+ ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
+ Color aUnderlineColor = m_aCurrentPDFState.m_aTextLineColor;
+ Color aOverlineColor = m_aCurrentPDFState.m_aOverlineColor;
+ Color aStrikeoutColor = m_aCurrentPDFState.m_aFont.GetColor();
+ bool bStrikeoutDone = false;
+ bool bUnderlineDone = false;
+ bool bOverlineDone = false;
if ( (eStrikeout == STRIKEOUT_SLASH) || (eStrikeout == STRIKEOUT_X) )
{
@@ -8425,12 +8425,12 @@ void PDFWriterImpl::drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nT
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
// FIXME: polygons with beziers may yield incorrect bound rect
- m_aTransparentObjects.back().m_aBoundRect = rPolyPoly.GetBoundRect();
+ m_aTransparentObjects.back().m_aBoundRect = rPolyPoly.GetBoundRect();
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_nObject = createObject();
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
+ m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
m_aTransparentObjects.back().m_pContentStream = new SvMemoryStream( 256, 256 );
// create XObject's content stream
OStringBuffer aContent( 256 );
@@ -8536,8 +8536,8 @@ SvStream* PDFWriterImpl::endRedirect()
SvStream* pStream = NULL;
if( ! m_aOutputStreams.empty() )
{
- pStream = m_aOutputStreams.front().m_pStream;
- m_aMapMode = m_aOutputStreams.front().m_aMapMode;
+ pStream = m_aOutputStreams.front().m_pStream;
+ m_aMapMode = m_aOutputStreams.front().m_aMapMode;
m_aOutputStreams.pop_front();
}
@@ -8567,11 +8567,11 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, sal_uIn
{
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
- m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
+ m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
+ m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_fAlpha = (double)(100-nTransparentPercent) / 100.0;
// get XObject's content stream
m_aTransparentObjects.back().m_pContentStream = static_cast<SvMemoryStream*>(endRedirect());
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
@@ -8604,11 +8604,11 @@ void PDFWriterImpl::endTransparencyGroup( const Rectangle& rBoundingBox, const B
{
// create XObject
m_aTransparentObjects.push_back( TransparencyEmit() );
- m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
+ m_aTransparentObjects.back().m_aBoundRect = rBoundingBox;
// convert rectangle to default user space
m_aPages.back().convertRect( m_aTransparentObjects.back().m_aBoundRect );
- m_aTransparentObjects.back().m_nObject = createObject();
- m_aTransparentObjects.back().m_fAlpha = 0.0;
+ m_aTransparentObjects.back().m_nObject = createObject();
+ m_aTransparentObjects.back().m_fAlpha = 0.0;
// get XObject's content stream
m_aTransparentObjects.back().m_pContentStream = static_cast<SvMemoryStream*>(endRedirect());
m_aTransparentObjects.back().m_nExtGStateObject = createObject();
@@ -9540,9 +9540,9 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
{
CHECK_RETURN( updateObject( rObject.m_nObject ) );
- Bitmap aBitmap;
- Color aTransparentColor( COL_TRANSPARENT );
- bool bWriteMask = false;
+ Bitmap aBitmap;
+ Color aTransparentColor( COL_TRANSPARENT );
+ bool bWriteMask = false;
if( ! bMask )
{
aBitmap = rObject.m_aBitmap.GetBitmap();
@@ -9606,8 +9606,8 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
break;
}
- sal_Int32 nStreamLengthObject = createObject();
- sal_Int32 nMaskObject = 0;
+ sal_Int32 nStreamLengthObject = createObject();
+ sal_Int32 nMaskObject = 0;
#if OSL_DEBUG_LEVEL > 1
{
@@ -9658,7 +9658,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
//check encryption buffer size
if( checkEncryptionBufferSize( pAccess->GetPaletteEntryCount()*3 ) )
{
- int nChar = 0;
+ int nChar = 0;
//fill the encryption buffer
for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
{
@@ -9803,8 +9803,8 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
if( nMaskObject )
{
BitmapEmit aEmit;
- aEmit.m_nObject = nMaskObject;
- aEmit.m_aBitmap = rObject.m_aBitmap;
+ aEmit.m_nObject = nMaskObject;
+ aEmit.m_aBitmap = rObject.m_aBitmap;
return writeBitmapObject( aEmit, true );
}
@@ -9830,12 +9830,12 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
pStream->Seek( STREAM_SEEK_TO_END );
BitmapID aID;
- aID.m_aPixelSize = rSizePixel;
- aID.m_nSize = pStream->Tell();
+ aID.m_aPixelSize = rSizePixel;
+ aID.m_nSize = pStream->Tell();
pStream->Seek( STREAM_SEEK_TO_BEGIN );
- aID.m_nChecksum = rtl_crc32( 0, pStream->GetData(), aID.m_nSize );
+ aID.m_nChecksum = rtl_crc32( 0, pStream->GetData(), aID.m_nSize );
if( ! rMask.IsEmpty() )
- aID.m_nMaskChecksum = rMask.GetChecksum();
+ aID.m_nMaskChecksum = rMask.GetChecksum();
std::list< JPGEmit >::const_iterator it;
for( it = m_aJPGs.begin(); it != m_aJPGs.end() && ! (aID == it->m_aID); ++it )
@@ -9844,12 +9844,12 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.push_front( JPGEmit() );
JPGEmit& rEmit = m_aJPGs.front();
- rEmit.m_nObject = createObject();
- rEmit.m_aID = aID;
- rEmit.m_pStream = pStream;
+ rEmit.m_nObject = createObject();
+ rEmit.m_aID = aID;
+ rEmit.m_pStream = pStream;
rEmit.m_bTrueColor = bIsTrueColor;
if( !! rMask && rMask.GetSizePixel() == rSizePixel )
- rEmit.m_aMask = rMask;
+ rEmit.m_aMask = rMask;
it = m_aJPGs.begin();
}
@@ -9859,7 +9859,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
aLine.append( "q " );
sal_Int32 nCheckWidth = 0;
m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetWidth(), aLine, false, &nCheckWidth );
- aLine.append( " 0 0 " );
+ aLine.append( " 0 0 " );
sal_Int32 nCheckHeight = 0;
m_aPages.back().appendMappedLength( (sal_Int32)rTargetArea.GetHeight(), aLine, true, &nCheckHeight );
aLine.append( ' ' );
@@ -9919,10 +9919,10 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& rBitmap, bool bDrawMask )
{
BitmapID aID;
- aID.m_aPixelSize = rBitmap.GetSizePixel();
- aID.m_nSize = rBitmap.GetBitCount();
- aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum();
- aID.m_nMaskChecksum = 0;
+ aID.m_aPixelSize = rBitmap.GetSizePixel();
+ aID.m_nSize = rBitmap.GetBitCount();
+ aID.m_nChecksum = rBitmap.GetBitmap().GetChecksum();
+ aID.m_nMaskChecksum = 0;
if( rBitmap.IsAlpha() )
aID.m_nMaskChecksum = rBitmap.GetAlpha().GetChecksum();
else
@@ -9940,10 +9940,10 @@ const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx
if( it == m_aBitmaps.end() )
{
m_aBitmaps.push_front( BitmapEmit() );
- m_aBitmaps.front().m_aID = aID;
- m_aBitmaps.front().m_aBitmap = rBitmap;
- m_aBitmaps.front().m_nObject = createObject();
- m_aBitmaps.front().m_bDrawMask = bDrawMask;
+ m_aBitmaps.front().m_aID = aID;
+ m_aBitmaps.front().m_aBitmap = rBitmap;
+ m_aBitmaps.front().m_nObject = createObject();
+ m_aBitmaps.front().m_bDrawMask = bDrawMask;
it = m_aBitmaps.begin();
}
@@ -10018,9 +10018,9 @@ sal_Int32 PDFWriterImpl::createGradient( const Gradient& rGradient, const Size&
if( it == m_aGradients.end() )
{
m_aGradients.push_front( GradientEmit() );
- m_aGradients.front().m_aGradient = rGradient;
- m_aGradients.front().m_nObject = createObject();
- m_aGradients.front().m_aSize = aPtSize;
+ m_aGradients.front().m_aGradient = rGradient;
+ m_aGradients.front().m_nObject = createObject();
+ m_aGradients.front().m_aSize = aPtSize;
it = m_aGradients.begin();
}
@@ -10126,7 +10126,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch
return;
if( rPolyPoly.Count() )
{
- PolyPolygon aPolyPoly( rPolyPoly );
+ PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
push( PUSH_LINECOLOR );
@@ -10140,9 +10140,9 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
{
MARK( "drawWallpaper" );
- bool bDrawColor = false;
- bool bDrawGradient = false;
- bool bDrawBitmap = false;
+ bool bDrawColor = false;
+ bool bDrawGradient = false;
+ bool bDrawBitmap = false;
BitmapEx aBitmap;
Point aBmpPos = rRect.TopLeft();
@@ -10165,7 +10165,7 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
{
if( rWall.GetStyle() != WALLPAPER_TILE )
{
- bDrawBitmap = true;
+ bDrawBitmap = true;
if( rWall.IsGradient() )
bDrawGradient = true;
else
@@ -10230,8 +10230,8 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
aTilingStream.append( " Do\n" );
m_aTilings.push_back( TilingEmit() );
- m_aTilings.back().m_nObject = createObject();
- m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
+ m_aTilings.back().m_nObject = createObject();
+ m_aTilings.back().m_aRectangle = Rectangle( Point( 0, 0 ), aConvertRect.GetSize() );
m_aTilings.back().m_pTilingStream = new SvMemoryStream();
m_aTilings.back().m_pTilingStream->Write( aTilingStream.getStr(), aTilingStream.getLength() );
// phase the tiling so wallpaper begins on upper left
@@ -10259,9 +10259,9 @@ void PDFWriterImpl::drawWallpaper( const Rectangle& rRect, const Wallpaper& rWal
}
else
{
- aBmpPos = aRect.TopLeft();
- aBmpSize = aRect.GetSize();
- bDrawBitmap = true;
+ aBmpPos = aRect.TopLeft();
+ aBmpSize = aRect.GetSize();
+ bDrawBitmap = true;
}
if( aBitmap.IsTransparent() )
@@ -10551,7 +10551,7 @@ void PDFWriterImpl::pop()
OSL_ENSURE( m_aGraphicsStack.size() > 1, "pop without push" );
if( m_aGraphicsStack.size() < 2 )
return;
-
+
GraphicsState aState = m_aGraphicsStack.front();
m_aGraphicsStack.pop_front();
GraphicsState& rOld = m_aGraphicsStack.front();
@@ -10662,9 +10662,9 @@ void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sa
return;
m_aNotes.push_back( PDFNoteEntry() );
- m_aNotes.back().m_nObject = createObject();
- m_aNotes.back().m_aContents = rNote;
- m_aNotes.back().m_aRect = rRect;
+ m_aNotes.back().m_nObject = createObject();
+ m_aNotes.back().m_aContents = rNote;
+ m_aNotes.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aNotes.back().m_aRect );
@@ -10683,9 +10683,9 @@ sal_Int32 PDFWriterImpl::createLink( const Rectangle& rRect, sal_Int32 nPageNr )
sal_Int32 nRet = m_aLinks.size();
m_aLinks.push_back( PDFLink() );
- m_aLinks.back().m_nObject = createObject();
- m_aLinks.back().m_nPage = nPageNr;
- m_aLinks.back().m_aRect = rRect;
+ m_aLinks.back().m_nObject = createObject();
+ m_aLinks.back().m_nPage = nPageNr;
+ m_aLinks.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aLinks.back().m_aRect );
@@ -10730,7 +10730,7 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr,
m_aDests.push_back( PDFDest() );
m_aDests.back().m_nPage = nPageNr;
- m_aDests.back().m_eType = eType;
+ m_aDests.back().m_eType = eType;
m_aDests.back().m_aRect = rRect;
// convert to default user space now, since the mapmode may change
m_aPages[nPageNr].convertRect( m_aDests.back().m_aRect );
@@ -10755,7 +10755,7 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL )
if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() )
return -1;
- m_aLinks[ nLinkId ].m_nDest = -1;
+ m_aLinks[ nLinkId ].m_nDest = -1;
using namespace ::com::sun::star;
@@ -10775,7 +10775,7 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL )
if (m_xTrans.is())
m_xTrans->parseStrict( aURL );
- m_aLinks[ nLinkId ].m_aURL = aURL.Complete;
+ m_aLinks[ nLinkId ].m_aURL = aURL.Complete;
return 0;
}
@@ -10859,42 +10859,42 @@ const sal_Char* PDFWriterImpl::getStructureTag( PDFWriter::StructElement eType )
if( aTagStrings.empty() )
{
aTagStrings[ PDFWriter::NonStructElement] = "NonStruct";
- aTagStrings[ PDFWriter::Document ] = "Document";
- aTagStrings[ PDFWriter::Part ] = "Part";
- aTagStrings[ PDFWriter::Article ] = "Art";
- aTagStrings[ PDFWriter::Section ] = "Sect";
- aTagStrings[ PDFWriter::Division ] = "Div";
- aTagStrings[ PDFWriter::BlockQuote ] = "BlockQuote";
- aTagStrings[ PDFWriter::Caption ] = "Caption";
- aTagStrings[ PDFWriter::TOC ] = "TOC";
- aTagStrings[ PDFWriter::TOCI ] = "TOCI";
- aTagStrings[ PDFWriter::Index ] = "Index";
- aTagStrings[ PDFWriter::Paragraph ] = "P";
- aTagStrings[ PDFWriter::Heading ] = "H";
- aTagStrings[ PDFWriter::H1 ] = "H1";
- aTagStrings[ PDFWriter::H2 ] = "H2";
- aTagStrings[ PDFWriter::H3 ] = "H3";
- aTagStrings[ PDFWriter::H4 ] = "H4";
- aTagStrings[ PDFWriter::H5 ] = "H5";
- aTagStrings[ PDFWriter::H6 ] = "H6";
- aTagStrings[ PDFWriter::List ] = "L";
- aTagStrings[ PDFWriter::ListItem ] = "LI";
- aTagStrings[ PDFWriter::LILabel ] = "Lbl";
- aTagStrings[ PDFWriter::LIBody ] = "LBody";
- aTagStrings[ PDFWriter::Table ] = "Table";
- aTagStrings[ PDFWriter::TableRow ] = "TR";
- aTagStrings[ PDFWriter::TableHeader ] = "TH";
- aTagStrings[ PDFWriter::TableData ] = "TD";
- aTagStrings[ PDFWriter::Span ] = "Span";
- aTagStrings[ PDFWriter::Quote ] = "Quote";
- aTagStrings[ PDFWriter::Note ] = "Note";
- aTagStrings[ PDFWriter::Reference ] = "Reference";
- aTagStrings[ PDFWriter::BibEntry ] = "BibEntry";
- aTagStrings[ PDFWriter::Code ] = "Code";
- aTagStrings[ PDFWriter::Link ] = "Link";
- aTagStrings[ PDFWriter::Figure ] = "Figure";
- aTagStrings[ PDFWriter::Formula ] = "Formula";
- aTagStrings[ PDFWriter::Form ] = "Form";
+ aTagStrings[ PDFWriter::Document ] = "Document";
+ aTagStrings[ PDFWriter::Part ] = "Part";
+ aTagStrings[ PDFWriter::Article ] = "Art";
+ aTagStrings[ PDFWriter::Section ] = "Sect";
+ aTagStrings[ PDFWriter::Division ] = "Div";
+ aTagStrings[ PDFWriter::BlockQuote ] = "BlockQuote";
+ aTagStrings[ PDFWriter::Caption ] = "Caption";
+ aTagStrings[ PDFWriter::TOC ] = "TOC";
+ aTagStrings[ PDFWriter::TOCI ] = "TOCI";
+ aTagStrings[ PDFWriter::Index ] = "Index";
+ aTagStrings[ PDFWriter::Paragraph ] = "P";
+ aTagStrings[ PDFWriter::Heading ] = "H";
+ aTagStrings[ PDFWriter::H1 ] = "H1";
+ aTagStrings[ PDFWriter::H2 ] = "H2";
+ aTagStrings[ PDFWriter::H3 ] = "H3";
+ aTagStrings[ PDFWriter::H4 ] = "H4";
+ aTagStrings[ PDFWriter::H5 ] = "H5";
+ aTagStrings[ PDFWriter::H6 ] = "H6";
+ aTagStrings[ PDFWriter::List ] = "L";
+ aTagStrings[ PDFWriter::ListItem ] = "LI";
+ aTagStrings[ PDFWriter::LILabel ] = "Lbl";
+ aTagStrings[ PDFWriter::LIBody ] = "LBody";
+ aTagStrings[ PDFWriter::Table ] = "Table";
+ aTagStrings[ PDFWriter::TableRow ] = "TR";
+ aTagStrings[ PDFWriter::TableHeader ] = "TH";
+ aTagStrings[ PDFWriter::TableData ] = "TD";
+ aTagStrings[ PDFWriter::Span ] = "Span";
+ aTagStrings[ PDFWriter::Quote ] = "Quote";
+ aTagStrings[ PDFWriter::Note ] = "Note";
+ aTagStrings[ PDFWriter::Reference ] = "Reference";
+ aTagStrings[ PDFWriter::BibEntry ] = "BibEntry";
+ aTagStrings[ PDFWriter::Code ] = "Code";
+ aTagStrings[ PDFWriter::Link ] = "Link";
+ aTagStrings[ PDFWriter::Figure ] = "Figure";
+ aTagStrings[ PDFWriter::Formula ] = "Formula";
+ aTagStrings[ PDFWriter::Form ] = "Form";
}
std::map< PDFWriter::StructElement, const char* >::const_iterator it = aTagStrings.find( eType );
@@ -10904,7 +10904,7 @@ const sal_Char* PDFWriterImpl::getStructureTag( PDFWriter::StructElement eType )
void PDFWriterImpl::beginStructureElementMCSeq()
{
- if( m_bEmitStructure &&
+ if( m_bEmitStructure &&
m_nCurrentStructElement > 0 && // StructTreeRoot
! m_aStructure[ m_nCurrentStructElement ].m_bOpenMCSeq // already opened sequence
)
@@ -11027,10 +11027,10 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
sal_Int32 nNewId = sal_Int32(m_aStructure.size());
m_aStructure.push_back( PDFStructureElement() );
PDFStructureElement& rEle = m_aStructure.back();
- rEle.m_eType = eType;
- rEle.m_nOwnElement = nNewId;
- rEle.m_nParentElement = m_nCurrentStructElement;
- rEle.m_nFirstPageObject = m_aPages[ m_nCurrentPage ].m_nPageObject;
+ rEle.m_eType = eType;
+ rEle.m_nOwnElement = nNewId;
+ rEle.m_nParentElement = m_nCurrentStructElement;
+ rEle.m_nFirstPageObject = m_aPages[ m_nCurrentPage ].m_nPageObject;
m_aStructure[ m_nCurrentStructElement ].m_aChildren.push_back( nNewId );
m_nCurrentStructElement = nNewId;
@@ -11063,7 +11063,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType,
if( m_bEmitStructure ) // don't create nonexistant objects
{
- rEle.m_nObject = createObject();
+ rEle.m_nObject = createObject();
// update parent's kids list
m_aStructure[ rEle.m_nParentElement ].m_aKids.push_back( rEle.m_nObject );
}
@@ -11118,7 +11118,7 @@ void PDFWriterImpl::endStructureElement()
* This function adds an internal structure list container to overcome the 8191 elements array limitation
* in kids element emission.
* Recursive function
- *
+ *
*/
void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
{
@@ -11176,21 +11176,21 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
m_aStructure.push_back( PDFStructureElement() );
PDFStructureElement& rEleNew = m_aStructure.back();
rEleNew.m_aAlias = aAliasName;
- rEleNew.m_eType = PDFWriter::Division; // a new Div type container
- rEleNew.m_nOwnElement = nNewId;
- rEleNew.m_nParentElement = nCurrentStructElement;
+ rEleNew.m_eType = PDFWriter::Division; // a new Div type container
+ rEleNew.m_nOwnElement = nNewId;
+ rEleNew.m_nParentElement = nCurrentStructElement;
//inherit the same page as the first child to be reparented
- rEleNew.m_nFirstPageObject = m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
+ rEleNew.m_nFirstPageObject = m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
rEleNew.m_nObject = createObject();//assign a PDF object number
//add the object to the kid list of the parent
aNewKids.push_back( PDFStructureElementKid( rEleNew.m_nObject ) );
aNewChildren.push_back( nNewId );
-
+
std::list< sal_Int32 >::iterator aChildEndIt( rEle.m_aChildren.begin() );
std::list< PDFStructureElementKid >::iterator aKidEndIt( rEle.m_aKids.begin() );
advance( aChildEndIt, ncMaxPDFArraySize );
advance( aKidEndIt, ncMaxPDFArraySize );
-
+
rEleNew.m_aKids.splice( rEleNew.m_aKids.begin(),
rEle.m_aKids,
rEle.m_aKids.begin(),
@@ -11209,7 +11209,7 @@ void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
//finally add the new kids resulting from the container added
rEle.m_aKids.insert( rEle.m_aKids.begin(), aNewKids.begin(), aNewKids.end() );
rEle.m_aChildren.insert( rEle.m_aChildren.begin(), aNewChildren.begin(), aNewChildren.end() );
- }
+ }
}
}
}
@@ -11264,42 +11264,42 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
switch( eAttr )
{
case PDFWriter::Placement:
- if( eVal == PDFWriter::Block ||
- eVal == PDFWriter::Inline ||
- eVal == PDFWriter::Before ||
- eVal == PDFWriter::Start ||
+ if( eVal == PDFWriter::Block ||
+ eVal == PDFWriter::Inline ||
+ eVal == PDFWriter::Before ||
+ eVal == PDFWriter::Start ||
eVal == PDFWriter::End )
bInsert = true;
break;
case PDFWriter::WritingMode:
- if( eVal == PDFWriter::LrTb ||
- eVal == PDFWriter::RlTb ||
+ if( eVal == PDFWriter::LrTb ||
+ eVal == PDFWriter::RlTb ||
eVal == PDFWriter::TbRl )
{
bInsert = true;
}
break;
case PDFWriter::TextAlign:
- if( eVal == PDFWriter::Start ||
- eVal == PDFWriter::Center ||
- eVal == PDFWriter::End ||
+ if( eVal == PDFWriter::Start ||
+ eVal == PDFWriter::Center ||
+ eVal == PDFWriter::End ||
eVal == PDFWriter::Justify )
{
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11310,11 +11310,11 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
case PDFWriter::Height:
if( eVal == PDFWriter::Auto )
{
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11322,12 +11322,12 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::BlockAlign:
- if( eVal == PDFWriter::Before ||
- eVal == PDFWriter::Middle ||
- eVal == PDFWriter::After ||
+ if( eVal == PDFWriter::Before ||
+ eVal == PDFWriter::Middle ||
+ eVal == PDFWriter::After ||
eVal == PDFWriter::Justify )
{
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11335,11 +11335,11 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::InlineAlign:
- if( eVal == PDFWriter::Start ||
- eVal == PDFWriter::Center ||
+ if( eVal == PDFWriter::Start ||
+ eVal == PDFWriter::Center ||
eVal == PDFWriter::End )
{
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11347,32 +11347,32 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::LineHeight:
- if( eVal == PDFWriter::Normal ||
+ if( eVal == PDFWriter::Normal ||
eVal == PDFWriter::Auto )
{
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11380,34 +11380,34 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::TextDecorationType:
- if( eVal == PDFWriter::NONE ||
- eVal == PDFWriter::Underline ||
- eVal == PDFWriter::Overline ||
+ if( eVal == PDFWriter::NONE ||
+ eVal == PDFWriter::Underline ||
+ eVal == PDFWriter::Overline ||
eVal == PDFWriter::LineThrough )
{
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11415,14 +11415,14 @@ bool PDFWriterImpl::setStructureAttribute( enum PDFWriter::StructAttribute eAttr
}
break;
case PDFWriter::ListNumbering:
- if( eVal == PDFWriter::NONE ||
- eVal == PDFWriter::Disc ||
- eVal == PDFWriter::Circle ||
- eVal == PDFWriter::Square ||
- eVal == PDFWriter::Decimal ||
- eVal == PDFWriter::UpperRoman ||
- eVal == PDFWriter::LowerRoman ||
- eVal == PDFWriter::UpperAlpha ||
+ if( eVal == PDFWriter::NONE ||
+ eVal == PDFWriter::Disc ||
+ eVal == PDFWriter::Circle ||
+ eVal == PDFWriter::Square ||
+ eVal == PDFWriter::Decimal ||
+ eVal == PDFWriter::UpperRoman ||
+ eVal == PDFWriter::LowerRoman ||
+ eVal == PDFWriter::UpperAlpha ||
eVal == PDFWriter::LowerAlpha )
{
if( eType == PDFWriter::List )
@@ -11470,21 +11470,21 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::StartIndent:
case PDFWriter::EndIndent:
// just for BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11492,17 +11492,17 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
break;
case PDFWriter::TextIndent:
// paragraph like BLSE and additional elements
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11510,11 +11510,11 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
break;
case PDFWriter::Width:
case PDFWriter::Height:
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11523,28 +11523,28 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::LineHeight:
case PDFWriter::BaselineShift:
// only for ILSE and BLSE
- if( eType == PDFWriter::Paragraph ||
- eType == PDFWriter::Heading ||
- eType == PDFWriter::H1 ||
- eType == PDFWriter::H2 ||
- eType == PDFWriter::H3 ||
- eType == PDFWriter::H4 ||
- eType == PDFWriter::H5 ||
- eType == PDFWriter::H6 ||
- eType == PDFWriter::List ||
- eType == PDFWriter::ListItem ||
- eType == PDFWriter::LILabel ||
- eType == PDFWriter::LIBody ||
- eType == PDFWriter::Table ||
- eType == PDFWriter::TableRow ||
- eType == PDFWriter::TableHeader ||
- eType == PDFWriter::TableData ||
- eType == PDFWriter::Span ||
- eType == PDFWriter::Quote ||
- eType == PDFWriter::Note ||
- eType == PDFWriter::Reference ||
- eType == PDFWriter::BibEntry ||
- eType == PDFWriter::Code ||
+ if( eType == PDFWriter::Paragraph ||
+ eType == PDFWriter::Heading ||
+ eType == PDFWriter::H1 ||
+ eType == PDFWriter::H2 ||
+ eType == PDFWriter::H3 ||
+ eType == PDFWriter::H4 ||
+ eType == PDFWriter::H5 ||
+ eType == PDFWriter::H6 ||
+ eType == PDFWriter::List ||
+ eType == PDFWriter::ListItem ||
+ eType == PDFWriter::LILabel ||
+ eType == PDFWriter::LIBody ||
+ eType == PDFWriter::Table ||
+ eType == PDFWriter::TableRow ||
+ eType == PDFWriter::TableHeader ||
+ eType == PDFWriter::TableData ||
+ eType == PDFWriter::Span ||
+ eType == PDFWriter::Quote ||
+ eType == PDFWriter::Note ||
+ eType == PDFWriter::Reference ||
+ eType == PDFWriter::BibEntry ||
+ eType == PDFWriter::Code ||
eType == PDFWriter::Link )
{
bInsert = true;
@@ -11553,7 +11553,7 @@ bool PDFWriterImpl::setStructureAttributeNumerical( enum PDFWriter::StructAttrib
case PDFWriter::RowSpan:
case PDFWriter::ColSpan:
// only for table cells
- if( eType == PDFWriter::TableHeader ||
+ if( eType == PDFWriter::TableHeader ||
eType == PDFWriter::TableData )
{
bInsert = true;
@@ -11591,9 +11591,9 @@ void PDFWriterImpl::setStructureBoundingBox( const Rectangle& rRect )
if( m_nCurrentStructElement > 0 && m_bEmitStructure )
{
PDFWriter::StructElement eType = m_aStructure[ m_nCurrentStructElement ].m_eType;
- if( eType == PDFWriter::Figure ||
- eType == PDFWriter::Formula ||
- eType == PDFWriter::Form ||
+ if( eType == PDFWriter::Figure ||
+ eType == PDFWriter::Formula ||
+ eType == PDFWriter::Form ||
eType == PDFWriter::Table )
{
m_aStructure[ m_nCurrentStructElement ].m_aBBox = rRect;
@@ -11638,8 +11638,8 @@ void PDFWriterImpl::setPageTransition( PDFWriter::PageTransition eType, sal_uInt
if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() )
return;
- m_aPages[ nPageNr ].m_eTransition = eType;
- m_aPages[ nPageNr ].m_nTransTime = nMilliSec;
+ m_aPages[ nPageNr ].m_eTransition = eType;
+ m_aPages[ nPageNr ].m_nTransTime = nMilliSec;
}
void PDFWriterImpl::ensureUniqueRadioOnValues()
@@ -11728,9 +11728,9 @@ sal_Int32 PDFWriterImpl::findRadioGroupWidget( const PDFWriter::RadioButtonWidge
// new group, insert the radiobutton
m_aWidgets.push_back( PDFWidget() );
- m_aWidgets.back().m_nObject = createObject();
- m_aWidgets.back().m_nPage = m_nCurrentPage;
- m_aWidgets.back().m_eType = PDFWriter::RadioButton;
+ m_aWidgets.back().m_nObject = createObject();
+ m_aWidgets.back().m_nPage = m_nCurrentPage;
+ m_aWidgets.back().m_eType = PDFWriter::RadioButton;
m_aWidgets.back().m_nRadioGroup = rBtn.RadioGroup;
m_aWidgets.back().m_nFlags |= 0x0000C000; // NoToggleToOff and Radio bits
@@ -11753,10 +11753,10 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
sal_Int32 nNewWidget = m_aWidgets.size();
m_aWidgets.push_back( PDFWidget() );
- m_aWidgets.back().m_nObject = createObject();
- m_aWidgets.back().m_aRect = rControl.Location;
- m_aWidgets.back().m_nPage = nPageNr;
- m_aWidgets.back().m_eType = rControl.getType();
+ m_aWidgets.back().m_nObject = createObject();
+ m_aWidgets.back().m_aRect = rControl.Location;
+ m_aWidgets.back().m_nPage = nPageNr;
+ m_aWidgets.back().m_eType = rControl.getType();
sal_Int32 nRadioGroupWidget = -1;
// for unknown reasons the radio buttons of a radio group must not have a
@@ -11770,10 +11770,10 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
}
// caution: m_aWidgets must not be changed after here or rNewWidget may be invalid
- PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
- rNewWidget.m_aDescription = rControl.Description;
- rNewWidget.m_aText = rControl.Text;
- rNewWidget.m_nTextStyle = rControl.TextStyle &
+ PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
+ rNewWidget.m_aDescription = rControl.Description;
+ rNewWidget.m_aText = rControl.Text;
+ rNewWidget.m_nTextStyle = rControl.TextStyle &
( TEXT_DRAW_LEFT | TEXT_DRAW_CENTER | TEXT_DRAW_RIGHT | TEXT_DRAW_TOP |
TEXT_DRAW_VCENTER | TEXT_DRAW_BOTTOM |
TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
@@ -11810,8 +11810,8 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
* so we need to create a radio button on demand for a new group
* and insert a checkbox for each RadioButtonWidget as its child
*/
- rNewWidget.m_eType = PDFWriter::CheckBox;
- rNewWidget.m_nRadioGroup = rBtn.RadioGroup;
+ rNewWidget.m_eType = PDFWriter::CheckBox;
+ rNewWidget.m_nRadioGroup = rBtn.RadioGroup;
DBG_ASSERT( nRadioGroupWidget >= 0 && nRadioGroupWidget < (sal_Int32)m_aWidgets.size(), "no radio group parent" );
@@ -11824,8 +11824,8 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_aOnValue = rBtn.OnValue;
if( ! rRadioButton.m_aValue.getLength() && rBtn.Selected )
{
- rNewWidget.m_aValue = rNewWidget.m_aOnValue;
- rRadioButton.m_aValue = rNewWidget.m_aOnValue;
+ rNewWidget.m_aValue = rNewWidget.m_aOnValue;
+ rRadioButton.m_aValue = rNewWidget.m_aOnValue;
}
createDefaultRadioButtonAppearance( rNewWidget, rBtn );
@@ -11851,9 +11851,9 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_nTextStyle = TEXT_DRAW_VCENTER;
const PDFWriter::ListBoxWidget& rLstBox = static_cast<const PDFWriter::ListBoxWidget&>(rControl);
- rNewWidget.m_aListEntries = rLstBox.Entries;
+ rNewWidget.m_aListEntries = rLstBox.Entries;
rNewWidget.m_aSelectedEntries = rLstBox.SelectedEntries;
- rNewWidget.m_aValue = rLstBox.Text;
+ rNewWidget.m_aValue = rLstBox.Text;
if( rLstBox.DropDown )
rNewWidget.m_nFlags |= 0x00020000;
if( rLstBox.Sort )
@@ -11869,28 +11869,28 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
rNewWidget.m_nTextStyle = TEXT_DRAW_VCENTER;
const PDFWriter::ComboBoxWidget& rBox = static_cast<const PDFWriter::ComboBoxWidget&>(rControl);
- rNewWidget.m_aValue = rBox.Text;
- rNewWidget.m_aListEntries = rBox.Entries;
+ rNewWidget.m_aValue = rBox.Text;
+ rNewWidget.m_aListEntries = rBox.Entries;
rNewWidget.m_nFlags |= 0x00060000; // combo and edit flag
if( rBox.Sort )
rNewWidget.m_nFlags |= 0x00080000;
PDFWriter::ListBoxWidget aLBox;
- aLBox.Name = rBox.Name;
- aLBox.Description = rBox.Description;
- aLBox.Text = rBox.Text;
- aLBox.TextStyle = rBox.TextStyle;
- aLBox.ReadOnly = rBox.ReadOnly;
- aLBox.Border = rBox.Border;
- aLBox.BorderColor = rBox.BorderColor;
- aLBox.Background = rBox.Background;
- aLBox.BackgroundColor = rBox.BackgroundColor;
- aLBox.TextFont = rBox.TextFont;
- aLBox.TextColor = rBox.TextColor;
- aLBox.DropDown = true;
- aLBox.Sort = rBox.Sort;
- aLBox.MultiSelect = false;
- aLBox.Entries = rBox.Entries;
+ aLBox.Name = rBox.Name;
+ aLBox.Description = rBox.Description;
+ aLBox.Text = rBox.Text;
+ aLBox.TextStyle = rBox.TextStyle;
+ aLBox.ReadOnly = rBox.ReadOnly;
+ aLBox.Border = rBox.Border;
+ aLBox.BorderColor = rBox.BorderColor;
+ aLBox.Background = rBox.Background;
+ aLBox.BackgroundColor = rBox.BackgroundColor;
+ aLBox.TextFont = rBox.TextFont;
+ aLBox.TextColor = rBox.TextColor;
+ aLBox.DropDown = true;
+ aLBox.Sort = rBox.Sort;
+ aLBox.MultiSelect = false;
+ aLBox.Entries = rBox.Entries;
createDefaultListBoxAppearance( rNewWidget, aLBox );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 2eacdc215dd8..33d2e67679a8 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -84,19 +84,19 @@ public:
// definition of structs
struct BuiltinFont
{
- const char * m_pName; // Name
- const char * m_pStyleName; // StyleName
- const char * m_pPSName; // PSName
- int m_nAscent;
- int m_nDescent;
- FontFamily m_eFamily; // Family
- CharSet m_eCharSet; // CharSet
- FontPitch m_ePitch; // Pitch
- FontWidth m_eWidthType; // WidthType
- FontWeight m_eWeight; // Weight
- FontItalic m_eItalic; // Italic
- int m_aWidths[256]; // character metrics
-
+ const char * m_pName; // Name
+ const char * m_pStyleName; // StyleName
+ const char * m_pPSName; // PSName
+ int m_nAscent;
+ int m_nDescent;
+ FontFamily m_eFamily; // Family
+ CharSet m_eCharSet; // CharSet
+ FontPitch m_ePitch; // Pitch
+ FontWidth m_eWidthType; // WidthType
+ FontWeight m_eWeight; // Weight
+ FontItalic m_eItalic; // Italic
+ int m_aWidths[256]; // character metrics
+
rtl::OString getNameObject() const;
};
@@ -110,26 +110,26 @@ public:
ResourceMap m_aExtGStates;
ResourceMap m_aShadings;
ResourceMap m_aPatterns;
-
+
void append( rtl::OStringBuffer&, sal_Int32 nFontDictObject );
};
-
+
struct PDFPage
{
- PDFWriterImpl* m_pWriter;
- sal_Int32 m_nPageWidth; // in inch/72
- sal_Int32 m_nPageHeight; // in inch/72
- PDFWriter::Orientation m_eOrientation;
- sal_Int32 m_nPageObject;
- sal_Int32 m_nPageIndex;
- std::vector<sal_Int32> m_aStreamObjects;
- sal_Int32 m_nStreamLengthObject;
- sal_uInt64 m_nBeginStreamPos;
- std::vector<sal_Int32> m_aAnnotations;
- std::vector<sal_Int32> m_aMCIDParents;
- PDFWriter::PageTransition m_eTransition;
- sal_uInt32 m_nTransTime;
- sal_uInt32 m_nDuration;
+ PDFWriterImpl* m_pWriter;
+ sal_Int32 m_nPageWidth; // in inch/72
+ sal_Int32 m_nPageHeight; // in inch/72
+ PDFWriter::Orientation m_eOrientation;
+ sal_Int32 m_nPageObject;
+ sal_Int32 m_nPageIndex;
+ std::vector<sal_Int32> m_aStreamObjects;
+ sal_Int32 m_nStreamLengthObject;
+ sal_uInt64 m_nBeginStreamPos;
+ std::vector<sal_Int32> m_aAnnotations;
+ std::vector<sal_Int32> m_aMCIDParents;
+ PDFWriter::PageTransition m_eTransition;
+ sal_uInt32 m_nTransTime;
+ sal_uInt32 m_nDuration;
bool m_bHasWidgets;
PDFPage( PDFWriterImpl* pWriter, sal_Int32 nPageWidth, sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation );
@@ -164,7 +164,7 @@ public:
// can be important if the source MapMode is not
// symmetrical) to page length and appends it to the buffer
// if pOutLength is set it will be updated to the emitted length
- // (in PDF map mode, that is 10th of point)
+ // (in PDF map mode, that is 10th of point)
void appendMappedLength( sal_Int32 nLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
// the same for double values
void appendMappedLength( double fLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL, sal_Int32 nPrecision = 5 ) const;
@@ -183,19 +183,19 @@ public:
struct BitmapID
{
- Size m_aPixelSize;
- sal_Int32 m_nSize;
- sal_Int32 m_nChecksum;
- sal_Int32 m_nMaskChecksum;
-
+ Size m_aPixelSize;
+ sal_Int32 m_nSize;
+ sal_Int32 m_nChecksum;
+ sal_Int32 m_nMaskChecksum;
+
BitmapID() : m_nSize( 0 ), m_nChecksum( 0 ), m_nMaskChecksum( 0 ) {}
BitmapID& operator=( const BitmapID& rCopy )
{
- m_aPixelSize = rCopy.m_aPixelSize;
- m_nSize = rCopy.m_nSize;
- m_nChecksum = rCopy.m_nChecksum;
- m_nMaskChecksum = rCopy.m_nMaskChecksum;
+ m_aPixelSize = rCopy.m_aPixelSize;
+ m_nSize = rCopy.m_nSize;
+ m_nChecksum = rCopy.m_nChecksum;
+ m_nMaskChecksum = rCopy.m_nMaskChecksum;
return *this;
}
@@ -210,20 +210,20 @@ public:
struct BitmapEmit
{
- BitmapID m_aID;
- BitmapEx m_aBitmap;
- sal_Int32 m_nObject;
- bool m_bDrawMask;
+ BitmapID m_aID;
+ BitmapEx m_aBitmap;
+ sal_Int32 m_nObject;
+ bool m_bDrawMask;
BitmapEmit() : m_bDrawMask( false ) {}
};
struct JPGEmit
{
- BitmapID m_aID;
- SvMemoryStream* m_pStream;
- Bitmap m_aMask;
- sal_Int32 m_nObject;
+ BitmapID m_aID;
+ SvMemoryStream* m_pStream;
+ Bitmap m_aMask;
+ sal_Int32 m_nObject;
bool m_bTrueColor;
JPGEmit() : m_pStream( NULL ) {}
@@ -232,9 +232,9 @@ public:
struct GradientEmit
{
- Gradient m_aGradient;
- Size m_aSize;
- sal_Int32 m_nObject;
+ Gradient m_aGradient;
+ Size m_aSize;
+ sal_Int32 m_nObject;
};
// for tilings (drawWallpaper, begin/endPattern)
@@ -246,7 +246,7 @@ public:
SvtGraphicFill::Transform m_aTransform;
ResourceDict m_aResources;
SvMemoryStream* m_pTilingStream;
-
+
TilingEmit()
: m_nObject( 0 ),
m_pTilingStream( NULL )
@@ -256,12 +256,12 @@ public:
// for transparency group XObjects
struct TransparencyEmit
{
- sal_Int32 m_nObject;
- sal_Int32 m_nExtGStateObject;
- double m_fAlpha;
- Rectangle m_aBoundRect;
- SvMemoryStream* m_pContentStream;
- SvMemoryStream* m_pSoftMaskStream;
+ sal_Int32 m_nObject;
+ sal_Int32 m_nExtGStateObject;
+ double m_fAlpha;
+ Rectangle m_aBoundRect;
+ SvMemoryStream* m_pContentStream;
+ SvMemoryStream* m_pSoftMaskStream;
TransparencyEmit()
: m_nObject( 0 ),
@@ -281,12 +281,12 @@ public:
class GlyphEmit
{
// performance: actually this should probably a vector;
- sal_Ucs m_aBufferedUnicodes[3];
+ sal_Ucs m_aBufferedUnicodes[3];
sal_Int32 m_nUnicodes;
sal_Int32 m_nMaxUnicodes;
boost::shared_array<sal_Ucs> m_pUnicodes;
sal_uInt8 m_nSubsetGlyphID;
-
+
public:
GlyphEmit() : m_nUnicodes(0), m_nSubsetGlyphID(0)
{
@@ -299,7 +299,7 @@ public:
void setGlyphId( sal_uInt8 i_nId ) { m_nSubsetGlyphID = i_nId; }
sal_uInt8 getGlyphId() const { return m_nSubsetGlyphID; }
-
+
void addCode( sal_Ucs i_cCode )
{
if( m_nUnicodes == m_nMaxUnicodes )
@@ -329,73 +329,73 @@ public:
typedef std::map< sal_GlyphId, GlyphEmit > FontEmitMapping;
struct FontEmit
{
- sal_Int32 m_nFontID;
- FontEmitMapping m_aMapping;
+ sal_Int32 m_nFontID;
+ FontEmitMapping m_aMapping;
FontEmit( sal_Int32 nID ) : m_nFontID( nID ) {}
};
typedef std::list< FontEmit > FontEmitList;
struct Glyph
{
- sal_Int32 m_nFontID;
- sal_uInt8 m_nSubsetGlyphID;
+ sal_Int32 m_nFontID;
+ sal_uInt8 m_nSubsetGlyphID;
};
typedef std::map< sal_GlyphId, Glyph > FontMapping;
struct FontSubset
{
- FontEmitList m_aSubsets;
- FontMapping m_aMapping;
+ FontEmitList m_aSubsets;
+ FontMapping m_aMapping;
};
typedef std::map< const ImplFontData*, FontSubset > FontSubsetData;
struct EmbedCode
{
- sal_Ucs m_aUnicode;
- rtl::OString m_aName;
+ sal_Ucs m_aUnicode;
+ rtl::OString m_aName;
};
struct EmbedEncoding
{
- sal_Int32 m_nFontID;
- std::vector< EmbedCode > m_aEncVector;
- std::map< sal_Ucs, sal_Int8 > m_aCMap;
+ sal_Int32 m_nFontID;
+ std::vector< EmbedCode > m_aEncVector;
+ std::map< sal_Ucs, sal_Int8 > m_aCMap;
};
struct EmbedFont
{
- sal_Int32 m_nNormalFontID;
- std::list< EmbedEncoding > m_aExtendedEncodings;
-
+ sal_Int32 m_nNormalFontID;
+ std::list< EmbedEncoding > m_aExtendedEncodings;
+
EmbedFont() : m_nNormalFontID( 0 ) {}
};
typedef std::map< const ImplFontData*, EmbedFont > FontEmbedData;
struct PDFDest
{
- sal_Int32 m_nPage;
- PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ sal_Int32 m_nPage;
+ PDFWriter::DestAreaType m_eType;
+ Rectangle m_aRect;
};
//--->i56629
struct PDFNamedDest
{
rtl::OUString m_aDestName;
- sal_Int32 m_nPage;
- PDFWriter::DestAreaType m_eType;
- Rectangle m_aRect;
+ sal_Int32 m_nPage;
+ PDFWriter::DestAreaType m_eType;
+ Rectangle m_aRect;
};
//<---
-
+
struct PDFOutlineEntry
{
- sal_Int32 m_nParentID;
- sal_Int32 m_nObject;
- sal_Int32 m_nParentObject;
- sal_Int32 m_nNextObject;
- sal_Int32 m_nPrevObject;
- std::vector< sal_Int32 > m_aChildren;
- rtl::OUString m_aTitle;
- sal_Int32 m_nDestID;
-
- PDFOutlineEntry()
+ sal_Int32 m_nParentID;
+ sal_Int32 m_nObject;
+ sal_Int32 m_nParentObject;
+ sal_Int32 m_nNextObject;
+ sal_Int32 m_nPrevObject;
+ std::vector< sal_Int32 > m_aChildren;
+ rtl::OUString m_aTitle;
+ sal_Int32 m_nDestID;
+
+ PDFOutlineEntry()
: m_nParentID( -1 ),
m_nObject( 0 ),
m_nParentObject( 0 ),
@@ -407,9 +407,9 @@ public:
struct PDFAnnotation
{
- sal_Int32 m_nObject;
- Rectangle m_aRect;
- sal_Int32 m_nPage;
+ sal_Int32 m_nObject;
+ Rectangle m_aRect;
+ sal_Int32 m_nPage;
PDFAnnotation()
: m_nObject( -1 ),
@@ -419,11 +419,11 @@ public:
struct PDFLink : public PDFAnnotation
{
- sal_Int32 m_nDest; // set to -1 for URL, to a dest else
- rtl::OUString m_aURL;
+ sal_Int32 m_nDest; // set to -1 for URL, to a dest else
+ rtl::OUString m_aURL;
sal_Int32 m_nStructParent; // struct parent entry
-
- PDFLink()
+
+ PDFLink()
: m_nDest( -1 ),
m_nStructParent( -1 )
{}
@@ -431,7 +431,7 @@ public:
struct PDFNoteEntry : public PDFAnnotation
{
- PDFNote m_aContents;
+ PDFNote m_aContents;
PDFNoteEntry()
{}
@@ -442,34 +442,34 @@ public:
struct PDFWidget : public PDFAnnotation
{
- PDFWriter::WidgetType m_eType;
- rtl::OString m_aName;
- rtl::OUString m_aDescription;
- rtl::OUString m_aText;
- USHORT m_nTextStyle;
- rtl::OUString m_aValue;
+ PDFWriter::WidgetType m_eType;
+ rtl::OString m_aName;
+ rtl::OUString m_aDescription;
+ rtl::OUString m_aText;
+ USHORT m_nTextStyle;
+ rtl::OUString m_aValue;
rtl::OString m_aDAString;
rtl::OString m_aDRDict;
- rtl::OString m_aMKDict;
- rtl::OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
+ rtl::OString m_aMKDict;
+ rtl::OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
// since the object number is not known at the moment
// of filling m_aMKDict, the string will be encrypted when emitted.
// the /CA string MUST BE the last added to m_aMKDict
// see code for details
- sal_Int32 m_nFlags;
- sal_Int32 m_nParent; // if not 0, parent's object number
- std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
+ sal_Int32 m_nFlags;
+ sal_Int32 m_nParent; // if not 0, parent's object number
+ std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
std::vector<sal_Int32> m_aKidsIndex; // widget children, contains index to m_aWidgets
rtl::OUString m_aOnValue;
sal_Int32 m_nTabOrder; // lowest number gets first in tab order
- sal_Int32 m_nRadioGroup;
- sal_Int32 m_nMaxLen;
+ sal_Int32 m_nRadioGroup;
+ sal_Int32 m_nMaxLen;
bool m_bSubmit;
bool m_bSubmitGet;
sal_Int32 m_nDest;
- std::vector<rtl::OUString> m_aListEntries;
+ std::vector<rtl::OUString> m_aListEntries;
std::vector<sal_Int32> m_aSelectedEntries;
- PDFAppearanceMap m_aAppearances;
+ PDFAppearanceMap m_aAppearances;
PDFWidget()
: m_eType( PDFWriter::PushButton ),
m_nTextStyle( 0 ),
@@ -482,11 +482,11 @@ public:
m_nDest( -1 )
{}
};
-
+
struct PDFStructureAttribute
{
- PDFWriter::StructAttributeValue eValue;
- sal_Int32 nValue;
+ PDFWriter::StructAttributeValue eValue;
+ sal_Int32 nValue;
PDFStructureAttribute()
: eValue( PDFWriter::Invalid ),
@@ -511,26 +511,26 @@ public:
sal_Int32 nObject; // an object number if nMCID is -1,
// else the page object relevant to MCID
sal_Int32 nMCID; // an MCID if >= 0
-
+
PDFStructureElementKid( sal_Int32 nObj ) : nObject( nObj ), nMCID( -1 ) {}
PDFStructureElementKid( sal_Int32 MCID, sal_Int32 nPage ) : nObject( nPage ), nMCID( MCID ) {}
};
-
+
struct PDFStructureElement
{
- sal_Int32 m_nObject;
- PDFWriter::StructElement m_eType;
+ sal_Int32 m_nObject;
+ PDFWriter::StructElement m_eType;
rtl::OString m_aAlias;
- sal_Int32 m_nOwnElement; // index into structure vector
- sal_Int32 m_nParentElement; // index into structure vector
- sal_Int32 m_nFirstPageObject;
- bool m_bOpenMCSeq;
- std::list< sal_Int32 > m_aChildren; // indexes into structure vector
+ sal_Int32 m_nOwnElement; // index into structure vector
+ sal_Int32 m_nParentElement; // index into structure vector
+ sal_Int32 m_nFirstPageObject;
+ bool m_bOpenMCSeq;
+ std::list< sal_Int32 > m_aChildren; // indexes into structure vector
std::list< PDFStructureElementKid > m_aKids;
- PDFStructAttributes m_aAttributes;
- Rectangle m_aBBox;
- rtl::OUString m_aActualText;
- rtl::OUString m_aAltText;
+ PDFStructAttributes m_aAttributes;
+ Rectangle m_aBBox;
+ rtl::OUString m_aActualText;
+ rtl::OUString m_aAltText;
com::sun::star::lang::Locale m_aLocale;
// m_aContents contains the element's marked content sequence
@@ -547,18 +547,18 @@ public:
}
};
-
+
struct PDFAddStream
{
rtl::OUString m_aMimeType;
PDFOutputStream* m_pStream;
sal_Int32 m_nStreamObject;
bool m_bCompress;
-
+
PDFAddStream() : m_pStream( NULL ), m_nStreamObject( 0 ), m_bCompress( true ) {}
};
-
-
+
+
// helper structure for drawLayout and friends
struct PDFGlyph
{
@@ -567,7 +567,7 @@ public:
sal_Int32 m_nGlyphId;
sal_Int32 m_nMappedFontId;
sal_uInt8 m_nMappedGlyphId;
-
+
PDFGlyph( const Point& rPos,
sal_Int32 nNativeWidth,
sal_Int32 nGlyphId,
@@ -582,7 +582,7 @@ public:
static const sal_Char* getStructureTag( PDFWriter::StructElement );
static const sal_Char* getAttributeTag( PDFWriter::StructAttribute eAtr );
static const sal_Char* getAttributeValueTag( PDFWriter::StructAttributeValue eVal );
-
+
// returns true if compression was done
// else false
static bool compressStream( SvMemoryStream* );
@@ -591,99 +591,99 @@ public:
private:
static const BuiltinFont m_aBuiltinFonts[14];
- OutputDevice* m_pReferenceDevice;
+ OutputDevice* m_pReferenceDevice;
- MapMode m_aMapMode; // PDFWriterImpl scaled units
- std::vector< PDFPage > m_aPages;
- PDFDocInfo m_aDocInfo;
+ MapMode m_aMapMode; // PDFWriterImpl scaled units
+ std::vector< PDFPage > m_aPages;
+ PDFDocInfo m_aDocInfo;
/* maps object numbers to file offsets (needed for xref) */
- std::vector< sal_uInt64 > m_aObjects;
+ std::vector< sal_uInt64 > m_aObjects;
/* contains Bitmaps until they are written to the
* file stream as XObjects*/
- std::list< BitmapEmit > m_aBitmaps;
+ std::list< BitmapEmit > m_aBitmaps;
/* contains JPG streams until written to file */
- std::list<JPGEmit> m_aJPGs;
+ std::list<JPGEmit> m_aJPGs;
/*--->i56629 contains all named destinations ever set during the PDF creation,
destination id is always the destination's position in this vector
*/
- std::vector<PDFNamedDest> m_aNamedDests;
+ std::vector<PDFNamedDest> m_aNamedDests;
//<---
/* contains all dests ever set during the PDF creation,
dest id is always the dest's position in this vector
*/
- std::vector<PDFDest> m_aDests;
+ std::vector<PDFDest> m_aDests;
/* contains all links ever set during PDF creation,
link id is always the link's position in this vector
*/
- std::vector<PDFLink> m_aLinks;
+ std::vector<PDFLink> m_aLinks;
/* makes correctly encoded for export to PDF URLS
*/
com::sun::star::uno::Reference< com::sun::star::util::XURLTransformer > m_xTrans;
/* maps arbitrary link ids for structure attributes to real link ids
(for setLinkPropertyId)
*/
- std::map<sal_Int32, sal_Int32> m_aLinkPropertyMap;
+ std::map<sal_Int32, sal_Int32> m_aLinkPropertyMap;
/* contains all outline items,
object 0 is the outline root
*/
- std::vector<PDFOutlineEntry> m_aOutline;
+ std::vector<PDFOutlineEntry> m_aOutline;
/* contains all notes set during PDF creation
*/
- std::vector<PDFNoteEntry> m_aNotes;
+ std::vector<PDFNoteEntry> m_aNotes;
/* the root of the structure tree
*/
- std::vector<PDFStructureElement> m_aStructure;
+ std::vector<PDFStructureElement> m_aStructure;
/* current object in the structure hierarchy
*/
- sal_Int32 m_nCurrentStructElement;
+ sal_Int32 m_nCurrentStructElement;
/* structure parent tree */
std::vector< rtl::OString > m_aStructParentTree;
/* emit strucure marks currently (aka. NonStructElement or not)
*/
- bool m_bEmitStructure;
- bool m_bNewMCID;
+ bool m_bEmitStructure;
+ bool m_bNewMCID;
/* role map of struct tree root */
std::hash_map< rtl::OString, rtl::OString, rtl::OStringHash >
m_aRoleMap;
/* contains all widgets used in the PDF
*/
- std::vector<PDFWidget> m_aWidgets;
+ std::vector<PDFWidget> m_aWidgets;
/* maps radio group id to index of radio group control in m_aWidgets */
- std::map< sal_Int32, sal_Int32 > m_aRadioGroupWidgets;
+ std::map< sal_Int32, sal_Int32 > m_aRadioGroupWidgets;
/* used to store control id during beginControlAppearance/endControlAppearance */
- sal_Int32 m_nCurrentControl;
+ sal_Int32 m_nCurrentControl;
/* hash_map for field names, used to ensure unique field names */
std::hash_map< rtl::OString, sal_Int32, rtl::OStringHash > m_aFieldNameMap;
/* contains Bitmaps for gradient functions until they are written
* to the file stream */
- std::list< GradientEmit > m_aGradients;
+ std::list< GradientEmit > m_aGradients;
/* contains bitmap tiling patterns */
- std::vector< TilingEmit > m_aTilings;
- std::list< TransparencyEmit > m_aTransparentObjects;
+ std::vector< TilingEmit > m_aTilings;
+ std::list< TransparencyEmit > m_aTransparentObjects;
/* contains all font subsets in use */
- FontSubsetData m_aSubsets;
+ FontSubsetData m_aSubsets;
bool m_bEmbedStandardFonts;
- FontEmbedData m_aEmbeddedFonts;
+ FontEmbedData m_aEmbeddedFonts;
FontEmbedData m_aSystemFonts;
- sal_Int32 m_nNextFID;
+ sal_Int32 m_nNextFID;
PDFFontCache m_aFontCache;
- sal_Int32 m_nInheritedPageWidth; // in inch/72
- sal_Int32 m_nInheritedPageHeight; // in inch/72
- PDFWriter::Orientation m_eInheritedOrientation;
- sal_Int32 m_nCurrentPage;
+ sal_Int32 m_nInheritedPageWidth; // in inch/72
+ sal_Int32 m_nInheritedPageHeight; // in inch/72
+ PDFWriter::Orientation m_eInheritedOrientation;
+ sal_Int32 m_nCurrentPage;
- sal_Int32 m_nCatalogObject;
- sal_Int32 m_nResourceDict;
+ sal_Int32 m_nCatalogObject;
+ sal_Int32 m_nResourceDict;
ResourceDict m_aGlobalResourceDict;
sal_Int32 m_nFontDictObject;
std::map< sal_Int32, sal_Int32 > m_aBuiltinFontToObjectMap;
- PDFWriter::PDFWriterContext m_aContext;
- oslFileHandle m_aFile;
- bool m_bOpen;
+ PDFWriter::PDFWriterContext m_aContext;
+ oslFileHandle m_aFile;
+ bool m_bOpen;
/* output redirection; e.g. to accumulate content streams for
@@ -691,31 +691,31 @@ private:
*/
struct StreamRedirect
{
- SvStream* m_pStream;
- MapMode m_aMapMode;
+ SvStream* m_pStream;
+ MapMode m_aMapMode;
Rectangle m_aTargetRect;
ResourceDict m_aResourceDict;
};
- std::list< StreamRedirect > m_aOutputStreams;
+ std::list< StreamRedirect > m_aOutputStreams;
// graphics state
struct GraphicsState
{
- Font m_aFont;
- MapMode m_aMapMode;
- Color m_aLineColor;
- Color m_aFillColor;
- Color m_aTextLineColor;
- Color m_aOverlineColor;
- basegfx::B2DPolyPolygon m_aClipRegion;
+ Font m_aFont;
+ MapMode m_aMapMode;
+ Color m_aLineColor;
+ Color m_aFillColor;
+ Color m_aTextLineColor;
+ Color m_aOverlineColor;
+ basegfx::B2DPolyPolygon m_aClipRegion;
bool m_bClipRegion;
- sal_Int32 m_nAntiAlias;
- sal_Int32 m_nLayoutMode;
+ sal_Int32 m_nAntiAlias;
+ sal_Int32 m_nLayoutMode;
LanguageType m_aDigitLanguage;
- sal_Int32 m_nTransparentPercent;
- sal_uInt16 m_nFlags;
+ sal_Int32 m_nTransparentPercent;
+ sal_uInt16 m_nFlags;
sal_uInt16 m_nUpdateFlags;
-
+
static const sal_uInt16 updateFont = 0x0001;
static const sal_uInt16 updateMapMode = 0x0002;
static const sal_uInt16 updateLineColor = 0x0004;
@@ -761,80 +761,80 @@ private:
GraphicsState& operator=(const GraphicsState& rState )
{
- m_aFont = rState.m_aFont;
- m_aMapMode = rState.m_aMapMode;
- m_aLineColor = rState.m_aLineColor;
- m_aFillColor = rState.m_aFillColor;
- m_aTextLineColor = rState.m_aTextLineColor;
- m_aOverlineColor = rState.m_aOverlineColor;
- m_aClipRegion = rState.m_aClipRegion;
+ m_aFont = rState.m_aFont;
+ m_aMapMode = rState.m_aMapMode;
+ m_aLineColor = rState.m_aLineColor;
+ m_aFillColor = rState.m_aFillColor;
+ m_aTextLineColor = rState.m_aTextLineColor;
+ m_aOverlineColor = rState.m_aOverlineColor;
+ m_aClipRegion = rState.m_aClipRegion;
m_bClipRegion = rState.m_bClipRegion;
- m_nAntiAlias = rState.m_nAntiAlias;
- m_nLayoutMode = rState.m_nLayoutMode;
+ m_nAntiAlias = rState.m_nAntiAlias;
+ m_nLayoutMode = rState.m_nLayoutMode;
m_aDigitLanguage = rState.m_aDigitLanguage;
- m_nTransparentPercent = rState.m_nTransparentPercent;
- m_nFlags = rState.m_nFlags;
+ m_nTransparentPercent = rState.m_nTransparentPercent;
+ m_nFlags = rState.m_nFlags;
m_nUpdateFlags = rState.m_nUpdateFlags;
return *this;
}
};
- std::list< GraphicsState > m_aGraphicsStack;
- GraphicsState m_aCurrentPDFState;
-
- ZCodec* m_pCodec;
- SvMemoryStream* m_pMemStream;
+ std::list< GraphicsState > m_aGraphicsStack;
+ GraphicsState m_aCurrentPDFState;
+ ZCodec* m_pCodec;
+ SvMemoryStream* m_pMemStream;
+
std::vector< PDFAddStream > m_aAdditionalStreams;
std::set< PDFWriter::ErrorCode > m_aErrors;
-
+
rtlDigest m_aDocDigest;
/*
variables for PDF security
-i12626
+i12626
*/
/* used to cipher the stream data and for password management */
- rtlCipher m_aCipher;
- rtlDigest m_aDigest;
+ rtlCipher m_aCipher;
+ rtlDigest m_aDigest;
/* pad string used for password in Standard security handler */
- sal_uInt8 m_nPadString[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPadString[ENCRYPTED_PWD_SIZE];
/* the owner password, in clear text */
- rtl::OUString m_aOwnerPassword;
+ rtl::OUString m_aOwnerPassword;
/* the padded owner password */
- sal_uInt8 m_nPaddedOwnerPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPaddedOwnerPassword[ENCRYPTED_PWD_SIZE];
/* the encryption dictionary owner password, according to algorithm 3.3 */
- sal_uInt8 m_nEncryptedOwnerPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nEncryptedOwnerPassword[ENCRYPTED_PWD_SIZE];
/* the user password, in clear text */
- rtl::OUString m_aUserPassword;
+ rtl::OUString m_aUserPassword;
/* the padded user password */
- sal_uInt8 m_nPaddedUserPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nPaddedUserPassword[ENCRYPTED_PWD_SIZE];
/* the encryption dictionary user password, according to algorithm 3.4 or 3.5 depending on the
security handler revision */
- sal_uInt8 m_nEncryptedUserPassword[ENCRYPTED_PWD_SIZE];
+ sal_uInt8 m_nEncryptedUserPassword[ENCRYPTED_PWD_SIZE];
/* the encryption key, formed with the user password according to algorithm 3.2, maximum length is 16 bytes + 3 + 2
for 128 bit security */
- sal_uInt8 m_nEncryptionKey[MAXIMUM_RC4_KEY_LENGTH];
- sal_Int32 m_nKeyLength; // key length, 16 or 5
- sal_Int32 m_nRC4KeyLength; // key length, 16 or 10, to be input to the algorith 3.1
+ sal_uInt8 m_nEncryptionKey[MAXIMUM_RC4_KEY_LENGTH];
+ sal_Int32 m_nKeyLength; // key length, 16 or 5
+ sal_Int32 m_nRC4KeyLength; // key length, 16 or 10, to be input to the algorith 3.1
/* set to true if the following stream must be encrypted, used inside writeBuffer() */
- sal_Bool m_bEncryptThisStream;
+ sal_Bool m_bEncryptThisStream;
/* the numerical value of the access permissions, according to PDF spec, must be signed */
sal_Int32 m_nAccessPermissions;
/* the document ID, the raw MD5 hash */
- sal_uInt8 m_nDocID[MD5_DIGEST_SIZE];
+ sal_uInt8 m_nDocID[MD5_DIGEST_SIZE];
/* string buffer to hold document ID, this is the output string */
- rtl::OStringBuffer m_aDocID;
+ rtl::OStringBuffer m_aDocID;
/* string to hold the PDF creation date */
- rtl::OStringBuffer m_aCreationDateString;
+ rtl::OStringBuffer m_aCreationDateString;
/* string to hold the PDF creation date, for PDF/A metadata */
- rtl::OStringBuffer m_aCreationMetaDateString;
+ rtl::OStringBuffer m_aCreationMetaDateString;
/* the buffer where the data are encrypted, dynamically allocated */
- sal_uInt8 *m_pEncryptionBuffer;
+ sal_uInt8 *m_pEncryptionBuffer;
/* size of the buffer */
- sal_Int32 m_nEncryptionBufferSize;
+ sal_Int32 m_nEncryptionBufferSize;
/* check and reallocate the buffer for encryption */
sal_Bool checkEncryptionBufferSize( register sal_Int32 newSize )
@@ -881,7 +881,7 @@ i12626
// do the MD5 hash
sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
// the i+2 to take into account the generation number, always zero
- rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
+ rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key legth: see algoritm 3.1, step 4: (N+5) max 16
rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
@@ -901,7 +901,7 @@ i12626
// do the MD5 hash
sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
// the i+2 to take into account the generation number, always zero
- rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
+ rtl_digest_MD5( &m_nEncryptionKey, i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key legth: see algoritm 3.1, step 4: (N+5) max 16
rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
@@ -1033,7 +1033,7 @@ i12626
bool emitAdditionalStreams();
// emits info dict (if applicable)
sal_Int32 emitInfoDict( );
-
+
// acrobat reader 5 and 6 use the order of the annotations
// as their tab order; since PDF1.5 one can make the
// tab order explicit by using the structure tree
@@ -1048,10 +1048,10 @@ i12626
Font replaceFont( const Font& rControlFont, const Font& rAppSetFont );
sal_Int32 getBestBuiltinFont( const Font& rFont );
sal_Int32 getSystemFont( const Font& i_rFont );
-
+
// used for edit and listbox
Font drawFieldBorder( PDFWidget&, const PDFWriter::AnyWidget&, const StyleSettings& );
-
+
void createDefaultPushButtonAppearance( PDFWidget&, const PDFWriter::PushButtonWidget& rWidget );
void createDefaultCheckBoxAppearance( PDFWidget&, const PDFWriter::CheckBoxWidget& rWidget );
void createDefaultRadioButtonAppearance( PDFWidget&, const PDFWriter::RadioButtonWidget& rWidget );
@@ -1067,7 +1067,7 @@ i12626
/* sets the offset of object n to the current position of output file+1
*/
bool updateObject( sal_Int32 n );
-
+
bool writeBuffer( const void* pBuffer, sal_uInt64 nBytes );
void beginCompression();
void endCompression();
@@ -1113,9 +1113,9 @@ public:
PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext );
~PDFWriterImpl();
- /* for OutputDevice so the reference device can have a list
- * that contains only suitable fonts (subsettable or builtin)
- * produces a new font list
+ /* for OutputDevice so the reference device can have a list
+ * that contains only suitable fonts (subsettable or builtin)
+ * produces a new font list
*/
ImplDevFontList* filterDevFontList( ImplDevFontList* pFontList );
/* for OutputDevice: get layout for builtin fonts
@@ -1134,7 +1134,7 @@ public:
bool emit();
std::set< PDFWriter::ErrorCode > getErrors();
void insertError( PDFWriter::ErrorCode eErr ) { m_aErrors.insert( eErr ); }
-
+
Size getCurPageSize() const
{
Size aSize;
@@ -1146,7 +1146,7 @@ public:
PDFWriter::PDFVersion getVersion() const { return m_aContext.Version; }
void setDocInfo( const PDFDocInfo& rInfo );
const PDFDocInfo& getDocInfo() const { return m_aDocInfo; }
-
+
void setDocumentLocale( const com::sun::star::lang::Locale& rLoc )
{ m_aContext.DocumentLocale = rLoc; }
@@ -1172,19 +1172,19 @@ public:
void setFillColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aFillColor = ImplIsColorTransparent(rColor) ? Color( COL_TRANSPARENT ) : rColor;
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFillColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFillColor;
}
void setTextLineColor()
{
m_aGraphicsStack.front().m_aTextLineColor = Color( COL_TRANSPARENT );
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
}
void setTextLineColor( const Color& rColor )
{
m_aGraphicsStack.front().m_aTextLineColor = rColor;
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateTextLineColor;
}
void setOverlineColor()
@@ -1237,7 +1237,7 @@ public:
m_aGraphicsStack.front().m_nLayoutMode = nLayoutMode;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateLayoutMode;
}
-
+
void setDigitLanguage( LanguageType eLang )
{
m_aGraphicsStack.front().m_aDigitLanguage = eLang;
@@ -1349,7 +1349,7 @@ public:
sal_Int32 createControl( const PDFWriter::AnyWidget& rControl, sal_Int32 nPageNr = -1 );
void beginControlAppearance( sal_Int32 nControl );
bool endControlAppearance( PDFWriter::WidgetState eState );
-
+
// additional streams
void addStream( const String& rMimeType, PDFOutputStream* pStream, bool bCompress );
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 11971db34378..c7c50acabc29 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,24 +45,24 @@
// - Defines -
// -----------
-#define PNGCHUNK_IHDR 0x49484452
-#define PNGCHUNK_PLTE 0x504c5445
-#define PNGCHUNK_IDAT 0x49444154
-#define PNGCHUNK_IEND 0x49454e44
-#define PNGCHUNK_bKGD 0x624b4744
-#define PNGCHUNK_cHRM 0x6348524d
-#define PNGCHUNK_gAMA 0x67414d41
-#define PNGCHUNK_hIST 0x68495354
-#define PNGCHUNK_pHYs 0x70485973
-#define PNGCHUNK_sBIT 0x73425420
-#define PNGCHUNK_tIME 0x74494d45
-#define PNGCHUNK_tEXt 0x74455874
-#define PNGCHUNK_tRNS 0x74524e53
-#define PNGCHUNK_zTXt 0x7a545874
-#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
-
-#define VIEWING_GAMMA 2.35
-#define DISPLAY_GAMMA 1.0
+#define PNGCHUNK_IHDR 0x49484452
+#define PNGCHUNK_PLTE 0x504c5445
+#define PNGCHUNK_IDAT 0x49444154
+#define PNGCHUNK_IEND 0x49454e44
+#define PNGCHUNK_bKGD 0x624b4744
+#define PNGCHUNK_cHRM 0x6348524d
+#define PNGCHUNK_gAMA 0x67414d41
+#define PNGCHUNK_hIST 0x68495354
+#define PNGCHUNK_pHYs 0x70485973
+#define PNGCHUNK_sBIT 0x73425420
+#define PNGCHUNK_tIME 0x74494d45
+#define PNGCHUNK_tEXt 0x74455874
+#define PNGCHUNK_tRNS 0x74524e53
+#define PNGCHUNK_zTXt 0x7a545874
+#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF
+
+#define VIEWING_GAMMA 2.35
+#define DISPLAY_GAMMA 1.0
namespace vcl
{
@@ -73,7 +73,7 @@ namespace vcl
// ------------------------------------------------------------------------------
static const BYTE mpDefaultColorTable[ 256 ] =
-{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
@@ -105,17 +105,17 @@ private:
std::vector< vcl::PNGReader::ChunkData >::iterator maChunkIter;
std::vector< sal_uInt8 >::iterator maDataIter;
- Bitmap* mpBmp;
- BitmapWriteAccess* mpAcc;
- Bitmap* mpMaskBmp;
- AlphaMask* mpAlphaMask;
- BitmapWriteAccess* mpMaskAcc;
- ZCodec* mpZCodec;
- BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpScanPrior; // pointer to the latest scanline
- BYTE* mpTransTab; // for transparency in images with palette colortype
- BYTE* mpScanCurrent; // pointer into the current scanline
- BYTE* mpColorTable; //
+ Bitmap* mpBmp;
+ BitmapWriteAccess* mpAcc;
+ Bitmap* mpMaskBmp;
+ AlphaMask* mpAlphaMask;
+ BitmapWriteAccess* mpMaskAcc;
+ ZCodec* mpZCodec;
+ BYTE* mpInflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ BYTE* mpScanPrior; // pointer to the latest scanline
+ BYTE* mpTransTab; // for transparency in images with palette colortype
+ BYTE* mpScanCurrent; // pointer into the current scanline
+ BYTE* mpColorTable; //
sal_Size mnStreamSize; // estimate of PNG file size
sal_uInt32 mnChunkType; // Type of current PNG chunk
sal_Int32 mnChunkLen; // Length of current PNG chunk
@@ -131,29 +131,29 @@ private:
sal_uInt32 mnYAdd; // the increment for input images Y coords for the current pass
int mnPreviewShift; // shift to convert orig image coords into preview image coords
int mnPreviewMask; // == ((1 << mnPreviewShift) - 1)
- USHORT mnIStmOldMode;
- USHORT mnTargetDepth; // pixel depth of target bitmap
- BYTE mnTransRed;
- BYTE mnTransGreen;
- BYTE mnTransBlue;
- BYTE mnPngDepth; // pixel depth of PNG data
- BYTE mnColorType;
- BYTE mnCompressionType;
- BYTE mnFilterType;
- BYTE mnInterlaceType;
- BitmapColor mcTranspColor; // transparency mask's transparency "color"
- BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
- BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
- BOOL mbAlphaChannel; // is true for ColorType 4 and 6
- BOOL mbRGBTriple;
- BOOL mbPalette; // FALSE if we need a Palette
- BOOL mbGrayScale;
- BOOL mbzCodecInUse;
- BOOL mbStatus;
- BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
- BOOL mbGamma; // TRUE if Gamma Correction available
- BOOL mbpHYs; // TRUE if pysical size of pixel available
- sal_Bool mbIgnoreGammaChunk;
+ USHORT mnIStmOldMode;
+ USHORT mnTargetDepth; // pixel depth of target bitmap
+ BYTE mnTransRed;
+ BYTE mnTransGreen;
+ BYTE mnTransBlue;
+ BYTE mnPngDepth; // pixel depth of PNG data
+ BYTE mnColorType;
+ BYTE mnCompressionType;
+ BYTE mnFilterType;
+ BYTE mnInterlaceType;
+ BitmapColor mcTranspColor; // transparency mask's transparency "color"
+ BitmapColor mcOpaqueColor; // transparency mask's opaque "color"
+ BOOL mbTransparent; // graphic includes an tRNS Chunk or an alpha Channel
+ BOOL mbAlphaChannel; // is true for ColorType 4 and 6
+ BOOL mbRGBTriple;
+ BOOL mbPalette; // FALSE if we need a Palette
+ BOOL mbGrayScale;
+ BOOL mbzCodecInUse;
+ BOOL mbStatus;
+ BOOL mbIDAT; // TRUE if finished with enough IDAT chunks
+ BOOL mbGamma; // TRUE if Gamma Correction available
+ BOOL mbpHYs; // TRUE if pysical size of pixel available
+ sal_Bool mbIgnoreGammaChunk;
bool ReadNextChunk();
void ReadRemainingChunks();
@@ -163,19 +163,19 @@ private:
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex );
void ImplSetTranspPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor &, BOOL bTrans );
void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, BYTE nPalIndex, BYTE nAlpha );
- void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
- void ImplReadIDAT();
+ void ImplSetAlphaPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor&, BYTE nAlpha );
+ void ImplReadIDAT();
bool ImplPreparePass();
void ImplApplyFilter();
void ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd );
- BOOL ImplReadTransparent();
- void ImplGetGamma();
- void ImplGetBackground();
- BYTE ImplScaleColor();
- BOOL ImplReadHeader( const Size& rPreviewSizeHint );
- BOOL ImplReadPalette();
- void ImplGetGrayPalette( sal_uInt16 );
- sal_uInt32 ImplReadsal_uInt32();
+ BOOL ImplReadTransparent();
+ void ImplGetGamma();
+ void ImplGetBackground();
+ BYTE ImplScaleColor();
+ BOOL ImplReadHeader( const Size& rPreviewSizeHint );
+ BOOL ImplReadPalette();
+ void ImplGetGrayPalette( sal_uInt16 );
+ sal_uInt32 ImplReadsal_uInt32();
public:
@@ -184,29 +184,29 @@ public:
BitmapEx GetBitmapEx( const Size& rPreviewSizeHint );
const std::vector< PNGReader::ChunkData >& GetAllChunks();
- void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; };
+ void SetIgnoreGammaChunk( sal_Bool bIgnore ){ mbIgnoreGammaChunk = bIgnore; };
};
// ------------------------------------------------------------------------------
PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
: mrPNGStream( rPNGStream ),
- mpBmp ( NULL ),
- mpAcc ( NULL ),
- mpMaskBmp ( NULL ),
- mpAlphaMask ( NULL ),
- mpMaskAcc ( NULL ),
- mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
- mpInflateInBuf ( NULL ),
- mpScanPrior ( NULL ),
- mpTransTab ( NULL ),
- mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
- mbzCodecInUse ( sal_False ),
+ mpBmp ( NULL ),
+ mpAcc ( NULL ),
+ mpMaskBmp ( NULL ),
+ mpAlphaMask ( NULL ),
+ mpMaskAcc ( NULL ),
+ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
+ mpInflateInBuf ( NULL ),
+ mpScanPrior ( NULL ),
+ mpTransTab ( NULL ),
+ mpColorTable ( (sal_uInt8*) mpDefaultColorTable ),
+ mbzCodecInUse ( sal_False ),
mbStatus( TRUE),
mbIDAT( FALSE ),
- mbGamma ( sal_False ),
- mbpHYs ( sal_False ),
- mbIgnoreGammaChunk ( sal_False )
+ mbGamma ( sal_False ),
+ mbpHYs ( sal_False ),
+ mbIgnoreGammaChunk ( sal_False )
{
// prepare the PNG data stream
mnOrigStreamMode = mrPNGStream.GetNumberFormatInt();
@@ -216,7 +216,7 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
maChunkSeq.reserve( 16 );
maChunkIter = maChunkSeq.begin();
- // estimate PNG file size (to allow sanity checks)
+ // estimate PNG file size (to allow sanity checks)
const sal_Size nStreamPos = mrPNGStream.Tell();
mrPNGStream.Seek( STREAM_SEEK_TO_END );
mnStreamSize = mrPNGStream.Tell();
@@ -381,8 +381,8 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
}
break;
- case PNGCHUNK_gAMA : // the gamma chunk must precede
- { // the 'IDAT' and also the 'PLTE'(if available )
+ case PNGCHUNK_gAMA : // the gamma chunk must precede
+ { // the 'IDAT' and also the 'PLTE'(if available )
if ( !mbIgnoreGammaChunk && ( mbIDAT == FALSE ) )
ImplGetGamma();
}
@@ -397,21 +397,21 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
case PNGCHUNK_tRNS :
{
- if ( !mbIDAT ) // the tRNS chunk must precede the IDAT
+ if ( !mbIDAT ) // the tRNS chunk must precede the IDAT
mbStatus = ImplReadTransparent();
}
break;
- case PNGCHUNK_bKGD : // the background chunk must appear
+ case PNGCHUNK_bKGD : // the background chunk must appear
{
- if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
- ImplGetBackground(); // PLTE(if available ) chunk.
+ if ( ( mbIDAT == FALSE ) && mbPalette ) // before the 'IDAT' and after the
+ ImplGetBackground(); // PLTE(if available ) chunk.
}
break;
case PNGCHUNK_IDAT :
{
- if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
+ if ( !mbIDAT ) // the gfx is finished, but there may be left a zlibCRC of about 4Bytes
ImplReadIDAT();
}
break;
@@ -532,16 +532,16 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
// valid color types are 0,2,3,4 & 6
switch ( mnColorType )
{
- case 0 : // each pixel is a grayscale
+ case 0 : // each pixel is a grayscale
{
switch ( mnPngDepth )
{
case 2 : // 2bit target not available -> use four bits
- mnTargetDepth = 4; // we have to expand the bitmap
+ mnTargetDepth = 4; // we have to expand the bitmap
mbGrayScale = TRUE;
break;
case 16 :
- mnTargetDepth = 8; // we have to reduce the bitmap
+ mnTargetDepth = 8; // we have to reduce the bitmap
// fall through
case 1 :
case 4 :
@@ -554,13 +554,13 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 2 : // each pixel is an RGB triple
+ case 2 : // each pixel is an RGB triple
{
mbRGBTriple = TRUE;
mnScansize *= 3;
switch ( mnPngDepth )
{
- case 16 : // we have to reduce the bitmap
+ case 16 : // we have to reduce the bitmap
case 8 :
mnTargetDepth = 24;
break;
@@ -570,12 +570,12 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 3 : // each pixel is a palette index
+ case 3 : // each pixel is a palette index
{
switch ( mnPngDepth )
{
case 2 :
- mnTargetDepth = 4; // we have to expand the bitmap
+ mnTargetDepth = 4; // we have to expand the bitmap
// fall through
case 1 :
case 4 :
@@ -588,14 +588,14 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 4 : // each pixel is a grayscale sample followed by an alpha sample
+ case 4 : // each pixel is a grayscale sample followed by an alpha sample
{
mnScansize *= 2;
mbAlphaChannel = TRUE;
switch ( mnPngDepth )
{
case 16 :
- mnTargetDepth = 8; // we have to reduce the bitmap
+ mnTargetDepth = 8; // we have to reduce the bitmap
case 8 :
mbGrayScale = TRUE;
break;
@@ -605,14 +605,14 @@ BOOL PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
}
break;
- case 6 : // each pixel is an RGB triple followed by an alpha sample
+ case 6 : // each pixel is an RGB triple followed by an alpha sample
{
mbRGBTriple = TRUE;
mnScansize *= 4;
mbAlphaChannel = TRUE;
switch (mnPngDepth )
{
- case 16 : // we have to reduce the bitmap
+ case 16 : // we have to reduce the bitmap
case 8 :
mnTargetDepth = 24;
break;
@@ -826,17 +826,17 @@ void PNGReaderImpl::ImplGetGamma()
if( mnChunkLen < 4 )
return;
- sal_uInt32 nGammaValue = ImplReadsal_uInt32();
- double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( (double)nGammaValue / 100000 ) );
- double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
+ sal_uInt32 nGammaValue = ImplReadsal_uInt32();
+ double fGamma = ( ( VIEWING_GAMMA / DISPLAY_GAMMA ) * ( (double)nGammaValue / 100000 ) );
+ double fInvGamma = ( fGamma <= 0.0 || fGamma > 10.0 ) ? 1.0 : ( 1.0 / fGamma );
if ( fInvGamma != 1.0 )
{
mbGamma = TRUE;
-
+
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
-
+
for ( sal_Int32 i = 0; i < 256; i++ )
mpColorTable[ i ] = (sal_uInt8)(pow((double)i/255.0, fInvGamma) * 255.0 + 0.5);
@@ -877,7 +877,7 @@ void PNGReaderImpl::ImplGetBackground()
}
}
break;
-
+
case 2 :
case 6 :
{
@@ -901,12 +901,12 @@ sal_uInt8 PNGReaderImpl::ImplScaleColor()
{
sal_uInt32 nMask = ( ( 1 << mnPngDepth ) - 1 );
sal_uInt16 nCol = ( *maDataIter++ << 8 );
-
+
nCol += *maDataIter++ & (sal_uInt16)nMask;
-
- if ( mnPngDepth > 8 ) // convert 16bit graphics to 8
+
+ if ( mnPngDepth > 8 ) // convert 16bit graphics to 8
nCol >>= 8;
-
+
return (sal_uInt8) nCol;
}
@@ -1199,7 +1199,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mbTransparent )
{
- if ( mnPngDepth == 4 ) // check if source has a two bit pixel format
+ if ( mnPngDepth == 4 ) // check if source has a two bit pixel format
{
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, ++nXIndex )
{
@@ -1248,7 +1248,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else
{
- if ( mnPngDepth == 4 ) // maybe the source is a two bitmap graphic
+ if ( mnPngDepth == 4 ) // maybe the source is a two bitmap graphic
{ // BMP_FORMAT_4BIT_LSN_PAL
for ( sal_Int32 nX = nXStart, nXIndex = 0; nX < maOrigSize.Width(); nX += nXAdd, nXIndex++ )
{
@@ -1290,7 +1290,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
{
if ( mbAlphaChannel )
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
for ( sal_Int32 nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp += 2 )
ImplSetAlphaPixel( nY, nX, pTmp[ 0 ], pTmp[ 1 ] );
@@ -1303,7 +1303,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else if ( mbTransparent )
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
for ( sal_Int32 nX = nXStart; nX < maOrigSize.Width(); nX += nXAdd, pTmp++ )
ImplSetAlphaPixel( nY, nX, *pTmp, mpTransTab[ *pTmp ] );
@@ -1316,7 +1316,7 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, sal_uInt32 nXAdd )
}
else // neither alpha nor transparency
{
- if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
+ if ( mnPngDepth == 8 ) // maybe the source is a 16 bit grayscale
{
if( nXAdd == 1 && mnPreviewShift == 0 ) // copy raw line data if possible
{
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 47152ea6ac11..8023e6423c87 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,68 +77,68 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL );
~PNGWriterImpl();
- sal_Bool Write( SvStream& rOStm );
+ sal_Bool Write( SvStream& rOStm );
- std::vector< vcl::PNGWriter::ChunkData >& GetChunks();
+ std::vector< vcl::PNGWriter::ChunkData >& GetChunks();
private:
- std::vector< vcl::PNGWriter::ChunkData > maChunkSeq;
-
- sal_Int32 mnCompLevel;
- sal_Int32 mnInterlaced;
- sal_uInt32 mnMaxChunkSize;
- BOOL mbStatus;
-
- BitmapReadAccess* mpAccess;
- BitmapReadAccess* mpMaskAccess;
- ZCodec* mpZCodec;
-
- BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
- BYTE* mpPreviousScan; // as big as mpDeflateInBuf
- BYTE* mpCurrentScan;
- ULONG mnDeflateInSize;
-
- ULONG mnWidth, mnHeight;
- BYTE mnBitsPerPixel;
- BYTE mnFilterType; // 0 oder 4;
- ULONG mnBBP; // bytes per pixel ( needed for filtering )
- BOOL mbTrueAlpha;
- ULONG mnCRC;
- long mnChunkDatSize;
- ULONG mnLastPercent;
-
- void ImplWritepHYs( const BitmapEx& rBitmapEx );
- void ImplWriteIDAT();
- ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
- void ImplClearFirstScanline();
- void ImplWriteTransparent();
- BOOL ImplWriteHeader();
- void ImplWritePalette();
- void ImplOpenChunk( ULONG nChunkType );
- void ImplWriteChunk( BYTE nNumb );
- void ImplWriteChunk( sal_uInt32 nNumb );
- void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
- void ImplCloseChunk( void );
+ std::vector< vcl::PNGWriter::ChunkData > maChunkSeq;
+
+ sal_Int32 mnCompLevel;
+ sal_Int32 mnInterlaced;
+ sal_uInt32 mnMaxChunkSize;
+ BOOL mbStatus;
+
+ BitmapReadAccess* mpAccess;
+ BitmapReadAccess* mpMaskAccess;
+ ZCodec* mpZCodec;
+
+ BYTE* mpDeflateInBuf; // as big as the size of a scanline + alphachannel + 1
+ BYTE* mpPreviousScan; // as big as mpDeflateInBuf
+ BYTE* mpCurrentScan;
+ ULONG mnDeflateInSize;
+
+ ULONG mnWidth, mnHeight;
+ BYTE mnBitsPerPixel;
+ BYTE mnFilterType; // 0 oder 4;
+ ULONG mnBBP; // bytes per pixel ( needed for filtering )
+ BOOL mbTrueAlpha;
+ ULONG mnCRC;
+ long mnChunkDatSize;
+ ULONG mnLastPercent;
+
+ void ImplWritepHYs( const BitmapEx& rBitmapEx );
+ void ImplWriteIDAT();
+ ULONG ImplGetFilter( ULONG nY, ULONG nXStart=0, ULONG nXAdd=1 );
+ void ImplClearFirstScanline();
+ void ImplWriteTransparent();
+ BOOL ImplWriteHeader();
+ void ImplWritePalette();
+ void ImplOpenChunk( ULONG nChunkType );
+ void ImplWriteChunk( BYTE nNumb );
+ void ImplWriteChunk( sal_uInt32 nNumb );
+ void ImplWriteChunk( unsigned char* pSource, sal_uInt32 nDatSize );
+ void ImplCloseChunk( void );
};
// ------------------------------------------------------------------------
PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) :
- mnCompLevel ( PNG_DEF_COMPRESSION ),
- mbStatus ( TRUE ),
- mpAccess ( NULL ),
- mpMaskAccess ( NULL ),
- mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
+ mnCompLevel ( PNG_DEF_COMPRESSION ),
+ mbStatus ( TRUE ),
+ mpAccess ( NULL ),
+ mpMaskAccess ( NULL ),
+ mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
mnCRC(0UL),
- mnLastPercent ( 0UL )
+ mnLastPercent ( 0UL )
{
if ( !rBmpEx.IsEmpty() )
{
Bitmap aBmp( rBmpEx.GetBitmap() );
-
- mnInterlaced = 0; // ( aBmp.GetSizePixel().Width() > 128 ) || ( aBmp.GetSizePixel().Height() > 128 ) ? 1 : 0; #i67236#
+
+ mnInterlaced = 0; // ( aBmp.GetSizePixel().Width() > 128 ) || ( aBmp.GetSizePixel().Height() > 128 ) ? 1 : 0; #i67236#
// #i67234# defaulting max chunk size to 256kb when using interlace mode
mnMaxChunkSize = mnInterlaced == 0 ? std::numeric_limits< sal_uInt32 >::max() : 0x40000;
@@ -161,7 +161,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
mnBitsPerPixel = (BYTE)aBmp.GetBitCount();
-
+
if( rBmpEx.IsTransparent() )
{
if ( mnBitsPerPixel <= 8 && rBmpEx.IsAlpha() )
@@ -169,8 +169,8 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
aBmp.Convert( BMP_CONVERSION_24BIT );
mnBitsPerPixel = 24;
}
-
- if ( mnBitsPerPixel <= 8 ) // transparent palette
+
+ if ( mnBitsPerPixel <= 8 ) // transparent palette
{
aBmp.Convert( BMP_CONVERSION_8BIT_TRANS );
aBmp.Replace( rBmpEx.GetMask(), BMP_COL_TRANS );
@@ -192,7 +192,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // TRUE RGB with alphachannel
if( mpAccess )
{
if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != FALSE )
@@ -235,7 +235,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
else
{
- mpAccess = aBmp.AcquireReadAccess(); // palette + RGB without alphachannel
+ mpAccess = aBmp.AcquireReadAccess(); // palette + RGB without alphachannel
if( mpAccess )
{
if ( ImplWriteHeader() )
@@ -253,7 +253,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
if ( mbStatus )
{
- ImplOpenChunk( PNGCHUNK_IEND ); // create an IEND chunk
+ ImplOpenChunk( PNGCHUNK_IEND ); // create an IEND chunk
ImplCloseChunk();
}
}
@@ -322,10 +322,10 @@ BOOL PNGWriterImpl::ImplWriteHeader()
else
mnFilterType = 4;
- BYTE nColorType = 2; // colortype:
+ BYTE nColorType = 2; // colortype:
// bit 0 -> palette is used
- if ( mpAccess->HasPalette() ) // bit 1 -> color is used
- nColorType |= 1; // bit 2 -> alpha channel is used
+ if ( mpAccess->HasPalette() ) // bit 1 -> color is used
+ nColorType |= 1; // bit 2 -> alpha channel is used
else
nBitDepth /= 3;
@@ -333,10 +333,10 @@ BOOL PNGWriterImpl::ImplWriteHeader()
nColorType |= 4;
ImplWriteChunk( nBitDepth );
- ImplWriteChunk( nColorType ); // colortype
- ImplWriteChunk((BYTE) 0 ); // compression type
- ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
- ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
+ ImplWriteChunk( nColorType ); // colortype
+ ImplWriteChunk((BYTE) 0 ); // compression type
+ ImplWriteChunk((BYTE) 0 ); // filter type - is not supported in this version
+ ImplWriteChunk((BYTE) mnInterlaced ); // interlace type
ImplCloseChunk();
}
else
@@ -348,9 +348,9 @@ BOOL PNGWriterImpl::ImplWriteHeader()
void PNGWriterImpl::ImplWritePalette()
{
- const ULONG nCount = mpAccess->GetPaletteEntryCount();
- BYTE* pTempBuf = new BYTE[ nCount*3 ];
- BYTE* pTmp = pTempBuf;
+ const ULONG nCount = mpAccess->GetPaletteEntryCount();
+ BYTE* pTempBuf = new BYTE[ nCount*3 ];
+ BYTE* pTmp = pTempBuf;
ImplOpenChunk( PNGCHUNK_PLTE );
@@ -416,7 +416,7 @@ void PNGWriterImpl::ImplWriteIDAT ()
mpDeflateInBuf = new BYTE[ mnDeflateInSize ];
- if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
+ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
mpPreviousScan = new BYTE[ mnDeflateInSize ];
mpCurrentScan = new BYTE[ mnDeflateInSize ];
@@ -434,37 +434,37 @@ void PNGWriterImpl::ImplWriteIDAT ()
{
// interlace mode
ULONG nY;
- for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
+ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 1
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 8 ) );
ImplClearFirstScanline();
- for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 2
+ for ( nY = 0; nY < mnHeight; nY+=8 ) // pass 2
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 4, 8 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 5 ) // pass 3
+ if ( mnHeight >= 5 ) // pass 3
{
for ( nY = 4; nY < mnHeight; nY+=8 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 4 ) );
ImplClearFirstScanline();
}
- for ( nY = 0; nY < mnHeight; nY+=4 ) // pass 4
+ for ( nY = 0; nY < mnHeight; nY+=4 ) // pass 4
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 2, 4 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 3 ) // pass 5
+ if ( mnHeight >= 3 ) // pass 5
{
for ( nY = 2; nY < mnHeight; nY+=4 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 2 ) );
ImplClearFirstScanline();
}
- for ( nY = 0; nY < mnHeight; nY+=2 ) // pass 6
+ for ( nY = 0; nY < mnHeight; nY+=2 ) // pass 6
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 1, 2 ) );
ImplClearFirstScanline();
- if ( mnHeight >= 2 ) // pass 7
+ if ( mnHeight >= 2 ) // pass 7
{
for ( nY = 1; nY < mnHeight; nY+=2 )
mpZCodec->Write( aOStm, mpDeflateInBuf, ImplGetFilter ( nY, 0, 1 ) );
@@ -473,7 +473,7 @@ void PNGWriterImpl::ImplWriteIDAT ()
mpZCodec->EndCompression();
mnCRC = mpZCodec->GetCRC();
- if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
+ if ( mnFilterType ) // using filter type 4 we need memory for the scanline 3 times
{
delete[] mpCurrentScan;
delete[] mpPreviousScan;
@@ -508,9 +508,9 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
if ( nXStart < mnWidth )
{
- *pDest++ = mnFilterType; // in this version the filter type is either 0 or 4
+ *pDest++ = mnFilterType; // in this version the filter type is either 0 or 4
- if ( mpAccess->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
+ if ( mpAccess->HasPalette() ) // alphachannel is not allowed by pictures including palette entries
{
switch ( mnBitsPerPixel )
{
@@ -527,8 +527,8 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
else
*pDest |= (BYTE) mpAccess->GetPixel( nY, nX ) << nShift;
}
- if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
- } // bufferpointer is to correct
+ if ( ( nXIndex & 7 ) != 0 ) pDest++; // byte is not completely used, so the
+ } // bufferpointer is to correct
break;
case( 4 ):
@@ -559,7 +559,7 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
}
else
{
- if ( mpMaskAccess ) // mpMaskAccess != NULL -> alphachannel is to create
+ if ( mpMaskAccess ) // mpMaskAccess != NULL -> alphachannel is to create
{
if ( mbTrueAlpha )
{
@@ -607,15 +607,15 @@ ULONG PNGWriterImpl::ImplGetFilter ( ULONG nY, ULONG nXStart, ULONG nXAdd )
{
mnDeflateInSize = pDest - mpCurrentScan;
pDest = mpDeflateInBuf;
- *pDest++ = 4; // filter type
+ *pDest++ = 4; // filter type
ULONG na, nb, nc;
long np, npa, npb, npc;
- BYTE* p1 = mpCurrentScan + 1; // Current Pixel
- BYTE* p2 = p1 - mnBBP; // left pixel
- BYTE* p3 = mpPreviousScan; // upper pixel
- BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
+ BYTE* p1 = mpCurrentScan + 1; // Current Pixel
+ BYTE* p2 = p1 - mnBBP; // left pixel
+ BYTE* p3 = mpPreviousScan; // upper pixel
+ BYTE* p4 = p3 - mnBBP; // upperleft Pixel;
while ( pDest < mpDeflateInBuf + mnDeflateInSize )
{
diff --git a/vcl/source/gdi/polyscan.cxx b/vcl/source/gdi/polyscan.cxx
index eb329f8c6869..8734ba9ab715 100644
--- a/vcl/source/gdi/polyscan.cxx
+++ b/vcl/source/gdi/polyscan.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,11 +39,11 @@
// ----------------
PolyScanline::PolyScanline() :
- mpFirst ( NULL ),
- mpLast ( NULL ),
- mpAct ( NULL ),
- mnLeft ( 0L ),
- mnRight ( 0L )
+ mpFirst ( NULL ),
+ mpLast ( NULL ),
+ mpAct ( NULL ),
+ mnLeft ( 0L ),
+ mnRight ( 0L )
{
}
@@ -89,7 +89,7 @@ void PolyScanline::Insert( long nX )
{
ScanlinePoint* pLast = mpFirst;
ScanlinePoint* pAct = mpFirst->mpNext;
-
+
while( pAct )
{
// insert in the midlle of the scanline?
@@ -98,10 +98,10 @@ void PolyScanline::Insert( long nX )
pLast->mpNext = new ScanlinePoint( nX, pAct );
break;
}
-
+
pLast = pAct;
pAct = pAct->mpNext;
- }
+ }
}
}
}
@@ -151,8 +151,8 @@ PolyScanner::PolyScanner( const Rectangle& rRect )
{
if( !rRect.IsEmpty() )
{
- Rectangle aRect( rRect );
- ULONG nHeight;
+ Rectangle aRect( rRect );
+ ULONG nHeight;
aRect.Justify();
mnLeft = aRect.Left();
@@ -179,9 +179,9 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
if( nCount )
{
- long nLast = nCount - 1;
- Point aFirst( rPoly[ 0 ] );
- Point aLast( rPoly[ (USHORT) nLast ] );
+ long nLast = nCount - 1;
+ Point aFirst( rPoly[ 0 ] );
+ Point aLast( rPoly[ (USHORT) nLast ] );
while( nLast && ( aLast == aFirst ) )
aLast = rPoly[ (USHORT) --nLast ];
@@ -197,10 +197,10 @@ PolyScanner::PolyScanner( const Polygon& rPoly )
else
{
const Rectangle aRect( rPoly.GetBoundRect() );
- ULONG nHeight;
+ ULONG nHeight;
mnLeft = aRect.Left();
- mnTop = aRect.Top();
+ mnTop = aRect.Top();
mnRight = aRect.Right();
mnBottom = aRect.Bottom();
aLast = aFirst;
@@ -267,21 +267,21 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
mpArray[ nY++ - mnTop ].Insert( nX );
else
while( nY > nEndY )
- mpArray[ nY-- - mnTop ].Insert( nX );
+ mpArray[ nY-- - mnTop ].Insert( nX );
}
else
{
const long nDX = labs( rEnd.X() - rStart.X() );
const long nDY = labs( rEnd.Y() - rStart.Y() );
- const long nStartX = rStart.X();
- const long nStartY = rStart.Y();
- const long nEndX = rEnd.X();
- const long nEndY = rEnd.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
- long nLastX = nStartX;
- long nLastY = nStartY;
- BOOL bLast = FALSE;
+ const long nStartX = rStart.X();
+ const long nStartY = rStart.Y();
+ const long nEndX = rEnd.X();
+ const long nEndY = rEnd.Y();
+ const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
+ const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
+ long nLastX = nStartX;
+ long nLastY = nStartY;
+ BOOL bLast = FALSE;
mpArray[ nStartY - mnTop ].Insert( nStartX );
@@ -306,7 +306,7 @@ void PolyScanner::InsertLine( const Point& rStart, const Point& rEnd )
nLastX = nX;
nLastY = nY;
-
+
if( nD < 0L )
nD += nDY2;
else
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 2ea9bfcc4c11..65c17a5b452d 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -136,8 +136,8 @@ PrinterOptions::~PrinterOptions()
QueueInfo::QueueInfo()
{
- mnStatus = 0;
- mnJobs = 0;
+ mnStatus = 0;
+ mnJobs = 0;
}
// -----------------------------------------------------------------------
@@ -163,12 +163,12 @@ QueueInfo::~QueueInfo()
bool QueueInfo::operator==( const QueueInfo& rInfo ) const
{
return
- maPrinterName == rInfo.maPrinterName &&
- maDriver == rInfo.maDriver &&
- maLocation == rInfo.maLocation &&
- maComment == rInfo.maComment &&
- mnStatus == rInfo.mnStatus &&
- mnJobs == rInfo.mnJobs;
+ maPrinterName == rInfo.maPrinterName &&
+ maDriver == rInfo.maDriver &&
+ maLocation == rInfo.maLocation &&
+ maComment == rInfo.maComment &&
+ mnStatus == rInfo.mnStatus &&
+ mnJobs == rInfo.mnJobs;
}
// -----------------------------------------------------------------------
@@ -207,9 +207,9 @@ SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo )
SalPrinterQueueInfo::SalPrinterQueueInfo()
{
- mnStatus = 0;
- mnJobs = QUEUE_JOBS_DONTKNOW;
- mpSysData = NULL;
+ mnStatus = 0;
+ mnJobs = QUEUE_JOBS_DONTKNOW;
+ mpSysData = NULL;
}
// -----------------------------------------------------------------------
@@ -222,7 +222,7 @@ SalPrinterQueueInfo::~SalPrinterQueueInfo()
ImplPrnQueueList::~ImplPrnQueueList()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
for( unsigned int i = 0; i < m_aQueueInfos.size(); i++ )
{
delete m_aQueueInfos[i].mpQueueInfo;
@@ -283,8 +283,8 @@ static void ImplInitPrnQueueList()
void ImplDeletePrnQueueList()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
if ( pPrnList )
{
@@ -297,9 +297,9 @@ void ImplDeletePrnQueueList()
const std::vector<rtl::OUString>& Printer::GetPrinterQueues()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
if ( !pSVData->maGDIData.mpPrinterQueueList )
- ImplInitPrnQueueList();
+ ImplInitPrnQueueList();
return pSVData->maGDIData.mpPrinterQueueList->m_aPrinterList;
}
@@ -316,16 +316,16 @@ const QueueInfo* Printer::GetQueueInfo( const String& rPrinterName, bool bStatus
{
if( !pInfo->mpQueueInfo || bStatusUpdate )
pSVData->mpDefInst->GetPrinterQueueState( pInfo->mpSalQueueInfo );
-
+
if ( !pInfo->mpQueueInfo )
pInfo->mpQueueInfo = new QueueInfo;
-
- pInfo->mpQueueInfo->maPrinterName = pInfo->mpSalQueueInfo->maPrinterName;
- pInfo->mpQueueInfo->maDriver = pInfo->mpSalQueueInfo->maDriver;
- pInfo->mpQueueInfo->maLocation = pInfo->mpSalQueueInfo->maLocation;
- pInfo->mpQueueInfo->maComment = pInfo->mpSalQueueInfo->maComment;
- pInfo->mpQueueInfo->mnStatus = pInfo->mpSalQueueInfo->mnStatus;
- pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
+
+ pInfo->mpQueueInfo->maPrinterName = pInfo->mpSalQueueInfo->maPrinterName;
+ pInfo->mpQueueInfo->maDriver = pInfo->mpSalQueueInfo->maDriver;
+ pInfo->mpQueueInfo->maLocation = pInfo->mpSalQueueInfo->maLocation;
+ pInfo->mpQueueInfo->maComment = pInfo->mpSalQueueInfo->maComment;
+ pInfo->mpQueueInfo->mnStatus = pInfo->mpSalQueueInfo->mnStatus;
+ pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
return pInfo->mpQueueInfo;
}
return NULL;
@@ -339,34 +339,34 @@ XubString Printer::GetDefaultPrinterName()
if( !pEnv || !*pEnv )
{
ImplSVData* pSVData = ImplGetSVData();
-
+
return pSVData->mpDefInst->GetDefaultPrinter();
}
- return XubString();
+ return XubString();
}
// =======================================================================
void Printer::ImplInitData()
{
- mbDevOutput = FALSE;
- meOutDevType = OUTDEV_PRINTER;
- mbDefPrinter = FALSE;
- mnError = 0;
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mnPageQueueSize = 0;
- mnCopyCount = 1;
- mbCollateCopy = FALSE;
- mbPrinting = FALSE;
- mbJobActive = FALSE;
- mbPrintFile = FALSE;
- mbInPrintPage = FALSE;
- mbNewJobSetup = FALSE;
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpDisplayDev = NULL;
- mbIsQueuePrinter = FALSE;
+ mbDevOutput = FALSE;
+ meOutDevType = OUTDEV_PRINTER;
+ mbDefPrinter = FALSE;
+ mnError = 0;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mnPageQueueSize = 0;
+ mnCopyCount = 1;
+ mbCollateCopy = FALSE;
+ mbPrinting = FALSE;
+ mbJobActive = FALSE;
+ mbPrintFile = FALSE;
+ mbInPrintPage = FALSE;
+ mbNewJobSetup = FALSE;
+ mpInfoPrinter = NULL;
+ mpPrinter = NULL;
+ mpDisplayDev = NULL;
+ mbIsQueuePrinter = FALSE;
mpPrinterOptions = new PrinterOptions;
// Printer in die Liste eintragen
@@ -410,9 +410,9 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
pJobSetup->maPrinterName = maPrinterName;
pJobSetup->maDriver = maDriver;
- mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
+ mpPrinter = NULL;
+ mpJobGraphics = NULL;
ImplUpdateJobSetupPaper( maJobSetup );
if ( !mpInfoPrinter )
@@ -441,18 +441,18 @@ void Printer::ImplInitDisplay( const Window* pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = NULL;
+ mpPrinter = NULL;
+ mpJobGraphics = NULL;
if ( pWindow )
mpDisplayDev = new VirtualDevice( *pWindow );
else
mpDisplayDev = new VirtualDevice();
- mpFontList = pSVData->maGDIData.mpScreenFontList;
- mpFontCache = pSVData->maGDIData.mpScreenFontCache;
- mnDPIX = mpDisplayDev->mnDPIX;
- mnDPIY = mpDisplayDev->mnDPIY;
+ mpFontList = pSVData->maGDIData.mpScreenFontList;
+ mpFontCache = pSVData->maGDIData.mpScreenFontCache;
+ mnDPIX = mpDisplayDev->mnDPIX;
+ mnDPIY = mpDisplayDev->mnDPIY;
}
// -----------------------------------------------------------------------
@@ -786,11 +786,11 @@ BOOL Printer::SetPrinterProps( const Printer* pPrinter )
ImplSVData* pSVData = ImplGetSVData();
- mbDefPrinter = pPrinter->mbDefPrinter;
- maPrintFile = pPrinter->maPrintFile;
- mbPrintFile = pPrinter->mbPrintFile;
- mnCopyCount = pPrinter->mnCopyCount;
- mbCollateCopy = pPrinter->mbCollateCopy;
+ mbDefPrinter = pPrinter->mbDefPrinter;
+ maPrintFile = pPrinter->maPrintFile;
+ mbPrintFile = pPrinter->mbPrintFile;
+ mnCopyCount = pPrinter->mnCopyCount;
+ mbCollateCopy = pPrinter->mbCollateCopy;
mnPageQueueSize = pPrinter->mnPageQueueSize;
*mpPrinterOptions = *pPrinter->mpPrinterOptions;
@@ -895,8 +895,8 @@ BOOL Printer::SetOrientation( Orientation eOrientation )
if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->meOrientation = eOrientation;
if ( IsDisplayPrinter() )
@@ -940,8 +940,8 @@ BOOL Printer::SetPaperBin( USHORT nPaperBin )
if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) &&
(nPaperBin < GetPaperBinCount()) )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->mnPaperBin = nPaperBin;
if ( IsDisplayPrinter() )
@@ -980,10 +980,10 @@ USHORT Printer::GetPaperBin() const
// Map user paper format to a available printer paper formats
void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNearest )
{
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
- int nLandscapeAngle = GetLandscapeAngle();
- int nPaperCount = GetPaperInfoCount();
+ int nLandscapeAngle = GetLandscapeAngle();
+ int nPaperCount = GetPaperInfoCount();
bool bFound = false;
PaperInfo aInfo(pSetupData->mnPaperWidth, pSetupData->mnPaperHeight);
@@ -1027,7 +1027,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
}
}
}
-
+
if( ! bFound && bMatchNearest )
{
sal_Int64 nBestMatch = SAL_MAX_INT64;
@@ -1036,11 +1036,11 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe
for( int i = 0; i < nPaperCount; i++ )
{
const PaperInfo& rPaperInfo = GetPaperInfo( i );
-
+
// check protrait match
sal_Int64 nDX = pSetupData->mnPaperWidth - rPaperInfo.getWidth();
sal_Int64 nDY = pSetupData->mnPaperHeight - rPaperInfo.getHeight();
- sal_Int64 nMatch = nDX*nDX + nDY*nDY;
+ sal_Int64 nMatch = nDX*nDX + nDY*nDY;
if( nMatch < nBestMatch )
{
nBestMatch = nMatch;
@@ -1075,8 +1075,8 @@ BOOL Printer::SetPaper( Paper ePaper )
if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->mePaperFormat = ePaper;
if ( ePaper != PAPER_USER )
{
@@ -1123,17 +1123,17 @@ BOOL Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
if ( mbInPrintPage )
return FALSE;
- Size aPixSize = LogicToPixel( rSize );
- Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
- if ( (maJobSetup.ImplGetConstData()->mePaperFormat != PAPER_USER) ||
+ Size aPixSize = LogicToPixel( rSize );
+ Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM );
+ if ( (maJobSetup.ImplGetConstData()->mePaperFormat != PAPER_USER) ||
(maJobSetup.ImplGetConstData()->mnPaperWidth != aPageSize.Width()) ||
(maJobSetup.ImplGetConstData()->mnPaperHeight != aPageSize.Height()) )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
- pSetupData->mePaperFormat = PAPER_USER;
- pSetupData->mnPaperWidth = aPageSize.Width();
- pSetupData->mnPaperHeight = aPageSize.Height();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ pSetupData->mePaperFormat = PAPER_USER;
+ pSetupData->mnPaperWidth = aPageSize.Width();
+ pSetupData->mnPaperHeight = aPageSize.Height();
if ( IsDisplayPrinter() )
{
@@ -1202,8 +1202,8 @@ BOOL Printer::SetDuplexMode( DuplexMode eDuplex )
if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex )
{
- JobSetup aJobSetup = maJobSetup;
- ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
+ JobSetup aJobSetup = maJobSetup;
+ ImplJobSetup* pSetupData = aJobSetup.ImplGetData();
pSetupData->meDuplexMode = eDuplex;
if ( IsDisplayPrinter() )
@@ -1309,8 +1309,8 @@ ULONG Printer::ImplSalPrinterErrorCodeToVCL( ULONG nError )
void Printer::ImplEndPrint()
{
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
maJobName.Erase();
}
@@ -1344,8 +1344,8 @@ BOOL Printer::EndJob()
bRet = TRUE;
- mbPrinting = FALSE;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPrintPage = 0;
maJobName.Erase();
mbDevOutput = FALSE;
@@ -1369,15 +1369,15 @@ BOOL Printer::AbortJob()
if ( !IsJobActive() && !IsPrinting() )
return FALSE;
- mbJobActive = FALSE;
- mbInPrintPage = FALSE;
- mpJobGraphics = NULL;
+ mbJobActive = FALSE;
+ mbInPrintPage = FALSE;
+ mpJobGraphics = NULL;
if ( mpPrinter )
{
- mbPrinting = FALSE;
- mnCurPage = 0;
- mnCurPrintPage = 0;
+ mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
maJobName.Erase();
ImplReleaseGraphics();
@@ -1443,14 +1443,14 @@ void Printer::ImplEndPage()
void Printer::updatePrinters()
{
- ImplSVData* pSVData = ImplGetSVData();
- ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
+ ImplSVData* pSVData = ImplGetSVData();
+ ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList;
if ( pPrnList )
{
ImplPrnQueueList* pNewList = new ImplPrnQueueList;
pSVData->mpDefInst->GetPrinterQueueInfo( pNewList );
-
+
bool bChanged = pPrnList->m_aQueueInfos.size() != pNewList->m_aQueueInfos.size();
for( unsigned int i = 0; ! bChanged && i < pPrnList->m_aQueueInfos.size(); i++ )
{
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index d560b0b6e7cc..c761ec8c98c3 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ typedef ::std::list< Component > ComponentList;
// List of (intersecting) actions, plus overall bounds
struct ConnectedComponents
{
- ConnectedComponents() :
+ ConnectedComponents() :
aComponentList(),
aBounds(),
aBgColor(COL_WHITE),
@@ -74,14 +74,14 @@ struct ConnectedComponents
bIsFullyTransparent(false)
{}
- ComponentList aComponentList;
- Rectangle aBounds;
+ ComponentList aComponentList;
+ Rectangle aBounds;
Color aBgColor;
- bool bIsSpecial;
- bool bIsFullyTransparent;
+ bool bIsSpecial;
+ bool bIsFullyTransparent;
};
-typedef ::std::list< ConnectedComponents > ConnectedComponentsList;
+typedef ::std::list< ConnectedComponents > ConnectedComponentsList;
// -----------
@@ -126,7 +126,7 @@ static bool checkRect( Rectangle& io_rPrevRect,
{
// shape needs to fully cover previous content, and have uniform
// color
- const bool bRet(
+ const bool bRet(
rMapModeVDev.LogicToPixel(rCurrRect).IsInside(io_rPrevRect) &&
rMapModeVDev.IsFillColor() );
@@ -135,7 +135,7 @@ static bool checkRect( Rectangle& io_rPrevRect,
io_rPrevRect = rCurrRect;
o_rBgColor = rMapModeVDev.GetFillColor();
}
-
+
return bRet;
}
@@ -154,7 +154,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( rAct.GetType() == META_TRANSPARENT_ACTION )
{
const MetaTransparentAction* pTransAct = static_cast<const MetaTransparentAction*>(&rAct);
- USHORT nTransparency( pTransAct->GetTransparence() );
+ USHORT nTransparency( pTransAct->GetTransparence() );
// #i10613# Respect transparency for draw color
if( nTransparency )
@@ -189,7 +189,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
case META_BMPEX_ACTION:
aBmpEx = static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx();
break;
-
+
case META_BMPEXSCALE_ACTION:
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
@@ -218,7 +218,7 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
if( pRA->HasPalette() )
aActualColor = pRA->GetBestPaletteColor( aBgColor ).operator Color();
-
+
aBmp.ReleaseAccess(pRA);
// did we get true white?
@@ -247,22 +247,22 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
switch( rAct.GetType() )
{
case META_BMPEX_ACTION:
- o_rMtf.AddAction( new MetaBmpAction(
- static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
+ o_rMtf.AddAction( new MetaBmpAction(
+ static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
aBmp ));
break;
case META_BMPEXSCALE_ACTION:
- o_rMtf.AddAction( new MetaBmpScaleAction(
- static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
- static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
+ o_rMtf.AddAction( new MetaBmpScaleAction(
+ static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
+ static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
aBmp ));
break;
case META_BMPEXSCALEPART_ACTION:
- o_rMtf.AddAction( new MetaBmpScalePartAction(
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcPoint(),
- static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
+ o_rMtf.AddAction( new MetaBmpScalePartAction(
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcPoint(),
+ static_cast<const MetaBmpExScalePartAction&>(rAct).GetSrcSize(),
aBmp ));
break;
default:
@@ -276,9 +276,9 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// Returns true, if given action creates visible (i.e. non-transparent) output
static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
{
- const bool bLineTransparency( rOut.IsLineColor() ? rOut.GetLineColor().GetTransparency() == 255 : true );
- const bool bFillTransparency( rOut.IsFillColor() ? rOut.GetFillColor().GetTransparency() == 255 : true );
- bool bRet( false );
+ const bool bLineTransparency( rOut.IsLineColor() ? rOut.GetLineColor().GetTransparency() == 255 : true );
+ const bool bFillTransparency( rOut.IsFillColor() ? rOut.GetFillColor().GetTransparency() == 255 : true );
+ bool bRet( false );
switch( rAct.GetType() )
{
@@ -404,7 +404,7 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_LINE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaLineAction&>(rAct).GetStartPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaLineAction&>(rAct).GetStartPoint(),
static_cast<const MetaLineAction&>(rAct).GetEndPoint() );
break;
@@ -458,47 +458,47 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_BMP_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case META_BMPSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpScaleAction&>(rAct).GetSize() );
break;
case META_BMPSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() );
break;
case META_BMPEX_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) );
break;
case META_BMPEXSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() );
break;
case META_BMPEXSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() );
break;
case META_MASK_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
case META_MASKSCALE_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
static_cast<const MetaMaskScaleAction&>(rAct).GetSize() );
break;
case META_MASKSCALEPART_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() );
break;
@@ -523,12 +523,12 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
break;
case META_FLOATTRANSPARENT_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() );
break;
case META_EPS_ACTION:
- aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
+ aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
static_cast<const MetaEPSAction&>(rAct).GetSize() );
break;
@@ -543,7 +543,7 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
// #105987# Use API method instead of Impl* methods
// #107490# Set base parameter equal to index parameter
- rOut.GetTextBoundRect( aActionBounds, rTextAct.GetText(), rTextAct.GetIndex(),
+ rOut.GetTextBoundRect( aActionBounds, rTextAct.GetText(), rTextAct.GetIndex(),
rTextAct.GetIndex(), rTextAct.GetLen() );
aActionBounds.Move( aPtLog.X(), aPtLog.Y() );
}
@@ -552,15 +552,15 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
+ const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
+ const long nLen = aString.Len();
if( nLen )
{
// #105987# ImplLayout takes everything in logical coordinates
- SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
- rTextAct.GetLen(), rTextAct.GetPoint(),
+ SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
+ rTextAct.GetLen(), rTextAct.GetPoint(),
0, rTextAct.GetDXArray() );
if( pSalLayout )
{
@@ -579,8 +579,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_STRETCHTEXT_ACTION:
{
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
+ const long nLen = aString.Len();
// #i16195# Literate copy from TextArray action, the
// semantics for the ImplLayout call are copied from the
@@ -590,8 +590,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
if( nLen )
{
// #105987# ImplLayout takes everything in logical coordinates
- SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
- rTextAct.GetLen(), rTextAct.GetPoint(),
+ SalLayout* pSalLayout = rOut.ImplLayout( rTextAct.GetText(), rTextAct.GetIndex(),
+ rTextAct.GetLen(), rTextAct.GetPoint(),
rTextAct.GetWidth() );
if( pSalLayout )
{
@@ -640,7 +640,7 @@ static bool ImplIsActionHandlingTransparency( const MetaAction& rAct )
}
// remove comment to enable highlighting of generated output
-bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
+bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
long nMaxBmpDPIX, long nMaxBmpDPIY,
bool bReduceTransparency, bool bTransparencyAutoMode,
bool bDownsampleBitmaps,
@@ -648,15 +648,15 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
)
{
MetaAction* pCurrAct;
- bool bTransparent( false );
+ bool bTransparent( false );
rOutMtf.Clear();
if( ! bReduceTransparency || bTransparencyAutoMode )
{
// watch for transparent drawing actions
- for( pCurrAct = ( (GDIMetaFile&) rInMtf ).FirstAction();
- pCurrAct && !bTransparent;
+ for( pCurrAct = ( (GDIMetaFile&) rInMtf ).FirstAction();
+ pCurrAct && !bTransparent;
pCurrAct = ( (GDIMetaFile&) rInMtf ).NextAction() )
{
// #i10613# Extracted "specialness" predicate into extra method
@@ -675,7 +675,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
}
- // #i10613# Determine set of connected components containing transparent objects. These are
+ // #i10613# Determine set of connected components containing transparent objects. These are
// then processed as bitmaps, the original actions are removed from the metafile.
if( !bTransparent )
{
@@ -684,7 +684,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
else
{
- // #i10613#
+ // #i10613#
// This works as follows: we want a number of distinct sets of
// connected components, where each set contains metafile
// actions that are intersecting (note: there are possibly
@@ -826,12 +826,12 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// execute action to get correct MapModes etc.
pCurrAct->Execute( &aMapModeVDev );
-
+
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction();
++nActionNum;
}
- ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
+ ConnectedComponentsList aCCList; // list containing distinct sets of connected components as elements.
// create an OutputDevice to record mapmode changes and the like
VirtualDevice aMapModeVDev2;
@@ -847,7 +847,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
// up to and including last ink-generating background
// action go to background component
- aBackgroundComponent.aComponentList.push_back(
+ aBackgroundComponent.aComponentList.push_back(
::std::make_pair(
pCurrAct, nActionNum) );
@@ -864,26 +864,26 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// iterate over all actions (start where background action
// search left off)
- for( ;
- pCurrAct;
+ for( ;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
// execute action to get correct MapModes etc.
pCurrAct->Execute( &aMapModeVDev2 );
- // cache bounds of current action
+ // cache bounds of current action
const Rectangle aBBCurrAct( ImplCalcActionBounds(*pCurrAct, aMapModeVDev2) );
// accumulate collected bounds here, initialize with current action
- Rectangle aTotalBounds( aBBCurrAct ); // thus,
+ Rectangle aTotalBounds( aBBCurrAct ); // thus,
// aTotalComponents.aBounds
// is
// empty
// for
// non-output-generating
// actions
- bool bTreatSpecial( false );
- ConnectedComponents aTotalComponents;
+ bool bTreatSpecial( false );
+ ConnectedComponents aTotalComponents;
//
// STAGE 2.1: Search for intersecting cc entries
@@ -903,7 +903,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// component.
aTotalComponents.bIsFullyTransparent = !ImplIsNotTransparent(*pCurrAct, aMapModeVDev2);
- if( !aBBCurrAct.IsEmpty() &&
+ if( !aBBCurrAct.IsEmpty() &&
!aTotalComponents.bIsFullyTransparent )
{
if( !aBackgroundComponent.aComponentList.empty() &&
@@ -912,18 +912,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// it seems the background is not large enough. to
// be on the safe side, combine with this component.
aTotalBounds.Union( aBackgroundComponent.aBounds );
-
+
// extract all aCurr actions to aTotalComponents
- aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
+ aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
aBackgroundComponent.aComponentList );
-
+
if( aBackgroundComponent.bIsSpecial )
bTreatSpecial = true;
}
- ConnectedComponentsList::iterator aCurrCC;
+ ConnectedComponentsList::iterator aCurrCC;
const ConnectedComponentsList::iterator aLastCC( aCCList.end() );
- bool bSomeComponentsChanged;
+ bool bSomeComponentsChanged;
// now, this is unfortunate: since changing anyone of
// the aCCList elements (e.g. by merging or addition
@@ -957,11 +957,11 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// calc union bounding box
aTotalBounds.Union( aCurrCC->aBounds );
-
+
// extract all aCurr actions to aTotalComponents
- aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
+ aTotalComponents.aComponentList.splice( aTotalComponents.aComponentList.end(),
aCurrCC->aComponentList );
-
+
if( aCurrCC->bIsSpecial )
bTreatSpecial = true;
@@ -1014,7 +1014,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
// added action is special and none of prev components
// special -> do the detailed tests
-
+
// can the action handle transparency correctly
// (i.e. when painted on white background, does the
// action still look correct)?
@@ -1058,19 +1058,19 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// set new bounds and add action to list
aTotalComponents.aBounds = aTotalBounds;
- aTotalComponents.aComponentList.push_back(
+ aTotalComponents.aComponentList.push_back(
::std::make_pair(
pCurrAct, nActionNum) );
// add aTotalComponents as a new entry to aCCList
aCCList.push_back( aTotalComponents );
- DBG_ASSERT( !aTotalComponents.aComponentList.empty(),
+ DBG_ASSERT( !aTotalComponents.aComponentList.empty(),
"Printer::GetPreparedMetaFile empty component" );
- DBG_ASSERT( !aTotalComponents.aBounds.IsEmpty() ||
+ DBG_ASSERT( !aTotalComponents.aBounds.IsEmpty() ||
(aTotalComponents.aBounds.IsEmpty() && aTotalComponents.aComponentList.size() == 1),
"Printer::GetPreparedMetaFile non-output generating actions must be solitary");
- DBG_ASSERT( !aTotalComponents.bIsFullyTransparent ||
+ DBG_ASSERT( !aTotalComponents.bIsFullyTransparent ||
(aTotalComponents.bIsFullyTransparent && aTotalComponents.aComponentList.size() == 1),
"Printer::GetPreparedMetaFile fully transparent actions must be solitary");
}
@@ -1088,11 +1088,11 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
::std::vector< const ConnectedComponents* > aCCList_MemberMap( rInMtf.GetActionCount() );
// iterate over all aCCList members and their contained metaactions
- ConnectedComponentsList::iterator aCurr( aCCList.begin() );
+ ConnectedComponentsList::iterator aCurr( aCCList.begin() );
const ConnectedComponentsList::iterator aLast( aCCList.end() );
for( ; aCurr != aLast; ++aCurr )
{
- ComponentList::iterator aCurrentAction( aCurr->aComponentList.begin() );
+ ComponentList::iterator aCurrentAction( aCurr->aComponentList.begin() );
const ComponentList::iterator aLastAction( aCurr->aComponentList.end() );
for( ; aCurrentAction != aLastAction; ++aCurrentAction )
{
@@ -1106,7 +1106,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// ===========================================================
//
- ComponentList::iterator aCurrAct( aBackgroundComponent.aComponentList.begin() );
+ ComponentList::iterator aCurrAct( aBackgroundComponent.aComponentList.begin() );
const ComponentList::iterator aLastAct( aBackgroundComponent.aComponentList.end() );
for( ; aCurrAct != aLastAct; ++aCurrAct )
{
@@ -1127,7 +1127,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
aTmpSize = mpPDFWriter->getCurPageSize();
aTmpSize = LogicToPixel( aTmpSize, MapMode( MAP_POINT ) );
-
+
// also add error code to PDFWriter
mpPDFWriter->insertError( vcl::PDFWriter::Warning_Transparency_Converted );
}
@@ -1146,7 +1146,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
if( aCurr->bIsSpecial )
{
- Rectangle aBoundRect( aCurr->aBounds );
+ Rectangle aBoundRect( aCurr->aBounds );
aBoundRect.Intersection( aOutputRect );
const double fBmpArea( (double) aBoundRect.GetWidth() * aBoundRect.GetHeight() );
@@ -1166,18 +1166,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
if( aBoundRect.GetWidth() && aBoundRect.GetHeight() )
{
Point aDstPtPix( aBoundRect.TopLeft() );
- Size aDstSzPix;
+ Size aDstSzPix;
- VirtualDevice aMapVDev; // here, we record only mapmode information
+ VirtualDevice aMapVDev; // here, we record only mapmode information
aMapVDev.EnableOutput(FALSE);
- VirtualDevice aPaintVDev; // into this one, we render.
+ VirtualDevice aPaintVDev; // into this one, we render.
rOutMtf.AddAction( new MetaPushAction( PUSH_MAPMODE ) );
rOutMtf.AddAction( new MetaMapModeAction() );
aPaintVDev.SetDrawMode( GetDrawMode() );
-
+
while( aDstPtPix.Y() <= aBoundRect.Bottom() )
{
aDstPtPix.X() = aBoundRect.Left();
@@ -1203,8 +1203,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aPaintVDev.EnableOutput(FALSE);
// iterate over all actions
- for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
- pCurrAct;
+ for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
// enable output only for
@@ -1221,7 +1221,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
pCurrAct->Execute( &aMapVDev );
- MapMode aMtfMap( aMapVDev.GetMapMode() );
+ MapMode aMtfMap( aMapVDev.GetMapMode() );
const Point aNewOrg( aMapVDev.PixelToLogic( aDstPtPix ) );
aMtfMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
@@ -1258,7 +1258,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// scale down bitmap, if requested
if( bDownsampleBitmaps )
{
- aBandBmp = GetDownsampledBitmap( aDstSzPix,
+ aBandBmp = GetDownsampledBitmap( aDstSzPix,
Point(), aBandBmp.GetSizePixel(),
aBandBmp, nMaxBmpDPIX, nMaxBmpDPIY );
}
@@ -1301,8 +1301,8 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// iterate over all actions and duplicate the ones not in a
// special aCCList member into rOutMtf
- for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
- pCurrAct;
+ for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0;
+ pCurrAct;
pCurrAct=const_cast<GDIMetaFile&>(rInMtf).NextAction(), ++nActionNum )
{
const ConnectedComponents* pCurrAssociatedComponent = aCCList_MemberMap[nActionNum];
@@ -1347,7 +1347,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
// -----------------------------------------------------------------------------
-Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
+Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY )
{
@@ -1383,8 +1383,8 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
// check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
+ if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
+ ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
{
// do scaling
@@ -1441,7 +1441,7 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
{
// do downsampling if neccessary
Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
-
+
// #103209# Normalize size (mirroring has to happen outside of this method)
aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
@@ -1452,8 +1452,8 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
// check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
+ if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
+ ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
{
// do scaling
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 0aeb928856fc..4a20bb69ee9c 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,13 +64,13 @@ class ImplPageCache
GDIMetaFile aPage;
PrinterController::PageSize aSize;
};
-
+
std::vector< CacheEntry > maPages;
std::vector< sal_Int32 > maPageNumbers;
std::vector< sal_Int32 > maCacheRanking;
-
+
static const sal_Int32 nCacheSize = 6;
-
+
void updateRanking( sal_Int32 nLastHit )
{
if( maCacheRanking[0] != nLastHit )
@@ -85,7 +85,7 @@ class ImplPageCache
maCacheRanking[0] = nLastHit;
}
}
-
+
public:
ImplPageCache()
: maPages( nCacheSize )
@@ -95,7 +95,7 @@ public:
for( sal_Int32 i = 0; i < nCacheSize; i++ )
maCacheRanking[i] = nCacheSize - i - 1;
}
-
+
// caution: does not ensure uniqueness
void insert( sal_Int32 i_nPageNo, const GDIMetaFile& i_rPage, const PrinterController::PageSize& i_rSize )
{
@@ -107,7 +107,7 @@ public:
// so update the ranking
updateRanking( nReplacePage );
}
-
+
// caution: bad algorithm; should there ever be reason to increase the cache size beyond 6
// this needs to be urgently rewritten. However do NOT increase the cache size lightly,
// whole pages can be rather memory intensive
@@ -125,7 +125,7 @@ public:
}
return false;
}
-
+
void invalidate()
{
for( sal_Int32 i = 0; i < nCacheSize; ++i )
@@ -139,18 +139,18 @@ public:
class vcl::ImplPrinterControllerData
{
-public:
+public:
struct ControlDependency
{
rtl::OUString maDependsOnName;
sal_Int32 mnDependsOnEntry;
-
+
ControlDependency() : mnDependsOnEntry( -1 ) {}
};
-
+
typedef std::hash_map< rtl::OUString, size_t, rtl::OUStringHash > PropertyToIndexMap;
typedef std::hash_map< rtl::OUString, ControlDependency, rtl::OUStringHash > ControlDependencyMap;
-
+
boost::shared_ptr<Printer> mpPrinter;
Sequence< PropertyValue > maUIOptions;
std::vector< PropertyValue > maUIProperties;
@@ -164,26 +164,28 @@ public:
view::PrintableState meJobState;
vcl::PrinterController::MultiPageSetup maMultiPage;
-
+
vcl::PrintProgressDialog* mpProgress;
-
+
ImplPageCache maPageCache;
-
+
// set by user through printer config dialog
// if set, pages are centered and trimmed onto the fixed page
Size maFixedPageSize;
sal_Int32 mnDefaultPaperBin;
-
+ sal_Int32 mnFixedPaperBin;
+
ImplPrinterControllerData() :
mbFirstPage( sal_True ),
mbLastPage( sal_False ),
mbReversePageOrder( sal_False ),
meJobState( view::PrintableState_JOB_STARTED ),
mpProgress( NULL ),
- mnDefaultPaperBin( -1 )
+ mnDefaultPaperBin( -1 ),
+ mnFixedPaperBin( -1 )
{}
~ImplPrinterControllerData() { delete mpProgress; }
-
+
Size getRealPaperSize( const Size& i_rPageSize ) const
{
if( maFixedPageSize.Width() > 0 && maFixedPageSize.Height() > 0 )
@@ -269,23 +271,23 @@ struct PrintJobAsync
{
boost::shared_ptr<PrinterController> mpController;
JobSetup maInitSetup;
-
+
PrintJobAsync( const boost::shared_ptr<PrinterController>& i_pController,
const JobSetup& i_rInitSetup
)
: mpController( i_pController ), maInitSetup( i_rInitSetup )
{}
-
+
DECL_LINK( ExecJob, void* );
};
IMPL_LINK( PrintJobAsync, ExecJob, void*, EMPTYARG )
{
Printer::ImplPrintJob( mpController, maInitSetup );
-
+
// clean up, do not access members after this
delete this;
-
+
return 0;
}
@@ -325,12 +327,12 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
}
pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDirect" ) ),
makeAny( sal_False ) );
- }
-
+ }
+
// setup printer
// if no specific printer is already set, create one
-
+
// #i108686#
// in case of a UI (platform independent or system dialog) print job, make the printer persistent over jobs
// however if no printer was already set by the print job's originator,
@@ -351,7 +353,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
pController->setPrinter( pPrinter );
}
-
+
// reset last page property
i_pController->setLastPage( sal_False );
@@ -361,7 +363,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
// case 2: "All pages" is selected
// update "Page range" attribute to have a sensible default,
// but leave "All" as selected
-
+
// "Pages" attribute from API is now equivalent to "PageRange"
// AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
// Argh ! That sure needs cleaning up
@@ -430,7 +432,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
return;
}
}
-
+
// check if the printer brings up its own dialog
// in that case leave the work to that dialog
if( ! pController->getPrinter()->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) &&
@@ -444,8 +446,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
if( ! aDlg.Execute() )
{
GDIMetaFile aPageFile;
- i_pController->setLastPage( sal_True );
- i_pController->getFilteredPageFile( 0, aPageFile );
+ i_pController->abortJob();
return;
}
if( aDlg.isPrintToFile() )
@@ -453,9 +454,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
rtl::OUString aFile = queryFile( pController->getPrinter().get() );
if( ! aFile.getLength() )
{
- GDIMetaFile aPageFile;
- i_pController->setLastPage( sal_True );
- i_pController->getFilteredPageFile( 0, aPageFile );
+ i_pController->abortJob();
return;
}
pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ),
@@ -471,16 +470,16 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
{
}
}
-
+
pController->pushPropertiesToPrinter();
-
+
rtl::OUString aJobName;
beans::PropertyValue* pJobNameVal = pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ) );
if( pJobNameVal )
pJobNameVal->Value >>= aJobName;
-
+
pController->getPrinter()->StartJob( String( aJobName ), pController );
-
+
pController->jobFinished( pController->getJobState() );
}
@@ -493,7 +492,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( IsJobActive() || IsPrinting() )
return FALSE;
-
+
ULONG nCopies = mnCopyCount;
bool bCollateCopy = mbCollateCopy;
bool bUserCopy = FALSE;
@@ -531,7 +530,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
{
pSingleValue->Value >>= bSinglePrintJobs;
}
-
+
// remark: currently it is still possible to use EnablePrintFile and
// SetPrintFileName to redirect printout into file
// it can be argued that those methods should be removed in favor
@@ -553,10 +552,10 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( mbPrintFile )
pPrintFile = &maPrintFile;
- maJobName = i_rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ maJobName = i_rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
if( ImplGetSVData()->maGDIData.mbPrinterPullModel )
{
mbJobActive = TRUE;
@@ -578,11 +577,11 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if ( !mnError )
mnError = PRINTER_GENERALERROR;
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
mpPrinter = NULL;
-
+
return false;
}
}
@@ -592,7 +591,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
// now the real job starts
i_pController->setJobState( view::PrintableState_JOB_STARTED );
i_pController->jobStarted();
-
+
int nJobs = 1;
int nOuterRepeatCount = 1;
int nInnerRepeatCount = 1;
@@ -609,10 +608,10 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
nCopies = 1;
nOuterRepeatCount = nInnerRepeatCount = 1;
}
-
+
for( int nJobIteration = 0; nJobIteration < nJobs; nJobIteration++ )
{
- bool bError = false;
+ bool bError = false, bAborted = false;
if( mpPrinter->StartJob( pPrintFile,
i_rJobName,
Application::GetDisplayName(),
@@ -624,11 +623,11 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
mbJobActive = TRUE;
i_pController->createProgressDialog();
int nPages = i_pController->getFilteredPageCount();
- for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount; nOuterIteration++ )
+ for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount && ! bAborted; nOuterIteration++ )
{
- for( int nPage = 0; nPage < nPages; nPage++ )
+ for( int nPage = 0; nPage < nPages && ! bAborted; nPage++ )
{
- for( int nInnerIteration = 0; nInnerIteration < nInnerRepeatCount; nInnerIteration++ )
+ for( int nInnerIteration = 0; nInnerIteration < nInnerRepeatCount && ! bAborted; nInnerIteration++ )
{
if( nPage == nPages-1 &&
nOuterIteration == nOuterRepeatCount-1 &&
@@ -638,22 +637,27 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
i_pController->setLastPage( sal_True );
}
i_pController->printFilteredPage( nPage );
+ if( i_pController->isProgressCanceled() )
+ {
+ i_pController->abortJob();
+ bAborted = true;
+ }
}
}
// FIXME: duplex ?
}
EndJob();
-
+
if( nJobIteration < nJobs-1 )
{
mpPrinter = pSVData->mpDefInst->CreatePrinter( mpInfoPrinter );
-
+
if ( mpPrinter )
{
- maJobName = i_rJobName;
- mnCurPage = 1;
- mnCurPrintPage = 1;
- mbPrinting = TRUE;
+ maJobName = i_rJobName;
+ mnCurPage = 1;
+ mnCurPrintPage = 1;
+ mbPrinting = TRUE;
}
else
bError = true;
@@ -661,7 +665,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
}
else
bError = true;
-
+
if( bError )
{
mnError = ImplSalPrinterErrorCodeToVCL( mpPrinter->GetErrorCode() );
@@ -672,11 +676,11 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
: view::PrintableState_JOB_FAILED );
if( mpPrinter )
pSVData->mpDefInst->DestroyPrinter( mpPrinter );
- mnCurPage = 0;
- mnCurPrintPage = 0;
- mbPrinting = FALSE;
+ mnCurPage = 0;
+ mnCurPrintPage = 0;
+ mbPrinting = FALSE;
mpPrinter = NULL;
-
+
return false;
}
}
@@ -684,7 +688,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
if( i_pController->getJobState() == view::PrintableState_JOB_STARTED )
i_pController->setJobState( view::PrintableState_JOB_SPOOLED );
}
-
+
// make last used printer persistent for UI jobs
if( i_pController->isShowDialogs() && ! i_pController->isDirectPrint() )
{
@@ -694,7 +698,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
GetName()
);
}
-
+
return true;
}
@@ -724,6 +728,7 @@ void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter
setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ),
makeAny( rtl::OUString( i_rPrinter->GetName() ) ) );
mpImplData->mnDefaultPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ mpImplData->mnFixedPaperBin = -1;
}
bool PrinterController::setupPrinter( Window* i_pParent )
@@ -731,15 +736,20 @@ bool PrinterController::setupPrinter( Window* i_pParent )
bool bRet = false;
if( mpImplData->mpPrinter.get() )
{
+ // get old data
Size aPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
+ USHORT nPaperBin = mpImplData->mpPrinter->GetPaperBin();
+
+ // call driver setup
bRet = mpImplData->mpPrinter->Setup( i_pParent );
if( bRet )
{
- // was the papersize overridden ? if so we need to take action
+ // was papersize or bin overridden ? if so we need to take action
Size aNewPaperSize( mpImplData->mpPrinter->PixelToLogic(
mpImplData->mpPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- if( aNewPaperSize != aPaperSize )
+ USHORT nNewPaperBin = mpImplData->mpPrinter->GetPaperBin();
+ if( aNewPaperSize != aPaperSize || nNewPaperBin != nPaperBin )
{
mpImplData->maFixedPageSize = aNewPaperSize;
mpImplData->maPageCache.invalidate();
@@ -748,6 +758,7 @@ bool PrinterController::setupPrinter( Window* i_pParent )
aOverrideSize.Height = aNewPaperSize.Height();
setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OverridePageSize" ) ),
makeAny( aOverrideSize ) );
+ mpImplData->mnFixedPaperBin = nNewPaperBin;
}
}
}
@@ -798,15 +809,15 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons
{
aPageSize.aSize.Width() = aIsSize.Width;
aPageSize.aSize.Height() = aIsSize.Height;
-
+
Size aRealPaperSize( getRealPaperSize( aPageSize.aSize ) );
if( aRealPaperSize != aCurSize )
mpPrinter->SetPaperSizeUser( aRealPaperSize, ! isFixedPageSize() );
}
-
+
if( nPaperBin != -1 && nPaperBin != mpPrinter->GetPaperBin() )
mpPrinter->SetPaperBin( nPaperBin );
-
+
return aPageSize;
}
@@ -843,7 +854,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->mpProgress->tick();
Application::Reschedule( true );
}
-
+
if( i_bMayUseCache )
{
PrinterController::PageSize aPageSize;
@@ -856,14 +867,14 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
mpImplData->maPageCache.invalidate();
o_rMtf.Clear();
-
+
// get page parameters
Sequence< PropertyValue > aPageParm( getPageParametersProtected( i_nUnfilteredPage ) );
const MapMode aMapMode( MAP_100TH_MM );
mpImplData->mpPrinter->Push();
mpImplData->mpPrinter->SetMapMode( aMapMode );
-
+
// modify job setup if necessary
PrinterController::PageSize aPageSize = mpImplData->modifyJobSetup( aPageParm );
@@ -879,13 +890,13 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag
o_rMtf.Stop();
o_rMtf.WindStart();
mpImplData->mpPrinter->Pop();
-
+
if( i_bMayUseCache )
mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize );
// reset "FirstPage" property to false now we've gotten at least our first one
mpImplData->mbFirstPage = sal_False;
-
+
return aPageSize;
}
@@ -931,14 +942,14 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
int nSubPages = rMPS.nRows * rMPS.nColumns;
if( nSubPages < 1 )
nSubPages = 1;
-
+
// reverse sheet order
if( mpImplData->mbReversePageOrder )
{
int nDocPages = getFilteredPageCount();
i_nFilteredPage = nDocPages - 1 - i_nFilteredPage;
}
-
+
// there is no filtering to be done (and possibly the page size of the
// original page is to be set), when N-Up is "neutral" that is there is
// only one subpage and the margins are 0
@@ -956,19 +967,19 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
o_rMtf.WindStart();
long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
- o_rMtf.Move( nDX, nDY );
+ o_rMtf.Move( nDX, nDY, mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
o_rMtf.WindStart();
o_rMtf.SetPrefSize( aPaperSize );
aPageSize.aSize = aPaperSize;
}
return aPageSize;
}
-
+
// set last page property really only on the very last page to be rendered
// that is on the last subpage of a NUp run
sal_Bool bIsLastPage = mpImplData->mbLastPage;
mpImplData->mbLastPage = sal_False;
-
+
Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize ) );
// multi page area: page size minus margins + one time spacing right and down
@@ -990,7 +1001,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
o_rMtf.SetPrefSize( aPaperSize );
o_rMtf.SetPrefMapMode( MapMode( MAP_100TH_MM ) );
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
-
+
int nDocPages = getPageCountProtected();
for( int nSubPage = 0; nSubPage < nSubPages; nSubPage++ )
{
@@ -1022,22 +1033,22 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
// scale the metafile down to a sub page size
double fScaleX = double(aSubPageSize.Width())/double(aPageSize.aSize.Width());
double fScaleY = double(aSubPageSize.Height())/double(aPageSize.aSize.Height());
- double fScale = std::min( fScaleX, fScaleY );
+ double fScale = std::min( fScaleX, fScaleY );
aPageFile.Scale( fScale, fScale );
aPageFile.WindStart();
-
+
// move the subpage so it is centered in its "cell"
long nOffX = (aSubPageSize.Width() - long(double(aPageSize.aSize.Width()) * fScale)) / 2;
long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
- aPageFile.Move( nX, nY );
+ aPageFile.Move( nX, nY, mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
aPageFile.WindStart();
// calculate border rectangle
Rectangle aSubPageRect( Point( nX, nY ),
Size( long(double(aPageSize.aSize.Width())*fScale),
long(double(aPageSize.aSize.Height())*fScale) ) );
-
+
// append subpage to page
appendSubPage( o_rMtf, aSubPageRect, aPageFile, rMPS.bDrawBorder );
}
@@ -1048,7 +1059,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
// subsequent getPageFile calls have changed the paper, reset it to current value
mpImplData->mpPrinter->SetMapMode( MapMode( MAP_100TH_MM ) );
mpImplData->mpPrinter->SetPaperSizeUser( aPaperSize, ! mpImplData->isFixedPageSize() );
-
+
return PrinterController::PageSize( aPaperSize, true );
}
@@ -1096,7 +1107,7 @@ ULONG PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile&
if( rPrinterOptions.IsConvertToGreyscales() )
{
mpImplData->mpPrinter->SetDrawMode( mpImplData->mpPrinter->GetDrawMode() |
- ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
}
@@ -1127,7 +1138,7 @@ void PrinterController::printFilteredPage( int i_nPage )
{
if( mpImplData->meJobState != view::PrintableState_JOB_STARTED )
return;
-
+
GDIMetaFile aPageFile;
PrinterController::PageSize aPageSize = getFilteredPageFile( i_nPage, aPageFile );
@@ -1145,30 +1156,35 @@ void PrinterController::printFilteredPage( int i_nPage )
mpImplData->mpPrinter->SetMapMode( MAP_100TH_MM );
// aPageSize was filtered through mpImplData->getRealPaperSize already by getFilteredPageFile()
mpImplData->mpPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() );
+ if( mpImplData->mnFixedPaperBin != -1 &&
+ mpImplData->mpPrinter->GetPaperBin() != mpImplData->mnFixedPaperBin )
+ {
+ mpImplData->mpPrinter->SetPaperBin( mpImplData->mnFixedPaperBin );
+ }
- // if full paper are is meant, move the output to accomodate for pageoffset
+ // if full paper is meant to be used, move the output to accomodate for pageoffset
if( aPageSize.bFullPaper )
{
Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() );
aPageFile.WindStart();
- aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y() );
+ aPageFile.Move( -aPageOffset.X(), -aPageOffset.Y(), mpImplData->mpPrinter->ImplGetDPIX(), mpImplData->mpPrinter->ImplGetDPIY() );
}
-
+
GDIMetaFile aCleanedFile;
ULONG nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
-
+
mpImplData->mpPrinter->EnableOutput( TRUE );
// actually print the page
mpImplData->mpPrinter->ImplStartPage();
-
+
mpImplData->mpPrinter->Push();
aCleanedFile.WindStart();
aCleanedFile.Play( mpImplData->mpPrinter.get() );
mpImplData->mpPrinter->Pop();
-
+
mpImplData->mpPrinter->ImplEndPage();
-
+
mpImplData->mpPrinter->SetDrawMode( nRestoreDrawMode );
}
@@ -1183,6 +1199,13 @@ void PrinterController::jobFinished( view::PrintableState )
void PrinterController::abortJob()
{
setJobState( view::PrintableState_JOB_ABORTED );
+ // applications (well, sw) depend on a page request with "IsLastPage" = true
+ // to free resources, else they (well, sw) will crash eventually
+ setLastPage( sal_True );
+ delete mpImplData->mpProgress;
+ mpImplData->mpProgress = NULL;
+ GDIMetaFile aMtf;
+ getPageFile( 0, aMtf, false );
}
void PrinterController::setLastPage( sal_Bool i_bLastPage )
@@ -1203,7 +1226,7 @@ bool PrinterController::getReversePrint() const
Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< PropertyValue >& i_rMergeList ) const
{
std::hash_set< rtl::OUString, rtl::OUStringHash > aMergeSet;
- size_t nResultLen = size_t(i_rMergeList.getLength()) + mpImplData->maUIProperties.size() + 3;
+ size_t nResultLen = size_t(i_rMergeList.getLength()) + mpImplData->maUIProperties.size() + 3;
for( int i = 0; i < i_rMergeList.getLength(); i++ )
aMergeSet.insert( i_rMergeList[i].Name );
@@ -1282,7 +1305,7 @@ void PrinterController::setValue( const rtl::OUString& i_rName, const Any& i_rVa
beans::PropertyValue aVal;
aVal.Name = i_rName;
aVal.Value = i_rValue;
-
+
setValue( aVal );
}
@@ -1383,7 +1406,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
if( prop_it != mpImplData->maPropertyToIndex.end() )
{
bEnabled = mpImplData->maUIPropertyEnabled[prop_it->second];
-
+
if( bEnabled )
{
// check control dependencies
@@ -1394,7 +1417,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
// check if the dependency is enabled
// if the dependency is disabled, we are too
bEnabled = isUIOptionEnabled( it->second.maDependsOnName );
-
+
if( bEnabled )
{
// does the dependency have the correct value ?
@@ -1413,7 +1436,7 @@ bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) co
// could be a dependency on a checked boolean
// in this case the dependency is on a non zero for checked value
bEnabled = ( bDepVal && it->second.mnDependsOnEntry != 0) ||
- ( ! bDepVal && it->second.mnDependsOnEntry == 0);
+ ( ! bDepVal && it->second.mnDependsOnEntry == 0);
}
else
{
@@ -1437,7 +1460,7 @@ rtl::OUString PrinterController::getDependency( const rtl::OUString& i_rProperty
mpImplData->maControlDependencies.find( i_rProperty );
if( it != mpImplData->maControlDependencies.end() )
aDependency = it->second.maDependsOnName;
-
+
return aDependency;
}
@@ -1477,7 +1500,7 @@ rtl::OUString PrinterController::makeEnabled( const rtl::OUString& i_rProperty )
}
}
}
-
+
return aDependency;
}
@@ -1504,7 +1527,7 @@ void PrinterController::createProgressDialog()
bShow = ! bApi;
}
}
-
+
if( bShow && ! Application::IsHeadlessModeEnabled() )
{
mpImplData->mpProgress = new PrintProgressDialog( NULL, getPageCountProtected() );
@@ -1515,6 +1538,11 @@ void PrinterController::createProgressDialog()
mpImplData->mpProgress->reset();
}
+bool PrinterController::isProgressCanceled() const
+{
+ return mpImplData->mpProgress && mpImplData->mpProgress->isCanceled();
+}
+
void PrinterController::setMultipage( const MultiPageSetup& i_rMPS )
{
mpImplData->maMultiPage = i_rMPS;
@@ -1548,7 +1576,7 @@ void PrinterController::pushPropertiesToPrinter()
{
case view::DuplexMode::OFF: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_OFF ); break;
case view::DuplexMode::LONGEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_LONGEDGE ); break;
- case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break;
+ case view::DuplexMode::SHORTEDGE: mpImplData->mpPrinter->SetDuplexMode( DUPLEX_SHORTEDGE ); break;
}
}
}
@@ -1675,7 +1703,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
const PropertyValue* i_pVal,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
)
-{
+{
sal_Int32 nElements =
1 // ControlType
+ (i_rTitle.getLength() ? 1 : 0) // Text
@@ -1744,7 +1772,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) );
aCtrl[nUsed++].Value <<= sal_False;
}
-
+
sal_Int32 nAddProps = i_rControlOptions.maAddProps.getLength();
for( sal_Int32 i = 0; i < nAddProps; i++ )
aCtrl[ nUsed++ ] = i_rControlOptions.maAddProps[i];
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 14f45b4beafd..34ea68386c2e 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,15 +55,15 @@
ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
{
// save boundaries
- mnYTop = nTop;
- mnYBottom = nBottom;
+ mnYTop = nTop;
+ mnYBottom = nBottom;
// initialize lists
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
- mbTouched = FALSE;
+ mpNextBand = NULL;
+ mpPrevBand = NULL;
+ mpFirstSep = NULL;
+ mpFirstBandPoint = NULL;
+ mbTouched = FALSE;
}
// -----------------------------------------------------------------------
@@ -73,15 +73,15 @@ ImplRegionBand::ImplRegionBand(
const bool bIgnorePoints)
{
// copy boundaries
- mnYTop = rRegionBand.mnYTop;
- mnYBottom = rRegionBand.mnYBottom;
- mbTouched = rRegionBand.mbTouched;
+ mnYTop = rRegionBand.mnYTop;
+ mnYBottom = rRegionBand.mnYBottom;
+ mbTouched = rRegionBand.mbTouched;
// initialisation
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = NULL;
+ mpPrevBand = NULL;
+ mpFirstSep = NULL;
+ mpFirstBandPoint = NULL;
// copy all elements of the list with separations
ImplRegionBandSep* pNewSep;
@@ -90,11 +90,11 @@ ImplRegionBand::ImplRegionBand(
while ( pSep )
{
// create new and copy data
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = pSep->mnXLeft;
- pNewSep->mnXRight = pSep->mnXRight;
- pNewSep->mbRemoved = pSep->mbRemoved;
- pNewSep->mpNextSep = NULL;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = pSep->mnXLeft;
+ pNewSep->mnXRight = pSep->mnXRight;
+ pNewSep->mbRemoved = pSep->mbRemoved;
+ pNewSep->mpNextSep = NULL;
if ( pSep == rRegionBand.mpFirstSep )
mpFirstSep = pNewSep;
else
@@ -116,7 +116,7 @@ ImplRegionBand::ImplRegionBand(
pPointCopy->mnLineId = pPoint->mnLineId;
pPointCopy->mbEndPoint = pPoint->mbEndPoint;
pPointCopy->meLineType = pPoint->meLineType;
-
+
if (pPrevPointCopy != NULL)
pPrevPointCopy->mpNextBandPoint = pPointCopy;
else
@@ -217,11 +217,11 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
{
if ( !mpFirstBandPoint )
{
- mpFirstBandPoint = new ImplRegionBandPoint;
- mpFirstBandPoint->mnX = nX;
- mpFirstBandPoint->mnLineId = nLineId;
- mpFirstBandPoint->mbEndPoint = bEndPoint;
- mpFirstBandPoint->meLineType = eLineType;
+ mpFirstBandPoint = new ImplRegionBandPoint;
+ mpFirstBandPoint->mnX = nX;
+ mpFirstBandPoint->mnLineId = nLineId;
+ mpFirstBandPoint->mbEndPoint = bEndPoint;
+ mpFirstBandPoint->meLineType = eLineType;
mpFirstBandPoint->mpNextBandPoint = NULL;
return TRUE;
}
@@ -277,7 +277,7 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// search appropriate position and insert point into the list
ImplRegionBandPoint* pNewRegionBandPoint;
-
+
pRegionBandPoint = mpFirstBandPoint;
pLastTestedRegionBandPoint = NULL;
while ( pRegionBandPoint )
@@ -285,12 +285,12 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
// new point completly left? -> insert as first point
if ( nX <= pRegionBandPoint->mnX )
{
- pNewRegionBandPoint = new ImplRegionBandPoint;
- pNewRegionBandPoint->mnX = nX;
- pNewRegionBandPoint->mnLineId = nLineId;
- pNewRegionBandPoint->mbEndPoint = bEndPoint;
- pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = pRegionBandPoint;
+ pNewRegionBandPoint = new ImplRegionBandPoint;
+ pNewRegionBandPoint->mnX = nX;
+ pNewRegionBandPoint->mnLineId = nLineId;
+ pNewRegionBandPoint->mbEndPoint = bEndPoint;
+ pNewRegionBandPoint->meLineType = eLineType;
+ pNewRegionBandPoint->mpNextBandPoint = pRegionBandPoint;
// connections to the new point
if ( !pLastTestedRegionBandPoint )
@@ -307,12 +307,12 @@ BOOL ImplRegionBand::InsertPoint( long nX, long nLineId,
}
// not inserted -> add to the end of the list
- pNewRegionBandPoint = new ImplRegionBandPoint;
- pNewRegionBandPoint->mnX = nX;
- pNewRegionBandPoint->mnLineId = nLineId;
- pNewRegionBandPoint->mbEndPoint = bEndPoint;
- pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = NULL;
+ pNewRegionBandPoint = new ImplRegionBandPoint;
+ pNewRegionBandPoint->mnX = nX;
+ pNewRegionBandPoint->mnLineId = nLineId;
+ pNewRegionBandPoint->mbEndPoint = bEndPoint;
+ pNewRegionBandPoint->meLineType = eLineType;
+ pNewRegionBandPoint->mpNextBandPoint = NULL;
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
@@ -341,8 +341,8 @@ void ImplRegionBand::ScaleX( double fHorzScale )
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
- pSep->mnXLeft = FRound( pSep->mnXLeft * fHorzScale );
- pSep->mnXRight = FRound( pSep->mnXRight * fHorzScale );
+ pSep->mnXLeft = FRound( pSep->mnXLeft * fHorzScale );
+ pSep->mnXRight = FRound( pSep->mnXRight * fHorzScale );
pSep = pSep->mpNextSep;
}
}
@@ -401,11 +401,11 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// band empty? -> add element
if ( !mpFirstSep )
{
- mpFirstSep = new ImplRegionBandSep;
- mpFirstSep->mnXLeft = nXLeft;
- mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep = new ImplRegionBandSep;
+ mpFirstSep->mnXLeft = nXLeft;
+ mpFirstSep->mnXRight = nXRight;
+ mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mpNextSep = NULL;
return;
}
@@ -422,10 +422,10 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// new separation completly left? -> new separation!
if ( nXRight < pSep->mnXLeft )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = nXLeft;
- pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = nXLeft;
+ pNewSep->mnXRight = nXRight;
+ pNewSep->mbRemoved = FALSE;
pNewSep->mpNextSep = pSep;
if ( pSep == mpFirstSep )
@@ -449,13 +449,13 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
// not inserted, but last element? -> add to the end of the list
if ( !pSep->mpNextSep && (nXLeft > pSep->mnXRight) )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = nXLeft;
- pNewSep->mnXRight = nXRight;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = nXLeft;
+ pNewSep->mnXRight = nXRight;
+ pNewSep->mbRemoved = FALSE;
- pSep->mpNextSep = pNewSep;
- pNewSep->mpNextSep = NULL;
+ pSep->mpNextSep = pNewSep;
+ pNewSep->mpNextSep = NULL;
break;
}
@@ -568,10 +568,10 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
{
if ( (nXLeft >= pSep->mnXLeft) && (nXRight <= pSep->mnXRight) )
{
- pNewSep = new ImplRegionBandSep;
- pNewSep->mnXLeft = pSep->mnXLeft;
- pNewSep->mnXRight = nXLeft-1;
- pNewSep->mbRemoved = FALSE;
+ pNewSep = new ImplRegionBandSep;
+ pNewSep->mnXLeft = pSep->mnXLeft;
+ pNewSep->mnXRight = nXLeft-1;
+ pNewSep->mbRemoved = FALSE;
pSep->mnXLeft = nXRight+1;
@@ -608,29 +608,29 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// order, and added four more cases. The code below references
// those numbers via #1, #2, etc.
//
- // Num Mnem newX:oldX newY:oldY Description Result Can quit?
+ // Num Mnem newX:oldX newY:oldY Description Result Can quit?
//
- // #1 Empty band - - The band is empty, thus, simply add new bandSep just add Yes
+ // #1 Empty band - - The band is empty, thus, simply add new bandSep just add Yes
//
- // #2 apart - - The rectangles are disjunct, add new one as is just add Yes
+ // #2 apart - - The rectangles are disjunct, add new one as is just add Yes
//
- // #3 atop == == The rectangles are _exactly_ the same, remove existing just remove Yes
+ // #3 atop == == The rectangles are _exactly_ the same, remove existing just remove Yes
//
- // #4 around < > The new rectangle extends the old to both sides intersect No
+ // #4 around < > The new rectangle extends the old to both sides intersect No
//
- // #5 left < < The new rectangle is left of the old (but intersects) intersect Yes
+ // #5 left < < The new rectangle is left of the old (but intersects) intersect Yes
//
- // #5b left-atop < == The new is left of the old, and coincides on the right intersect Yes
+ // #5b left-atop < == The new is left of the old, and coincides on the right intersect Yes
//
- // #6 right > > The new is right of the old (but intersects) intersect No
+ // #6 right > > The new is right of the old (but intersects) intersect No
//
- // #6b right-atop == > The new is right of the old, and coincides on the left intersect No
+ // #6b right-atop == > The new is right of the old, and coincides on the left intersect No
//
- // #7 inside > < The new is fully inside the old intersect Yes
+ // #7 inside > < The new is fully inside the old intersect Yes
//
- // #8 inside-right > == The new is fully inside the old, coincides on the right intersect Yes
+ // #8 inside-right > == The new is fully inside the old, coincides on the right intersect Yes
//
- // #9 inside-left == < The new is fully inside the old, coincides on the left intersect Yes
+ // #9 inside-left == < The new is fully inside the old, coincides on the left intersect Yes
//
//
// Then, to correctly perform XOr, the segment that's switched off
@@ -644,15 +644,15 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// trailing band sep from 11 to 14. This mimicks the xor look of a
// bitmap operation.
//
-
+
// band empty? -> add element
if ( !mpFirstSep )
{
- mpFirstSep = new ImplRegionBandSep;
- mpFirstSep->mnXLeft = nXLeft;
- mpFirstSep->mnXRight = nXRight;
- mpFirstSep->mbRemoved = FALSE;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep = new ImplRegionBandSep;
+ mpFirstSep->mnXLeft = nXLeft;
+ mpFirstSep->mnXRight = nXRight;
+ mpFirstSep->mbRemoved = FALSE;
+ mpFirstSep->mpNextSep = NULL;
return;
}
@@ -681,10 +681,10 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pNewSep->mpNextSep = pSep;
-
+
// connections to the new separation
if ( pSep == mpFirstSep )
mpFirstSep = pNewSep;
@@ -734,7 +734,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
else
{
pSep->mnXLeft = nXRight+1; // 9
-
+
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
@@ -746,7 +746,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
"ImplRegionBand::XOr(): Case 4,5,6,7 expected all coordinates to be not equal!" );
// The plain-jane check would look like this:
- //
+ //
// if( nXLeft < nOldLeft )
// {
// // #4,5
@@ -771,7 +771,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// // #7 done!
// }
// }
- //
+ //
// but since we generally don't have to care whether
// it's 4 or 6 (only that we must not stop processing
// here), condensed that in such a way that only the
@@ -810,16 +810,16 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = pSep->mpNextSep;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pSep->mpNextSep = pNewSep;
-
+
pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
}
-
+
pPrevSep = pSep;
pSep = pSep->mpNextSep;
}
@@ -832,11 +832,11 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep->mnXRight = nXRight;
pNewSep->mpNextSep = NULL;
pNewSep->mbRemoved = FALSE;
-
+
// connections from the new separation
pPrevSep->mpNextSep = pNewSep;
}
-
+
OptimizeBand();
}
@@ -914,8 +914,8 @@ long ImplRegionBand::GetXRightBoundary() const
BOOL ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const
{
- ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
- ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
+ ImplRegionBandSep* pOwnRectBandSep = mpFirstSep;
+ ImplRegionBandSep* pSecondRectBandSep = rRegionBand.mpFirstSep;
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 4931ee66e93f..372c771624de 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,7 +87,7 @@ bool ImplIsPolygonRectilinear (const PolyPolygon& rPolyPoly)
const USHORT nPolyCount = rPolyPoly.Count();
for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const USHORT nSize = aPoly.GetSize();
@@ -191,7 +191,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
const USHORT nPolyCount = rPolyPoly.Count();
for (USHORT nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const USHORT nSize = aPoly.GetSize();
@@ -221,7 +221,7 @@ ImplRegion* ImplRectilinearPolygonToBands (const PolyPolygon& rPolyPoly)
const long nTop (::std::min(aStart.Y(), aEnd.Y()));
const long nBottom (::std::max(aStart.Y(), aEnd.Y()));
const LineType eLineType (aStart.Y() > aEnd.Y() ? LINE_DESCENDING : LINE_ASCENDING);
-
+
// Make sure that the current line is covered by bands.
ImplAddMissingBands(pImplRegion, nTop,nBottom);
@@ -289,14 +289,14 @@ ImplRegion* ImplGeneralPolygonToBands (
// initialisation and creation of Bands
ImplRegion* pImplRegion = new ImplRegion();
pImplRegion->CreateBandRange( rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom() );
-
+
// insert polygons
const USHORT nPolyCount = rPolyPoly.Count();
for ( USHORT nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
- const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
- const USHORT nSize = aPoly.GetSize();
+ const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
+ const USHORT nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
if ( nSize <= 2 )
@@ -325,7 +325,7 @@ ImplRegion* ImplGeneralPolygonToBands (
#ifdef DBG_UTIL
const char* ImplDbgTestRegion( const void* pObj )
{
- Region* pRegion = (Region*)pObj;
+ Region* pRegion = (Region*)pObj;
ImplRegion* pImplRegion = pRegion->ImplGetImplRegion();
if ( aImplNullRegion.mnRefCount )
@@ -343,8 +343,8 @@ const char* ImplDbgTestRegion( const void* pObj )
if ( (pImplRegion != &aImplEmptyRegion) && (pImplRegion != &aImplNullRegion) )
{
- ULONG nCount = 0;
- const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
+ ULONG nCount = 0;
+ const ImplRegionBand* pBand = pImplRegion->ImplGetFirstRegionBand();
while ( pBand )
{
if ( pBand->mnYBottom < pBand->mnYTop )
@@ -425,27 +425,27 @@ inline void Region::ImplPolyPolyRegionToBandRegion()
// =======================================================================
ImplRegionBase::ImplRegionBase( int nRefCount )
-: mnRefCount( nRefCount )
-, mnRectCount( 0 )
-, mpPolyPoly( NULL )
-, mpB2DPolyPoly( NULL )
+: mnRefCount( nRefCount )
+, mnRectCount( 0 )
+, mpPolyPoly( NULL )
+, mpB2DPolyPoly( NULL )
{}
// ------------------------------------------------------------------------
ImplRegion::ImplRegion()
{
- mpFirstBand = NULL;
- mpLastCheckedBand = NULL;
+ mpFirstBand = NULL;
+ mpLastCheckedBand = NULL;
}
// ------------------------------------------------------------------------
ImplRegion::ImplRegion( const PolyPolygon& rPolyPoly )
{
- mpFirstBand = NULL;
- mpLastCheckedBand = NULL;
- mpPolyPoly = new PolyPolygon( rPolyPoly );
+ mpFirstBand = NULL;
+ mpLastCheckedBand = NULL;
+ mpPolyPoly = new PolyPolygon( rPolyPoly );
}
// ------------------------------------------------------------------------
@@ -460,7 +460,7 @@ ImplRegion::ImplRegion( const basegfx::B2DPolyPolygon& rPolyPoly )
// -----------------------------------------------------------------------
ImplRegion::ImplRegion( const ImplRegion& rImplRegion )
-: ImplRegionBase()
+: ImplRegionBase()
{
mpFirstBand = NULL;
mpLastCheckedBand = NULL;
@@ -582,20 +582,20 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
else if ( rStartPt.Y() != rEndPt.Y() )
{
- const long nDX = labs( rEndPt.X() - rStartPt.X() );
- const long nDY = labs( rEndPt.Y() - rStartPt.Y() );
- const long nStartX = rStartPt.X();
- const long nStartY = rStartPt.Y();
- const long nEndX = rEndPt.X();
- const long nEndY = rEndPt.Y();
- const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
- const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
+ const long nDX = labs( rEndPt.X() - rStartPt.X() );
+ const long nDY = labs( rEndPt.Y() - rStartPt.Y() );
+ const long nStartX = rStartPt.X();
+ const long nStartY = rStartPt.Y();
+ const long nEndX = rEndPt.X();
+ const long nEndY = rEndPt.Y();
+ const long nXInc = ( nStartX < nEndX ) ? 1L : -1L;
+ const long nYInc = ( nStartY < nEndY ) ? 1L : -1L;
if ( nDX >= nDY )
{
- const long nDYX = ( nDY - nDX ) << 1;
- const long nDY2 = nDY << 1;
- long nD = nDY2 - nDX;
+ const long nDYX = ( nDY - nDX ) << 1;
+ const long nDY2 = nDY << 1;
+ long nD = nDY2 - nDX;
for ( nX = nStartX, nY = nStartY; nX != nEndX; nX += nXInc )
{
@@ -609,9 +609,9 @@ BOOL ImplRegion::InsertLine( const Point& rStartPt, const Point& rEndPt,
}
else
{
- const long nDYX = ( nDX - nDY ) << 1;
- const long nDY2 = nDX << 1;
- long nD = nDY2 - nDY;
+ const long nDYX = ( nDX - nDY ) << 1;
+ const long nDY2 = nDX << 1;
+ long nD = nDY2 - nDY;
for ( nX = nStartX, nY = nStartY; nY != nEndY; nY += nYInc )
{
@@ -1183,10 +1183,10 @@ void Region::ImplCreateRectRegion( const Rectangle& rRect )
else
{
// get justified rectangle
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nRight = Max( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
// create instance of implementation class
mpImplRegion = new ImplRegion();
@@ -1387,10 +1387,10 @@ BOOL Region::Union( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1454,10 +1454,10 @@ BOOL Region::Intersect( const Rectangle& rRect )
return TRUE;
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// is own region NULL-region? -> copy data!
if ( mpImplRegion == &aImplNullRegion )
@@ -1540,10 +1540,10 @@ BOOL Region::Exclude( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1582,10 +1582,10 @@ BOOL Region::XOr( const Rectangle& rRect )
ImplCopyData();
// get justified rectangle
- long nLeft = Min( rRect.Left(), rRect.Right() );
- long nTop = Min( rRect.Top(), rRect.Bottom() );
- long nRight = Max( rRect.Left(), rRect.Right() );
- long nBottom = Max( rRect.Top(), rRect.Bottom() );
+ long nLeft = Min( rRect.Left(), rRect.Right() );
+ long nTop = Min( rRect.Top(), rRect.Bottom() );
+ long nRight = Max( rRect.Left(), rRect.Right() );
+ long nBottom = Max( rRect.Top(), rRect.Bottom() );
// insert bands if the boundaries are not allready in the list
mpImplRegion->InsertBands( nTop, nBottom );
@@ -1662,7 +1662,7 @@ BOOL Region::Intersect( const Region& rRegion )
// same instance data? -> nothing to do!
if ( mpImplRegion == rRegion.mpImplRegion )
return TRUE;
-
+
ImplPolyPolyRegionToBandRegion();
((Region*)&rRegion)->ImplPolyPolyRegionToBandRegion();
@@ -1926,7 +1926,7 @@ Rectangle Region::GetBoundRect() const
return aRect;
// get the boundaries of the first band
- long nYTop = mpImplRegion->mpFirstBand->mnYTop;
+ long nYTop = mpImplRegion->mpFirstBand->mnYTop;
long nYBottom = mpImplRegion->mpFirstBand->mnYBottom;
long nXLeft = mpImplRegion->mpFirstBand->GetXLeftBoundary();
long nXRight = mpImplRegion->mpFirstBand->GetXRightBoundary();
@@ -1935,9 +1935,9 @@ Rectangle Region::GetBoundRect() const
ImplRegionBand* pBand = mpImplRegion->mpFirstBand->mpNextBand;
while ( pBand )
{
- nYBottom = pBand->mnYBottom;
- nXLeft = Min( nXLeft, pBand->GetXLeftBoundary() );
- nXRight = Max( nXRight, pBand->GetXRightBoundary() );
+ nYBottom = pBand->mnYBottom;
+ nXLeft = Min( nXLeft, pBand->GetXLeftBoundary() );
+ nXRight = Max( nXRight, pBand->GetXRightBoundary() );
pBand = pBand->mpNextBand;
}
@@ -1999,7 +1999,7 @@ const basegfx::B2DPolyPolygon Region::GetB2DPolyPolygon() const
// TODO: cache the converted polygon?
// mpImplRegion->mpB2DPolyPoly = aRet;
}
-
+
return aRet;
}
@@ -2025,7 +2025,7 @@ basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
}
EndEnumRects( aHdl );
}
-
+
return aRet;
}
@@ -2048,17 +2048,17 @@ BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
return FALSE;
// initialise pointer for first access
- ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pCurrRectBandSep = pCurrRectBand->mpFirstSep;
+ ImplRegionBand* pCurrRectBand = mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pCurrRectBandSep = pCurrRectBand->mpFirstSep;
DBG_ASSERT( pCurrRectBandSep != NULL, "Erstes Band wurde nicht optimiert." );
if ( !pCurrRectBandSep )
return FALSE;
// get boundaries of current rectangle
- rX = pCurrRectBandSep->mnXLeft;
- rY = pCurrRectBand->mnYTop;
- rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
+ rX = pCurrRectBandSep->mnXLeft;
+ rY = pCurrRectBand->mnYTop;
+ rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
rHeight = pCurrRectBand->mnYBottom - pCurrRectBand->mnYTop + 1;
// save pointers
@@ -2081,8 +2081,8 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
return FALSE;
// get last pointers
- ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
- ImplRegionBandSep* pCurrRectBandSep = (ImplRegionBandSep*)rImplRegionInfo.mpVoidCurrRectBandSep;
+ ImplRegionBand* pCurrRectBand = (ImplRegionBand*)rImplRegionInfo.mpVoidCurrRectBand;
+ ImplRegionBandSep* pCurrRectBandSep = (ImplRegionBandSep*)rImplRegionInfo.mpVoidCurrRectBandSep;
// get next separation from current band
pCurrRectBandSep = pCurrRectBandSep->mpNextSep;
@@ -2102,9 +2102,9 @@ BOOL Region::ImplGetNextRect( ImplRegionInfo& rImplRegionInfo,
}
// get boundaries of current rectangle
- rX = pCurrRectBandSep->mnXLeft;
- rY = pCurrRectBand->mnYTop;
- rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
+ rX = pCurrRectBandSep->mnXLeft;
+ rY = pCurrRectBand->mnYTop;
+ rWidth = pCurrRectBandSep->mnXRight - pCurrRectBandSep->mnXLeft + 1;
rHeight = pCurrRectBand->mnYBottom - pCurrRectBand->mnYTop + 1;
// save new pointers
@@ -2326,10 +2326,10 @@ BOOL Region::operator==( const Region& rRegion ) const
}
// initialise pointers
- ImplRegionBand* pOwnRectBand = mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pOwnRectBandSep = pOwnRectBand->mpFirstSep;
- ImplRegionBand* pSecondRectBand = rRegion.mpImplRegion->mpFirstBand;
- ImplRegionBandSep* pSecondRectBandSep = pSecondRectBand->mpFirstSep;
+ ImplRegionBand* pOwnRectBand = mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pOwnRectBandSep = pOwnRectBand->mpFirstSep;
+ ImplRegionBand* pSecondRectBand = rRegion.mpImplRegion->mpFirstBand;
+ ImplRegionBandSep* pSecondRectBandSep = pSecondRectBand->mpFirstSep;
while ( pOwnRectBandSep && pSecondRectBandSep )
{
// get boundaries of current rectangle
@@ -2399,9 +2399,9 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
{
DBG_CHKOBJ( &rRegion, Region, ImplDbgTestRegion );
- VersionCompat aCompat( rIStrm, STREAM_READ );
- UINT16 nVersion;
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStrm, STREAM_READ );
+ UINT16 nVersion;
+ UINT16 nTmp16;
// statische Object haben RefCount von 0
if ( rRegion.mpImplRegion->mnRefCount )
@@ -2479,7 +2479,7 @@ SvStream& operator>>( SvStream& rIStrm, Region& rRegion )
rRegion.mpImplRegion->mnRectCount++;
}
}
-
+
if( rIStrm.IsEof() )
{
DBG_ERROR( "premature end of region stream" );
@@ -2560,7 +2560,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
// put endmarker
rOStrm << (UINT16) STREAMENTRY_END;
-
+
// write polypolygon if available
const BOOL bHasPolyPolygon = rRegion.HasPolyPolygon();
rOStrm << bHasPolyPolygon;
@@ -2570,7 +2570,7 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
// #i105373#
PolyPolygon aNoCurvePolyPolygon;
rRegion.GetPolyPolygon().AdaptiveSubdivide(aNoCurvePolyPolygon);
-
+
rOStrm << aNoCurvePolyPolygon;
}
}
@@ -2786,7 +2786,7 @@ RegionHandle Region::BeginEnumRects()
ImplRegionHandle* pData = new ImplRegionHandle;
pData->mpRegion = new Region( *this );
- pData->mbFirst = TRUE;
+ pData->mbFirst = TRUE;
// save pointers
pData->mpCurrRectBand = pData->mpRegion->mpImplRegion->mpFirstBand;
@@ -2828,10 +2828,10 @@ BOOL Region::GetEnumRects( RegionHandle pVoidData, Rectangle& rRect )
}
// get boundaries of current rectangle
- rRect.Top() = pData->mpCurrRectBand->mnYTop;
- rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
- rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
- rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
+ rRect.Top() = pData->mpCurrRectBand->mnYTop;
+ rRect.Bottom() = pData->mpCurrRectBand->mnYBottom;
+ rRect.Left() = pData->mpCurrRectBandSep->mnXLeft;
+ rRect.Right() = pData->mpCurrRectBandSep->mnXRight;
return TRUE;
}
@@ -2900,13 +2900,13 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu
Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
{
//return Region( rPolyPoly );
-
+
// check if it's worth extracting the XOr'ing the Rectangles
// empiricism shows that break even between XOr'ing rectangles separately
// and ImplPolyPolyRegionToBandRegion is at half rectangles/half polygons
int nPolygonRects = 0, nPolygonPolygons = 0;
int nPolygons = rPolyPoly.Count();
-
+
for( USHORT i = 0; i < nPolygons; i++ )
{
const Polygon& rPoly = rPolyPoly[i];
@@ -2917,7 +2917,7 @@ Region Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly )
}
if( nPolygonPolygons > nPolygonRects )
return Region( rPolyPoly );
-
+
Region aResult;
Rectangle aRect;
for( USHORT i = 0; i < nPolygons; i++ )
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 97e11c5a6aa4..e0fff311459f 100755
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ SalFrameGeometry SalFrame::GetGeometry()
// ----------------------------------------------------------------------------
-SalGraphics::SalGraphics()
+SalGraphics::SalGraphics()
: m_nLayout( 0 ),
m_bAntiAliasB2DDraw(false)
{
@@ -280,7 +280,7 @@ basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
basegfx::B2DPoint aRet( i_rPoint );
@@ -309,9 +309,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolygon aRet;
if( w )
{
@@ -320,9 +320,9 @@ basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, con
{
aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isPrevControlPointUsed( i ) )
- aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) );
if( i_rPoly.isNextControlPointUsed( i ) )
- aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
+ aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) );
}
aRet.setClosed( i_rPoly.isClosed() );
aRet.flip();
@@ -339,9 +339,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
w = i_pOutDev->GetOutputWidthPixel();
else
w = GetGraphicsWidth();
-
+
DBG_ASSERT( w, "missing graphics width" );
-
+
basegfx::B2DPolyPolygon aRet;
if( w )
{
@@ -358,9 +358,9 @@ basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rP
// ----------------------------------------------------------------------------
-BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+BOOL SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return unionClipRegion( nX, nY, nWidth, nHeight );
}
@@ -376,19 +376,19 @@ BOOL SalGraphics::UnionClipRegion( const ::basegfx::B2DPolyPolygon& rPoly, const
return unionClipRegion( rPoly );
}
-void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY );
}
-void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
+void SalGraphics::DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
drawPixel( nX, nY, nSalColor );
}
-void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
+void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
@@ -397,16 +397,16 @@ void SalGraphics::DrawLine( long nX1, long nY1, long nX2, long nY2, const Out
}
drawLine( nX1, nY1, nX2, nY2 );
}
-void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+void SalGraphics::DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
drawRect( nX, nY, nWidth, nHeight );
}
-bool SalGraphics::drawPolyLine(
+bool SalGraphics::drawPolyLine(
const basegfx::B2DPolygon& /*rPolyPolygon*/,
double /*fTransparency*/,
- const basegfx::B2DVector& /*rLineWidths*/,
+ const basegfx::B2DVector& /*rLineWidths*/,
basegfx::B2DLineJoin /*eLineJoin*/)
{
return false;
@@ -417,7 +417,7 @@ void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const Out
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -430,7 +430,7 @@ void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const Outp
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry );
delete [] pPtAry2;
}
@@ -449,7 +449,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
{
ULONG nPoints = pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
+ mirror( nPoints, pPtAry[i], pPtAry2[i], pOutDev );
}
drawPolyPolygon( nPoly, pPoints, (PCONSTSALPOINT*)pPtAry2 );
@@ -465,7 +465,7 @@ void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) );
bRet = drawPolyPolygon( aMirror, i_fTransparency );
@@ -483,10 +483,10 @@ bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fT
sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -498,10 +498,10 @@ sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry,
sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
{
sal_Bool bResult = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
delete [] pPtAry2;
}
@@ -514,7 +514,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
{
sal_Bool bRet = sal_False;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
// TODO: optimize, reduce new/delete calls
SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
@@ -523,7 +523,7 @@ sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt3
{
ULONG nPoints = i_pPoints[i];
pPtAry2[i] = new SalPoint[ nPoints ];
- mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
+ mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev );
}
bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, (PCONSTSALPOINT*)pPtAry2, i_pFlgAry );
@@ -542,7 +542,7 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
const OutputDevice* i_pOutDev )
{
bool bRet = false;
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) )
{
basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) );
bRet = drawPolyLine( aMirror, fTransparency, i_rLineWidth, i_eLineJoin );
@@ -552,54 +552,54 @@ bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon, double
return bRet;
}
-void SalGraphics::CopyArea( long nDestX, long nDestY,
+void SalGraphics::CopyArea( long nDestX, long nDestY,
long nSrcX, long nSrcY,
long nSrcWidth, long nSrcHeight,
USHORT nFlags, const OutputDevice *pOutDev )
{
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
mirror( nDestX, nSrcWidth, pOutDev );
mirror( nSrcX, nSrcWidth, pOutDev );
}
copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, nFlags );
}
-void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
+void SalGraphics::CopyBits( const SalTwoRect* pPosAry,
SalGraphics* pSrcGraphics, const OutputDevice *pOutDev, const OutputDevice *pSrcOutDev )
{
- if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
+ if( ( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) ||
(pSrcGraphics && ( (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) ) ) )
{
SalTwoRect pPosAry2 = *pPosAry;
if( (pSrcGraphics && (pSrcGraphics->GetLayout() & SAL_LAYOUT_BIDI_RTL)) || (pSrcOutDev && pSrcOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
- if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnSrcX, pPosAry2.mnSrcWidth, pSrcOutDev );
+ if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
copyBits( &pPosAry2, pSrcGraphics );
}
else
copyBits( pPosAry, pSrcGraphics );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap );
}
-void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
+void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nTransparentColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, nTransparentColor );
}
else
@@ -612,49 +612,49 @@ void SalGraphics::DrawBitmap( const SalTwoRect* pPosAry,
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawBitmap( &pPosAry2, rSalBitmap, rTransparentBitmap );
}
else
drawBitmap( pPosAry, rSalBitmap, rTransparentBitmap );
}
-void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
+void SalGraphics::DrawMask( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap,
SalColor nMaskColor, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = *pPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
drawMask( &pPosAry2, rSalBitmap, nMaskColor );
}
else
drawMask( pPosAry, rSalBitmap, nMaskColor );
}
-SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
+SalBitmap* SalGraphics::GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
return getBitmap( nX, nY, nWidth, nHeight );
}
-SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
+SalColor SalGraphics::GetPixel( long nX, long nY, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, pOutDev );
return getPixel( nX, nY );
}
-void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
invert( nX, nY, nWidth, nHeight, nFlags );
}
-void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
+void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalPoint* pPtAry2 = new SalPoint[nPoints];
- BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
+ BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev );
invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags );
delete [] pPtAry2;
}
@@ -662,7 +662,7 @@ void SalGraphics::Invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nF
invert( nPoints, pPtAry, nFlags );
}
-BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
+BOOL SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
mirror( nX, nWidth, pOutDev );
@@ -762,7 +762,7 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
Rectangle rgn( rControlRegion );
mirror( rgn, pOutDev );
mirror( nType, aValue, pOutDev );
- if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
+ if( getNativeControlRegion( nType, nPart, rgn, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion ) )
{
mirror( rNativeBoundingRegion, pOutDev, true );
@@ -777,26 +777,26 @@ BOOL SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart,
}
}
else
- return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
+ return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption,
rNativeBoundingRegion, rNativeContentRegion );
}
bool SalGraphics::DrawAlphaBitmap( const SalTwoRect& rPosAry,
const SalBitmap& rSourceBitmap,
- const SalBitmap& rAlphaBitmap,
+ const SalBitmap& rAlphaBitmap,
const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
{
SalTwoRect pPosAry2 = rPosAry;
- mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
+ mirror( pPosAry2.mnDestX, pPosAry2.mnDestWidth, pOutDev );
return drawAlphaBitmap( pPosAry2, rSourceBitmap, rAlphaBitmap );
}
else
return drawAlphaBitmap( rPosAry, rSourceBitmap, rAlphaBitmap );
}
-bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
+bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight,
sal_uInt8 nTransparency, const OutputDevice *pOutDev )
{
if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) )
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 5e187944c706..742b69e5309c 100755
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,7 @@
#include <unicode/uchar.h>
#if defined _MSC_VER
#pragma warning(pop)
-#endif
+#endif
#include <algorithm>
@@ -117,7 +117,7 @@ bool IsDiacritic( sal_UCS4 nChar )
if( (pRange->mnMin <= nChar) && (nChar < pRange->mnEnd) )
return true;
- return false;
+ return false;
}
// =======================================================================
@@ -315,7 +315,7 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang )
case LANGUAGE_FARSI & LANGUAGE_MASK_PRIMARY:
case LANGUAGE_URDU & LANGUAGE_MASK_PRIMARY:
case LANGUAGE_PUNJABI & LANGUAGE_MASK_PRIMARY: //???
- case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY:
+ case LANGUAGE_SINDHI & LANGUAGE_MASK_PRIMARY:
nOffset = 0x06F0 - '0'; // eastern arabic-indic digits
break;
case LANGUAGE_BENGALI & LANGUAGE_MASK_PRIMARY:
@@ -615,7 +615,7 @@ ImplLayoutArgs::ImplLayoutArgs( const xub_Unicode* pStr, int nLen,
UBiDi* pParaBidi = ubidi_openSized( mnLength, 0, &rcI18n );
if( !pParaBidi )
return;
- ubidi_setPara( pParaBidi, reinterpret_cast<const UChar *>(mpStr), mnLength, nLevel, NULL, &rcI18n ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pParaBidi, reinterpret_cast<const UChar *>(mpStr), mnLength, nLevel, NULL, &rcI18n ); // UChar != sal_Unicode in MinGW
UBiDi* pLineBidi = pParaBidi;
int nSubLength = mnEndCharPos - mnMinCharPos;
@@ -1054,7 +1054,7 @@ bool GenericSalLayout::GetCharWidths( sal_Int32* pCharWidths ) const
if( pN->IsClusterStart() )
break;
if( pN->IsDiacritic() )
- continue; // ignore diacritics
+ continue; // ignore diacritics
if( nXPosMax > pN->maLinearPos.X() )
nXPosMax = pN->maLinearPos.X();
}
@@ -1317,10 +1317,10 @@ void GenericSalLayout::ApplyAsianKerning( const sal_Unicode* pStr, int nLength )
{
// ignore code ranges that are not affected by asian punctuation compression
const sal_Unicode cHere = pStr[n];
- if( ((0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0))) || (0xFF00 != (cHere & 0xFF00)) )
+ if( ((0x3000 != (cHere & 0xFF00)) && (0x2010 != (cHere & 0xFFF0))) || (0xFF00 != (cHere & 0xFF00)) )
continue;
const sal_Unicode cNext = pStr[n+1];
- if( ((0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0))) || (0xFF00 != (cNext & 0xFF00)) )
+ if( ((0x3000 != (cNext & 0xFF00)) && (0x2010 != (cNext & 0xFFF0))) || (0xFF00 != (cNext & 0xFF00)) )
continue;
// calculate compression values
@@ -1580,7 +1580,7 @@ void GenericSalLayout::MoveGlyph( int nStart, long nNewXPos )
return;
GlyphItem* pG = mpGlyphItems + nStart;
- // the nNewXPos argument determines the new cell position
+ // the nNewXPos argument determines the new cell position
// as RTL-glyphs are right justified in their cell
// the cell position needs to be adjusted to the glyph position
if( pG->IsRTLGlyph() )
@@ -1900,7 +1900,7 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
if( n > 0 )
{
// drop the NotDef glyphs in the base layout run if a fallback run exists
- while (
+ while (
(maFallbackRuns[ n-1 ].PosIsInRun( nCharPos[0] ) ) &&
(!maFallbackRuns[ n ].PosIsInAnyRun( nCharPos[0] ) )
)
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 31df581f50a2..42c8884ad650 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,35 +36,35 @@
// - Defines -
// -----------
-#define IMPL_CASE_GET_FORMAT( Format ) \
-case( BMP_FORMAT##Format ): \
- pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
+#define IMPL_CASE_GET_FORMAT( Format ) \
+case( BMP_FORMAT##Format ): \
+ pFncGetPixel = BitmapReadAccess::GetPixelFor##Format; \
break
// -----------------------------------------------------------------------------
-#define IMPL_CASE_SET_FORMAT( Format, BitCount ) \
-case( BMP_FORMAT##Format ): \
-{ \
- pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
- pDstBuffer->mnBitCount = BitCount; \
-} \
+#define IMPL_CASE_SET_FORMAT( Format, BitCount ) \
+case( BMP_FORMAT##Format ): \
+{ \
+ pFncSetPixel = BitmapReadAccess::SetPixelFor##Format; \
+ pDstBuffer->mnBitCount = BitCount; \
+} \
break
// -----------------------------------------------------------------------------
-#define DOUBLE_SCANLINES() \
-while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
-{ \
- memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \
- nActY++; \
+#define DOUBLE_SCANLINES() \
+while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) ) \
+{ \
+ memcpy( pDstScanMap[ nActY + 1L ], pDstScan, rDstBuffer.mnScanlineSize ); \
+ nActY++; \
}
// -----------
// - Inlines -
// -----------
-#define TC_TO_PAL_COLORS 4096
+#define TC_TO_PAL_COLORS 4096
static long ImplIndexFromColor( const BitmapColor& rCol )
{
@@ -84,22 +84,22 @@ static long ImplIndexFromColor( const BitmapColor& rCol )
}
-#define COLOR_TO_INDEX( _def_rCol )
+#define COLOR_TO_INDEX( _def_rCol )
// ------------------------
// - conversion functions -
// ------------------------
-static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
- BitmapColor aIndex( 0 );
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
+ BitmapColor* pColMapBuf = aColMap.ImplGetColorBuffer();
+ BitmapColor aIndex( 0 );
for( USHORT i = 0, nSrcCount = aColMap.GetEntryCount(), nDstCount = rDstBuffer.maPalette.GetEntryCount(); i < nSrcCount; i++ )
{
@@ -124,20 +124,20 @@ static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuff
// -----------------------------------------------------------------------------
-static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ const BitmapColor* pColBuf = rSrcBuffer.maPalette.ImplGetColorBuffer();
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_1BIT_MSB_PAL )
{
- const BitmapColor aCol0( pColBuf[ 0 ] );
- const BitmapColor aCol1( pColBuf[ 1 ] );
- long nMapX;
+ const BitmapColor aCol0( pColBuf[ 0 ] );
+ const BitmapColor aCol1( pColBuf[ 1 ] );
+ long nMapX;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -146,7 +146,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
for( long nX = 0L; nX < nWidth; )
{
nMapX = pMapX[ nX ];
- pFncSetPixel( pDstScan, nX++,
+ pFncSetPixel( pDstScan, nX++,
pSrcScan[ nMapX >> 3 ] & ( 1 << ( 7 - ( nMapX & 7 ) ) ) ? aCol1 : aCol0,
rDstMask );
}
@@ -165,7 +165,7 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
for( long nX = 0L; nX < nWidth; )
{
nMapX = pMapX[ nX ];
- pFncSetPixel( pDstScan, nX++,
+ pFncSetPixel( pDstScan, nX++,
pColBuf[ ( pSrcScan[ nMapX >> 1 ] >> ( nMapX & 1 ? 0 : 4 ) ) & 0x0f ],
rDstMask );
}
@@ -201,18 +201,18 @@ static void ImplPALToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// -----------------------------------------------------------------------------
-static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- BYTE* pPixel;
+ BYTE* pPixel;
for( long nActY = 0, nMapY; nActY < nHeight; nActY++ )
{
@@ -245,16 +245,16 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
// -----------------------------------------------------------------------------
-static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
+static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
FncGetPixel pFncGetPixel, FncSetPixel pFncSetPixel,
Scanline* pSrcScanMap, Scanline* pDstScanMap, long* pMapX, long* pMapY )
{
- const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
- const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
- const ColorMask& rDstMask = rDstBuffer.maColorMask;
- BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
- BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
- BitmapColor aIndex( 0 );
+ const long nWidth = rDstBuffer.mnWidth, nHeight = rDstBuffer.mnHeight, nHeight1 = nHeight - 1;
+ const ColorMask& rSrcMask = rSrcBuffer.maColorMask;
+ const ColorMask& rDstMask = rDstBuffer.maColorMask;
+ BitmapPalette aColMap( rSrcBuffer.maPalette.GetEntryCount() );
+ BYTE* pColToPalMap = new BYTE[ TC_TO_PAL_COLORS ];
+ BitmapColor aIndex( 0 );
for( long nR = 0; nR < 16; nR++ )
{
@@ -292,12 +292,12 @@ static void ImplTCToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffe
// - StretchAndConvert -
// ---------------------
-BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
+BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
ULONG nDstBitmapFormat, BitmapPalette* pDstPal, ColorMask* pDstMask )
{
- FncGetPixel pFncGetPixel;
- FncSetPixel pFncSetPixel;
- BitmapBuffer* pDstBuffer = new BitmapBuffer;
+ FncGetPixel pFncGetPixel;
+ FncSetPixel pFncSetPixel;
+ BitmapBuffer* pDstBuffer = new BitmapBuffer;
long i;
// set function for getting pixels
@@ -401,7 +401,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
bool bFastConvert = ImplFastBitmapConversion( *pDstBuffer, rSrcBuffer, rTwoRect );
if( bFastConvert )
return pDstBuffer;
-
+
const long nSrcX = rTwoRect.mnSrcX, nSrcY = rTwoRect.mnSrcY;
const long nSrcDX = rTwoRect.mnSrcWidth, nSrcDY = rTwoRect.mnSrcHeight;
const long nDstDX = rTwoRect.mnDestWidth, nDstDY = rTwoRect.mnDestHeight;
@@ -430,7 +430,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
delete pDstBuffer;
return NULL;
}
-
+
// horizontal mapping table
if( nDstDX != nSrcDX )
{
@@ -487,7 +487,7 @@ BitmapBuffer* StretchAndConvert( const BitmapBuffer& rSrcBuffer, const SalTwoRec
// do buffer scaling and conversion
if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount <= 8 )
{
- ImplPALToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
+ ImplPALToPAL( rSrcBuffer, *pDstBuffer, pFncGetPixel, pFncSetPixel,
pSrcScan, pDstScan, pMapX, pMapY );
}
else if( rSrcBuffer.mnBitCount <= 8 && pDstBuffer->mnBitCount > 8 )
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index 8aa0e47f1a35..561c05e7021b 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,11 +71,11 @@ BOOL SalGraphics::hitTestNativeControl( ControlType,
*
* Draws the requested control described by nPart/nState.
*
- * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * aCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControl( ControlType,
+BOOL SalGraphics::drawNativeControl( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -92,11 +92,11 @@ BOOL SalGraphics::drawNativeControl( ControlType,
* OPTIONAL. Draws the requested text for the control described by nPart/nState.
* Used if text not drawn by DrawNativeControl().
*
- * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * aCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the complete control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * aCaption: A caption or title string (like button text etc)
*/
-BOOL SalGraphics::drawNativeControlText( ControlType,
+BOOL SalGraphics::drawNativeControlText( ControlType,
ControlPart,
const Rectangle&,
ControlState,
@@ -116,9 +116,9 @@ BOOL SalGraphics::drawNativeControlText( ControlType,
* within the control that can be safely drawn into without drawing over
* the borders of the control.
*
- * rControlRegion: The bounding region of the control in VCL frame coordinates.
- * aValue: An optional value (tristate/numerical/string)
- * aCaption: A caption or title string (like button text etc)
+ * rControlRegion: The bounding region of the control in VCL frame coordinates.
+ * aValue: An optional value (tristate/numerical/string)
+ * aCaption: A caption or title string (like button text etc)
*/
BOOL SalGraphics::getNativeControlRegion( ControlType,
ControlPart,
diff --git a/vcl/source/gdi/svcompat.cxx b/vcl/source/gdi/svcompat.cxx
index 415cad128a49..a2d7bd38e735 100644
--- a/vcl/source/gdi/svcompat.cxx
+++ b/vcl/source/gdi/svcompat.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 78ce197525ec..c7543fcd7111 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 4c1439ffe6f4..74aac917a9f1 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,17 +77,17 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
if ( !mpVirDev )
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
- throw ::com::sun::star::uno::RuntimeException(
+ throw ::com::sun::star::uno::RuntimeException(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not create system bitmap!" ) ),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
//GetpApp()->Exception( EXC_SYSOBJNOTCREATED );
}
- mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
- mnOutWidth = nDX;
- mnOutHeight = nDY;
- mbScreenComp = TRUE;
- mnAlphaDepth = -1;
+ mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() );
+ mnOutWidth = nDX;
+ mnOutHeight = nDY;
+ mbScreenComp = TRUE;
+ mnAlphaDepth = -1;
// #i59315# init vdev size from system object, when passed a
// SystemGraphicsData. Otherwise, output size will always
@@ -103,17 +103,17 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp;
- meOutDevType = OUTDEV_VIRDEV;
- mbDevOutput = TRUE;
- mpFontList = pSVData->maGDIData.mpScreenFontList;
- mpFontCache = pSVData->maGDIData.mpScreenFontCache;
- mnDPIX = pOutDev->mnDPIX;
- mnDPIY = pOutDev->mnDPIY;
- maFont = pOutDev->maFont;
+ meOutDevType = OUTDEV_VIRDEV;
+ mbDevOutput = TRUE;
+ mpFontList = pSVData->maGDIData.mpScreenFontList;
+ mpFontCache = pSVData->maGDIData.mpScreenFontCache;
+ mnDPIX = pOutDev->mnDPIX;
+ mnDPIY = pOutDev->mnDPIY;
+ maFont = pOutDev->maFont;
if( maTextColor != pOutDev->maTextColor )
{
- maTextColor = pOutDev->maTextColor;
+ maTextColor = pOutDev->maTextColor;
mbInitTextColor = true;
}
@@ -236,15 +236,15 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
if ( bRet )
{
- mnOutWidth = rNewSize.Width();
+ mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
Erase();
}
}
else
{
- SalVirtualDevice* pNewVirDev;
- ImplSVData* pSVData = ImplGetSVData();
+ SalVirtualDevice* pNewVirDev;
+ ImplSVData* pSVData = ImplGetSVData();
// we need a graphics
if ( !mpGraphics )
@@ -270,12 +270,12 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
nHeight = mnOutHeight;
else
nHeight = nNewHeight;
- aPosAry.mnSrcX = 0;
- aPosAry.mnSrcY = 0;
- aPosAry.mnSrcWidth = nWidth;
+ aPosAry.mnSrcX = 0;
+ aPosAry.mnSrcY = 0;
+ aPosAry.mnSrcWidth = nWidth;
aPosAry.mnSrcHeight = nHeight;
- aPosAry.mnDestX = 0;
- aPosAry.mnDestY = 0;
+ aPosAry.mnDestX = 0;
+ aPosAry.mnDestY = 0;
aPosAry.mnDestWidth = nWidth;
aPosAry.mnDestHeight = nHeight;
@@ -284,7 +284,7 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
ImplReleaseGraphics();
pSVData->mpDefInst->DestroyVirtualDevice( mpVirDev );
mpVirDev = pNewVirDev;
- mnOutWidth = rNewSize.Width();
+ mnOutWidth = rNewSize.Width();
mnOutHeight = rNewSize.Height();
bRet = TRUE;
}
@@ -303,11 +303,11 @@ BOOL VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, BOOL bErase )
// -----------------------------------------------------------------------
-// #i32109#: Fill opaque areas correctly (without relying on
+// #i32109#: Fill opaque areas correctly (without relying on
// fill/linecolor state)
void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
{
- // Set line and fill color to black (->opaque),
+ // Set line and fill color to black (->opaque),
// fill rect with that (linecolor, too, because of
// those pesky missing pixel problems)
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
@@ -442,7 +442,7 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
void VirtualDevice::Compat_ZeroExtleadBug()
{
- meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
+ meRefDevMode = (BYTE)meRefDevMode | REFDEV_FORCE_ZERO_EXTLEAD;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 10aa4431f69d..5c080688fab4 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,12 +44,12 @@ DBG_NAME( Wallpaper );
ImplWallpaper::ImplWallpaper() :
maColor( COL_TRANSPARENT )
{
- mnRefCount = 1;
- mpBitmap = NULL;
- mpCache = NULL;
- mpGradient = NULL;
- mpRect = NULL;
- meStyle = WALLPAPER_NULL;
+ mnRefCount = 1;
+ mpBitmap = NULL;
+ mpCache = NULL;
+ mpGradient = NULL;
+ mpRect = NULL;
+ meStyle = WALLPAPER_NULL;
}
// -----------------------------------------------------------------------
@@ -110,8 +110,8 @@ void ImplWallpaper::ImplReleaseCachedBitmap()
SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
{
- VersionCompat aCompat( rIStm, STREAM_READ );
- UINT16 nTmp16;
+ VersionCompat aCompat( rIStm, STREAM_READ );
+ UINT16 nTmp16;
delete rImplWallpaper.mpRect;
rImplWallpaper.mpRect = NULL;
@@ -165,11 +165,11 @@ SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
- VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
- BOOL bRect = ( rImplWallpaper.mpRect != NULL );
- BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
- BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
- BOOL bDummy = FALSE;
+ VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
+ BOOL bRect = ( rImplWallpaper.mpRect != NULL );
+ BOOL bGrad = ( rImplWallpaper.mpGradient != NULL );
+ BOOL bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ BOOL bDummy = FALSE;
// version 1
rOStm << rImplWallpaper.maColor << (UINT16) rImplWallpaper.meStyle;
@@ -241,9 +241,9 @@ Wallpaper::Wallpaper( const Color& rColor )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
- mpImplWallpaper->maColor = rColor;
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper->maColor = rColor;
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -252,9 +252,9 @@ Wallpaper::Wallpaper( const BitmapEx& rBmpEx )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
- mpImplWallpaper->mpBitmap = new BitmapEx( rBmpEx );
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper->mpBitmap = new BitmapEx( rBmpEx );
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -263,9 +263,9 @@ Wallpaper::Wallpaper( const Gradient& rGradient )
{
DBG_CTOR( Wallpaper, NULL );
- mpImplWallpaper = new ImplWallpaper;
+ mpImplWallpaper = new ImplWallpaper;
mpImplWallpaper->mpGradient = new Gradient( rGradient );
- mpImplWallpaper->meStyle = WALLPAPER_TILE;
+ mpImplWallpaper->meStyle = WALLPAPER_TILE;
}
// -----------------------------------------------------------------------
@@ -300,11 +300,11 @@ void Wallpaper::SetColor( const Color& rColor )
// -----------------------------------------------------------------------
-const Color& Wallpaper::GetColor() const
-{
+const Color& Wallpaper::GetColor() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return mpImplWallpaper->maColor;
+ return mpImplWallpaper->maColor;
}
// -----------------------------------------------------------------------
@@ -325,11 +325,11 @@ void Wallpaper::SetStyle( WallpaperStyle eStyle )
// -----------------------------------------------------------------------
-WallpaperStyle Wallpaper::GetStyle() const
-{
+WallpaperStyle Wallpaper::GetStyle() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return mpImplWallpaper->meStyle;
+ return mpImplWallpaper->meStyle;
}
// -----------------------------------------------------------------------
@@ -391,11 +391,11 @@ BitmapEx Wallpaper::GetBitmap() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsBitmap() const
-{
+BOOL Wallpaper::IsBitmap() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpBitmap != 0);
+ return (mpImplWallpaper->mpBitmap != 0);
}
@@ -449,11 +449,11 @@ Gradient Wallpaper::GetGradient() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsGradient() const
-{
+BOOL Wallpaper::IsGradient() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpGradient != 0);
+ return (mpImplWallpaper->mpGradient != 0);
}
@@ -529,11 +529,11 @@ Rectangle Wallpaper::GetRect() const
// -----------------------------------------------------------------------
-BOOL Wallpaper::IsRect() const
-{
+BOOL Wallpaper::IsRect() const
+{
DBG_CHKTHIS( Wallpaper, NULL );
- return (mpImplWallpaper->mpRect != 0);
+ return (mpImplWallpaper->mpRect != 0);
}
@@ -599,7 +599,7 @@ BOOL Wallpaper::operator==( const Wallpaper& rWallpaper ) const
return TRUE;
if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) ||
- ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
+ ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) )
return FALSE;
if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index ebdd59f517af..2b808f0c896e 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -237,7 +237,7 @@ bool FtFontFile::Map()
mpFileMap = (const unsigned char*)
mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 );
if( mpFileMap == MAP_FAILED )
- mpFileMap = NULL;
+ mpFileMap = NULL;
close( nFile );
#elif defined(WNT)
void* pFileDesc = ::CreateFile( pFileName, GENERIC_READ, FILE_SHARE_READ,
@@ -520,7 +520,7 @@ void* FreetypeServerFont::GetFtFace() const
FreetypeManager::~FreetypeManager()
{
-// This crashes on Solaris 10
+// This crashes on Solaris 10
// TODO: check which versions have this problem
//
// FT_Error rcFT = FT_Done_FreeType( aLibFT );
@@ -1307,7 +1307,7 @@ void FreetypeServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
int nLoadFlags = mnLoadFlags;
// if( mbArtItalic )
-// nLoadFlags |= FT_LOAD_NO_BITMAP;
+// nLoadFlags |= FT_LOAD_NO_BITMAP;
FT_Error rc = -1;
#if (FTVERSION <= 2008)
@@ -1449,7 +1449,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
// becomes an expensive nop when a glyph covers no pixels.
FT_BBox cbox;
FT_Glyph_Get_CBox(pGlyphFT, ft_glyph_bbox_unscaled, &cbox);
-
+
if( (cbox.xMax - cbox.xMin) == 0 || (cbox.yMax - cbox.yMin == 0) )
{
nAngle = 0;
@@ -1457,7 +1457,7 @@ bool FreetypeServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& rRawBitmap
FT_Done_Glyph( pGlyphFT );
return true;
}
-
+
if( pGlyphFT->format != FT_GLYPH_FORMAT_BITMAP )
{
if( pGlyphFT->format == FT_GLYPH_FORMAT_OUTLINE )
@@ -1561,7 +1561,7 @@ bool FreetypeServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& rRawBitmap
FT_Int nLoadFlags = mnLoadFlags;
if( mbArtItalic )
- nLoadFlags |= FT_LOAD_NO_BITMAP;
+ nLoadFlags |= FT_LOAD_NO_BITMAP;
#if (FTVERSION <= 2004) && !defined(TT_CONFIG_OPTION_BYTECODE_INTERPRETER)
// autohinting in FT<=2.0.4 makes antialiased glyphs look worse
@@ -1735,7 +1735,7 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const
{
rResult.mbSymbolic = mpFontInfo->IsSymbolFont();
- // TODO: is the full CmapResult needed on platforms calling this?
+ // TODO: is the full CmapResult needed on platforms calling this?
if( FT_IS_SFNT( maFaceFT ) )
{
ULONG nLength = 0;
@@ -1754,11 +1754,11 @@ bool FreetypeServerFont::GetFontCodeRanges( CmapResult& rResult ) const
for( sal_uInt32 cCode = FT_Get_First_Char( maFaceFT, &nGlyphIndex );; )
{
if( !nGlyphIndex )
- break;
- aCodes.push_back( cCode ); // first code inside range
+ break;
+ aCodes.push_back( cCode ); // first code inside range
sal_uInt32 cNext = cCode;
do cNext = FT_Get_Next_Char( maFaceFT, cCode, &nGlyphIndex ); while( cNext == ++cCode );
- aCodes.push_back( cCode ); // first code outside range
+ aCodes.push_back( cCode ); // first code outside range
cCode = cNext;
}
@@ -1964,10 +1964,10 @@ ULONG FreetypeServerFont::GetKernPairs( ImplKernPairData** ppKernPairs ) const
}
break;
- case 2: // version 0, kerning format 2
+ case 2: // version 0, kerning format 2
{
const FT_Byte* pSubTable = pBuffer;
- /*USHORT nRowWidth =*/ NEXT_U16( pBuffer );
+ /*USHORT nRowWidth =*/ NEXT_U16( pBuffer );
USHORT nOfsLeft = NEXT_U16( pBuffer );
USHORT nOfsRight = NEXT_U16( pBuffer );
USHORT nOfsArray = NEXT_U16( pBuffer );
@@ -2160,7 +2160,7 @@ void PolyArgs::ClosePolygon()
const sal_uInt16 nPolySize(aPoly.GetSize());
if(nPolySize)
{
- if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1))
+ if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1))
|| (aPoly.GetPoint(nPolySize - 1) != aPoly.GetPoint(0)))
{
aPoly.SetSize(nPolySize + 1);
diff --git a/vcl/source/glyphs/gcach_ftyp.hxx b/vcl/source/glyphs/gcach_ftyp.hxx
index 5ebe70bcbdf9..7c936e4721ae 100644
--- a/vcl/source/glyphs/gcach_ftyp.hxx
+++ b/vcl/source/glyphs/gcach_ftyp.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -219,9 +219,9 @@ private:
FT_SizeRec_* maSizeFT;
bool mbFaceOk;
- bool mbArtItalic;
- bool mbArtBold;
- bool mbUseGamma;
+ bool mbArtItalic;
+ bool mbArtBold;
+ bool mbUseGamma;
typedef ::std::hash_map<int,int> GlyphSubstitution;
GlyphSubstitution maGlyphSubstitution;
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx
index a9f9167062ba..b1a03bee2bf9 100644
--- a/vcl/source/glyphs/gcach_layout.cxx
+++ b/vcl/source/glyphs/gcach_layout.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -335,7 +335,7 @@ void IcuFontFromServerFont::getGlyphAdvance( LEGlyphID nGlyphIndex,
// -----------------------------------------------------------------------
le_bool IcuFontFromServerFont::getGlyphPoint( LEGlyphID,
- le_int32
+ le_int32
#if OSL_DEBUG_LEVEL > 1
pointNumber
#endif
@@ -562,13 +562,13 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
{
// left-to-right case
if( nClusterMinPos > nCharPos )
- nClusterMinPos = nCharPos; // extend cluster
+ nClusterMinPos = nCharPos; // extend cluster
else if( nCharPos <= nClusterMaxPos )
- /*NOTHING*/; // inside cluster
+ /*NOTHING*/; // inside cluster
else if( bDiacritic )
- nClusterMaxPos = nCharPos; // add diacritic to cluster
+ nClusterMaxPos = nCharPos; // add diacritic to cluster
else {
- nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
+ nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
bInCluster = false;
}
}
@@ -576,12 +576,12 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
{
// right-to-left case
if( nClusterMaxPos < nCharPos )
- nClusterMaxPos = nCharPos; // extend cluster
+ nClusterMaxPos = nCharPos; // extend cluster
else if( nCharPos >= nClusterMinPos )
- /*NOTHING*/; // inside cluster
+ /*NOTHING*/; // inside cluster
else if( bDiacritic )
{
- nClusterMinPos = nCharPos; // ICU often has [diacritic* baseglyph*]
+ nClusterMinPos = nCharPos; // ICU often has [diacritic* baseglyph*]
if( bClusterStart ) {
nClusterMaxPos = nCharPos;
bInCluster = false;
@@ -589,7 +589,7 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr
}
else
{
- nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
+ nClusterMinPos = nClusterMaxPos = nCharPos; // new cluster
bInCluster = !bClusterStart;
}
}
diff --git a/vcl/source/glyphs/gcach_rbmp.cxx b/vcl/source/glyphs/gcach_rbmp.cxx
index 5ea80da77794..b7ab25cd026d 100644
--- a/vcl/source/glyphs/gcach_rbmp.cxx
+++ b/vcl/source/glyphs/gcach_rbmp.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -211,7 +211,7 @@ bool RawBitmap::Rotate( int nAngle )
unsigned char* pBuf = new unsigned char[ nBufSize ];
if( !pBuf )
return false;
-
+
memset( pBuf, 0, nBufSize );
int i;
diff --git a/vcl/source/glyphs/gcach_vdev.cxx b/vcl/source/glyphs/gcach_vdev.cxx
index 8cd45cf58224..4db84d4137ca 100644
--- a/vcl/source/glyphs/gcach_vdev.cxx
+++ b/vcl/source/glyphs/gcach_vdev.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,22 +56,22 @@ void VirtDevServerFont::AnnounceFonts( ImplDevFontList* pToAdd )
ImplFontData& rData = *new ImplFontData;
rData.SetSysData( new FontSysData( (void*)SERVERFONT_MAGIC ) );
- rData.maName = aFontInfo.GetName();
- rData.maStyleName = aFontInfo.GetStyleName();
- rData.mnWidth = aFontInfo.GetWidth();
- rData.mnHeight = aFontInfo.GetHeight();
- rData.meFamily = aFontInfo.GetFamily();
- rData.meCharSet = aFontInfo.GetCharSet();
- rData.mePitch = aFontInfo.GetPitch();
- rData.meWidthType = aFontInfo.GetWidthType();
- rData.meWeight = aFontInfo.GetWeight();
- rData.meItalic = aFontInfo.GetItalic();
- rData.meType = aFontInfo.GetType();
- rData.meFamily = aFontInfo.GetFamily();
-
- rData.mbOrientation = true; // TODO: where to get this info?
- rData.mbDevice = false;
- rData.mnQuality = 0; // prefer client-side fonts if available
+ rData.maName = aFontInfo.GetName();
+ rData.maStyleName = aFontInfo.GetStyleName();
+ rData.mnWidth = aFontInfo.GetWidth();
+ rData.mnHeight = aFontInfo.GetHeight();
+ rData.meFamily = aFontInfo.GetFamily();
+ rData.meCharSet = aFontInfo.GetCharSet();
+ rData.mePitch = aFontInfo.GetPitch();
+ rData.meWidthType = aFontInfo.GetWidthType();
+ rData.meWeight = aFontInfo.GetWeight();
+ rData.meItalic = aFontInfo.GetItalic();
+ rData.meType = aFontInfo.GetType();
+ rData.meFamily = aFontInfo.GetFamily();
+
+ rData.mbOrientation = true; // TODO: where to get this info?
+ rData.mbDevice = false;
+ rData.mnQuality = 0; // prefer client-side fonts if available
pToAdd->Add( &rData );
}
@@ -97,7 +97,7 @@ VirtDevServerFont* VirtDevServerFont::CreateFont( const ImplFontSelectData& rFSD
// -----------------------------------------------------------------------
VirtDevServerFont::VirtDevServerFont( const ImplFontSelectData& rFSD )
-: ServerFont( rFSD)
+: ServerFont( rFSD)
{}
// -----------------------------------------------------------------------
@@ -107,37 +107,37 @@ void VirtDevServerFont::FetchFontMetric( ImplFontMetricData& rTo, long& rFactor
const ImplFontSelectData& aFSD = GetFontSelData();
Font aFont;
- aFont.SetName ( aFSD.maName );
- aFont.SetStyleName ( aFSD.maStyleName );
- aFont.SetHeight ( aFSD.mnHeight );
- aFont.SetWidth ( aFSD.mnWidth );
+ aFont.SetName ( aFSD.maName );
+ aFont.SetStyleName ( aFSD.maStyleName );
+ aFont.SetHeight ( aFSD.mnHeight );
+ aFont.SetWidth ( aFSD.mnWidth );
aFont.SetOrientation( aFSD.mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
FontMetric aMetric( vdev.GetFontMetric( aFont ) );
rFactor = 0x100;
- rTo.mnAscent = aMetric.GetAscent();
- rTo.mnDescent = aMetric.GetDescent();
- rTo.mnIntLeading = aMetric.GetIntLeading();
- rTo.mnExtLeading = aMetric.GetExtLeading();
- rTo.mnSlant = aMetric.GetSlant();
- rTo.meType = aMetric.GetType();
- rTo.mnFirstChar = 0x0020; // TODO: where to get this info?
- rTo.mnLastChar = 0xFFFE; // TODO: where to get this info?
-
- rTo.mnWidth = aFSD.mnWidth;
- rTo.maName = aFSD.maName;
- rTo.maStyleName = aFSD.maStyleName;
- rTo.mnOrientation = aFSD.mnOrientation;
- rTo.meFamily = aFSD.meFamily;
- rTo.meCharSet = aFSD.meCharSet;
- rTo.meWeight = aFSD.meWeight;
- rTo.meItalic = aFSD.meItalic;
- rTo.mePitch = aFSD.mePitch;
- rTo.mbDevice = FALSE;
+ rTo.mnAscent = aMetric.GetAscent();
+ rTo.mnDescent = aMetric.GetDescent();
+ rTo.mnIntLeading = aMetric.GetIntLeading();
+ rTo.mnExtLeading = aMetric.GetExtLeading();
+ rTo.mnSlant = aMetric.GetSlant();
+ rTo.meType = aMetric.GetType();
+ rTo.mnFirstChar = 0x0020; // TODO: where to get this info?
+ rTo.mnLastChar = 0xFFFE; // TODO: where to get this info?
+
+ rTo.mnWidth = aFSD.mnWidth;
+ rTo.maName = aFSD.maName;
+ rTo.maStyleName = aFSD.maStyleName;
+ rTo.mnOrientation = aFSD.mnOrientation;
+ rTo.meFamily = aFSD.meFamily;
+ rTo.meCharSet = aFSD.meCharSet;
+ rTo.meWeight = aFSD.meWeight;
+ rTo.meItalic = aFSD.meItalic;
+ rTo.mePitch = aFSD.mePitch;
+ rTo.mbDevice = FALSE;
}
// -----------------------------------------------------------------------
@@ -152,19 +152,19 @@ int VirtDevServerFont::GetGlyphIndex( sal_Unicode aChar ) const
void VirtDevServerFont::InitGlyphData( int nGlyphIndex, GlyphData& rGD ) const
{
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
// get glyph metrics
sal_Int32 nCharWidth = 10;
-// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth );
+// TODO: vdev.GetCharWidth( nGlyphIndex, nGlyphIndex, &nCharWidth );
rGD.SetCharWidth( nCharWidth );
sal_Unicode aChar = nGlyphIndex;
@@ -208,7 +208,7 @@ bool VirtDevServerFont::GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const
// -----------------------------------------------------------------------
-bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const
+bool VirtDevServerFont::GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const
{
return false;
}
@@ -225,12 +225,12 @@ int VirtDevServerFont::GetGlyphKernValue( int, int ) const
ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) const
{
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
@@ -246,9 +246,9 @@ ULONG VirtDevServerFont::GetKernPairs( ImplKernPairData** ppImplKernPairs ) cons
KerningPair* pFrom = pKernPairs;
for ( ULONG n = 0; n < nPairs; n++ )
{
- pTo->mnChar1 = pFrom->nChar1;
- pTo->mnChar2 = pFrom->nChar2;
- pTo->mnKern = pFrom->nKern;
+ pTo->mnChar1 = pFrom->nChar1;
+ pTo->mnChar2 = pFrom->nChar2;
+ pTo->mnKern = pFrom->nKern;
++pFrom;
++pTo;
}
@@ -266,12 +266,12 @@ bool VirtDevServerFont::GetGlyphOutline( int nGlyphIndex, PolyPolygon& rPolyPoly
return false;
/*
Font aFont;
- aFont.SetName ( GetFontSelData().maName );
- aFont.SetStyleName ( GetFontSelData().maStyleName );
- aFont.SetHeight ( GetFontSelData().mnHeight );
- aFont.SetWidth ( GetFontSelData().mnWidth );
+ aFont.SetName ( GetFontSelData().maName );
+ aFont.SetStyleName ( GetFontSelData().maStyleName );
+ aFont.SetHeight ( GetFontSelData().mnHeight );
+ aFont.SetWidth ( GetFontSelData().mnWidth );
aFont.SetOrientation( GetFontSelData().mnOrientation );
- aFont.SetVertical ( GetFontSelData().mbVertical );
+ aFont.SetVertical ( GetFontSelData().mbVertical );
VirtualDevice vdev( 1 );
vdev.SetFont( aFont );
diff --git a/vcl/source/glyphs/gcach_vdev.hxx b/vcl/source/glyphs/gcach_vdev.hxx
index e2349169ee13..f8512ed57850 100644
--- a/vcl/source/glyphs/gcach_vdev.hxx
+++ b/vcl/source/glyphs/gcach_vdev.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,23 +32,23 @@
class VirtDevServerFont : public ServerFont
{
public:
- virtual bool GetAntialiasAdvice( void ) const;
- virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
- virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const;
+ virtual bool GetAntialiasAdvice( void ) const;
+ virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const;
+ virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const;
+ virtual bool GetGlyphOutline( int nGlyphIndex, PolyPolygon& ) const;
protected:
friend class GlyphCache;
- static void AnnounceFonts( ImplDevFontList* );
- static void ClearFontList();
+ static void AnnounceFonts( ImplDevFontList* );
+ static void ClearFontList();
- static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
- virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
- virtual ULONG GetKernPairs( ImplKernPairData** ) const;
+ static VirtDevServerFont* CreateFont( const ImplFontSelectData& );
+ virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const;
+ virtual ULONG GetKernPairs( ImplKernPairData** ) const;
virtual int GetGlyphKernValue( int, int ) const;
- virtual int GetGlyphIndex( sal_Unicode ) const;
- virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const;
+ virtual int GetGlyphIndex( sal_Unicode ) const;
+ virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const;
private:
VirtDevServerFont( const ImplFontSelectData& );
diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx
index 1953ecf553c4..abb4b96448af 100644
--- a/vcl/source/glyphs/glyphcache.cxx
+++ b/vcl/source/glyphs/glyphcache.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,7 +42,7 @@
#include <vcl/graphite_features.hxx>
#endif
-#include <rtl/ustring.hxx> // used only for string=>hashvalue
+#include <rtl/ustring.hxx> // used only for string=>hashvalue
#include <osl/file.hxx>
#include <tools/debug.hxx>
@@ -228,9 +228,9 @@ ServerFont* GlyphCache::CacheFont( const ImplFontSelectData& rFontSelData )
if( nFontId <= 0 )
return NULL;
- // the FontList's key mpFontData member is reinterpreted as font id
+ // the FontList's key mpFontData member is reinterpreted as font id
ImplFontSelectData aFontSelData = rFontSelData;
- aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
+ aFontSelData.mpFontData = reinterpret_cast<ImplFontData*>( nFontId );
FontList::iterator it = maFontList.find( aFontSelData );
if( it != maFontList.end() )
{
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx
index f82e3afe39c8..cf7066a9ba2f 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx
index 389accd631f0..da1be3bffac0 100644
--- a/vcl/source/glyphs/graphite_cache.cxx
+++ b/vcl/source/glyphs/graphite_cache.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index 1cb25306c4ee..343fec2ef1bb 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
// Description:
// Parse a string of features specified as & separated pairs.
// e.g.
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index ae7ec8246e33..300f23aad8b4 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
// Description: An implementation of the SalLayout interface that uses the
// Graphite engine.
@@ -594,21 +594,39 @@ bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
{
#ifdef GRCACHE
GrSegRecord * pSegRecord = NULL;
- gr::Segment * pSegment = CreateSegment(rArgs, &pSegRecord);
- if (!pSegment)
- return false;
-
+ gr::Segment * pSegment = NULL;
+ // Graphite can in rare cases crash with a zero length
+ if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
+ {
+ pSegment = CreateSegment(rArgs, &pSegRecord);
+ if (!pSegment)
+ return false;
+ }
+ else
+ {
+ clear();
+ return true;
+ }
// layout the glyphs as required by OpenOffice
bool success = LayoutGlyphs(rArgs, pSegment, pSegRecord);
if (pSegRecord) pSegRecord->unlock();
else delete pSegment;
#else
- gr::Segment * pSegment = CreateSegment(rArgs);
- if (!pSegment)
- return false;
- bool success = LayoutGlyphs(rArgs, pSegment);
- delete pSegment;
+ gr::Segment * pSegment = NULL;
+ bool success = true;
+ if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
+ {
+ pSegment = CreateSegment(rArgs);
+ if (!pSegment)
+ return false;
+ success = LayoutGlyphs(rArgs, pSegment);
+ if (pSegment) delete pSegment;
+ }
+ else
+ {
+ clear();
+ }
#endif
return success;
}
@@ -659,7 +677,7 @@ public:
return hash;
};
protected:
- virtual void UniqueCacheInfo(std::wstring & stuFace, bool & fBold, bool & fItalic)
+ virtual void UniqueCacheInfo( ext_std::wstring& stuFace, bool& fBold, bool& fItalic )
{
#ifdef WIN32
dynamic_cast<GraphiteWinFont&>(mrRealFont).UniqueCacheInfo(stuFace, fBold, fItalic);
@@ -722,7 +740,7 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
(GraphiteCacheHandler::instance).getCache(aFontHash);
if (pCache)
{
- *pSegRecord = pCache->getSegment(rArgs, bRtl, nSegCharLimit);
+ *pSegRecord = pCache->getSegment(rArgs, bRtl, limit);
if (*pSegRecord)
{
pSegment = (*pSegRecord)->getSegment();
@@ -736,7 +754,34 @@ gr::Segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
(*pSegRecord)->clearVectors();
}
mpTextSrc->switchLayoutArgs(rArgs);
- return pSegment;
+ if (limit > rArgs.mnMinCharPos && limit == rArgs.mnEndCharPos
+ && pSegment->stopCharacter() != limit)
+ {
+ // check that the last character is not part of a ligature
+ glyph_set_range_t aGlyphSet = pSegment->charToGlyphs(limit - 1);
+ if (aGlyphSet.first == aGlyphSet.second)
+ {
+ // no glyphs associated with this glyph - occurs mid ligature
+ pSegment = NULL;
+ *pSegRecord = NULL;
+ }
+ else
+ {
+ while (aGlyphSet.first != aGlyphSet.second)
+ {
+ int lastChar = static_cast<int>((*aGlyphSet.first).lastChar());
+ if (lastChar >= limit)
+ {
+ pSegment = NULL;
+ *pSegRecord = NULL;
+ break;
+ }
+ aGlyphSet.first++;
+ }
+ }
+ }
+ if (pSegment)
+ return pSegment;
}
}
#endif
@@ -1058,7 +1103,7 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, std::vector<int> & rDelt
{
nXOffset = args.mpDXArray[nChars - 1] - mvCharDxs[nChars - 1];
}
- int nPrevClusterGlyph = (bRtl)? mvGlyphs.size() : -1;
+ int nPrevClusterGlyph = (bRtl)? (signed)mvGlyphs.size() : -1;
int nPrevClusterLastChar = -1;
for (size_t i = 0; i < nChars; i++)
{
diff --git a/vcl/source/glyphs/graphite_serverfont.cxx b/vcl/source/glyphs/graphite_serverfont.cxx
index eda97f509f03..137322da0c70 100644
--- a/vcl/source/glyphs/graphite_serverfont.cxx
+++ b/vcl/source/glyphs/graphite_serverfont.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/glyphs/graphite_textsrc.cxx b/vcl/source/glyphs/graphite_textsrc.cxx
index 5764ba9454c9..d3bf1c57ec08 100644
--- a/vcl/source/glyphs/graphite_textsrc.cxx
+++ b/vcl/source/glyphs/graphite_textsrc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx
index 3912977cc9be..b8f6ff3991a2 100644
--- a/vcl/source/glyphs/graphite_textsrc.hxx
+++ b/vcl/source/glyphs/graphite_textsrc.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef _SV_GRAPHITETEXTSRC_HXX
#define _SV_GRAPHITETEXTSRC_HXX
// Description: Implements the Graphite interfaces IGrTextSource and
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 2bc0ab94d272..7ce0b8354a62 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ using namespace ::com::sun::star;
namespace
{
// TODO(Q3): move to o3tl bithacks or somesuch. A similar method is in canvas/canvastools.hxx
-
+
// Good ole HAKMEM tradition. Calc number of 1 bits in 32bit word,
// unrolled loop. See e.g. Hackers Delight, p. 66
inline sal_Int32 bitcount( sal_uInt32 val )
@@ -183,7 +183,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
m_nEndianness = util::Endianness::LITTLE; // doesn't matter
m_aLayout.IsMsbFirst = sal_False; // doesn't matter
break;
-
+
case BMP_FORMAT_8BIT_TC_MASK:
m_bPalette = false;
m_nBitsPerInputPixel = 8;
@@ -264,7 +264,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
pCounts[1] = 8;
pCounts[2] = 8;
pCounts[3] = 8;
-
+
m_nRedIndex = 3;
m_nGreenIndex = 2;
m_nBlueIndex = 1;
@@ -409,11 +409,11 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
// put alpha in front of all the color channels
sal_Int8* pTags =m_aComponentTags.getArray();
sal_Int32* pCounts=m_aComponentBitCounts.getArray();
- std::rotate(pTags,
- pTags+m_aComponentTags.getLength()-1,
+ std::rotate(pTags,
+ pTags+m_aComponentTags.getLength()-1,
pTags+m_aComponentTags.getLength());
- std::rotate(pCounts,
- pCounts+m_aComponentBitCounts.getLength()-1,
+ std::rotate(pCounts,
+ pCounts+m_aComponentBitCounts.getLength()-1,
pCounts+m_aComponentBitCounts.getLength());
++m_nRedIndex;
++m_nGreenIndex;
@@ -428,7 +428,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
// adapt scanline parameters
const Size aSize = m_aBitmap.GetSizePixel();
- m_aLayout.ScanLineBytes =
+ m_aLayout.ScanLineBytes =
m_aLayout.ScanLineStride = (aSize.Width()*m_nBitsPerOutputPixel + 7)/8;
}
}
@@ -455,20 +455,20 @@ geometry::IntegerSize2D SAL_CALL VclCanvasBitmap::getSize() throw (uno::RuntimeE
return m_aBmpEx.IsTransparent();
}
-uno::Reference< rendering::XBitmap > SAL_CALL VclCanvasBitmap::getScaledBitmap( const geometry::RealSize2D& newSize,
+uno::Reference< rendering::XBitmap > SAL_CALL VclCanvasBitmap::getScaledBitmap( const geometry::RealSize2D& newSize,
sal_Bool beFast ) throw (uno::RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
-
+
BitmapEx aNewBmp( m_aBitmap );
aNewBmp.Scale( sizeFromRealSize2D( newSize ), beFast ? BMP_SCALE_FAST : BMP_SCALE_INTERPOLATE );
return uno::Reference<rendering::XBitmap>( new VclCanvasBitmap( aNewBmp ) );
}
// XIntegerReadOnlyBitmap
-uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerBitmapLayout& bitmapLayout,
- const geometry::IntegerRectangle2D& rect ) throw( lang::IndexOutOfBoundsException,
- rendering::VolatileContentDestroyedException,
+uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerBitmapLayout& bitmapLayout,
+ const geometry::IntegerRectangle2D& rect ) throw( lang::IndexOutOfBoundsException,
+ rendering::VolatileContentDestroyedException,
uno::RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -478,7 +478,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
const ::Rectangle aRequestedArea( vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
if( aRequestedArea.IsEmpty() )
return uno::Sequence< sal_Int8 >();
-
+
// Invalid/empty bitmap: no data available
if( !m_pBmpAcc )
throw lang::IndexOutOfBoundsException();
@@ -492,19 +492,19 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
throw lang::IndexOutOfBoundsException();
}
- uno::Sequence< sal_Int8 > aRet;
+ uno::Sequence< sal_Int8 > aRet;
Rectangle aRequestedBytes( aRequestedArea );
// adapt to byte boundaries
aRequestedBytes.Left() = aRequestedArea.Left()*m_nBitsPerOutputPixel/8;
aRequestedBytes.Right() = (aRequestedArea.Right()*m_nBitsPerOutputPixel + 7)/8;
-
+
// copy stuff to output sequence
aRet.realloc(aRequestedBytes.getWidth()*aRequestedBytes.getHeight());
sal_Int8* pOutBuf = aRet.getArray();
bitmapLayout.ScanLines = aRequestedBytes.getHeight();
- bitmapLayout.ScanLineBytes =
+ bitmapLayout.ScanLineBytes =
bitmapLayout.ScanLineStride= aRequestedBytes.getWidth();
sal_Int32 nScanlineStride=bitmapLayout.ScanLineStride;
@@ -571,9 +571,9 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
return aRet;
}
-uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::IntegerBitmapLayout& bitmapLayout,
- const geometry::IntegerPoint2D& pos ) throw (lang::IndexOutOfBoundsException,
- rendering::VolatileContentDestroyedException,
+uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::IntegerBitmapLayout& bitmapLayout,
+ const geometry::IntegerPoint2D& pos ) throw (lang::IndexOutOfBoundsException,
+ rendering::VolatileContentDestroyedException,
uno::RuntimeException)
{
vos::OGuard aGuard( Application::GetSolarMutex() );
@@ -597,7 +597,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
// copy stuff to output sequence
bitmapLayout.ScanLines = 1;
- bitmapLayout.ScanLineBytes =
+ bitmapLayout.ScanLineBytes =
bitmapLayout.ScanLineStride= aRet.getLength();
const long nScanlineLeftOffset( pos.X*m_nBitsPerInputPixel/8 );
@@ -682,7 +682,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const USHORT nCount( m_pBmpAcc ?
+ const USHORT nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
if( nIndex < 0 || nIndex >= nCount )
@@ -703,7 +703,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal
{
vos::OGuard aGuard( Application::GetSolarMutex() );
- const USHORT nCount( m_pBmpAcc ?
+ const USHORT nCount( m_pBmpAcc ?
(m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 );
OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range");
@@ -714,16 +714,16 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal
return sal_False; // read-only implementation
}
-namespace
-{
+namespace
+{
struct PaletteColorSpaceHolder: public rtl::StaticWithInit<uno::Reference<rendering::XColorSpace>,
- PaletteColorSpaceHolder>
+ PaletteColorSpaceHolder>
{
uno::Reference<rendering::XColorSpace> operator()()
{
return vcl::unotools::createStandardColorSpace();
}
- };
+ };
}
uno::Reference< rendering::XColorSpace > SAL_CALL VclCanvasBitmap::getColorSpace( ) throw (uno::RuntimeException)
@@ -754,7 +754,7 @@ uno::Sequence< ::beans::PropertyValue > SAL_CALL VclCanvasBitmap::getProperties(
return uno::Sequence< ::beans::PropertyValue >();
}
-uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertColorSpace( const uno::Sequence< double >& deviceColor,
+uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertColorSpace( const uno::Sequence< double >& deviceColor,
const uno::Reference< ::rendering::XColorSpace >& targetColorSpace ) throw (uno::RuntimeException)
{
// TODO(P3): if we know anything about target
@@ -770,7 +770,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertToRGB( const
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
- ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
+ ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
"number of channels no multiple of pixel element count",
static_cast<rendering::XBitmapPalette*>(this), 01);
@@ -819,7 +819,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToARGB( con
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
- ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
+ ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
"number of channels no multiple of pixel element count",
static_cast<rendering::XBitmapPalette*>(this), 01);
@@ -872,7 +872,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertToPARGB( co
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
- ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
+ ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
"number of channels no multiple of pixel element count",
static_cast<rendering::XBitmapPalette*>(this), 01);
@@ -928,18 +928,18 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromRGB( const uno::Seq
uno::Sequence< double > aRes(nLen*nComponentsPerPixel);
double* pColors=aRes.getArray();
-
+
if( m_bPalette )
{
for( sal_Size i=0; i<nLen; ++i )
{
- pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
+ pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
BitmapColor(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue)));
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = 1.0;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -952,7 +952,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromRGB( const uno::Seq
pColors[m_nBlueIndex] = rgbColor[i].Blue;
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = 1.0;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -968,18 +968,18 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromARGB( const uno::Se
uno::Sequence< double > aRes(nLen*nComponentsPerPixel);
double* pColors=aRes.getArray();
-
+
if( m_bPalette )
{
for( sal_Size i=0; i<nLen; ++i )
{
- pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
+ pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
BitmapColor(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue)));
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = rgbColor[i].Alpha;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -992,7 +992,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromARGB( const uno::Se
pColors[m_nBlueIndex] = rgbColor[i].Blue;
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = rgbColor[i].Alpha;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -1008,19 +1008,19 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromPARGB( const uno::S
uno::Sequence< double > aRes(nLen*nComponentsPerPixel);
double* pColors=aRes.getArray();
-
+
if( m_bPalette )
{
for( sal_Size i=0; i<nLen; ++i )
{
const double nAlpha( rgbColor[i].Alpha );
- pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
+ pColors[m_nIndexIndex] = m_pBmpAcc->GetBestPaletteIndex(
BitmapColor(toByteColor(rgbColor[i].Red / nAlpha),
toByteColor(rgbColor[i].Green / nAlpha),
toByteColor(rgbColor[i].Blue / nAlpha)));
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = nAlpha;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -1034,7 +1034,7 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromPARGB( const uno::S
pColors[m_nBlueIndex] = rgbColor[i].Blue / nAlpha;
if( m_nAlphaIndex != -1 )
pColors[m_nAlphaIndex] = nAlpha;
-
+
pColors += nComponentsPerPixel;
}
}
@@ -1043,23 +1043,23 @@ uno::Sequence< double > SAL_CALL VclCanvasBitmap::convertFromPARGB( const uno::S
sal_Int32 SAL_CALL VclCanvasBitmap::getBitsPerPixel( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ vos::OGuard aGuard( Application::GetSolarMutex() );
return m_nBitsPerOutputPixel;
}
uno::Sequence< ::sal_Int32 > SAL_CALL VclCanvasBitmap::getComponentBitCounts( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ vos::OGuard aGuard( Application::GetSolarMutex() );
return m_aComponentBitCounts;
}
sal_Int8 SAL_CALL VclCanvasBitmap::getEndianness( ) throw (uno::RuntimeException)
{
- vos::OGuard aGuard( Application::GetSolarMutex() );
+ vos::OGuard aGuard( Application::GetSolarMutex() );
return m_nEndianness;
}
-uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
+uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< ::rendering::XColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
if( dynamic_cast<VclCanvasBitmap*>(targetColorSpace.get()) )
@@ -1068,7 +1068,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co
const sal_Size nLen( deviceColor.getLength() );
const sal_Int32 nComponentsPerPixel(m_aComponentTags.getLength());
- ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
+ ENSURE_ARG_OR_THROW2(nLen%nComponentsPerPixel==0,
"number of channels no multiple of pixel element count",
static_cast<rendering::XBitmapPalette*>(this), 01);
@@ -1123,7 +1123,7 @@ uno::Sequence<double> SAL_CALL VclCanvasBitmap::convertFromIntegerColorSpace( co
}
}
-uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
+uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< ::rendering::XIntegerBitmapColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,uno::RuntimeException)
{
if( dynamic_cast<VclCanvasBitmap*>(targetColorSpace.get()) )
@@ -1161,16 +1161,16 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB
for( sal_Size i=0; i<nLen; i+=nBytesPerPixel )
{
// if palette, index is guaranteed to be 8 bit
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(*pIn) :
+ m_pBmpAcc->GetPaletteColor(*pIn) :
m_pBmpAcc->GetPixelFromData(pIn,0);
-
- // TODO(F3): Convert result to sRGB color space
+
+ // TODO(F3): Convert result to sRGB color space
*pOut++ = rendering::RGBColor(toDoubleColor(aCol.GetRed()),
toDoubleColor(aCol.GetGreen()),
toDoubleColor(aCol.GetBlue()));
- // skips alpha
+ // skips alpha
pIn += nBytesPerPixel;
}
}
@@ -1178,7 +1178,7 @@ uno::Sequence<rendering::RGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToRGB
{
for( sal_Int32 i=0; i<nNumColors; ++i )
{
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
sal::static_int_cast<USHORT>(
@@ -1218,12 +1218,12 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
for( sal_Size i=0; i<nLen; i+=nBytesPerPixel )
{
// if palette, index is guaranteed to be 8 bit
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(*pIn) :
+ m_pBmpAcc->GetPaletteColor(*pIn) :
m_pBmpAcc->GetPixelFromData(pIn,0);
-
- // TODO(F3): Convert result to sRGB color space
+
+ // TODO(F3): Convert result to sRGB color space
*pOut++ = rendering::ARGBColor(1.0 - toDoubleColor(nAlphaFactor*pIn[nNonAlphaBytes]),
toDoubleColor(aCol.GetRed()),
toDoubleColor(aCol.GetGreen()),
@@ -1235,7 +1235,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToAR
{
for( sal_Int32 i=0; i<nNumColors; ++i )
{
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
sal::static_int_cast<USHORT>(
@@ -1276,12 +1276,12 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
for( sal_Size i=0; i<nLen; i+=nBytesPerPixel )
{
// if palette, index is guaranteed to be 8 bit
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
- m_pBmpAcc->GetPaletteColor(*pIn) :
+ m_pBmpAcc->GetPaletteColor(*pIn) :
m_pBmpAcc->GetPixelFromData(pIn,0);
-
- // TODO(F3): Convert result to sRGB color space
+
+ // TODO(F3): Convert result to sRGB color space
const double nAlpha( 1.0 - toDoubleColor(nAlphaFactor*pIn[nNonAlphaBytes]) );
*pOut++ = rendering::ARGBColor(nAlpha,
nAlpha*toDoubleColor(aCol.GetRed()),
@@ -1294,7 +1294,7 @@ uno::Sequence<rendering::ARGBColor> SAL_CALL VclCanvasBitmap::convertIntegerToPA
{
for( sal_Int32 i=0; i<nNumColors; ++i )
{
- const BitmapColor aCol =
+ const BitmapColor aCol =
m_bPalette ?
m_pBmpAcc->GetPaletteColor(
sal::static_int_cast<USHORT>(
@@ -1331,10 +1331,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
@@ -1349,10 +1349,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromRGB( con
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
@@ -1380,10 +1380,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
@@ -1398,10 +1398,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromARGB( co
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
@@ -1430,10 +1430,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
const BitmapColor aCol(toByteColor(rgbColor[i].Red / nAlpha),
toByteColor(rgbColor[i].Green / nAlpha),
toByteColor(rgbColor[i].Blue / nAlpha));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,0,aCol2);
@@ -1448,10 +1448,10 @@ uno::Sequence< ::sal_Int8 > SAL_CALL VclCanvasBitmap::convertIntegerFromPARGB( c
const BitmapColor aCol(toByteColor(rgbColor[i].Red),
toByteColor(rgbColor[i].Green),
toByteColor(rgbColor[i].Blue));
- const BitmapColor aCol2 =
+ const BitmapColor aCol2 =
m_bPalette ?
BitmapColor(
- sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
+ sal::static_int_cast<BYTE>(m_pBmpAcc->GetBestPaletteIndex( aCol ))) :
aCol;
m_pBmpAcc->SetPixelOnData(pColors,i,aCol2);
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index 71c306ff9bbb..30c0b900b188 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,7 +80,7 @@ namespace vcl
{
namespace unotools
{
- // #i79917# removed helpers bezierSequenceFromPolygon and
+ // #i79917# removed helpers bezierSequenceFromPolygon and
// pointSequenceFromPolygon here
// Also all helpers using tools Polygon and PolyPolygon will get mapped to the
// B2DPolygon helpers for these cases, see comments with the same TaskID below.
@@ -88,8 +88,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
- const ::Polygon& inputPolygon )
+ uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
+ const ::Polygon& inputPolygon )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xPolyPolygonFromPolygon()" );
@@ -101,7 +101,7 @@ namespace vcl
//---------------------------------------------------------------------------------------
uno::Reference< rendering::XPolyPolygon2D > xPolyPolygonFromPolyPolygon( const uno::Reference< rendering::XGraphicDevice >& xGraphicDevice,
- const ::PolyPolygon& inputPolyPolygon )
+ const ::PolyPolygon& inputPolyPolygon )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xPolyPolygonFromPolyPolygon()" );
@@ -164,8 +164,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XBitmap > xBitmapFromBitmap( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
- const ::Bitmap& inputBitmap )
+ uno::Reference< rendering::XBitmap > xBitmapFromBitmap( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
+ const ::Bitmap& inputBitmap )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmap()" );
@@ -174,8 +174,8 @@ namespace vcl
//---------------------------------------------------------------------------------------
- uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
- const ::BitmapEx& inputBitmap )
+ uno::Reference< rendering::XBitmap > xBitmapFromBitmapEx( const uno::Reference< rendering::XGraphicDevice >& /*xGraphicDevice*/,
+ const ::BitmapEx& inputBitmap )
{
RTL_LOGFILE_CONTEXT( aLog, "::vcl::unotools::xBitmapFromBitmapEx()" );
@@ -203,10 +203,10 @@ namespace vcl
namespace
{
- inline bool operator==( const rendering::IntegerBitmapLayout& rLHS,
+ inline bool operator==( const rendering::IntegerBitmapLayout& rLHS,
const rendering::IntegerBitmapLayout& rRHS )
{
- return
+ return
rLHS.ScanLineBytes == rRHS.ScanLineBytes &&
rLHS.ScanLineStride == rRHS.ScanLineStride &&
rLHS.PlaneStride == rRHS.PlaneStride &&
@@ -342,16 +342,16 @@ namespace vcl
OSL_ENSURE(aLayout.ColorSpace.is(),
"Cannot convert image without color space!");
if( !aLayout.ColorSpace.is() )
- return ::BitmapEx();
+ return ::BitmapEx();
nDepth = aLayout.ColorSpace->getBitsPerPixel();
if( xInputBitmap->hasAlpha() )
{
// determine alpha channel depth
- const uno::Sequence<sal_Int8> aTags(
+ const uno::Sequence<sal_Int8> aTags(
aLayout.ColorSpace->getComponentTags() );
- const uno::Sequence<sal_Int32> aDepths(
+ const uno::Sequence<sal_Int32> aDepths(
aLayout.ColorSpace->getComponentBitCounts() );
const sal_Int8* pStart(aTags.getConstArray());
const sal_Size nLen(aTags.getLength());
@@ -384,7 +384,7 @@ namespace vcl
else
nDepth = 8;
- const USHORT nPaletteEntries(
+ const USHORT nPaletteEntries(
sal::static_int_cast<USHORT>(
std::min(sal_Int32(255), nEntryCount)));
@@ -396,7 +396,7 @@ namespace vcl
uno::Sequence<double> aPaletteEntry;
for( USHORT j=0; j<nPaletteEntries; ++j )
{
- if( !xPalette->getIndex(aPaletteEntry,j) &&
+ if( !xPalette->getIndex(aPaletteEntry,j) &&
nAlphaDepth == 0 )
{
nAlphaDepth = 1;
@@ -412,26 +412,26 @@ namespace vcl
}
}
- const ::Size aPixelSize(
+ const ::Size aPixelSize(
sizeFromIntegerSize2D(xInputBitmap->getSize()));
// normalize bitcount
- nDepth =
+ nDepth =
( nDepth <= 1 ) ? 1 :
( nDepth <= 4 ) ? 4 :
- ( nDepth <= 8 ) ? 8 : 24;
+ ( nDepth <= 8 ) ? 8 : 24;
::Bitmap aBitmap( aPixelSize,
sal::static_int_cast<USHORT>(nDepth),
aLayout.Palette.is() ? &aPalette : NULL );
::Bitmap aAlpha;
if( nAlphaDepth )
- aAlpha = ::Bitmap( aPixelSize,
+ aAlpha = ::Bitmap( aPixelSize,
sal::static_int_cast<USHORT>(nAlphaDepth),
&::Bitmap::GetGreyPalette(
sal::static_int_cast<USHORT>(1L << nAlphaDepth)) );
- { // limit scoped access
+ { // limit scoped access
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
aBitmap );
ScopedBitmapWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
@@ -446,7 +446,7 @@ namespace vcl
if( !readBmp(nWidth,nHeight,aLayout,xInputBitmap,
pWriteAccess,pAlphaWriteAccess) )
continue;
- } // limit scoped access
+ } // limit scoped access
if( nAlphaDepth )
return ::BitmapEx( aBitmap,
@@ -638,8 +638,8 @@ namespace vcl
{
return uno::Sequence< beans::PropertyValue >();
}
- virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
- const uno::Reference< rendering::XColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,
+ virtual uno::Sequence< double > SAL_CALL convertColorSpace( const uno::Sequence< double >& deviceColor,
+ const uno::Reference< rendering::XColorSpace >& targetColorSpace ) throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
// TODO(P3): if we know anything about target
@@ -652,7 +652,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -669,7 +669,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -686,7 +686,7 @@ namespace vcl
{
const double* pIn( deviceColor.getConstArray() );
const sal_Size nLen( deviceColor.getLength() );
- ENSURE_ARG_OR_THROW2(nLen%4==0,
+ ENSURE_ARG_OR_THROW2(nLen%4==0,
"number of channels no multiple of 4",
static_cast<rendering::XColorSpace*>(this), 0);
@@ -785,7 +785,7 @@ namespace vcl
return aRet;
}
- Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
+ Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
{
ENSURE_ARG_OR_THROW( rColor.getLength() == 4,
"color must have 4 channels" );
@@ -801,7 +801,7 @@ namespace vcl
return aColor;
}
- uno::Sequence< double > VCL_DLLPUBLIC colorToDoubleSequence(
+ uno::Sequence< double > VCL_DLLPUBLIC colorToDoubleSequence(
const Color& rColor,
const uno::Reference< rendering::XColorSpace >& xColorSpace )
{
@@ -815,7 +815,7 @@ namespace vcl
return xColorSpace->convertFromARGB(aSeq);
}
- Color VCL_DLLPUBLIC doubleSequenceToColor(
+ Color VCL_DLLPUBLIC doubleSequenceToColor(
const uno::Sequence< double > rColor,
const uno::Reference< rendering::XColorSpace >& xColorSpace )
{
diff --git a/vcl/source/helper/evntpost.cxx b/vcl/source/helper/evntpost.cxx
index 9e200a3136c3..ee86cbfe46c2 100644
--- a/vcl/source/helper/evntpost.cxx
+++ b/vcl/source/helper/evntpost.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 7b244781c3c7..03f84d0072c9 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -98,7 +98,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
DBG_ASSERT( ! pSVData->mbDeInit, "DeleteOnDeinit added after DeiInitVCL !" );
if( pSVData->mbDeInit )
return;
-
+
if( pSVData->mpDeinitDeleteList == NULL )
pSVData->mpDeinitDeleteList = new std::list< DeleteOnDeinitBase* >();
pSVData->mpDeinitDeleteList->push_back( i_pContainer );
@@ -106,7 +106,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
void DeleteOnDeinitBase::ImplDeleteOnDeInit()
{
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
if( pSVData->mpDeinitDeleteList )
{
for( std::list< vcl::DeleteOnDeinitBase* >::iterator it = pSVData->mpDeinitDeleteList->begin();
diff --git a/vcl/source/helper/smartid.cxx b/vcl/source/helper/smartid.cxx
index c367aeb2bce5..dfa3f0eaf888 100755
--- a/vcl/source/helper/smartid.cxx
+++ b/vcl/source/helper/smartid.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -226,7 +226,7 @@ BOOL SmartId::Matches( const SmartId &rId ) const
return FALSE;
else if ( HasString() && rId.HasString() )
return Matches( rId.GetStr() );
- else
+ else
return rId.HasNumeric() && Matches( rId.GetNum() );
}
@@ -239,7 +239,7 @@ BOOL SmartId::Equals( const SmartId &rId ) const
&& mpData->bHasNumericId == rId.mpData->bHasNumericId;
else if ( !mpData && !rId.mpData )
return TRUE;
- else
+ else
return FALSE;
}
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index db622073cea9..9dfe9e768ef4 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,12 +126,12 @@ String GetCommandLineToken( int nToken, const String& rLine )
int nLen = rLine.Len();
if( ! nLen )
return String();
-
+
int nActualToken = 0;
sal_Unicode* pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*( nLen + 1 ) );
const sal_Unicode* pRun = rLine.GetBuffer();
sal_Unicode* pLeap = NULL;
-
+
while( *pRun && nActualToken <= nToken )
{
while( *pRun && isSpace( *pRun ) )
@@ -167,7 +167,7 @@ String GetCommandLineToken( int nToken, const String& rLine )
}
*pLeap = 0;
-
+
String aRet( pBuffer );
return aRet;
}
@@ -177,12 +177,12 @@ ByteString GetCommandLineToken( int nToken, const ByteString& rLine )
int nLen = rLine.Len();
if( ! nLen )
return ByteString();
-
+
int nActualToken = 0;
char* pBuffer = (char*)alloca( nLen + 1 );
const char* pRun = rLine.GetBuffer();
char* pLeap = NULL;
-
+
while( *pRun && nActualToken <= nToken )
{
while( *pRun && isSpace( *pRun ) )
@@ -218,7 +218,7 @@ ByteString GetCommandLineToken( int nToken, const ByteString& rLine )
}
*pLeap = 0;
-
+
ByteString aRet( pBuffer );
return aRet;
}
@@ -227,10 +227,10 @@ int GetCommandLineTokenCount( const String& rLine )
{
if( ! rLine.Len() )
return 0;
-
+
int nTokenCount = 0;
const sal_Unicode *pRun = rLine.GetBuffer();
-
+
while( *pRun )
{
@@ -270,7 +270,7 @@ int GetCommandLineTokenCount( const String& rLine )
}
nTokenCount++;
}
-
+
return nTokenCount;
}
@@ -278,10 +278,10 @@ int GetCommandLineTokenCount( const ByteString& rLine )
{
if( ! rLine.Len() )
return 0;
-
+
int nTokenCount = 0;
const char *pRun = rLine.GetBuffer();
-
+
while( *pRun )
{
@@ -321,7 +321,7 @@ int GetCommandLineTokenCount( const ByteString& rLine )
}
nTokenCount++;
}
-
+
return nTokenCount;
}
@@ -330,7 +330,7 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
int nLen = rLine.Len();
if( ! nLen )
return String();
-
+
sal_Unicode *pBuffer = (sal_Unicode*)alloca( sizeof(sal_Unicode)*(nLen + 1) );
const sal_Unicode *pRun = rLine.GetBuffer();
sal_Unicode *pLeap = pBuffer;
@@ -379,7 +379,7 @@ String WhitespaceToSpace( const String& rLine, BOOL bProtect )
*pLeap = 0;
String aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer );
- return aRet;
+ return aRet;
}
ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
@@ -387,7 +387,7 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
int nLen = rLine.Len();
if( ! nLen )
return ByteString();
-
+
char *pBuffer = (char*)alloca( nLen + 1 );
const char *pRun = rLine.GetBuffer();
char *pLeap = pBuffer;
@@ -436,7 +436,7 @@ ByteString WhitespaceToSpace( const ByteString& rLine, BOOL bProtect )
*pLeap = 0;
ByteString aRet( *pBuffer == ' ' ? pBuffer+1 : pBuffer );
- return aRet;
+ return aRet;
}
} // namespace
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 133b19aa0538..710f1b77f3f9 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index caf7ee237d67..9a3f9c5690b6 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@ namespace vcl
{
mnReleased = Application::ReleaseSolarMutex();
}
-
+
~SolarMutexReleaser()
{
if( mnReleased )
@@ -128,7 +128,7 @@ Any SAL_CALL DisplayConnection::getIdentifier() throw()
void DisplayConnection::dispatchDowningEvent()
{
SolarMutexReleaser aRel;
-
+
MutexGuard aGuard( m_aMutex );
Any aEvent;
std::list< Reference< XEventHandler > > aLocalList( m_aHandlers );
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index c2e3af01635a..39a59f241807 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index 6d2360dae6cb..99579f00b107 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,13 +103,13 @@ SV_BUTTONHELPTEXT_MORE
};
Finnische-Texte:
-OK OK
-CANCEL Peruuta
-HELP ~Ohje
-MORE ~Enemmän
-YES ~Kyllä
-NO ~Ei
-RETRY ~Yritäuudelleen
+OK OK
+CANCEL Peruuta
+HELP ~Ohje
+MORE ~Enemmän
+YES ~Kyllä
+NO ~Ei
+RETRY ~Yritäuudelleen
*/
diff --git a/vcl/source/src/helptext.src b/vcl/source/src/helptext.src
index a42a9531d9ee..327266c13b50 100644
--- a/vcl/source/src/helptext.src
+++ b/vcl/source/src/helptext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index fdb1e755c86a..20ba1cbd3dd0 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/src/menu.src b/vcl/source/src/menu.src
index 1833093adfac..f4e59c1c8030 100644
--- a/vcl/source/src/menu.src
+++ b/vcl/source/src/menu.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,46 +36,46 @@ String SV_RESID_STRING_NOSELECTIONPOSSIBLE
Menu SV_RESID_MENU_EDIT
{
- ItemList =
+ ItemList =
{
MenuItem
{
- Identifier = SV_MENU_EDIT_UNDO ;
+ Identifier = SV_MENU_EDIT_UNDO ;
Text [ en-US ] = "~Undo" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
- Identifier = SV_MENU_EDIT_CUT ;
+ Identifier = SV_MENU_EDIT_CUT ;
Text [ en-US ] = "Cu~t" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_COPY ;
+ Identifier = SV_MENU_EDIT_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_PASTE ;
+ Identifier = SV_MENU_EDIT_PASTE ;
Text [ en-US ] = "~Paste" ;
};
MenuItem
{
- Identifier = SV_MENU_EDIT_DELETE ;
+ Identifier = SV_MENU_EDIT_DELETE ;
Text [ en-US ] = "~Delete" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
- Identifier = SV_MENU_EDIT_SELECTALL ;
+ Identifier = SV_MENU_EDIT_SELECTALL ;
Text [ en-US ] = "Select ~All" ;
};
- MenuItem { Separator = TRUE ; };
+ MenuItem { Separator = TRUE ; };
MenuItem
{
Identifier = SV_MENU_EDIT_INSERTSYMBOL;
Text [ en-US ] = "~Special Character...";
-
+
};
};
};
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 58f0a477c848..34519022560b 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,9 +35,9 @@ ModalDialog SV_DLG_PRINT
Moveable = TRUE;
Maxable = TRUE;
SVLook = TRUE;
-
+
Size = MAP_APPFONT( 350, 215 );
-
+
OKButton SV_PRINT_OK
{
DefButton = TRUE;
@@ -55,7 +55,7 @@ ModalDialog SV_DLG_PRINT
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 50, 15 );
};
-
+
Window SV_PRINT_PAGE_PREVIEW
{
Pos = MAP_APPFONT( 5, 5 );
@@ -114,7 +114,7 @@ ModalDialog SV_DLG_PRINT
{
Text [en-US] = "Default printer";
};
-
+
String SV_PRINT_PRINTPREVIEW_TXT
{
@@ -125,7 +125,7 @@ ModalDialog SV_DLG_PRINT
{
Text [en-US] = "Page Layout";
Hide = TRUE;
-
+
FixedLine SV_PRINT_PRT_NUP_LAYOUT_FL
{
Pos = MAP_APPFONT( 5, 5 );
@@ -300,12 +300,12 @@ ModalDialog SV_DLG_PRINT
HelpText [en-US] = "Check to draw a border around each page.";
};
};
-
+
TabPage SV_PRINT_TAB_JOB
{
Text [en-US] = "General";
Hide = TRUE;
-
+
FixedLine SV_PRINT_PRINTERS_FL
{
Pos = MAP_APPFONT( 5, 5 );
@@ -387,22 +387,22 @@ ModalDialog SV_DLG_PRINT
Text [en-US] = "Collate";
HelpText [en-US] = "Select whether copies should be collated or not.";
};
-
+
Image SV_PRINT_COLLATE_IMG
{
ImageBitmap = Bitmap { File = "collate.png" ; };
};
-
+
Image SV_PRINT_NOCOLLATE_IMG
{
ImageBitmap = Bitmap { File = "ncollate.png" ; };
};
-
+
Image SV_PRINT_COLLATE_HC_IMG
{
ImageBitmap = Bitmap { File = "collate_h.png" ; };
};
-
+
Image SV_PRINT_NOCOLLATE_HC_IMG
{
ImageBitmap = Bitmap { File = "ncollate_h.png" ; };
@@ -440,7 +440,7 @@ ModalDialog SV_DLG_PRINT
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "Print in ~reverse page order";
HelpText [en-US] = "Check to print pages in reverse order.";
- };
+ };
};
};
@@ -451,9 +451,9 @@ ModelessDialog SV_DLG_PRINT_PROGRESS
Sizeable = FALSE;
Moveable = TRUE;
SVLook = TRUE;
-
+
Size = MAP_APPFONT( 120, 70 );
-
+
CancelButton SV_PRINT_PROGRESS_CANCEL
{
Pos = MAP_APPFONT( 35, 50 );
diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 2c6574220a5f..90787a620e14 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/src/units.src b/vcl/source/src/units.src
index 16b40b3f41a3..aff92ad105b5 100644
--- a/vcl/source/src/units.src
+++ b/vcl/source/src/units.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,6 +30,7 @@
#include <vcl/svids.hrc>
#endif
+// Amelia : adds two units , 'ch' and 'line'
StringArray SV_FUNIT_STRINGS
{
ItemList [ en-US ] =
@@ -51,6 +52,8 @@ StringArray SV_FUNIT_STRINGS
< "feet" ; FUNIT_FOOT ; > ;
< "miles" ; FUNIT_MILE ; > ;
< "mile" ; FUNIT_MILE ; > ;
+ < "ch" ; FUNIT_CHAR ; > ;
+ < "line" ; FUNIT_LINE ; > ;
< "%" ; FUNIT_PERCENT ; > ;
};
};
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 7f00b73b0808..d0323939b35a 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index 3018236fff1a..49ca3aca9716 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,15 +46,15 @@
DECLARE_TABLE( ImplAccelTable, ImplAccelEntry* )
DECLARE_LIST( ImplAccelList, ImplAccelEntry* )
-#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF)
+#define ACCELENTRY_NOTFOUND ((USHORT)0xFFFF)
// =======================================================================
class ImplAccelData
{
public:
- ImplAccelTable maKeyTable; // Fuer KeyCodes, die mit einem Code erzeugt wurden
- ImplAccelList maIdList; // Id-List
+ ImplAccelTable maKeyTable; // Fuer KeyCodes, die mit einem Code erzeugt wurden
+ ImplAccelList maIdList; // Id-List
};
// =======================================================================
@@ -66,11 +66,11 @@ DBG_NAME( Accelerator )
USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
USHORT* pIndex = NULL )
{
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCount = pList->Count();
- USHORT nCompareId;
+ ULONG nLow;
+ ULONG nHigh;
+ ULONG nMid;
+ ULONG nCount = pList->Count();
+ USHORT nCompareId;
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
if ( !nCount || (nId < pList->GetObject( 0 )->mnId) )
@@ -114,8 +114,8 @@ USHORT ImplAccelEntryGetIndex( ImplAccelList* pList, USHORT nId,
static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
{
- USHORT nInsIndex;
- USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
+ USHORT nInsIndex;
+ USHORT nIndex = ImplAccelEntryGetIndex( pList, pEntry->mnId, &nInsIndex );
if ( nIndex != ACCELENTRY_NOTFOUND )
{
@@ -159,10 +159,10 @@ static USHORT ImplAccelEntryGetFirstPos( ImplAccelList* pList, USHORT nId )
void Accelerator::ImplInit()
{
- mnCurId = 0;
- mnCurRepeat = 0;
- mbIsCancel = FALSE;
- mpDel = NULL;
+ mnCurId = 0;
+ mnCurRepeat = 0;
+ mbIsCancel = FALSE;
+ mpDel = NULL;
}
// -----------------------------------------------------------------------
@@ -248,12 +248,12 @@ void Accelerator::ImplInsertAccel( USHORT nItemId, const KeyCode& rKeyCode,
}
// Neuen Eintrag holen und fuellen
- ImplAccelEntry* pEntry = new ImplAccelEntry;
- pEntry->mnId = nItemId;
- pEntry->maKeyCode = rKeyCode;
- pEntry->mpAccel = pAutoAccel;
- pEntry->mpAutoAccel = pAutoAccel;
- pEntry->mbEnabled = bEnable;
+ ImplAccelEntry* pEntry = new ImplAccelEntry;
+ pEntry->mnId = nItemId;
+ pEntry->maKeyCode = rKeyCode;
+ pEntry->mpAccel = pAutoAccel;
+ pEntry->mpAutoAccel = pAutoAccel;
+ pEntry->mbEnabled = bEnable;
// Ab in die Tabellen
ULONG nCode = rKeyCode.GetFullKeyCode();
@@ -372,16 +372,16 @@ void Accelerator::InsertItem( const ResId& rResId )
{
DBG_CHKTHIS( Accelerator, NULL );
- ULONG nObjMask;
- USHORT nAccelKeyId;
- USHORT bDisable;
- KeyCode aKeyCode;
- Accelerator* pAutoAccel = NULL;
+ ULONG nObjMask;
+ USHORT nAccelKeyId;
+ USHORT bDisable;
+ KeyCode aKeyCode;
+ Accelerator* pAutoAccel = NULL;
GetRes( rResId.SetRT( RSC_ACCELITEM ) );
- nObjMask = ReadLongRes();
- nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes());
- bDisable = ReadShortRes();
+ nObjMask = ReadLongRes();
+ nAccelKeyId = sal::static_int_cast<USHORT>(ReadLongRes());
+ bDisable = ReadShortRes();
if ( nObjMask & ACCELITEM_KEY )
{
@@ -568,16 +568,16 @@ BOOL Accelerator::Call( const KeyCode& rKeyCode, USHORT nRepeat )
if ( pEntry->mbEnabled )
{
BOOL bDel = FALSE;
- mnCurId = pEntry->mnId;
- maCurKeyCode = rKeyCode;
- mnCurRepeat = nRepeat;
- mpDel = &bDel;
+ mnCurId = pEntry->mnId;
+ maCurKeyCode = rKeyCode;
+ mnCurRepeat = nRepeat;
+ mpDel = &bDel;
Select();
if ( !bDel )
{
- mnCurId = 0;
- maCurKeyCode = KeyCode();
- mnCurRepeat = 0;
+ mnCurId = 0;
+ maCurKeyCode = KeyCode();
+ mnCurRepeat = 0;
}
return TRUE;
@@ -715,11 +715,11 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel )
DBG_CHKOBJ( &rAccel, Accelerator, NULL );
// Neue Daten zuweisen
- maHelpStr = rAccel.maHelpStr;
- maCurKeyCode = KeyCode();
- mnCurId = 0;
- mnCurRepeat = 0;
- mbIsCancel = FALSE;
+ maHelpStr = rAccel.maHelpStr;
+ maCurKeyCode = KeyCode();
+ mnCurId = 0;
+ mnCurRepeat = 0;
+ mbIsCancel = FALSE;
// Tabellen loeschen und kopieren
ImplDeleteData();
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index 81699bcaabb0..cb302296bdce 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel )
//e.g. #i90599#. Someone starts typing a sequence in a dialog, but doesn't
//end it, and then closes the dialog, deleting the accelerators. So if
//we're removing an accelerator that a sub-accelerator which is in the
- //sequence list, throw away the entire sequence
+ //sequence list, throw away the entire sequence
if ( mpSequenceList )
{
for (USHORT i = 0; i < pAccel->GetItemCount(); ++i)
diff --git a/vcl/source/window/arrange.cxx b/vcl/source/window/arrange.cxx
index dad48235f8fb..b110177d10e5 100644
--- a/vcl/source/window/arrange.cxx
+++ b/vcl/source/window/arrange.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@ void WindowArranger::setParent( WindowArranger* i_pParent )
void WindowArranger::setParentWindow( Window* i_pNewParent )
{
m_pParentWindow = i_pNewParent;
-
+
size_t nEle = countElements();
for( size_t i = 0; i < nEle; i++ )
{
@@ -167,7 +167,7 @@ Size WindowArranger::Element::getOptimalSize( WindowSizeType i_eType ) const
aResult.Width() += m_nLeftBorder + m_nRightBorder;
aResult.Height() += m_nTopBorder + m_nBottomBorder;
}
-
+
return aResult;
}
@@ -236,7 +236,7 @@ Size RowOrColumn::getOptimalSize( WindowSizeType i_eType ) const
aRet.Height() -= m_nBorderWidth;
else
aRet.Width() -= m_nBorderWidth;
-
+
// add the outer border
aRet.Width() += 2*m_nOuterBorder;
aRet.Height() += 2*m_nOuterBorder;
@@ -267,7 +267,7 @@ void RowOrColumn::distributeRowWidth( std::vector<Size>& io_rSizes, long /*i_nUs
aIndices.push_back( i );
}
}
-
+
// distribute extra space evenly among collected elements
nElements = aIndices.size();
if( nElements > 0 )
@@ -307,7 +307,7 @@ void RowOrColumn::distributeColumnHeight( std::vector<Size>& io_rSizes, long /*i
aIndices.push_back( i );
}
}
-
+
// distribute extra space evenly among collected elements
nElements = aIndices.size();
if( nElements > 0 )
@@ -497,7 +497,7 @@ void LabeledElement::resize()
Size aElementSize( m_aElement.getOptimalSize( WINDOWSIZE_PREFERRED ) );
if( m_nDistance + aLabelSize.Width() + aElementSize.Width() > m_aManagedArea.GetWidth() )
aElementSize = m_aElement.getOptimalSize( WINDOWSIZE_MINIMUM );
-
+
// align label and element vertically in LabeledElement
long nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aLabelSize.Height()) / 2;
Point aPos( m_aManagedArea.Left(),
@@ -506,13 +506,13 @@ void LabeledElement::resize()
if( m_nLabelColumnWidth != 0 )
aSize.Width() = m_nLabelColumnWidth;
m_aLabel.setPosSize( aPos, aSize );
-
+
aPos.X() += aSize.Width() + m_nDistance;
nYOff = (m_aManagedArea.GetHeight() - 2*m_nOuterBorder - aElementSize.Height()) / 2;
aPos.Y() = m_aManagedArea.Top() + m_nOuterBorder + nYOff;
aSize.Width() = aElementSize.Width();
aSize.Height() = m_aManagedArea.GetHeight() - 2*m_nOuterBorder;
-
+
// label style
// 0: position left and right
// 1: keep the element close to label and grow it
@@ -591,7 +591,7 @@ Size LabelColumn::getOptimalSize( WindowSizeType i_eType ) const
{
long nWidth = getLabelWidth();
Size aColumnSize;
-
+
// every child is a LabeledElement
size_t nEle = countElements();
for( size_t i = 0; i < nEle; i++ )
@@ -628,7 +628,7 @@ Size LabelColumn::getOptimalSize( WindowSizeType i_eType ) const
}
if( aElementSize.Height() )
{
- aColumnSize.Height() += getBorderWidth() + aElementSize.Height();
+ aColumnSize.Height() += getBorderWidth() + aElementSize.Height();
}
}
if( nEle > 0 && aColumnSize.Height() )
@@ -731,7 +731,7 @@ MatrixArranger::~MatrixArranger()
Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>& o_rColumnWidths, std::vector<long>& o_rRowHeights ) const
{
Size aMatrixSize( 2*m_nOuterBorder, 2*m_nOuterBorder );
-
+
// first find out the current number of rows and columns
sal_uInt32 nRows = 0, nColumns = 0;
for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
@@ -742,11 +742,11 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
if( it->m_nY >= nRows )
nRows = it->m_nY+1;
}
-
+
// now allocate row and column depth vectors
o_rColumnWidths = std::vector< long >( nColumns, 0 );
o_rRowHeights = std::vector< long >( nRows, 0 );
-
+
// get sizes an allocate them into rows/columns
for( std::vector< MatrixElement >::const_iterator it = m_aElements.begin();
it != m_aElements.end(); ++it )
@@ -757,18 +757,18 @@ Size MatrixArranger::getOptimalSize( WindowSizeType i_eType, std::vector<long>&
if( aSize.Height() > o_rRowHeights[ it->m_nY ] )
o_rRowHeights[ it->m_nY ] = aSize.Height();
}
-
+
// add up sizes
for( sal_uInt32 i = 0; i < nColumns; i++ )
aMatrixSize.Width() += o_rColumnWidths[i] + m_nBorderX;
if( nColumns > 0 )
aMatrixSize.Width() -= m_nBorderX;
-
+
for( sal_uInt32 i = 0; i < nRows; i++ )
aMatrixSize.Height() += o_rRowHeights[i] + m_nBorderY;
if( nRows > 0 )
aMatrixSize.Height() -= m_nBorderY;
-
+
return aMatrixSize;
}
@@ -783,7 +783,7 @@ void MatrixArranger::resize()
// assure that we have at least one row and column
if( m_aElements.empty() )
return;
-
+
// check if we can get optimal size, else fallback to minimal size
std::vector<long> aColumnWidths, aRowHeights;
Size aOptSize( getOptimalSize( WINDOWSIZE_PREFERRED, aColumnWidths, aRowHeights ) );
@@ -797,20 +797,20 @@ void MatrixArranger::resize()
if( aOptSize.Width() > m_aManagedArea.GetWidth() )
aColumnWidths = aMinColumnWidths;
}
-
+
// FIXME: distribute extra space available
-
+
// prepare offsets
std::vector<long> aColumnX( aColumnWidths.size() );
aColumnX[0] = m_aManagedArea.Left() + m_nOuterBorder;
for( size_t i = 1; i < aColumnX.size(); i++ )
aColumnX[i] = aColumnX[i-1] + aColumnWidths[i-1] + m_nBorderX;
-
+
std::vector<long> aRowY( aRowHeights.size() );
aRowY[0] = m_aManagedArea.Top() + m_nOuterBorder;
for( size_t i = 1; i < aRowY.size(); i++ )
aRowY[i] = aRowY[i-1] + aRowHeights[i-1] + m_nBorderY;
-
+
// now iterate over the elements and assign their positions
for( std::vector< MatrixElement >::iterator it = m_aElements.begin();
it != m_aElements.end(); ++it )
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index b221d1f7d928..cb43ab822268 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -104,10 +104,10 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect )
// Zwischen dem Symbol und dem Button-Rand lassen wir 5% Platz
long nExtraWidth = ((rRect.GetWidth()*50)+500)/1000;
long nExtraHeight = ((rRect.GetHeight()*50)+500)/1000;
- rRect.Left() += nExtraWidth;
- rRect.Right() -= nExtraWidth;
- rRect.Top() += nExtraHeight;
- rRect.Bottom() -= nExtraHeight;
+ rRect.Left() += nExtraWidth;
+ rRect.Right() -= nExtraWidth;
+ rRect.Top() += nExtraHeight;
+ rRect.Bottom() -= nExtraHeight;
}
// -----------------------------------------------------------------------
@@ -116,8 +116,8 @@ static void ImplDrawBrdWinSymbol( OutputDevice* pDev,
const Rectangle& rRect, SymbolType eSymbol )
{
// Zwischen dem Symbol und dem Button lassen wir 5% Platz
- DecorationView aDecoView( pDev );
- Rectangle aTempRect = rRect;
+ DecorationView aDecoView( pDev );
+ Rectangle aTempRect = rRect;
Window::ImplCalcSymbolRect( aTempRect );
aDecoView.DrawSymbol( aTempRect, eSymbol,
pDev->GetSettings().GetStyleSettings().GetButtonTextColor(), 0 );
@@ -211,10 +211,10 @@ void ImplBorderWindowView::ImplInitTitle( ImplBorderFrameData* pData )
{
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
- if ( !(pBorderWindow->GetStyle() & WB_MOVEABLE) ||
+ if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) ||
(pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
{
- pData->mnTitleType = BORDERWINDOW_TITLE_NONE;
+ pData->mnTitleType = BORDERWINDOW_TITLE_NONE;
pData->mnTitleHeight = 0;
}
else
@@ -276,7 +276,7 @@ USHORT ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const Poin
// no corner resize for floating toolbars, which would lead to jumps while formatting
// setting nSizeWidth = 0 will only return pure left,top,right,bottom
- if( pBorderWindow->GetStyle() & WB_OWNERDRAWDECORATION )
+ if( pBorderWindow->GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP) )
nSizeWidth = 0;
if ( rPos.X() < pData->mnLeftBorder )
@@ -426,10 +426,10 @@ BOOL ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, cons
{
if ( bTracking )
{
- Point aPos = pBorderWindow->GetPosPixel();
- Size aSize = pBorderWindow->GetOutputSizePixel();
- pData->mnTrackX = aPos.X();
- pData->mnTrackY = aPos.Y();
+ Point aPos = pBorderWindow->GetPosPixel();
+ Size aSize = pBorderWindow->GetOutputSizePixel();
+ pData->mnTrackX = aPos.X();
+ pData->mnTrackY = aPos.Y();
pData->mnTrackWidth = aSize.Width();
pData->mnTrackHeight = aSize.Height();
@@ -782,8 +782,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
{
/*
// adjusting mousepos not required, we allow the whole screen (no desktop anymore...)
- Point aFrameMousePos = pBorderWindow->ImplOutputToFrame( aMousePos );
- Size aFrameSize = pBorderWindow->ImplGetFrameWindow()->GetOutputSizePixel();
+ Point aFrameMousePos = pBorderWindow->ImplOutputToFrame( aMousePos );
+ Size aFrameSize = pBorderWindow->ImplGetFrameWindow()->GetOutputSizePixel();
if ( aFrameMousePos.X() < 0 )
aFrameMousePos.X() = 0;
if ( aFrameMousePos.Y() < 0 )
@@ -795,8 +795,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
aMousePos = pBorderWindow->ImplFrameToOutput( aFrameMousePos );
*/
- aMousePos.X() -= pData->maMouseOff.X();
- aMousePos.Y() -= pData->maMouseOff.Y();
+ aMousePos.X() -= pData->maMouseOff.X();
+ aMousePos.Y() -= pData->maMouseOff.Y();
if ( pData->mnHitTest & BORDERWINDOW_HITTEST_TITLE )
{
@@ -820,18 +820,18 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
else
{
- Point aOldPos = pBorderWindow->GetPosPixel();
- Size aSize = pBorderWindow->GetSizePixel();
- Rectangle aNewRect( aOldPos, aSize );
- long nOldWidth = aSize.Width();
- long nOldHeight = aSize.Height();
- long nBorderWidth = pData->mnLeftBorder+pData->mnRightBorder;
- long nBorderHeight = pData->mnTopBorder+pData->mnBottomBorder;
- long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
- long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
- long nMinWidth2 = nBorderWidth;
- long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
- long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
+ Point aOldPos = pBorderWindow->GetPosPixel();
+ Size aSize = pBorderWindow->GetSizePixel();
+ Rectangle aNewRect( aOldPos, aSize );
+ long nOldWidth = aSize.Width();
+ long nOldHeight = aSize.Height();
+ long nBorderWidth = pData->mnLeftBorder+pData->mnRightBorder;
+ long nBorderHeight = pData->mnTopBorder+pData->mnBottomBorder;
+ long nMinWidth = pBorderWindow->mnMinWidth+nBorderWidth;
+ long nMinHeight = pBorderWindow->mnMinHeight+nBorderHeight;
+ long nMinWidth2 = nBorderWidth;
+ long nMaxWidth = pBorderWindow->mnMaxWidth+nBorderWidth;
+ long nMaxHeight = pBorderWindow->mnMaxHeight+nBorderHeight;
if ( pData->mnTitleHeight )
{
@@ -880,11 +880,11 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
{
// adjust size for Resizing-call
aSize = aNewRect.GetSize();
- aSize.Width() -= nBorderWidth;
- aSize.Height() -= nBorderHeight;
+ aSize.Width() -= nBorderWidth;
+ aSize.Height() -= nBorderHeight;
((SystemWindow*)pBorderWindow->ImplGetClientWindow())->Resizing( aSize );
- aSize.Width() += nBorderWidth;
- aSize.Height() += nBorderHeight;
+ aSize.Width() += nBorderWidth;
+ aSize.Height() += nBorderHeight;
if ( aSize.Width() < nMinWidth )
aSize.Width() = nMinWidth;
if ( aSize.Height() < nMinHeight )
@@ -922,8 +922,8 @@ BOOL ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
}
else
{
- pData->mnTrackX = aNewRect.Left();
- pData->mnTrackY = aNewRect.Top();
+ pData->mnTrackX = aNewRect.Left();
+ pData->mnTrackY = aNewRect.Top();
pData->mnTrackWidth = aNewRect.GetWidth();
pData->mnTrackHeight = aNewRect.GetHeight();
pBorderWindow->ShowTracking( Rectangle( pBorderWindow->ScreenToOutputPixel( aNewRect.TopLeft() ), aNewRect.GetSize() ), SHOWTRACK_BIG );
@@ -948,8 +948,8 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
{
if ( nHitTest & BORDERWINDOW_HITTEST_CLOSE )
{
- nHelpId = SV_HELPTEXT_CLOSE;
- rHelpRect = pData->maCloseRect;
+ nHelpId = SV_HELPTEXT_CLOSE;
+ rHelpRect = pData->maCloseRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_ROLL )
{
@@ -957,33 +957,33 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
nHelpId = SV_HELPTEXT_ROLLDOWN;
else
nHelpId = SV_HELPTEXT_ROLLUP;
- rHelpRect = pData->maRollRect;
+ rHelpRect = pData->maRollRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_DOCK )
{
- nHelpId = SV_HELPTEXT_MAXIMIZE;
- rHelpRect = pData->maDockRect;
+ nHelpId = SV_HELPTEXT_MAXIMIZE;
+ rHelpRect = pData->maDockRect;
}
/* no help string available
else if ( nHitTest & BORDERWINDOW_HITTEST_MENU )
{
- nHelpId = SV_HELPTEXT_MENU;
- rHelpRect = pData->maMenuRect;
+ nHelpId = SV_HELPTEXT_MENU;
+ rHelpRect = pData->maMenuRect;
}*/
else if ( nHitTest & BORDERWINDOW_HITTEST_HIDE )
{
- nHelpId = SV_HELPTEXT_MINIMIZE;
- rHelpRect = pData->maHideRect;
+ nHelpId = SV_HELPTEXT_MINIMIZE;
+ rHelpRect = pData->maHideRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_HELP )
{
- nHelpId = SV_HELPTEXT_HELP;
- rHelpRect = pData->maHelpRect;
+ nHelpId = SV_HELPTEXT_HELP;
+ rHelpRect = pData->maHelpRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_PIN )
{
- nHelpId = SV_HELPTEXT_ALWAYSVISIBLE;
- rHelpRect = pData->maPinRect;
+ nHelpId = SV_HELPTEXT_ALWAYSVISIBLE;
+ rHelpRect = pData->maPinRect;
}
else if ( nHitTest & BORDERWINDOW_HITTEST_TITLE )
{
@@ -992,7 +992,7 @@ String ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData* pData,
// tooltip only if title truncated
if( pData->mbTitleClipped )
{
- rHelpRect = pData->maTitleRect;
+ rHelpRect = pData->maTitleRect;
// no help id, use window title as help string
aHelpStr = pData->mpBorderWindow->GetText();
}
@@ -1048,10 +1048,10 @@ void ImplNoBorderWindowView::Init( OutputDevice*, long, long )
void ImplNoBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = 0;
- rTopBorder = 0;
- rRightBorder = 0;
- rBottomBorder = 0;
+ rLeftBorder = 0;
+ rTopBorder = 0;
+ rRightBorder = 0;
+ rBottomBorder = 0;
}
// -----------------------------------------------------------------------
@@ -1084,18 +1084,18 @@ ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderW
void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
{
- mpOutDev = pDev;
- mnWidth = nWidth;
- mnHeight = nHeight;
+ mpOutDev = pDev;
+ mnWidth = nWidth;
+ mnHeight = nHeight;
mbNWFBorder = false;
USHORT nBorderStyle = mpBorderWindow->GetBorderStyle();
if ( nBorderStyle & WINDOW_BORDER_NOBORDER )
{
- mnLeftBorder = 0;
- mnTopBorder = 0;
- mnRightBorder = 0;
- mnBottomBorder = 0;
+ mnLeftBorder = 0;
+ mnTopBorder = 0;
+ mnRightBorder = 0;
+ mnBottomBorder = 0;
}
else
{
@@ -1108,7 +1108,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
Window *pWin = NULL, *pCtrl = NULL;
if( mpOutDev->GetOutDevType() == OUTDEV_WINDOW )
pWin = (Window*) mpOutDev;
-
+
ControlType aCtrlType = 0;
if( pWin && (pCtrl = mpBorderWindow->GetWindow( WINDOW_CLIENT )) != NULL )
{
@@ -1164,18 +1164,18 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mnBottomBorder = aBounds.Bottom() - aContent.Bottom();
if( mnWidth && mnHeight )
{
-
+
mpBorderWindow->SetPaintTransparent( TRUE );
mpBorderWindow->SetBackground();
pCtrl->SetPaintTransparent( TRUE );
-
+
Window* pCompoundParent = NULL;
if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() )
pCompoundParent = pWin->GetParent();
-
+
if( pCompoundParent )
pCompoundParent->SetPaintTransparent( TRUE );
-
+
if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() )
{
if( ! pCompoundParent ) // compound controls have to fix themselves
@@ -1194,7 +1194,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mbNWFBorder = false;
}
}
-
+
if( ! mbNWFBorder )
{
USHORT nStyle = FRAME_DRAW_NODRAW;
@@ -1206,14 +1206,14 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
nStyle |= FRAME_DRAW_DOUBLEIN;
if ( nBorderStyle & WINDOW_BORDER_MONO )
nStyle |= FRAME_DRAW_MONO;
-
- DecorationView aDecoView( mpOutDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle );
- mnLeftBorder = aCalcRect.Left();
- mnTopBorder = aCalcRect.Top();
- mnRightBorder = aRect.Right()-aCalcRect.Right();
- mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
+
+ DecorationView aDecoView( mpOutDev );
+ Rectangle aRect( 0, 0, 10, 10 );
+ Rectangle aCalcRect = aDecoView.DrawFrame( aRect, nStyle );
+ mnLeftBorder = aCalcRect.Left();
+ mnTopBorder = aCalcRect.Top();
+ mnRightBorder = aRect.Right()-aCalcRect.Right();
+ mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
}
}
}
@@ -1223,10 +1223,10 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
void ImplSmallBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = mnLeftBorder;
- rTopBorder = mnTopBorder;
- rRightBorder = mnRightBorder;
- rBottomBorder = mnBottomBorder;
+ rLeftBorder = mnLeftBorder;
+ rTopBorder = mnTopBorder;
+ rRightBorder = mnRightBorder;
+ rBottomBorder = mnBottomBorder;
}
// -----------------------------------------------------------------------
@@ -1292,12 +1292,12 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
break;
case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
+ case WINDOW_PATTERNBOX:
+ case WINDOW_NUMERICBOX:
+ case WINDOW_METRICBOX:
case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
+ case WINDOW_DATEBOX:
+ case WINDOW_TIMEBOX:
case WINDOW_LONGCURRENCYBOX:
if( pCtrl->GetStyle() & WB_DROPDOWN )
{
@@ -1315,7 +1315,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
break;
}
}
-
+
if ( aCtrlType && pCtrl->IsNativeControlSupported(aCtrlType, aCtrlPart) )
{
ImplControlValue aControlValue;
@@ -1334,18 +1334,18 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
if( pCtrl->HasFocus() || pCtrl->HasChildPathFocus() )
nState |= CTRL_STATE_FOCUSED;
}
-
+
BOOL bMouseOver = FALSE;
Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD );
while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == FALSE )
pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT );
-
+
if( bMouseOver )
nState |= CTRL_STATE_ROLLOVER;
Point aPoint;
Rectangle aCtrlRegion( aPoint, Size( mnWidth, mnHeight ) );
-
+
Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
Rectangle aContentRgn( aCtrlRegion );
if(pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
@@ -1353,7 +1353,7 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
{
aCtrlRegion=aContentRgn;
}
-
+
bNativeOK = pWin->DrawNativeControl( aCtrlType, aCtrlPart, aCtrlRegion, nState,
aControlValue, rtl::OUString() );
@@ -1397,11 +1397,11 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
nStyle |= FRAME_DRAW_MENU;
// tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
if( pWin && pWin == pWin->ImplGetFrameWindow() )
- nStyle |= FRAME_DRAW_WINDOWBORDER;
+ nStyle |= FRAME_DRAW_WINDOWBORDER;
- DecorationView aDecoView( mpOutDev );
- Point aTmpPoint;
- Rectangle aInRect( aTmpPoint, Size( mnWidth, mnHeight ) );
+ DecorationView aDecoView( mpOutDev );
+ Point aTmpPoint;
+ Rectangle aInRect( aTmpPoint, Size( mnWidth, mnHeight ) );
aDecoView.DrawFrame( aInRect, nStyle );
}
}
@@ -1415,20 +1415,20 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow )
{
- maFrameData.mpBorderWindow = pBorderWindow;
- maFrameData.mbDragFull = FALSE;
- maFrameData.mnHitTest = 0;
- maFrameData.mnPinState = 0;
- maFrameData.mnCloseState = 0;
- maFrameData.mnRollState = 0;
- maFrameData.mnDockState = 0;
- maFrameData.mnMenuState = 0;
- maFrameData.mnHideState = 0;
- maFrameData.mnHelpState = 0;
- maFrameData.mbTitleClipped = 0;
+ maFrameData.mpBorderWindow = pBorderWindow;
+ maFrameData.mbDragFull = FALSE;
+ maFrameData.mnHitTest = 0;
+ maFrameData.mnPinState = 0;
+ maFrameData.mnCloseState = 0;
+ maFrameData.mnRollState = 0;
+ maFrameData.mnDockState = 0;
+ maFrameData.mnMenuState = 0;
+ maFrameData.mnHideState = 0;
+ maFrameData.mnHelpState = 0;
+ maFrameData.mbTitleClipped = 0;
- mpATitleVirDev = NULL;
- mpDTitleVirDev = NULL;
+ mpATitleVirDev = NULL;
+ mpDTitleVirDev = NULL;
}
// -----------------------------------------------------------------------
@@ -1480,35 +1480,35 @@ Rectangle ImplStdBorderWindowView::GetMenuRect() const
void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeight )
{
- ImplBorderFrameData* pData = &maFrameData;
- ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
- const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
- DecorationView aDecoView( pDev );
- Rectangle aRect( 0, 0, 10, 10 );
- Rectangle aCalcRect = aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW );
+ ImplBorderFrameData* pData = &maFrameData;
+ ImplBorderWindow* pBorderWindow = maFrameData.mpBorderWindow;
+ const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
+ DecorationView aDecoView( pDev );
+ Rectangle aRect( 0, 0, 10, 10 );
+ Rectangle aCalcRect = aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW );
- pData->mpOutDev = pDev;
- pData->mnWidth = nWidth;
- pData->mnHeight = nHeight;
+ pData->mpOutDev = pDev;
+ pData->mnWidth = nWidth;
+ pData->mnHeight = nHeight;
- pData->mnTitleType = pBorderWindow->mnTitleType;
- pData->mbFloatWindow = pBorderWindow->mbFloatWindow;
+ pData->mnTitleType = pBorderWindow->mnTitleType;
+ pData->mbFloatWindow = pBorderWindow->mbFloatWindow;
- if ( !(pBorderWindow->GetStyle() & WB_MOVEABLE) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
+ if ( !(pBorderWindow->GetStyle() & (WB_MOVEABLE | WB_POPUP)) || (pData->mnTitleType == BORDERWINDOW_TITLE_NONE) )
pData->mnBorderSize = 0;
else if ( pData->mnTitleType == BORDERWINDOW_TITLE_TEAROFF )
pData->mnBorderSize = 0;
else
pData->mnBorderSize = rStyleSettings.GetBorderSize();
- pData->mnLeftBorder = aCalcRect.Left();
- pData->mnTopBorder = aCalcRect.Top();
- pData->mnRightBorder = aRect.Right()-aCalcRect.Right();
- pData->mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
+ pData->mnLeftBorder = aCalcRect.Left();
+ pData->mnTopBorder = aCalcRect.Top();
+ pData->mnRightBorder = aRect.Right()-aCalcRect.Right();
+ pData->mnBottomBorder = aRect.Bottom()-aCalcRect.Bottom();
pData->mnLeftBorder += pData->mnBorderSize;
- pData->mnTopBorder += pData->mnBorderSize;
+ pData->mnTopBorder += pData->mnBorderSize;
pData->mnRightBorder += pData->mnBorderSize;
pData->mnBottomBorder += pData->mnBorderSize;
- pData->mnNoTitleTop = pData->mnTopBorder;
+ pData->mnNoTitleTop = pData->mnTopBorder;
ImplInitTitle( &maFrameData );
if ( pData->mnTitleHeight )
@@ -1519,29 +1519,29 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
// set a proper background for drawing
// highlighted buttons in the title
- pBorderWindow->SetBackground( rStyleSettings.GetWindowColor() );
+ pBorderWindow->SetBackground( rStyleSettings.GetFaceColor() );
- pData->maTitleRect.Left() = pData->mnLeftBorder;
- pData->maTitleRect.Right() = nWidth-pData->mnRightBorder-1;
- pData->maTitleRect.Top() = pData->mnTopBorder;
+ pData->maTitleRect.Left() = pData->mnLeftBorder;
+ pData->maTitleRect.Right() = nWidth-pData->mnRightBorder-1;
+ pData->maTitleRect.Top() = pData->mnTopBorder;
pData->maTitleRect.Bottom() = pData->maTitleRect.Top()+pData->mnTitleHeight-1;
if ( pData->mnTitleType & (BORDERWINDOW_TITLE_NORMAL | BORDERWINDOW_TITLE_SMALL) )
{
- long nLeft = pData->maTitleRect.Left();
- long nRight = pData->maTitleRect.Right();
- long nItemTop = pData->maTitleRect.Top();
- long nItemBottom = pData->maTitleRect.Bottom();
- nLeft += 1;
- nRight -= 3;
- nItemTop += 2;
- nItemBottom -= 2;
+ long nLeft = pData->maTitleRect.Left();
+ long nRight = pData->maTitleRect.Right();
+ long nItemTop = pData->maTitleRect.Top();
+ long nItemBottom = pData->maTitleRect.Bottom();
+ nLeft += 1;
+ nRight -= 3;
+ nItemTop += 2;
+ nItemBottom -= 2;
if ( pBorderWindow->GetStyle() & WB_PINABLE )
{
Image aImage;
ImplGetPinImage( 0, 0, aImage );
- pData->maPinRect.Top() = nItemTop;
+ pData->maPinRect.Top() = nItemTop;
pData->maPinRect.Bottom() = nItemBottom;
pData->maPinRect.Left() = nLeft;
pData->maPinRect.Right() = pData->maPinRect.Left()+aImage.GetSizePixel().Width();
@@ -1550,10 +1550,10 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
if ( pBorderWindow->GetStyle() & WB_CLOSEABLE )
{
- pData->maCloseRect.Top() = nItemTop;
+ pData->maCloseRect.Top() = nItemTop;
pData->maCloseRect.Bottom() = nItemBottom;
- pData->maCloseRect.Right() = nRight;
- pData->maCloseRect.Left() = pData->maCloseRect.Right()-pData->maCloseRect.GetHeight()+1;
+ pData->maCloseRect.Right() = nRight;
+ pData->maCloseRect.Left() = pData->maCloseRect.Right()-pData->maCloseRect.GetHeight()+1;
nRight -= pData->maCloseRect.GetWidth()+3;
}
@@ -1618,7 +1618,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
pData->maHelpRect.SetEmpty();
}
- pData->mnTopBorder += pData->mnTitleHeight;
+ pData->mnTopBorder += pData->mnTitleHeight;
}
else
{
@@ -1638,10 +1638,10 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh
void ImplStdBorderWindowView::GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const
{
- rLeftBorder = maFrameData.mnLeftBorder;
- rTopBorder = maFrameData.mnTopBorder;
- rRightBorder = maFrameData.mnRightBorder;
- rBottomBorder = maFrameData.mnBottomBorder;
+ rLeftBorder = maFrameData.mnLeftBorder;
+ rTopBorder = maFrameData.mnTopBorder;
+ rRightBorder = maFrameData.mnRightBorder;
+ rBottomBorder = maFrameData.mnBottomBorder;
}
// -----------------------------------------------------------------------
@@ -1655,26 +1655,50 @@ long ImplStdBorderWindowView::CalcTitleWidth() const
void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutDev, const Point* pOffset )
{
- ImplBorderFrameData* pData = &maFrameData;
- OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev;
- ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
- Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
- Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
- const StyleSettings& rStyleSettings = pData->mpOutDev->GetSettings().GetStyleSettings();
- DecorationView aDecoView( pDev );
- Color aFrameColor( rStyleSettings.GetFaceColor() );
+ ImplBorderFrameData* pData = &maFrameData;
+ OutputDevice* pDev = pOutDev ? pOutDev : pData->mpOutDev;
+ ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
+ Point aTmpPoint = pOffset ? Point(*pOffset) : Point();
+ Rectangle aInRect( aTmpPoint, Size( pData->mnWidth, pData->mnHeight ) );
+ const StyleSettings& rStyleSettings = pData->mpOutDev->GetSettings().GetStyleSettings();
+ DecorationView aDecoView( pDev );
+ Color aFaceColor( rStyleSettings.GetFaceColor() );
+ Color aFrameColor( aFaceColor );
aFrameColor.DecreaseContrast( (UINT8) (0.50 * 255));
// Draw Frame
if ( nDrawFlags & BORDERWINDOW_DRAW_FRAME )
{
+ Region oldClipRgn( pDev->GetClipRegion( ) );
+
+ // for popups, don't draw part of the frame
+ if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
+ {
+ FloatingWindow *pWin = dynamic_cast< FloatingWindow* >( pData->mpBorderWindow->GetWindow( WINDOW_CLIENT ) );
+ if ( pWin )
+ {
+ Region aClipRgn( aInRect );
+ Rectangle aItemClipRect( pWin->ImplGetItemEdgeClipRect() );
+ if( !aItemClipRect.IsEmpty() )
+ {
+ aItemClipRect.SetPos( pData->mpBorderWindow->AbsoluteScreenToOutputPixel( aItemClipRect.TopLeft() ) );
+ aClipRgn.Exclude( aItemClipRect );
+ pDev->SetClipRegion( aClipRgn );
+ }
+ }
+ }
+
// single line frame
pDev->SetLineColor( aFrameColor );
pDev->SetFillColor();
pDev->DrawRect( aInRect );
aInRect.nLeft++; aInRect.nRight--;
aInRect.nTop++; aInRect.nBottom--;
+
+ // restore
+ if ( pData->mnTitleType == BORDERWINDOW_TITLE_POPUP )
+ pDev->SetClipRegion( oldClipRgn );
}
else
aInRect = aDecoView.DrawFrame( aInRect, FRAME_DRAW_DOUBLEOUT | FRAME_DRAW_NODRAW);
@@ -1701,7 +1725,11 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
aInRect = pData->maTitleRect;
// use no gradient anymore, just a static titlecolor
- pDev->SetFillColor( aFrameColor );
+ if ( pData->mnTitleType != BORDERWINDOW_TITLE_POPUP )
+ pDev->SetFillColor( aFrameColor );
+ else
+ pDev->SetFillColor( aFaceColor );
+
pDev->SetTextColor( rStyleSettings.GetButtonTextColor() );
Rectangle aTitleRect( pData->maTitleRect );
if( pOffset )
@@ -1711,7 +1739,7 @@ void ImplStdBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice* pOutD
if ( pData->mnTitleType != BORDERWINDOW_TITLE_TEAROFF )
{
- aInRect.Left() += 2;
+ aInRect.Left() += 2;
aInRect.Right() -= 2;
if ( !pData->maPinRect.IsEmpty() )
@@ -1836,13 +1864,13 @@ void ImplBorderWindow::ImplInit( Window* pParent,
{
// Alle WindowBits entfernen, die wir nicht haben wollen
WinBits nOrgStyle = nStyle;
- WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW | WB_NEEDSFOCUS);
+ WinBits nTestStyle = (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_PINABLE | WB_CLOSEABLE | WB_STANDALONE | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_SYSTEMFLOATWIN | WB_INTROWIN | WB_DEFAULTWIN | WB_TOOLTIPWIN | WB_NOSHADOW | WB_OWNERDRAWDECORATION | WB_SYSTEMCHILDWINDOW | WB_NEEDSFOCUS | WB_POPUP);
if ( nTypeStyle & BORDERWINDOW_STYLE_APP )
nTestStyle |= WB_APP;
nStyle &= nTestStyle;
- mpWindowImpl->mbBorderWin = TRUE;
- mbSmallOutBorder = FALSE;
+ mpWindowImpl->mbBorderWin = TRUE;
+ mbSmallOutBorder = FALSE;
if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME )
{
if( (nStyle & WB_SYSTEMCHILDWINDOW) )
@@ -1851,17 +1879,17 @@ void ImplBorderWindow::ImplInit( Window* pParent,
mpWindowImpl->mbFrame = TRUE;
mbFrameBorder = FALSE;
}
- else if( (nStyle & WB_OWNERDRAWDECORATION) )
+ else if( (nStyle & (WB_OWNERDRAWDECORATION | WB_POPUP)) )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = TRUE;
+ mbFrameBorder = (nOrgStyle & WB_NOBORDER) ? FALSE : TRUE;
}
else
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mpWindowImpl->mbFrame = TRUE;
- mbFrameBorder = FALSE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mpWindowImpl->mbFrame = TRUE;
+ mbFrameBorder = FALSE;
// closeable windows may have a border as well, eg. system floating windows without caption
if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER )
mbSmallOutBorder = TRUE;
@@ -1869,11 +1897,11 @@ void ImplBorderWindow::ImplInit( Window* pParent,
}
else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP )
{
- mpWindowImpl->mbOverlapWin = TRUE;
- mbFrameBorder = TRUE;
+ mpWindowImpl->mbOverlapWin = TRUE;
+ mbFrameBorder = TRUE;
}
else
- mbFrameBorder = FALSE;
+ mbFrameBorder = FALSE;
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
mbFloatWindow = TRUE;
@@ -1885,26 +1913,26 @@ void ImplBorderWindow::ImplInit( Window* pParent,
SetTextFillColor();
mpMenuBarWindow = NULL;
- mnMinWidth = 0;
- mnMinHeight = 0;
- mnMaxWidth = SHRT_MAX;
- mnMaxHeight = SHRT_MAX;
- mnRollHeight = 0;
+ mnMinWidth = 0;
+ mnMinHeight = 0;
+ mnMaxWidth = SHRT_MAX;
+ mnMaxHeight = SHRT_MAX;
+ mnRollHeight = 0;
mnOrgMenuHeight = 0;
- mbPined = FALSE;
- mbRollUp = FALSE;
- mbMenuHide = FALSE;
- mbDockBtn = FALSE;
- mbMenuBtn = FALSE;
- mbHideBtn = FALSE;
- mbHelpBtn = FALSE;
+ mbPined = FALSE;
+ mbRollUp = FALSE;
+ mbMenuHide = FALSE;
+ mbDockBtn = FALSE;
+ mbMenuBtn = FALSE;
+ mbHideBtn = FALSE;
+ mbHelpBtn = FALSE;
mbDisplayActive = IsActive();
if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT )
mnTitleType = BORDERWINDOW_TITLE_SMALL;
else
mnTitleType = BORDERWINDOW_TITLE_NORMAL;
- mnBorderStyle = WINDOW_BORDER_NORMAL;
+ mnBorderStyle = WINDOW_BORDER_NORMAL;
InitView();
}
@@ -1913,7 +1941,7 @@ void ImplBorderWindow::ImplInit( Window* pParent,
ImplBorderWindow::ImplBorderWindow( Window* pParent,
SystemParentData* pSystemParentData,
WinBits nStyle, USHORT nTypeStyle
- ) : Window( WINDOW_BORDERWINDOW )
+ ) : Window( WINDOW_BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData );
}
@@ -2001,8 +2029,8 @@ void ImplBorderWindow::RequestHelp( const HelpEvent& rHEvt )
// no keyboard help for border win
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
{
- Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
+ Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
+ Rectangle aHelpRect;
String aHelpStr( mpBorderView->RequestHelp( aMousePosPixel, aHelpRect ) );
// Rechteck ermitteln
@@ -2103,7 +2131,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- if ( !mpWindowImpl->mbFrame || (GetStyle() & WB_OWNERDRAWDECORATION) )
+ if ( !mpWindowImpl->mbFrame || (GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP)) )
UpdateView( TRUE, ImplGetWindow()->GetOutputSizePixel() );
}
@@ -2165,8 +2193,8 @@ void ImplBorderWindow::UpdateView( BOOL bNewView, const Size& rNewOutSize )
GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( aOldSize.Width() || aOldSize.Height() )
{
- aOutputSize.Width() += nLeftBorder+nRightBorder;
- aOutputSize.Height() += nTopBorder+nBottomBorder;
+ aOutputSize.Width() += nLeftBorder+nRightBorder;
+ aOutputSize.Height() += nTopBorder+nBottomBorder;
if ( aOutputSize == GetSizePixel() )
InvalidateBorder();
else
@@ -2188,10 +2216,10 @@ void ImplBorderWindow::InvalidateBorder()
mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder );
if ( nLeftBorder || nTopBorder || nRightBorder || nBottomBorder )
{
- Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
- Region aRegion( aWinRect );
+ Rectangle aWinRect( Point( 0, 0 ), GetOutputSizePixel() );
+ Region aRegion( aWinRect );
aWinRect.Left() += nLeftBorder;
- aWinRect.Top() += nTopBorder;
+ aWinRect.Top() += nTopBorder;
aWinRect.Right() -= nRightBorder;
aWinRect.Bottom() -= nBottomBorder;
// kein Output-Bereich mehr, dann alles invalidieren
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index e835fe749ed1..891580a0a2e4 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,11 +44,11 @@
struct ImplBtnDlgItem
{
- USHORT mnId;
- BOOL mbOwnButton;
- BOOL mbDummyAlign;
- long mnSepSize;
- PushButton* mpPushButton;
+ USHORT mnId;
+ BOOL mbOwnButton;
+ BOOL mbDummyAlign;
+ long mnSepSize;
+ PushButton* mpPushButton;
};
DECLARE_LIST( ImplBtnDlgItemList, ImplBtnDlgItem* )
@@ -57,11 +57,11 @@ DECLARE_LIST( ImplBtnDlgItemList, ImplBtnDlgItem* )
void ButtonDialog::ImplInitButtonDialogData()
{
- mpItemList = new ImplBtnDlgItemList( 8, 8 );
- mnButtonSize = 0;
- mnCurButtonId = 0;
- mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND;
- mbFormat = TRUE;
+ mpItemList = new ImplBtnDlgItemList( 8, 8 );
+ mnButtonSize = 0;
+ mnCurButtonId = 0;
+ mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND;
+ mbFormat = TRUE;
}
// -----------------------------------------------------------------------
@@ -87,7 +87,7 @@ ButtonDialog::ButtonDialog( Window* pParent, const ResId& rResId ) :
Dialog( WINDOW_BUTTONDIALOG )
{
ImplInitButtonDialogData();
- rResId.SetRT( RSC_DIALOG ); // !!!!!!!!!! RSC_BUTTONDIALOG !!!!!!!!
+ rResId.SetRT( RSC_DIALOG ); // !!!!!!!!!! RSC_BUTTONDIALOG !!!!!!!!
ImplInit( pParent, ImplInitRes( rResId ) );
ImplLoadRes( rResId );
}
@@ -113,7 +113,7 @@ ButtonDialog::~ButtonDialog()
PushButton* ButtonDialog::ImplCreatePushButton( USHORT nBtnFlags )
{
PushButton* pBtn;
- WinBits nStyle = 0;
+ WinBits nStyle = 0;
if ( nBtnFlags & BUTTONDIALOG_DEFBUTTON )
nStyle |= WB_DEFBUTTON;
@@ -156,9 +156,9 @@ long ButtonDialog::ImplGetButtonSize()
return mnButtonSize;
// Calculate ButtonSize
- long nLastSepSize = 0;
- long nSepSize = 0;
- long nButtonCount = 0;
+ long nLastSepSize = 0;
+ long nSepSize = 0;
+ long nButtonCount = 0;
maCtrlSize = Size( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
ImplBtnDlgItem* pItem = mpItemList->First();
while ( pItem )
@@ -206,9 +206,9 @@ void ButtonDialog::ImplPosControls()
// determine dialog size
ImplBtnDlgItem* pItem;
- Size aDlgSize = maPageSize;
- long nX;
- long nY;
+ Size aDlgSize = maPageSize;
+ long nX;
+ long nY;
if ( GetStyle() & WB_HORZ )
{
if ( mnButtonSize+(IMPL_DIALOG_OFFSET*2) > aDlgSize.Width() )
@@ -335,11 +335,11 @@ void ButtonDialog::AddButton( const XubString& rText, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
- pItem->mnSepSize = nSepPixel;
- pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = TRUE;
+ pItem->mnSepSize = nSepPixel;
+ pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
if ( rText.Len() )
pItem->mpPushButton->SetText( rText );
@@ -358,10 +358,10 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = TRUE;
- pItem->mnSepSize = nSepPixel;
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = TRUE;
+ pItem->mnSepSize = nSepPixel;
if ( eType == BUTTON_OK )
nBtnFlags |= BUTTONDIALOG_OKBUTTON;
@@ -372,9 +372,9 @@ void ButtonDialog::AddButton( StandardButtonType eType, USHORT nId,
pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
// Standard-Buttons have the right text already
- if ( !((eType == BUTTON_OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
+ if ( !((eType == BUTTON_OK) && (pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
!((eType == BUTTON_CANCEL) && (pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
- !((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
+ !((eType == BUTTON_HELP) && (pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
{
pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
pItem->mpPushButton->SetHelpText( Button::GetStandardHelpText( eType ) );
@@ -395,11 +395,11 @@ void ButtonDialog::AddButton( PushButton* pBtn, USHORT nId,
USHORT nBtnFlags, long nSepPixel )
{
// PageItem anlegen
- ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
- pItem->mnId = nId;
- pItem->mbOwnButton = FALSE;
- pItem->mnSepSize = nSepPixel;
- pItem->mpPushButton = pBtn;
+ ImplBtnDlgItem* pItem = new ImplBtnDlgItem;
+ pItem->mnId = nId;
+ pItem->mbOwnButton = FALSE;
+ pItem->mnSepSize = nSepPixel;
+ pItem->mpPushButton = pBtn;
if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON )
mnFocusButtonId = nId;
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 03e01c96742b..56d1df9518e8 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,12 +40,12 @@
CommandExtTextInputData::CommandExtTextInputData()
{
- mpTextAttr = NULL;
- mnCursorPos = 0;
- mnDeltaStart = 0;
- mnOldTextLen = 0;
- mnCursorFlags = 0;
- mbOnlyCursor = FALSE;
+ mpTextAttr = NULL;
+ mnCursorPos = 0;
+ mnDeltaStart = 0;
+ mnOldTextLen = 0;
+ mnCursorFlags = 0;
+ mbOnlyCursor = FALSE;
}
// -----------------------------------------------------------------------
@@ -66,11 +66,11 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
}
else
mpTextAttr = NULL;
- mnCursorPos = nCursorPos;
- mnDeltaStart = nDeltaStart;
- mnOldTextLen = nOldTextLen;
- mnCursorFlags = nCursorFlags;
- mbOnlyCursor = bOnlyCursor;
+ mnCursorPos = nCursorPos;
+ mnDeltaStart = nDeltaStart;
+ mnOldTextLen = nOldTextLen;
+ mnCursorFlags = nCursorFlags;
+ mbOnlyCursor = bOnlyCursor;
}
// -----------------------------------------------------------------------
@@ -85,11 +85,11 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData&
}
else
mpTextAttr = NULL;
- mnCursorPos = rData.mnCursorPos;
- mnDeltaStart = rData.mnDeltaStart;
- mnOldTextLen = rData.mnOldTextLen;
- mnCursorFlags = rData.mnCursorFlags;
- mbOnlyCursor = rData.mbOnlyCursor;
+ mnCursorPos = rData.mnCursorPos;
+ mnDeltaStart = rData.mnDeltaStart;
+ mnOldTextLen = rData.mnOldTextLen;
+ mnCursorFlags = rData.mnCursorFlags;
+ mbOnlyCursor = rData.mbOnlyCursor;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 5725189e10c3..44d15ab0673b 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,16 +40,16 @@
struct ImplCursorData
{
- AutoTimer maTimer; // Timer
- Point maPixPos; // Pixel-Position
- Point maPixRotOff; // Pixel-Offset-Position
- Size maPixSize; // Pixel-Size
- long mnPixSlant; // Pixel-Slant
- short mnOrientation; // Pixel-Orientation
- unsigned char mnDirection; // indicates writing direction
- USHORT mnStyle; // Cursor-Style
- BOOL mbCurVisible; // Ist Cursor aktuell sichtbar
- Window* mpWindow; // Zugeordnetes Windows
+ AutoTimer maTimer; // Timer
+ Point maPixPos; // Pixel-Position
+ Point maPixRotOff; // Pixel-Offset-Position
+ Size maPixSize; // Pixel-Size
+ long mnPixSlant; // Pixel-Slant
+ short mnOrientation; // Pixel-Orientation
+ unsigned char mnDirection; // indicates writing direction
+ USHORT mnStyle; // Cursor-Style
+ BOOL mbCurVisible; // Ist Cursor aktuell sichtbar
+ Window* mpWindow; // Zugeordnetes Windows
};
// =======================================================================
@@ -57,7 +57,7 @@ struct ImplCursorData
static void ImplCursorInvert( ImplCursorData* pData )
{
Window* pWindow = pData->mpWindow;
- BOOL bMapMode = pWindow->IsMapModeEnabled();
+ BOOL bMapMode = pWindow->IsMapModeEnabled();
pWindow->EnableMapMode( FALSE );
USHORT nInvertStyle;
if ( pData->mnStyle & CURSOR_SHADOW )
@@ -94,10 +94,10 @@ static void ImplCursorInvert( ImplCursorData* pData )
// left-to-right
pAry[0] = aPoly.GetPoint( 0 );
pAry[1] = aPoly.GetPoint( 1 );
- pAry[2] = pAry[1];
+ pAry[2] = pAry[1];
pAry[2].X() += delta;
pAry[3] = pAry[1];
- pAry[3].Y() += delta;
+ pAry[3].Y() += delta;
pAry[4] = aPoly.GetPoint( 2 );
pAry[5] = aPoly.GetPoint( 3 );
pAry[6] = aPoly.GetPoint( 4 );
@@ -109,8 +109,8 @@ static void ImplCursorInvert( ImplCursorData* pData )
pAry[1] = aPoly.GetPoint( 1 );
pAry[2] = aPoly.GetPoint( 2 );
pAry[3] = aPoly.GetPoint( 3 );
- pAry[4] = pAry[0];
- pAry[4].Y() += delta;
+ pAry[4] = pAry[0];
+ pAry[4].Y() += delta;
pAry[5] = pAry[0];
pAry[5].X() -= delta;
pAry[6] = aPoly.GetPoint( 4 );
@@ -134,13 +134,13 @@ void Cursor::ImplDraw()
{
if ( mpData && mpData->mpWindow && !mpData->mbCurVisible )
{
- Window* pWindow = mpData->mpWindow;
- mpData->maPixPos = pWindow->LogicToPixel( maPos );
- mpData->maPixSize = pWindow->LogicToPixel( maSize );
- mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
- mpData->mnOrientation = mnOrientation;
- mpData->mnDirection = mnDirection;
- long nOffsetY = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
+ Window* pWindow = mpData->mpWindow;
+ mpData->maPixPos = pWindow->LogicToPixel( maPos );
+ mpData->maPixSize = pWindow->LogicToPixel( maSize );
+ mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width();
+ mpData->mnOrientation = mnOrientation;
+ mpData->mnDirection = mnDirection;
+ long nOffsetY = pWindow->LogicToPixel( Size( 0, mnOffsetY ) ).Height();
// Position um den Offset korrigieren
mpData->maPixPos.Y() -= nOffsetY;
@@ -197,8 +197,8 @@ void Cursor::ImplShow( BOOL bDrawDirect )
mpData->maTimer.SetTimeoutHdl( LINK( this, Cursor, ImplTimerHdl ) );
}
- mpData->mpWindow = pWindow;
- mpData->mnStyle = mnStyle;
+ mpData->mpWindow = pWindow;
+ mpData->mnStyle = mnStyle;
if ( bDrawDirect )
ImplDraw();
@@ -261,14 +261,14 @@ IMPL_LINK( Cursor, ImplTimerHdl, AutoTimer*, EMPTYARG )
Cursor::Cursor()
{
- mpData = NULL;
- mpWindow = NULL;
- mnSlant = 0;
- mnOffsetY = 0;
- mnOrientation = 0;
- mnDirection = 0;
- mnStyle = 0;
- mbVisible = FALSE;
+ mpData = NULL;
+ mpWindow = NULL;
+ mnSlant = 0;
+ mnOffsetY = 0;
+ mnOrientation = 0;
+ mnDirection = 0;
+ mnStyle = 0;
+ mbVisible = FALSE;
}
// -----------------------------------------------------------------------
@@ -277,13 +277,13 @@ Cursor::Cursor( const Cursor& rCursor ) :
maSize( rCursor.maSize ),
maPos( rCursor.maPos )
{
- mpData = NULL;
- mpWindow = NULL;
- mnSlant = rCursor.mnSlant;
- mnOrientation = rCursor.mnOrientation;
- mnDirection = rCursor.mnDirection;
- mnStyle = 0;
- mbVisible = rCursor.mbVisible;
+ mpData = NULL;
+ mpWindow = NULL;
+ mnSlant = rCursor.mnSlant;
+ mnOrientation = rCursor.mnOrientation;
+ mnDirection = rCursor.mnDirection;
+ mnStyle = 0;
+ mbVisible = rCursor.mbVisible;
}
// -----------------------------------------------------------------------
@@ -435,12 +435,12 @@ void Cursor::SetDirection( unsigned char nNewDirection )
Cursor& Cursor::operator=( const Cursor& rCursor )
{
- maPos = rCursor.maPos;
- maSize = rCursor.maSize;
- mnSlant = rCursor.mnSlant;
- mnOrientation = rCursor.mnOrientation;
- mnDirection = rCursor.mnDirection;
- mbVisible = rCursor.mbVisible;
+ maPos = rCursor.maPos;
+ maSize = rCursor.maSize;
+ mnSlant = rCursor.mnSlant;
+ mnOrientation = rCursor.mnOrientation;
+ mnDirection = rCursor.mnDirection;
+ mbVisible = rCursor.mbVisible;
ImplNew();
return *this;
@@ -450,12 +450,12 @@ Cursor& Cursor::operator=( const Cursor& rCursor )
BOOL Cursor::operator==( const Cursor& rCursor ) const
{
- if ( (maPos == rCursor.maPos) &&
- (maSize == rCursor.maSize) &&
- (mnSlant == rCursor.mnSlant) &&
- (mnOrientation == rCursor.mnOrientation) &&
- (mnDirection == rCursor.mnDirection) &&
- (mbVisible == rCursor.mbVisible) )
+ if ( (maPos == rCursor.maPos) &&
+ (maSize == rCursor.maSize) &&
+ (mnSlant == rCursor.mnSlant) &&
+ (mnOrientation == rCursor.mnOrientation) &&
+ (mnDirection == rCursor.mnDirection) &&
+ (mbVisible == rCursor.mbVisible) )
return TRUE;
else
return FALSE;
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index e5c3dc525cec..14a8cfc39079 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,9 +37,9 @@
// =======================================================================
-#define BUTTON_DRAW_FLATTEST (BUTTON_DRAW_FLAT | \
- BUTTON_DRAW_PRESSED | \
- BUTTON_DRAW_CHECKED | \
+#define BUTTON_DRAW_FLATTEST (BUTTON_DRAW_FLAT | \
+ BUTTON_DRAW_PRESSED | \
+ BUTTON_DRAW_CHECKED | \
BUTTON_DRAW_HIGHLIGHT)
// =======================================================================
@@ -47,11 +47,11 @@
void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect,
USHORT nStyle, BOOL bClose )
{
- DecorationView aView( pDev );
- const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
- Rectangle aRect = rRect;
- Color aColor1;
- Color aColor2;
+ DecorationView aView( pDev );
+ const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
+ Rectangle aRect = rRect;
+ Color aColor1;
+ Color aColor2;
pDev->SetFillColor();
@@ -67,10 +67,10 @@ void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect,
}
aView.DrawFrame( aRect, aColor1, aColor2 );
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
+ aRect.Left() += 2;
+ aRect.Top() += 2;
+ aRect.Right() -= 2;
+ aRect.Bottom() -= 2;
if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
pDev->SetLineColor( rStyleSettings.GetLightColor() );
@@ -113,22 +113,22 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
SymbolType eType )
{
// Groessen vorberechnen
- long nMin = Min( rRect.GetWidth(), rRect.GetHeight() );
- long nSize = nMin;
+ long nMin = Min( rRect.GetWidth(), rRect.GetHeight() );
+ long nSize = nMin;
if ( nMin & 0x01 )
nMin--;
- Point aCenter = rRect.Center();
- long nCenterX = aCenter.X();
- long nCenterY = aCenter.Y();
- long n2 = nMin / 2;
- long n4 = nMin / 4;
- long nLeft;
- long nTop;
- long nRight;
- long nBottom;
- long nTemp;
- long i;
+ Point aCenter = rRect.Center();
+ long nCenterX = aCenter.X();
+ long nCenterY = aCenter.Y();
+ long n2 = nMin / 2;
+ long n4 = nMin / 4;
+ long nLeft;
+ long nTop;
+ long nRight;
+ long nBottom;
+ long nTemp;
+ long i;
switch ( eType )
{
@@ -338,8 +338,8 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
{
if ( !( nSize & 0x01 ))
{
- // An even rectangle size means we have to use a smaller size for
- // our arrows as we want to use one pixel for the spearhead! Otherwise
+ // An even rectangle size means we have to use a smaller size for
+ // our arrows as we want to use one pixel for the spearhead! Otherwise
// it will be clipped!
nCenterX++;
n2 = ( nMin-1 ) / 2;
@@ -368,9 +368,9 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
case SYMBOL_RADIOCHECKMARK:
case SYMBOL_RECORD:
{
- const long nExt = ( n2 << 1 ) + 1;
- Bitmap aBmp( Size( nExt, nExt ), 1 );
- BitmapWriteAccess* pWAcc = aBmp.AcquireWriteAccess();
+ const long nExt = ( n2 << 1 ) + 1;
+ Bitmap aBmp( Size( nExt, nExt ), 1 );
+ BitmapWriteAccess* pWAcc = aBmp.AcquireWriteAccess();
if( pWAcc )
{
@@ -471,8 +471,8 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
aRectSize.Width() = 1;
else if ( nMin > 20 )
aRectSize.Width() = nMin/10;
- nLeft = nCenterX-n2+1;
- nTop = nCenterY-n2+1;
+ nLeft = nCenterX-n2+1;
+ nTop = nCenterY-n2+1;
nBottom = nCenterY-n2+nMin-aRectSize.Width()+1;
i = 0;
while ( i < nMin-aRectSize.Width()+1 )
@@ -673,11 +673,11 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType,
const Color& rColor, USHORT nStyle )
{
- const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
- Color aOldLineColor = mpOutDev->GetLineColor();
- Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
+ const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
+ Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ Color aOldLineColor = mpOutDev->GetLineColor();
+ Color aOldFillColor = mpOutDev->GetFillColor();
+ BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->SetLineColor();
mpOutDev->SetFillColor( rColor );
mpOutDev->EnableMapMode( FALSE );
@@ -721,10 +721,10 @@ void DecorationView::DrawFrame( const Rectangle& rRect,
const Color& rLeftTopColor,
const Color& rRightBottomColor )
{
- Rectangle aRect = mpOutDev->LogicToPixel( rRect );
- Color aOldLineColor = mpOutDev->GetLineColor();
- Color aOldFillColor = mpOutDev->GetFillColor();
- BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = mpOutDev->LogicToPixel( rRect );
+ Color aOldLineColor = mpOutDev->GetLineColor();
+ Color aOldFillColor = mpOutDev->GetFillColor();
+ BOOL bOldMapMode = mpOutDev->IsMapModeEnabled();
mpOutDev->EnableMapMode( FALSE );
mpOutDev->SetLineColor();
mpOutDev->ImplDraw2ColorFrame( aRect, rLeftTopColor, rRightBottomColor );
@@ -826,10 +826,10 @@ static void ImplDrawDPILineRect( OutputDevice* pDev, Rectangle& rRect,
}
}
- rRect.Left() += nLineWidth;
- rRect.Top() += nLineHeight;
- rRect.Right() -= nLineWidth;
- rRect.Bottom() -= nLineHeight;
+ rRect.Left() += nLineWidth;
+ rRect.Top() += nLineHeight;
+ rRect.Right() -= nLineWidth;
+ rRect.Bottom() -= nLineHeight;
}
// =======================================================================
@@ -847,7 +847,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
// UseFlatBorders disables 3D style for all frames except menus
// menus may use different border colors (eg on XP)
- // normal frames will be drawn using the shadow color
+ // normal frames will be drawn using the shadow color
// whereas window frame borders will use black
BOOL bFlatBorders = ( !bMenuStyle && rStyleSettings.GetUseFlatBorders() );
@@ -892,10 +892,10 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
if ( nFrameStyle == FRAME_DRAW_GROUP )
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
else if ( (nFrameStyle == FRAME_DRAW_IN) ||
(nFrameStyle == FRAME_DRAW_OUT) )
@@ -907,10 +907,10 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
}
else // FRAME_DRAW_DOUBLEIN || FRAME_DRAW_DOUBLEOUT
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
}
}
@@ -924,8 +924,8 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
ImplControlValue aControlValue( nValueStyle );
Rectangle aBound, aContent;
Rectangle aNatRgn( rRect );
- if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
- aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
+ if( pWin->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
+ aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
if( pWin->DrawNativeControl( CTRL_FRAME, PART_BORDER, aContent, CTRL_STATE_ENABLED,
aControlValue, rtl::OUString()) )
@@ -1022,7 +1022,7 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
rStyleSettings.GetDarkShadowColor() :
rStyleSettings.GetLightBorderColor(),
rStyleSettings.GetDarkShadowColor() );
-
+
}
rRect.Left()++;
@@ -1069,8 +1069,8 @@ static void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect,
Rectangle DecorationView::DrawFrame( const Rectangle& rRect, USHORT nStyle )
{
- Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = rRect;
+ BOOL bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
@@ -1132,25 +1132,25 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
pDev->SetFillColor( aBlackColor );
Rectangle aRect1;
Rectangle aRect2;
- aRect1.Left() = aFillRect.Left();
- aRect1.Right() = aFillRect.Right(),
- aRect2.Top() = aFillRect.Top();
+ aRect1.Left() = aFillRect.Left();
+ aRect1.Right() = aFillRect.Right(),
+ aRect2.Top() = aFillRect.Top();
aRect2.Bottom() = aFillRect.Bottom();
if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
{
- aRect1.Top() = aFillRect.Top();
+ aRect1.Top() = aFillRect.Top();
aRect1.Bottom() = aBrdSize.Height()-1;
- aRect2.Left() = aFillRect.Left();
- aRect2.Right() = aFillRect.Left()+aBrdSize.Width()-1;
+ aRect2.Left() = aFillRect.Left();
+ aRect2.Right() = aFillRect.Left()+aBrdSize.Width()-1;
aFillRect.Left() += aBrdSize.Width();
aFillRect.Top() += aBrdSize.Height();
}
else
{
- aRect1.Top() = aFillRect.Bottom()-aBrdSize.Height()+1;
+ aRect1.Top() = aFillRect.Bottom()-aBrdSize.Height()+1;
aRect1.Bottom() = aFillRect.Bottom();
- aRect2.Left() = aFillRect.Right()-aBrdSize.Width()+1;
- aRect2.Right() = aFillRect.Right(),
+ aRect2.Left() = aFillRect.Right()-aBrdSize.Width()+1;
+ aRect2.Right() = aFillRect.Right(),
aFillRect.Right() -= aBrdSize.Width();
aFillRect.Bottom() -= aBrdSize.Height();
}
@@ -1285,32 +1285,32 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
{
if ( (rRect.GetHeight() > 10) && (rRect.GetWidth() > 10) )
{
- rRect.Left() += 4;
- rRect.Top() += 4;
- rRect.Right() -= 1;
- rRect.Bottom() -= 1;
+ rRect.Left() += 4;
+ rRect.Top() += 4;
+ rRect.Right() -= 1;
+ rRect.Bottom() -= 1;
}
else
{
- rRect.Left() += 3;
- rRect.Top() += 3;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 3;
+ rRect.Top() += 3;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
}
else if ( nStyle & BUTTON_DRAW_CHECKED )
{
- rRect.Left() += 3;
- rRect.Top() += 3;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
+ rRect.Left() += 3;
+ rRect.Top() += 3;
+ rRect.Right() -= 2;
+ rRect.Bottom() -= 2;
}
else
{
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 3;
- rRect.Bottom() -= 3;
+ rRect.Left() += 2;
+ rRect.Top() += 2;
+ rRect.Right() -= 3;
+ rRect.Bottom() -= 3;
}
}
@@ -1318,8 +1318,8 @@ static void ImplDrawButton( OutputDevice* pDev, Rectangle& rRect,
Rectangle DecorationView::DrawButton( const Rectangle& rRect, USHORT nStyle )
{
- Rectangle aRect = rRect;
- BOOL bOldMap = mpOutDev->IsMapModeEnabled();
+ Rectangle aRect = rRect;
+ BOOL bOldMap = mpOutDev->IsMapModeEnabled();
if ( bOldMap )
{
aRect = mpOutDev->LogicToPixel( aRect );
@@ -1366,7 +1366,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
mpOutDev->SetLineColor( Color( COL_BLACK ) );
else
mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
-
+
mpOutDev->DrawLine( aStart, aStop );
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
{
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 3b5585d3bc63..86b7e853b07f 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -638,7 +638,7 @@ BOOL Dialog::ImplStartExecuteModal()
"Dialog::StartExecuteModal() - Parent input disabled, use another parent to ensure modality!" );
DBG_ASSERT( ! pParent->IsInModalMode(),
"Dialog::StartExecuteModal() - Parent already modally disabled, use another parent to ensure modality!" );
-
+
}
#endif
@@ -664,10 +664,10 @@ BOOL Dialog::ImplStartExecuteModal()
SetModalInputMode( TRUE );
mbOldSaveBack = IsSaveBackgroundEnabled();
EnableSaveBackground();
-
+
// FIXME: no layouting, workaround some clipping issues
ImplAdjustNWFSizes();
-
+
Show();
pSVData->maAppData.mnModalMode++;
@@ -691,7 +691,7 @@ short Dialog::Execute()
ImplDelData aDelData;
ImplAddDel( &aDelData );
-
+
#ifdef DBG_UTIL
ImplDelData aParentDelData;
Window* pDialogParent = mpDialogParent;
@@ -955,15 +955,15 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULO
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
-
+
Wallpaper aWallpaper = GetBackground();
if ( !aWallpaper.IsBitmap() )
ImplInitSettings();
-
+
pDev->Push();
pDev->SetMapMode();
pDev->SetLineColor();
-
+
if ( aWallpaper.IsBitmap() )
pDev->DrawBitmapEx( aPos, aSize, aWallpaper.GetBitmap() );
else
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 64f2b7e0d2a1..306a5ea02ab9 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -320,7 +320,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
if( pWindow == NULL )
pWindow = pSWindow;
-
+
while ( pSWindow )
{
// the DialogControlStart mark is only accepted for the direct children
@@ -372,7 +372,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, USHORT&
pTempWindow = ImplGetNextWindow( pParent, i, i, FALSE );
// the DialogControlStart mark is only accepted for the direct children
- if ( !i
+ if ( !i
|| ( pTempWindow && !ImplHasIndirectTabParent( pTempWindow )
&& pTempWindow->ImplGetWindow()->IsDialogControlStart() ) )
break;
@@ -465,10 +465,10 @@ static Window* ImplFindAccelWindow( Window* pParent, USHORT& rIndex, xub_Unicode
if( pAccelWin )
return pAccelWin;
}
-
+
if ( i == nStart )
break;
-
+
if ( i < nFormEnd )
{
pWindow = ImplGetNextWindow( pParent, i, i, bCheckEnable );
@@ -885,7 +885,7 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
return TRUE;
}
-
+
return FALSE;
}
@@ -1079,10 +1079,10 @@ Window* Window::GetLabelFor() const
return pWindow;
sal_Unicode nAccel = getAccel( GetText() );
-
+
WindowType nMyType = GetType();
- if( nMyType == WINDOW_FIXEDTEXT ||
- nMyType == WINDOW_FIXEDLINE ||
+ if( nMyType == WINDOW_FIXEDTEXT ||
+ nMyType == WINDOW_FIXEDLINE ||
nMyType == WINDOW_GROUPBOX )
{
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
@@ -1120,8 +1120,8 @@ Window* Window::GetLabelFor() const
if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if( nType != WINDOW_FIXEDTEXT &&
- nType != WINDOW_FIXEDLINE &&
+ if( nType != WINDOW_FIXEDTEXT &&
+ nType != WINDOW_FIXEDLINE &&
nType != WINDOW_GROUPBOX )
{
pWindow = pSWindow;
@@ -1159,8 +1159,8 @@ Window* Window::GetLabeledBy() const
if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
return NULL;
-// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
-// GetType() == WINDOW_FIXEDLINE ||
+// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
+// GetType() == WINDOW_FIXEDLINE ||
// GetType() == WINDOW_GROUPBOX ) )
// #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
// See tools/options/print for example.
@@ -1172,7 +1172,7 @@ Window* Window::GetLabeledBy() const
// that comes before this control; with the exception of push buttons
// which are labeled only if the fixed text, fixed line or group box
// is directly before the control
-
+
// get form start and form end and index of this control
USHORT nIndex, nFormStart, nFormEnd;
Window* pSWindow = ::ImplFindDlgCtrlWindow( pFrameWindow,
@@ -1182,9 +1182,9 @@ Window* Window::GetLabeledBy() const
nFormEnd );
if( pSWindow && nIndex != nFormStart )
{
- if( GetType() == WINDOW_PUSHBUTTON ||
- GetType() == WINDOW_HELPBUTTON ||
- GetType() == WINDOW_OKBUTTON ||
+ if( GetType() == WINDOW_PUSHBUTTON ||
+ GetType() == WINDOW_HELPBUTTON ||
+ GetType() == WINDOW_OKBUTTON ||
GetType() == WINDOW_CANCELBUTTON )
{
nFormStart = nIndex-1;
@@ -1199,8 +1199,8 @@ Window* Window::GetLabeledBy() const
if( pSWindow && pSWindow->IsVisible() && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if ( ( nType == WINDOW_FIXEDTEXT ||
- nType == WINDOW_FIXEDLINE ||
+ if ( ( nType == WINDOW_FIXEDTEXT ||
+ nType == WINDOW_FIXEDLINE ||
nType == WINDOW_GROUPBOX ) )
{
// a fixed text can't be labeld by a fixed text.
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index e4d5a8c4c0eb..ef9a5ce31a04 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -225,7 +225,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde )
else
{
// fire dragOver on listeners of current window
- nListeners = fireDragOverEvent( pChildWindow, dtde.Context, dtde.DropAction, location,
+ nListeners = fireDragOverEvent( pChildWindow, dtde.Context, dtde.DropAction, location,
dtde.SourceActions );
}
@@ -302,7 +302,7 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent&
void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent& dge )
throw(RuntimeException)
-{ MutexGuard aImplGuard( m_aMutex );
+{ MutexGuard aImplGuard( m_aMutex );
Point origin( dge.DragOriginX, dge.DragOriginY );
@@ -324,7 +324,7 @@ void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent&
pChildWindow->ImplReMirror( origin );
aSolarGuard.clear();
-
+
fireDragGestureEvent( pChildWindow, dge.DragSource, dge.Event, origin, dge.DragAction );
}
@@ -368,7 +368,7 @@ sal_Int32 DNDEventDispatcher::fireDragEnterEvent( Window *pWindow,
if( pWindow && pWindow->IsInputEnabled() && ! pWindow->IsInModalMode() )
{
OClearableGuard aGuard( Application::GetSolarMutex() );
-
+
// set an UI lock
pWindow->IncrementLockCount();
@@ -531,9 +531,9 @@ sal_Int32 DNDEventDispatcher::fireDropEvent( Window *pWindow,
// DNDEventDispatcher::fireDragGestureRecognized
//==================================================================================================
-sal_Int32 DNDEventDispatcher::fireDragGestureEvent( Window *pWindow,
- const Reference< XDragSource >& xSource, const Any event,
- const Point& rOrigin, const sal_Int8 nDragAction
+sal_Int32 DNDEventDispatcher::fireDragGestureEvent( Window *pWindow,
+ const Reference< XDragSource >& xSource, const Any event,
+ const Point& rOrigin, const sal_Int8 nDragAction
)
throw(::com::sun::star::uno::RuntimeException)
{
@@ -559,6 +559,6 @@ sal_Int32 DNDEventDispatcher::fireDragGestureEvent( Window *pWindow,
// release UI lock
pWindow->DecrementLockCount();
}
-
+
return n;
}
diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx
index 07819e76f957..a8c926494926 100644
--- a/vcl/source/window/dndlcon.cxx
+++ b/vcl/source/window/dndlcon.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,18 +36,18 @@ using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::datatransfer::dnd;
//==================================================================================================
-//
+//
//==================================================================================================
DNDListenerContainer::DNDListenerContainer( sal_Int8 nDefaultActions )
: WeakComponentImplHelper4< XDragGestureRecognizer, XDropTargetDragContext, XDropTargetDropContext, XDropTarget >(GetMutex())
{
m_bActive = sal_True;
- m_nDefaultActions = nDefaultActions;
+ m_nDefaultActions = nDefaultActions;
}
//==================================================================================================
-//
+//
//==================================================================================================
DNDListenerContainer::~DNDListenerContainer()
@@ -57,8 +57,8 @@ DNDListenerContainer::~DNDListenerContainer()
//==================================================================================================
// DNDListenerContainer::addDragGestureListener
//==================================================================================================
-
-void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDragGestureListener >& dgl )
+
+void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDragGestureListener >& dgl )
throw(RuntimeException)
{
rBHelper.addListener( getCppuType( ( const Reference< XDragGestureListener > * ) 0 ), dgl );
@@ -68,7 +68,7 @@ void SAL_CALL DNDListenerContainer::addDragGestureListener( const Reference< XDr
// DNDListenerContainer::removeDragGestureListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference< XDragGestureListener >& dgl )
+void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference< XDragGestureListener >& dgl )
throw(RuntimeException)
{
rBHelper.removeListener( getCppuType( ( const Reference< XDragGestureListener > * ) 0 ), dgl );
@@ -78,16 +78,16 @@ void SAL_CALL DNDListenerContainer::removeDragGestureListener( const Reference<
// DNDListenerContainer::resetRecognizer
//==================================================================================================
-void SAL_CALL DNDListenerContainer::resetRecognizer( )
+void SAL_CALL DNDListenerContainer::resetRecognizer( )
throw(RuntimeException)
{
}
-
+
//==================================================================================================
// DNDListenerContainer::addDropTargetListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
+void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDropTargetListener >& dtl )
throw(RuntimeException)
{
rBHelper.addListener( getCppuType( ( const Reference< XDropTargetListener > * ) 0 ), dtl );
@@ -97,7 +97,7 @@ void SAL_CALL DNDListenerContainer::addDropTargetListener( const Reference< XDro
// DNDListenerContainer::removeDropTargetListener
//==================================================================================================
-void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< XDropTargetListener >& dtl )
+void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< XDropTargetListener >& dtl )
throw(RuntimeException)
{
rBHelper.removeListener( getCppuType( ( const Reference< XDropTargetListener > * ) 0 ), dtl );
@@ -107,7 +107,7 @@ void SAL_CALL DNDListenerContainer::removeDropTargetListener( const Reference< X
// DNDListenerContainer::isActive
//==================================================================================================
-sal_Bool SAL_CALL DNDListenerContainer::isActive( )
+sal_Bool SAL_CALL DNDListenerContainer::isActive( )
throw(RuntimeException)
{
return m_bActive;
@@ -117,7 +117,7 @@ sal_Bool SAL_CALL DNDListenerContainer::isActive( )
// DNDListenerContainer::setActive
//==================================================================================================
-void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
+void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
throw(RuntimeException)
{
m_bActive = active;
@@ -127,7 +127,7 @@ void SAL_CALL DNDListenerContainer::setActive( sal_Bool active )
// DNDListenerContainer::getDefaultActions
//==================================================================================================
-sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
+sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
throw(RuntimeException)
{
return m_nDefaultActions;
@@ -137,7 +137,7 @@ sal_Int8 SAL_CALL DNDListenerContainer::getDefaultActions( )
// DNDListenerContainer::setDefaultActions
//==================================================================================================
-void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
+void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
throw(RuntimeException)
{
m_nDefaultActions = actions;
@@ -147,7 +147,7 @@ void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions )
// DNDListenerContainer::fireDropEvent
//==================================================================================================
-sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDropContext >& context,
+sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDropContext >& context,
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
const Reference< XTransferable >& transferable )
{
@@ -155,17 +155,17 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
-
+
// remember context to use in own context methods
m_xDropTargetDropContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0,
- static_cast < XDropTargetDropContext * > (this), dropAction,
+ DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ static_cast < XDropTargetDropContext * > (this), dropAction,
locationX, locationY, sourceActions, transferable );
while (aIterator.hasMoreElements())
@@ -225,10 +225,10 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop
sal_uInt32 DNDListenerContainer::fireDragExitEvent()
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -267,14 +267,14 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent()
// DNDListenerContainer::fireDragOverEvent
//==================================================================================================
-sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTargetDragContext >& context,
+sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTargetDragContext >& context,
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -283,8 +283,8 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
- static_cast < XDropTargetDragContext * > (this),
+ DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions );
while (aIterator.hasMoreElements())
@@ -335,14 +335,14 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget
//==================================================================================================
sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTargetDragContext >& context,
- sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
+ sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions,
const Sequence< DataFlavor >& dataFlavors )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -351,7 +351,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0,
static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions, dataFlavors );
@@ -406,10 +406,10 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDropTargetListener > * ) 0) );
-
+
if( pContainer && m_bActive )
{
OInterfaceIteratorHelper aIterator( *pContainer );
@@ -418,7 +418,7 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD
m_xDropTargetDragContext = context;
// do not construct the event before you are sure at least one listener is registered
- DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
+ DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0,
static_cast < XDropTargetDragContext * > (this),
dropAction, locationX, locationY, sourceActions );
@@ -473,16 +473,16 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( sal_Int8 dragAction, sal_
sal_Int32 dragOriginY, const Reference< XDragSource >& dragSource, const Any& triggerEvent )
{
sal_uInt32 nRet = 0;
-
+
// fire DropTargetDropEvent on all XDropTargetListeners
OInterfaceContainerHelper *pContainer = rBHelper.getContainer( getCppuType( ( Reference < XDragGestureListener > * ) 0) );
-
+
if( pContainer )
{
OInterfaceIteratorHelper aIterator( *pContainer );
// do not construct the event before you are sure at least one listener is registered
- DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction,
+ DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction,
dragOriginX, dragOriginY, dragSource, triggerEvent );
while( aIterator.hasMoreElements() )
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 9ea407e52ee3..fa3779870685 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,7 +72,7 @@ static void ImplInitBackground( DockingAreaWindow* pThis )
DockingAreaWindow::DockingAreaWindow( Window* pParent ) :
Window( WINDOW_DOCKINGAREA )
{
- ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
+ ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
mpImplData = new ImplData;
ImplInitBackground( this );
@@ -102,7 +102,7 @@ static void ImplInvalidateMenubar( DockingAreaWindow* pThis )
// due to a possible comon gradient covering menubar and top dockingarea
// the menubar must be repainted if the top dockingarea changes size or visibility
if( ImplGetSVData()->maNWFData.mbMenuBarDockingAreaCommonBG &&
- (pThis->GetAlign() == WINDOWALIGN_TOP)
+ (pThis->GetAlign() == WINDOWALIGN_TOP)
&& pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL )
&& pThis->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
@@ -167,8 +167,8 @@ void DockingAreaWindow::Paint( const Rectangle& )
// draw a single toolbar background covering the whole docking area
Point tmp;
Rectangle aCtrlRegion( tmp, GetOutputSizePixel() );
-
- DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+
+ DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aCtrlRegion, nState, aControlValue, rtl::OUString() );
// each toolbar gets a thin border to better recognize its borders on the homogeneous docking area
@@ -194,7 +194,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
}
else
{
- // create map to find toolbar lines
+ // create map to find toolbar lines
Size aOutSz = GetOutputSizePixel();
std::map< int, int > ranges;
USHORT nChildren = GetChildCount();
@@ -228,7 +228,7 @@ void DockingAreaWindow::Paint( const Rectangle& )
aTBRect.Top() = 0;
aTBRect.Bottom() = aOutSz.Height() - 1;
}
- DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+ DrawNativeControl( CTRL_TOOLBAR, IsHorizontal() ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aTBRect, nState, aControlValue, rtl::OUString() );
}
}
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index e67c2d9ecfd5..ffbae266584a 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,13 +62,13 @@ class ImplDockFloatWin2 : public FloatingWindow
{
private:
ImplDockingWindowWrapper* mpDockWin;
- ULONG mnLastTicks;
- Timer maDockTimer;
- Timer maEndDockTimer;
- Point maDockPos;
- Rectangle maDockRect;
+ ULONG mnLastTicks;
+ Timer maDockTimer;
+ Timer maEndDockTimer;
+ Point maDockPos;
+ Rectangle maDockRect;
BOOL mbInMove;
- ULONG mnLastUserEvent;
+ ULONG mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin2* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin2* );
@@ -78,14 +78,14 @@ public:
ImplDockingWindowWrapper* pDockingWin );
~ImplDockFloatWin2();
- virtual void Move();
- virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
- virtual void Pin();
- virtual void Roll();
- virtual void PopupModeEnd();
- virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual void Move();
+ virtual void Resize();
+ virtual void TitleButtonClick( USHORT nButton );
+ virtual void Pin();
+ virtual void Roll();
+ virtual void PopupModeEnd();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
using Window::SetPosSizePixel;
virtual void SetPosSizePixel( long nX, long nY,
long nWidth, long nHeight,
@@ -216,8 +216,8 @@ IMPL_LINK( ImplDockFloatWin2, DockingHdl, ImplDockFloatWin2*, EMPTYARG )
}
}
- if( mpDockWin->IsDockable() &&
- mpDockWin->GetWindow()->IsVisible() &&
+ if( mpDockWin->IsDockable() &&
+ mpDockWin->GetWindow()->IsVisible() &&
(Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) && // i43499 CTRL disables docking now
@@ -436,7 +436,7 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow )
{
StartPopupMode( pParentToolBox, pWindow, FLOATWIN_POPUPMODE_ALLOWTEAROFF |
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE |
FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE );
}
@@ -515,14 +515,14 @@ Rectangle DockingManager::GetPosSizePixel( const Window *pWindow )
// if TEAROFF_DASHED defined a single dashed line is used
// otherwise multiple smaller lines will be painted
-//#define TEAROFF_DASHED
+//#define TEAROFF_DASHED
// size of the drag area
#ifdef TEAROFF_DASHED
-#define POPUP_DRAGBORDER 2
-#define POPUP_DRAGGRIP 5
+#define POPUP_DRAGBORDER 2
+#define POPUP_DRAGGRIP 5
#else
-#define POPUP_DRAGBORDER 3
+#define POPUP_DRAGBORDER 3
#define POPUP_DRAGGRIP 5
#endif
#define POPUP_DRAGHEIGHT (POPUP_DRAGGRIP+POPUP_DRAGBORDER+POPUP_DRAGBORDER)
@@ -534,11 +534,11 @@ private:
ImplDockingWindowWrapper* mpDockingWin;
BOOL mbHighlight;
BOOL mbMoving;
- bool mbTrackingEnabled;
+ bool mbTrackingEnabled;
Point maDelta;
Point maTearOffPosition;
- bool mbGripAtBottom;
- bool mbHasGrip;
+ bool mbGripAtBottom;
+ bool mbHasGrip;
void ImplSetBorder();
public:
@@ -560,13 +560,13 @@ public:
void DrawGrip();
void DrawBorder();
- bool hasGrip() const { return mbHasGrip; }
+ bool hasGrip() const { return mbHasGrip; }
};
-ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
+ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW)
{
- mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility
+ mpWindowImpl->mbToolbarFloatingWindow = TRUE; // indicate window type, required for accessibility
// which should not see this window as a toplevel window
mpDockingWin = pDockingWin;
mbHighlight = FALSE;
@@ -589,7 +589,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin()
// this is to avoid appearance of this window as standalone window in the accessibility hierarchy
// as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
- // has to provide accessibility support (as implemented in the toolkit)
+ // has to provide accessibility support (as implemented in the toolkit)
// so the contained toolbar should appear as child of the correponsing toolbar item of the parent toolbar
return ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >();
}
@@ -620,7 +620,7 @@ void ImplPopupFloatWin::ImplSetBorder()
void ImplPopupFloatWin::Resize()
{
// the borderview overwrites the border during resize so restore it
- ImplSetBorder();
+ ImplSetBorder();
}
Rectangle ImplPopupFloatWin::GetDragRect() const
@@ -743,8 +743,8 @@ void ImplPopupFloatWin::DrawGrip()
//aRect.nLeft = aRect.nLeft + (aRect.getWidth() - width) / 2;
aRect.nLeft = (aRect.nLeft + aRect.nRight - width) / 2;
aRect.nRight = aRect.nLeft + width;
-
- int i=0;
+
+ int i=0;
while( i< POPUP_DRAGGRIP )
{
DrawRect( aRect );
@@ -839,7 +839,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
{
// move the window according to mouse pos
PointerState aState = GetParent()->GetPointerState();
- if (ImplHasMirroredGraphics() && IsRTLEnabled())
+ if (ImplHasMirroredGraphics() && IsRTLEnabled())
ImplMirrorFramePos(aState.maPos);
maTearOffPosition = aState.maPos - maDelta;
GetWindow( WINDOW_BORDER )->SetPosPixel( maTearOffPosition );
@@ -856,8 +856,8 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow )
mpDockingWindow = (Window*) pWindow;
mpParent = pWindow->GetParent();
- mbDockable = TRUE;
- mbLocked = FALSE;
+ mbDockable = TRUE;
+ mbLocked = FALSE;
mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES);
DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow );
if( pDockWin )
@@ -1148,7 +1148,7 @@ BOOL ImplDockingWindowWrapper::Close()
void ImplDockingWindowWrapper::ToggleFloatingMode()
{
// notify dockingwindow/toolbox
- // note: this must be done *before* notifying the
+ // note: this must be done *before* notifying the
// listeners to have the toolbox in the proper state
if( GetWindow()->ImplIsDockingWindow() )
((DockingWindow*) GetWindow())->ToggleFloatingMode();
@@ -1234,7 +1234,7 @@ BOOL ImplDockingWindowWrapper::IsTitleButtonVisible( USHORT nButton ) const
{
if ( nButton == TITLE_BUTTON_DOCKING )
return mbDockBtn;
- else // if ( nButton == TITLE_BUTTON_HIDE )
+ else // if ( nButton == TITLE_BUTTON_HIDE )
return mbHideBtn;
}
}
@@ -1316,7 +1316,7 @@ IMPL_LINK( ImplDockingWindowWrapper, PopupModeEnd, void*, EMPTYARG )
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
+ ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
@@ -1374,7 +1374,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ?
mnFloatBits | WB_SYSTEMWINDOW
//#ifdef __USE_OWNERDRAWDECORATION__
- | WB_OWNERDRAWDECORATION
+ | WB_OWNERDRAWDECORATION
//#endif
: mnFloatBits,
this );
@@ -1448,7 +1448,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( BOOL bFloatMode )
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
- ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
+ ((ImplBorderWindow*)mpOldBorderWin)->GetBorder(
GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
mpOldBorderWin->Resize();
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index c8e382bad982..d60eccb46dff 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,8 +62,8 @@ public:
ImplData();
~ImplData();
- Window* mpParent;
- Size maMaxOutSize;
+ Window* mpParent;
+ Size maMaxOutSize;
};
DockingWindow::ImplData::ImplData()
@@ -82,12 +82,12 @@ class ImplDockFloatWin : public FloatingWindow
{
private:
DockingWindow* mpDockWin;
- ULONG mnLastTicks;
- Timer maDockTimer;
- Point maDockPos;
- Rectangle maDockRect;
+ ULONG mnLastTicks;
+ Timer maDockTimer;
+ Point maDockPos;
+ Rectangle maDockRect;
BOOL mbInMove;
- ULONG mnLastUserEvent;
+ ULONG mnLastUserEvent;
DECL_LINK( DockingHdl, ImplDockFloatWin* );
DECL_LINK( DockTimerHdl, ImplDockFloatWin* );
@@ -96,14 +96,14 @@ public:
DockingWindow* pDockingWin );
~ImplDockFloatWin();
- virtual void Move();
- virtual void Resize();
- virtual void TitleButtonClick( USHORT nButton );
- virtual void Pin();
- virtual void Roll();
- virtual void PopupModeEnd();
- virtual void Resizing( Size& rSize );
- virtual BOOL Close();
+ virtual void Move();
+ virtual void Resize();
+ virtual void TitleButtonClick( USHORT nButton );
+ virtual void Pin();
+ virtual void Roll();
+ virtual void PopupModeEnd();
+ virtual void Resizing( Size& rSize );
+ virtual BOOL Close();
ULONG GetLastTicks() const { return mnLastTicks; }
};
@@ -178,8 +178,8 @@ IMPL_LINK( ImplDockFloatWin, DockingHdl, ImplDockFloatWin*, EMPTYARG )
PointerState aState = mpDockWin->GetParent()->GetPointerState();
mnLastUserEvent = 0;
- if( mpDockWin->IsDockable() &&
- (Time::GetSystemTicks() - mnLastTicks > 500) &&
+ if( mpDockWin->IsDockable() &&
+ (Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) ) // i43499 CTRL disables docking now
{
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 323bbe3b0d74..394deb5b2f66 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,8 +54,8 @@ public:
ImplData();
~ImplData();
- ToolBox* mpBox;
- Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
+ ToolBox* mpBox;
+ Rectangle maItemEdgeClipRect; // used to clip the common edge between a toolbar item and the border of this window
};
FloatingWindow::ImplData::ImplData()
@@ -138,7 +138,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle )
mpNextFloat = NULL;
mpFirstPopupModeWin = NULL;
mnPostId = 0;
- mnTitle = (nStyle & WB_MOVEABLE) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE;
+ mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE;
mnOldTitle = mnTitle;
mnPopupModeFlags = 0;
mbInPopupMode = FALSE;
@@ -267,7 +267,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
BOOL bRTL = Application::GetSettings().GetLayoutRTL();
- Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
+ Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ),
pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) );
Rectangle devRectRTL( devRect );
@@ -342,13 +342,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
bBreak = FALSE;
}
if( bBreak )
- {
+ {
e1 = devRect.TopLeft();
e2 = devRect.BottomLeft();
// set non-zero width
e2.X()++;
// don't clip corners
- e1.Y()++;
+ e1.Y()++;
e2.Y()--;
}
break;
@@ -366,13 +366,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
bBreak = FALSE;
}
if( bBreak )
- {
+ {
e1 = devRect.TopRight();
e2 = devRect.BottomRight();
// set non-zero width
e2.X()++;
// don't clip corners
- e1.Y()++;
+ e1.Y()++;
e2.Y()--;
}
break;
@@ -382,13 +382,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if ( aPos.Y() < aScreenRect.Top() )
bBreak = FALSE;
if( bBreak )
- {
+ {
e1 = devRect.TopLeft();
e2 = devRect.TopRight();
// set non-zero height
e2.Y()++;
// don't clip corners
- e1.X()++;
+ e1.X()++;
e2.X()--;
}
break;
@@ -397,13 +397,13 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow,
if ( aPos.Y()+aSize.Height() > aScreenRect.Bottom() )
bBreak = FALSE;
if( bBreak )
- {
+ {
e1 = devRect.BottomLeft();
e2 = devRect.BottomRight();
// set non-zero height
e2.Y()++;
// don't clip corners
- e1.X()++;
+ e1.X()++;
e2.X()--;
}
break;
@@ -486,7 +486,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
else
aAbsolute = Point( pReference->OutputToAbsoluteScreenPixel(
pReference->ScreenToOutputPixel(rPos) ) );
-
+
do
{
// compute the floating window's size in absolute screen coordinates
@@ -502,8 +502,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin
return pWin;
}
- // test, if mouse is in rectangle, (this is typically the rect of the active
- // toolbox item or similar)
+ // test, if mouse is in rectangle, (this is typically the rect of the active
+ // toolbox item or similar)
// note: maFloatRect is set in FloatingWindow::StartPopupMode() and
// is already in absolute device coordinates
if ( pWin->maFloatRect.IsInside( aAbsolute ) )
@@ -652,6 +652,8 @@ void FloatingWindow::SetTitleType( USHORT nTitle )
nTitleStyle = BORDERWINDOW_TITLE_SMALL;
else if ( nTitle == FLOATWIN_TITLE_TEAROFF )
nTitleStyle = BORDERWINDOW_TITLE_TEAROFF;
+ else if ( nTitle == FLOATWIN_TITLE_POPUP )
+ nTitleStyle = BORDERWINDOW_TITLE_POPUP;
else // nTitle == FLOATWIN_TITLE_NONE
nTitleStyle = BORDERWINDOW_TITLE_NONE;
((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetTitleType( nTitleStyle, aOutSize );
@@ -670,9 +672,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, ULONG nFlags )
if ( IsRollUp() )
RollDown();
- // remove title
+ // remove title
mnOldTitle = mnTitle;
- if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
+ if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && GetText().Len() )
+ SetTitleType( FLOATWIN_TITLE_POPUP );
+ else if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
SetTitleType( FLOATWIN_TITLE_TEAROFF );
else
SetTitleType( FLOATWIN_TITLE_NONE );
@@ -749,15 +753,15 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, ULONG nFlags )
aRect.SetPos( aPos );
nFlags |=
- FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
-// FLOATWIN_POPUPMODE_NOMOUSECLOSE |
+ FLOATWIN_POPUPMODE_NOFOCUSCLOSE |
+// FLOATWIN_POPUPMODE_NOMOUSECLOSE |
FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE |
-// FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE | // #105968# floating toolboxes should close when clicked in (parent's) float rect
+// FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE | // #105968# floating toolboxes should close when clicked in (parent's) float rect
FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE;
-// | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
+// | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
/*
- * FLOATWIN_POPUPMODE_NOKEYCLOSE |
+ * FLOATWIN_POPUPMODE_NOKEYCLOSE |
* don't set since it disables closing floaters with escape
*/
@@ -791,7 +795,7 @@ void FloatingWindow::ImplEndPopupMode( USHORT nFlags, ULONG nFocusId )
while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this )
pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL );
-
+
// Fenster aus der Liste austragen
pSVData->maWinData.mpFirstFloat = mpNextFloat;
mpNextFloat = NULL;
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 03f88adc3566..6e6bac881516 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/javachild.cxx b/vcl/source/window/javachild.cxx
index 2cd18b897ff5..271e74fcf106 100644
--- a/vcl/source/window/javachild.cxx
+++ b/vcl/source/window/javachild.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-
+
#ifdef SOLAR_JAVA
#include <jni.h>
#endif
@@ -84,20 +84,20 @@ void JavaChildWindow::implTestJavaException( void* pEnv )
#ifdef SOLAR_JAVA
JNIEnv* pJavaEnv = reinterpret_cast< JNIEnv* >( pEnv );
jthrowable jtThrowable = pJavaEnv->ExceptionOccurred();
-
- if( jtThrowable )
+
+ if( jtThrowable )
{ // is it a java exception ?
#if OSL_DEBUG_LEVEL > 1
pJavaEnv->ExceptionDescribe();
-#endif // OSL_DEBUG_LEVEL > 1
+#endif // OSL_DEBUG_LEVEL > 1
pJavaEnv->ExceptionClear();
jclass jcThrowable = pJavaEnv->FindClass("java/lang/Throwable");
jmethodID jmThrowable_getMessage = pJavaEnv->GetMethodID(jcThrowable, "getMessage", "()Ljava/lang/String;");
jstring jsMessage = (jstring) pJavaEnv->CallObjectMethod(jtThrowable, jmThrowable_getMessage);
::rtl::OUString ouMessage;
-
- if(jsMessage)
+
+ if(jsMessage)
{
const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, NULL);
ouMessage = ::rtl::OUString(jcMessage);
@@ -113,7 +113,7 @@ void JavaChildWindow::implTestJavaException( void* pEnv )
sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
{
- sal_IntPtr nRet = 0;
+ sal_IntPtr nRet = 0;
#if defined WNT
nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd );
@@ -123,7 +123,7 @@ sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
#elif defined UNX
#ifdef SOLAR_JAVA
uno::Reference< lang::XMultiServiceFactory > xFactory( vcl::unohelper::GetMultiServiceFactory() );
-
+
if( xFactory.is() && ( GetSystemData()->aWindow > 0 ) )
{
try
@@ -131,65 +131,65 @@ sal_IntPtr JavaChildWindow::getParentWindowHandleForJava()
::rtl::Reference< ::jvmaccess::VirtualMachine > xVM;
uno::Reference< java::XJavaVM > xJavaVM( xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.java.JavaVirtualMachine") ) ), uno::UNO_QUERY );
uno::Sequence< sal_Int8 > aProcessID( 17 );
-
+
rtl_getGlobalProcessId( (sal_uInt8*) aProcessID.getArray() );
aProcessID[ 16 ] = 0;
OSL_ENSURE(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *), "Pointer cannot be represented as sal_Int64");
sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(0));
xJavaVM->getJavaVM(aProcessID) >>= nPointer;
xVM = reinterpret_cast< jvmaccess::VirtualMachine * >(nPointer);
-
+
if( xVM.is() )
{
try
{
::jvmaccess::VirtualMachine::AttachGuard aVMAttachGuard( xVM );
JNIEnv* pEnv = aVMAttachGuard.getEnvironment();
-
- jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit");
+
+ jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit");
implTestJavaException(pEnv);
-
+
jmethodID jmToolkit_getDefaultToolkit = pEnv->GetStaticMethodID( jcToolkit, "getDefaultToolkit", "()Ljava/awt/Toolkit;" );
implTestJavaException(pEnv);
-
+
pEnv->CallStaticObjectMethod(jcToolkit, jmToolkit_getDefaultToolkit);
implTestJavaException(pEnv);
-
+
jclass jcMotifAppletViewer = pEnv->FindClass("sun/plugin/navig/motif/MotifAppletViewer");
if( pEnv->ExceptionOccurred() )
{
pEnv->ExceptionClear();
-
- jcMotifAppletViewer = pEnv->FindClass( "sun/plugin/viewer/MNetscapePluginContext");
+
+ jcMotifAppletViewer = pEnv->FindClass( "sun/plugin/viewer/MNetscapePluginContext");
implTestJavaException(pEnv);
}
-
- jclass jcClassLoader = pEnv->FindClass("java/lang/ClassLoader");
+
+ jclass jcClassLoader = pEnv->FindClass("java/lang/ClassLoader");
implTestJavaException(pEnv);
-
+
jmethodID jmClassLoader_loadLibrary = pEnv->GetStaticMethodID( jcClassLoader, "loadLibrary", "(Ljava/lang/Class;Ljava/lang/String;Z)V");
implTestJavaException(pEnv);
-
+
jstring jsplugin = pEnv->NewStringUTF("javaplugin_jni");
implTestJavaException(pEnv);
-
- pEnv->CallStaticVoidMethod(jcClassLoader, jmClassLoader_loadLibrary, jcMotifAppletViewer, jsplugin, JNI_FALSE);
+
+ pEnv->CallStaticVoidMethod(jcClassLoader, jmClassLoader_loadLibrary, jcMotifAppletViewer, jsplugin, JNI_FALSE);
implTestJavaException(pEnv);
-
+
jmethodID jmMotifAppletViewer_getWidget = pEnv->GetStaticMethodID( jcMotifAppletViewer, "getWidget", "(IIIII)I" );
implTestJavaException(pEnv);
-
+
const Size aSize( GetOutputSizePixel() );
- jint ji_widget = pEnv->CallStaticIntMethod( jcMotifAppletViewer, jmMotifAppletViewer_getWidget,
+ jint ji_widget = pEnv->CallStaticIntMethod( jcMotifAppletViewer, jmMotifAppletViewer_getWidget,
GetSystemData()->aWindow, 0, 0, aSize.Width(), aSize.Height() );
implTestJavaException(pEnv);
-
+
nRet = static_cast< sal_IntPtr >( ji_widget );
}
catch( uno::RuntimeException& )
{
}
-
+
if( !nRet )
nRet = static_cast< sal_IntPtr >( GetSystemData()->aWindow );
}
diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx
index bcc5536fd028..8e3ec3fca35c 100644
--- a/vcl/source/window/keycod.cxx
+++ b/vcl/source/window/keycod.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,9 +101,9 @@ KeyCode::KeyCode( const ResId& rResId )
{
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
- ULONG nKeyCode = pResMgr->ReadLong();
- ULONG nModifier = pResMgr->ReadLong();
- ULONG nKeyFunc = pResMgr->ReadLong();
+ ULONG nKeyCode = pResMgr->ReadLong();
+ ULONG nModifier = pResMgr->ReadLong();
+ ULONG nKeyFunc = pResMgr->ReadLong();
eFunc = (KeyFuncType)nKeyFunc;
if ( eFunc != KEYFUNC_DONTKNOW )
diff --git a/vcl/source/window/keyevent.cxx b/vcl/source/window/keyevent.cxx
index f4011b9be16e..35844f31867e 100644
--- a/vcl/source/window/keyevent.cxx
+++ b/vcl/source/window/keyevent.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ void KeyEvent::InitKeyEvent( ::com::sun::star::awt::KeyEvent& rEvent ) const
}
KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
-{
+{
KeyEvent aClone(*this);
USHORT nCode = maKeyCode.GetCode();
@@ -91,11 +91,11 @@ KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
switch (nCode)
{
case KEY_DOWN: aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break;
- case KEY_UP: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break;
- case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_DOWN, nMod); break;
+ case KEY_UP: aClone.maKeyCode = KeyCode(KEY_LEFT, nMod); break;
+ case KEY_LEFT: aClone.maKeyCode = KeyCode(KEY_DOWN, nMod); break;
case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_UP, nMod); break;
}
- break;
+ break;
case TextDirectionality_LeftToRight_TopToBottom:
/* do nothing */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index fa6d9972d32a..9d88fe426cb1 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,9 +80,9 @@ namespace vcl
struct MenuLayoutData : public ControlLayoutData
{
- std::vector< USHORT > m_aLineItemIds;
- std::vector< USHORT > m_aLineItemPositions;
- std::map< USHORT, Rectangle > m_aVisibleItemBoundRects;
+ std::vector< USHORT > m_aLineItemIds;
+ std::vector< USHORT > m_aLineItemPositions;
+ std::map< USHORT, Rectangle > m_aVisibleItemBoundRects;
};
}
@@ -113,8 +113,8 @@ static BOOL ImplHilite( const MouseEvent& rMEvt )
// read XWP settings at program startup
if (init == FALSE) {
- BOOL rc;
- ULONG cb = sizeof(HOOKCONFIG);
+ BOOL rc;
+ ULONG cb = sizeof(HOOKCONFIG);
memset(&hc, 0, sizeof(HOOKCONFIG));
rc = PrfQueryProfileData( HINI_USER, INIAPP_XWPHOOK, INIKEY_HOOK_CONFIG,
&hc, &cb);
@@ -147,29 +147,29 @@ static BOOL ImplAccelDisabled()
struct MenuItemData
{
- USHORT nId; // SV Id
- MenuItemType eType; // MenuItem-Type
- MenuItemBits nBits; // MenuItem-Bits
- Menu* pSubMenu; // Pointer auf das SubMenu
- Menu* pAutoSubMenu; // Pointer auf SubMenu aus Resource
- XubString aText; // Menu-Text
- XubString aHelpText; // Help-String
- XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
- XubString aCommandStr; // CommandString
+ USHORT nId; // SV Id
+ MenuItemType eType; // MenuItem-Type
+ MenuItemBits nBits; // MenuItem-Bits
+ Menu* pSubMenu; // Pointer auf das SubMenu
+ Menu* pAutoSubMenu; // Pointer auf SubMenu aus Resource
+ XubString aText; // Menu-Text
+ XubString aHelpText; // Help-String
+ XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
+ XubString aCommandStr; // CommandString
XubString aHelpCommandStr; // Help command string (to reference external help)
- ULONG nHelpId; // Help-Id
- ULONG nUserValue; // User value
- Image aImage; // Image
- KeyCode aAccelKey; // Accelerator-Key
- BOOL bChecked; // Checked
- BOOL bEnabled; // Enabled
- BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
- BOOL bIsTemporary; // Temporary inserted ('No selection possible')
- BOOL bMirrorMode;
- long nItemImageAngle;
- Size aSz; // nur temporaer gueltig
- XubString aAccessibleName; // accessible name
- XubString aAccessibleDescription; // accessible description
+ ULONG nHelpId; // Help-Id
+ ULONG nUserValue; // User value
+ Image aImage; // Image
+ KeyCode aAccelKey; // Accelerator-Key
+ BOOL bChecked; // Checked
+ BOOL bEnabled; // Enabled
+ BOOL bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true)
+ BOOL bIsTemporary; // Temporary inserted ('No selection possible')
+ BOOL bMirrorMode;
+ long nItemImageAngle;
+ Size aSz; // nur temporaer gueltig
+ XubString aAccessibleName; // accessible name
+ XubString aAccessibleDescription; // accessible description
SalMenuItem* pSalMenuItem; // access to native menu
@@ -187,7 +187,7 @@ struct MenuItemData
return bChecked || ( nBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) );
}
};
-
+
MenuItemData::~MenuItemData()
{
if( pAutoSubMenu )
@@ -224,7 +224,7 @@ public:
{ return (MenuItemData*)List::GetObject( nPos ); }
MenuItemData* SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCode, USHORT& rPos, USHORT& nDuplicates, USHORT nCurrentPos ) const;
- USHORT GetItemCount( xub_Unicode cSelectChar ) const;
+ USHORT GetItemCount( xub_Unicode cSelectChar ) const;
USHORT GetItemCount( KeyCode aKeyCode ) const;
uno::Reference< i18n::XCharacterClassification > GetCharClass() const;
@@ -246,20 +246,20 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
const XubString& rStr, const Image& rImage,
Menu* pMenu, USHORT nPos )
{
- MenuItemData* pData = new MenuItemData( rStr, rImage );
- pData->nId = nId;
- pData->eType = eType;
- pData->nBits = nBits;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
- pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
- pData->nItemImageAngle = 0;
+ MenuItemData* pData = new MenuItemData( rStr, rImage );
+ pData->nId = nId;
+ pData->eType = eType;
+ pData->nBits = nBits;
+ pData->pSubMenu = NULL;
+ pData->pAutoSubMenu = NULL;
+ pData->nHelpId = 0;
+ pData->nUserValue = 0;
+ pData->bChecked = FALSE;
+ pData->bEnabled = TRUE;
+ pData->bVisible = TRUE;
+ pData->bIsTemporary = FALSE;
+ pData->bMirrorMode = FALSE;
+ pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
aSalMIData.nId = nId;
@@ -278,20 +278,20 @@ MenuItemData* MenuItemList::Insert( USHORT nId, MenuItemType eType,
void MenuItemList::InsertSeparator( USHORT nPos )
{
- MenuItemData* pData = new MenuItemData;
- pData->nId = 0;
- pData->eType = MENUITEM_SEPARATOR;
- pData->nBits = 0;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
- pData->nHelpId = 0;
- pData->nUserValue = 0;
- pData->bChecked = FALSE;
- pData->bEnabled = TRUE;
- pData->bVisible = TRUE;
- pData->bIsTemporary = FALSE;
- pData->bMirrorMode = FALSE;
- pData->nItemImageAngle = 0;
+ MenuItemData* pData = new MenuItemData;
+ pData->nId = 0;
+ pData->eType = MENUITEM_SEPARATOR;
+ pData->nBits = 0;
+ pData->pSubMenu = NULL;
+ pData->pAutoSubMenu = NULL;
+ pData->nHelpId = 0;
+ pData->nUserValue = 0;
+ pData->bChecked = FALSE;
+ pData->bEnabled = TRUE;
+ pData->bVisible = TRUE;
+ pData->bIsTemporary = FALSE;
+ pData->bMirrorMode = FALSE;
+ pData->nItemImageAngle = 0;
SalItemParams aSalMIData;
aSalMIData.nId = 0;
@@ -337,7 +337,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
USHORT nListCount = (USHORT)Count();
// try character code first
- nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates
+ nDuplicates = GetItemCount( cSelectChar ); // return number of duplicates
if( nDuplicates )
{
for ( rPos = 0; rPos < nListCount; rPos++)
@@ -346,7 +346,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, cSelectChar ) )
{
if( nDuplicates > 1 && rPos == nCurrentPos )
- continue; // select next entry with the same mnemonic
+ continue; // select next entry with the same mnemonic
else
return pData;
}
@@ -354,7 +354,7 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
}
// nothing found, try keycode instead
- nDuplicates = GetItemCount( aKeyCode ); // return number of duplicates
+ nDuplicates = GetItemCount( aKeyCode ); // return number of duplicates
if( nDuplicates )
{
@@ -373,13 +373,13 @@ MenuItemData* MenuItemList::SearchItem( xub_Unicode cSelectChar, KeyCode aKeyCod
KeyCode mnKeyCode;
xub_Unicode mnUnicode = pData->aText.GetChar(n+1);
Window* pDefWindow = ImplGetDefaultWindow();
- if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode )
+ if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode )
&& aKeyCode.GetCode() == mnKeyCode.GetCode())
|| (ascii && rI18nHelper.MatchMnemonic( pData->aText, ascii ) ) )
{
if( nDuplicates > 1 && rPos == nCurrentPos )
- continue; // select next entry with the same mnemonic
+ continue; // select next entry with the same mnemonic
else
return pData;
}
@@ -429,7 +429,7 @@ USHORT MenuItemList::GetItemCount( KeyCode aKeyCode ) const
// if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes
// so we have working shortcuts when ascii mnemonics are used
Window* pDefWindow = ImplGetDefaultWindow();
- if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode )
+ if( (pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode )
&& aKeyCode.GetCode() == mnKeyCode.GetCode())
|| ( ascii && rI18nHelper.MatchMnemonic( pData->aText, ascii ) ) )
nItems++;
@@ -487,7 +487,7 @@ private:
DECL_LINK( ShowHideListener, VclWindowEvent* );
void StateChanged( StateChangedType nType );
- void DataChanged( const DataChangedEvent& rDCEvt );
+ void DataChanged( const DataChangedEvent& rDCEvt );
protected:
Region ImplCalcClipRegion( BOOL bIncludeLogo = TRUE ) const;
void ImplInitClipRegion();
@@ -498,7 +498,7 @@ protected:
void ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd = FALSE );
void ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDown );
long ImplGetStartY() const;
- Rectangle ImplGetItemRect( USHORT nPos );
+ Rectangle ImplGetItemRect( USHORT nPos );
public:
MenuFloatingWindow( Menu* pMenu, Window* pParent, WinBits nStyle );
@@ -599,7 +599,7 @@ void DecoToolBox::calcMinSize()
if( GetItemCount() == 0 )
{
ResMgr* pResMgr = ImplGetResMgr();
-
+
Bitmap aBitmap;
if( pResMgr )
aBitmap = Bitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
@@ -615,7 +615,7 @@ void DecoToolBox::calcMinSize()
}
}
aTbx.SetOutStyle( TOOLBOX_STYLE_FLAT );
- maMinSize = aTbx.CalcWindowSizePixel();
+ maMinSize = aTbx.CalcWindowSizePixel();
}
Size DecoToolBox::getMinSize()
@@ -637,21 +637,21 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
{
lastSize = nMaxHeight - border;
- Color aEraseColor( 255, 255, 255, 255 );
- BitmapEx aBmpExDst( maImage.GetBitmapEx() );
- BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ Color aEraseColor( 255, 255, 255, 255 );
+ BitmapEx aBmpExDst( maImage.GetBitmapEx() );
+ BitmapEx aBmpExSrc( GetSettings().GetStyleSettings().GetHighContrastMode() ?
maImageHC.GetBitmapEx() : aBmpExDst );
-
+
aEraseColor.SetTransparency( 255 );
aBmpExDst.Erase( aEraseColor );
aBmpExDst.SetSizePixel( Size( lastSize, lastSize ) );
-
+
Rectangle aSrcRect( Point(0,0), maImage.GetSizePixel() );
- Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
- (lastSize - maImage.GetSizePixel().Height())/2 ),
+ Rectangle aDestRect( Point((lastSize - maImage.GetSizePixel().Width())/2,
+ (lastSize - maImage.GetSizePixel().Height())/2 ),
maImage.GetSizePixel() );
-
+
aBmpExDst.CopyPixel( aDestRect, aSrcRect, &aBmpExSrc );
SetItemImage( IID_DOCUMENTCLOSE, Image( aBmpExDst ) );
}
@@ -675,7 +675,7 @@ private:
USHORT m_nId;
Link m_aSelectLink;
Link m_aHighlightLink;
-
+
AddButtonEntry() : m_nId( 0 ) {}
};
@@ -685,12 +685,12 @@ private:
ULONG nSaveFocusId;
BOOL mbAutoPopup;
BOOL bIgnoreFirstMove;
- BOOL bStayActive;
+ BOOL bStayActive;
DecoToolBox aCloser;
PushButton aFloatBtn;
PushButton aHideBtn;
-
+
std::map< USHORT, AddButtonEntry > m_aAddButtons;
void HighlightItem( USHORT nPos, BOOL bHighlight );
@@ -699,8 +699,8 @@ private:
USHORT ImplFindEntry( const Point& rMousePos ) const;
void ImplCreatePopup( BOOL bPreSelectFirst );
BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE );
- Rectangle ImplGetItemRect( USHORT nPos );
-
+ Rectangle ImplGetItemRect( USHORT nPos );
+
void ImplInitStyleSettings();
DECL_LINK( CloserHdl, PushButton* );
@@ -741,7 +741,7 @@ public:
void SetAutoPopup( BOOL bAuto ) { mbAutoPopup = bAuto; }
void ImplLayoutChanged();
Size MinCloseButtonSize();
-
+
// add an arbitrary button to the menubar (will appear next to closer)
USHORT AddMenuBarButton( const Image&, const Link&, const String&, USHORT nPos );
void SetMenuBarButtonHighlightHdl( USHORT nId, const Link& );
@@ -792,7 +792,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
{
if( ! pMenu )
return FALSE;
-
+
BOOL bDone = FALSE;
USHORT nId = 0;
@@ -845,7 +845,7 @@ static BOOL ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, USHORT nHighl
// den Hilfe-Index
String aCommand = pMenu->GetItemCommand( nId );
ULONG nHelpId = pMenu->GetHelpId( nId );
-
+
if ( aCommand.Len() )
pHelp->Start( aCommand, NULL );
else if ( nHelpId )
@@ -912,7 +912,7 @@ Menu::Menu( BOOL bMenubar )
Menu::~Menu()
{
DBG_DTOR( Menu, NULL );
-
+
vcl::LazyDeletor<Menu>::Undelete( this );
ImplCallEventListeners( VCLEVENT_OBJECT_DYING, ITEMPOS_INVALID );
@@ -977,7 +977,7 @@ void Menu::ImplInit()
bCanceled = FALSE;
bInCallback = FALSE;
bKilled = FALSE;
- mpLayoutData = NULL;
+ mpLayoutData = NULL;
mpFirstDel = NULL; // Dtor notification list
// Native-support: returns NULL if not supported
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu( bIsMenuBar );
@@ -993,7 +993,7 @@ void Menu::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
rResId.SetRT( RSC_MENU );
GetRes( rResId );
@@ -1102,7 +1102,7 @@ void Menu::Deactivate()
if( !aDelData.isDeleted() )
{
bInCallback = FALSE;
-
+
if ( this == pStartMenu )
GetpApp()->HideHelpStatusText();
}
@@ -1282,7 +1282,7 @@ void Menu::InsertItem( const ResId& rResId, USHORT nPos )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
ULONG nObjMask;
GetRes( rResId.SetRT( RSC_MENUITEM ) );
@@ -1622,7 +1622,7 @@ void Menu::SetPopupMenu( USHORT nItemId, PopupMenu* pMenu )
// data exchange
pData->pSubMenu = pMenu;
-
+
// #112023# Make sure pStartedFrom does not point to invalid (old) data
if ( pData->pSubMenu )
pData->pSubMenu->pStartedFrom = 0;
@@ -1905,9 +1905,9 @@ void Menu::SetItemImage( USHORT nItemId, const Image& rImage )
static inline Image ImplRotImage( const Image& rImage, long nAngle10 )
{
- Image aRet;
- BitmapEx aBmpEx( rImage.GetBitmapEx() );
-
+ Image aRet;
+ BitmapEx aBmpEx( rImage.GetBitmapEx() );
+
aBmpEx.Rotate( nAngle10, COL_WHITE );
return Image( aBmpEx );
@@ -1932,9 +1932,9 @@ void Menu::SetItemImageAngle( USHORT nItemId, long nAngle10 )
static inline Image ImplMirrorImage( const Image& rImage )
{
- Image aRet;
- BitmapEx aBmpEx( rImage.GetBitmapEx() );
-
+ Image aRet;
+ BitmapEx aBmpEx( rImage.GetBitmapEx() );
+
aBmpEx.Mirror( BMP_MIRROR_HORZ );
return Image( aBmpEx );
@@ -2023,7 +2023,7 @@ const XubString& Menu::GetHelpCommand( USHORT nItemId ) const
else
return ImplGetSVEmptyStr();
}
-
+
void Menu::SetHelpText( USHORT nItemId, const XubString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2038,7 +2038,7 @@ const XubString& Menu::ImplGetHelpText( USHORT nItemId ) const
if ( pData )
{
- if ( !pData->aHelpText.Len() &&
+ if ( !pData->aHelpText.Len() &&
(( pData->nHelpId ) || ( pData->aCommandStr.Len() )))
{
Help* pHelp = Application::GetHelp();
@@ -2154,7 +2154,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
// check for separator
if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR )
bVisible = FALSE;
-
+
if( bVisible )
{
for( n = nPos; n > 0; n-- )
@@ -2174,7 +2174,7 @@ BOOL Menu::ImplIsVisible( USHORT nPos ) const
// Fuer den Menubar nicht erlaubt, weil ich nicht mitbekomme
// ob dadurch ein Eintrag verschwindet oder wieder da ist.
- if ( bVisible && !bIsMenuBar && ( nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES ) &&
+ if ( bVisible && !bIsMenuBar && ( nMenuFlags & MENU_FLAG_HIDEDISABLEDENTRIES ) &&
!( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) )
{
if( !pData ) // e.g. nPos == ITEMPOS_INVALID
@@ -2212,7 +2212,7 @@ BOOL Menu::ImplIsSelectable( USHORT nPos ) const
// check general visibility first
if ( pData && ( pData->nBits & MIB_NOSELECT ) )
bSelectable = FALSE;
-
+
return bSelectable;
}
@@ -2257,14 +2257,14 @@ void Menu::SelectItem( USHORT nItemId )
}
void Menu::SetAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible )
-{
+{
mxAccessible = rxAccessible;
}
long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) const
{
rMaxWidth = rCheckHeight = rRadioHeight = 0;
-
+
if( ! bIsMenuBar )
{
ImplControlValue aVal;
@@ -2518,7 +2518,7 @@ Size Menu::ImplCalcSize( Window* pWin )
{
nTextPos = (USHORT)(2*nExtra);
aSz.Height() = nFontHeight+6;
-
+
// get menubar height from native methods if supported
if( pWindow->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
{
@@ -2564,10 +2564,10 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
ImplControlValue aControlValue;
Rectangle aCtrlRegion( i_rRect );
ControlState nState = CTRL_STATE_PRESSED | CTRL_STATE_ENABLED;
-
+
aControlValue.setTristateVal( BUTTONVALUE_ON );
-
- bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
+
+ bNativeOk = i_pWindow->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
aCtrlRegion, nState, aControlValue,
rtl::OUString() );
}
@@ -2596,7 +2596,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
if ( pLogo )
aTopLeft.X() = pLogo->aBitmap.GetSizePixel().Width();
-
+
int nOuterSpace = 0;
if( !bIsMenuBar )
{
@@ -2678,23 +2678,23 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
ControlPart nPart = ((pData->nBits & MIB_RADIOCHECK)
? PART_MENU_ITEM_RADIO_MARK
: PART_MENU_ITEM_CHECK_MARK);
-
+
ControlState nState = 0;
-
+
if ( pData->bChecked )
nState |= CTRL_STATE_PRESSED;
-
+
if ( pData->bEnabled )
nState |= CTRL_STATE_ENABLED;
-
+
if ( bHighlighted )
nState |= CTRL_STATE_SELECTED;
-
+
long nCtrlHeight = (pData->nBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight;
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight)/2;
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
-
- Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
+
+ Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
pWin->DrawNativeControl( CTRL_MENU_POPUP, nPart,
aCheckRect,
nState,
@@ -2704,7 +2704,7 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
else if ( pData->bChecked ) // by default do nothing for unchecked items
{
ImplPaintCheckBackground( pWin, aOuterCheckRect, pThisItemOnly && bHighlighted );
-
+
SymbolType eSymbol;
Size aSymbolSize;
if ( pData->nBits & MIB_RADIOCHECK )
@@ -3205,7 +3205,7 @@ BOOL Menu::GetSystemMenuData( SystemMenuData* pData ) const
bool Menu::IsHighlighted( USHORT nItemPos ) const
{
bool bRet = false;
-
+
if( pWindow )
{
if( bIsMenuBar )
@@ -3213,7 +3213,7 @@ bool Menu::IsHighlighted( USHORT nItemPos ) const
else
bRet = ( nItemPos == static_cast< MenuFloatingWindow * > (pWindow)->GetHighlightedItem() );
}
-
+
return bRet;
}
@@ -3322,7 +3322,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu )
// depending on the native implementation or the displayable flag
// the menubar windows is supressed (ie, height=0)
- if( !((MenuBar*) pMenu)->IsDisplayable() ||
+ if( !((MenuBar*) pMenu)->IsDisplayable() ||
( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) )
nHeight = 0;
@@ -3346,7 +3346,7 @@ BOOL MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu )
BOOL bDone = FALSE;
// No keyboard processing when system handles the menu or our menubar is invisible
- if( !IsDisplayable() ||
+ if( !IsDisplayable() ||
( ImplGetSalMenu() && ImplGetSalMenu()->VisibleMenuBar() ) )
return bDone;
@@ -3391,11 +3391,11 @@ BOOL MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = TRUE;
pMenu->Activate();
-
+
if( !aDelData.isDeleted() )
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = FALSE;
}
return TRUE;
}
@@ -3407,10 +3407,10 @@ BOOL MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const
ImplMenuDelData aDelData( this );
pMenu->pStartedFrom = (Menu*)this;
- pMenu->bInCallback = TRUE;
+ pMenu->bInCallback = TRUE;
pMenu->Deactivate();
if( !aDelData.isDeleted() )
- pMenu->bInCallback = FALSE;
+ pMenu->bInCallback = FALSE;
}
return TRUE;
}
@@ -3483,7 +3483,7 @@ void MenuBar::RemoveMenuBarButton( USHORT nId )
BOOL MenuBar::HandleMenuButtonEvent( Menu *, USHORT i_nButtonId ) const
{
- return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId );
+ return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId );
}
// -----------------------------------------------------------------------
@@ -3770,7 +3770,7 @@ USHORT PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, ULONG nPopupM
if ( bRealExecute )
{
pWin->ImplAddDel( &aDelData );
-
+
ImplDelData aModalWinDel;
pW->ImplAddDel( &aModalWinDel );
pW->ImplIncModalCount();
@@ -3942,7 +3942,7 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt
aSubmenuCloseTimer.SetTimeout( GetSettings().GetMouseSettings().GetMenuDelay() );
aSubmenuCloseTimer.SetTimeoutHdl( LINK( this, MenuFloatingWindow, SubmenuClose ) );
aScrollTimer.SetTimeoutHdl( LINK( this, MenuFloatingWindow, AutoScroll ) );
-
+
AddEventListener( LINK( this, MenuFloatingWindow, ShowHideListener ) );
}
@@ -3954,7 +3954,7 @@ void MenuFloatingWindow::doShutdown()
// otherwise the entry will not be read when the menu is opened again
if( nHighlightedItem != ITEMPOS_INVALID )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem );
-
+
if( !bKeyInput && pMenu && pMenu->pStartedFrom && !pMenu->pStartedFrom->bIsMenuBar )
{
// #102461# remove highlight in parent
@@ -3973,12 +3973,12 @@ void MenuFloatingWindow::doShutdown()
pPWin->HighlightItem( i, FALSE );
}
}
-
+
// free the reference to the accessible component
SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
-
+
aHighlightChangedTimer.Stop();
-
+
// #95056# invalidate screen area covered by system window
// so this can be taken into account if the commandhandler performs a scroll operation
if( GetParent() )
@@ -4046,7 +4046,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, BOOL bMBDow
{
if( ! pMenu )
return;
-
+
long nY = nScrollerHeight;
long nMouseY = rMEvt.GetPosPixel().Y();
Size aOutSz = GetOutputSizePixel();
@@ -4179,7 +4179,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer )
{
if( ! pMenu )
return 0;
-
+
MenuItemData* pItemData = pMenu->pItemList->GetDataFromPos( nHighlightedItem );
if ( pItemData )
{
@@ -4255,7 +4255,7 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
if( pEvent->GetId() == VCLEVENT_WINDOW_SHOW )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
else if( pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
@@ -4358,7 +4358,7 @@ void MenuFloatingWindow::EndExecute()
ImplGetSVData()->maWinData.mbNoDeactivate = FALSE;
}
}
-
+
// Wenn von woanders gestartet, dann ab dort aufraumen:
MenuFloatingWindow* pCleanUpFrom = this;
MenuFloatingWindow* pWin = this;
@@ -4482,7 +4482,7 @@ void MenuFloatingWindow::ImplScroll( BOOL bUp )
{
KillActivePopup();
Update();
-
+
if( ! pMenu )
return;
@@ -4647,7 +4647,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
if( ! pMenu )
return;
-
+
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
long nY = nScrollerHeight+nStartY;
@@ -4658,7 +4658,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
int nOuterSpace = ImplGetSVData()->maNWFData.mnMenuFormatExtraBorder;
nY += nOuterSpace;
-
+
USHORT nCount = (USHORT)pMenu->pItemList->Count();
for ( USHORT n = 0; n < nCount; n++ )
{
@@ -4678,7 +4678,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
long nFontHeight = GetTextHeight();
aItemRect.Right() -= nFontHeight + nFontHeight/4;
}
-
+
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
Size aPxSize( GetOutputSizePixel() );
@@ -4723,7 +4723,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
}
else
SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() );
-
+
DrawRect( aItemRect );
}
pMenu->ImplPaint( this, nScrollerHeight, nStartY, pData, bHighlight );
@@ -4741,7 +4741,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( USHORT nPos )
{
if( ! pMenu )
return Rectangle();
-
+
Rectangle aRect;
Size aSz = GetOutputSizePixel();
long nStartY = ImplGetStartY();
@@ -4779,7 +4779,7 @@ void MenuFloatingWindow::ImplCursorUpDown( BOOL bUp, BOOL bHomeEnd )
{
if( ! pMenu )
return;
-
+
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
USHORT n = nHighlightedItem;
@@ -5025,7 +5025,7 @@ void MenuFloatingWindow::Paint( const Rectangle& )
{
if( ! pMenu )
return;
-
+
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
SetClipRegion();
@@ -5054,7 +5054,7 @@ void MenuFloatingWindow::ImplDrawScroller( BOOL bUp )
{
if( ! pMenu )
return;
-
+
SetClipRegion();
Size aOutSz = GetOutputSizePixel();
@@ -5165,30 +5165,30 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) :
{
BitmapEx aBitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
BitmapEx aBitmapHC( ResId( SV_RESID_BITMAP_CLOSEDOCHC, *pResMgr ) );
-
+
aCloser.maImage = Image( aBitmap );
aCloser.maImageHC = Image( aBitmapHC );
-
+
aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT );
aCloser.SetBackground();
aCloser.SetPaintTransparent( TRUE );
aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP );
-
+
aCloser.InsertItem( IID_DOCUMENTCLOSE,
GetSettings().GetStyleSettings().GetHighContrastMode() ? aCloser.maImageHC : aCloser.maImage, 0 );
aCloser.SetSelectHdl( LINK( this, MenuBarWindow, CloserHdl ) );
aCloser.AddEventListener( LINK( this, MenuBarWindow, ToolboxEventHdl ) );
aCloser.SetQuickHelpText( IID_DOCUMENTCLOSE, XubString( ResId( SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr ) ) );
-
+
aFloatBtn.SetClickHdl( LINK( this, MenuBarWindow, FloatHdl ) );
aFloatBtn.SetSymbol( SYMBOL_FLOAT );
aFloatBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_RESTORE, *pResMgr ) ) );
-
+
aHideBtn.SetClickHdl( LINK( this, MenuBarWindow, HideHdl ) );
aHideBtn.SetSymbol( SYMBOL_HIDE );
aHideBtn.SetQuickHelpText( XubString( ResId( SV_HELPTEXT_MINIMIZE, *pResMgr ) ) );
}
-
+
ImplInitStyleSettings();
AddEventListener( LINK( this, MenuBarWindow, ShowHideListener ) );
@@ -5243,7 +5243,7 @@ IMPL_LINK( MenuBarWindow, CloserHdl, PushButton*, EMPTYARG )
{
if( ! pMenu )
return 0;
-
+
if( aCloser.GetCurItemId() == IID_DOCUMENTCLOSE )
{
// #i106052# call close hdl asynchronously to ease handler implementation
@@ -5270,7 +5270,7 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
MenuBar::MenuBarButtonCallbackArg aArg;
aArg.nId = 0xffff;
aArg.bHighlight = (pEvent->GetId() == VCLEVENT_TOOLBOX_HIGHLIGHT);
@@ -5294,7 +5294,7 @@ IMPL_LINK( MenuBarWindow, ShowHideListener, VclWindowEvent*, pEvent )
{
if( ! pMenu )
return 0;
-
+
if( pEvent->GetId() == VCLEVENT_WINDOW_SHOW )
pMenu->ImplCallEventListeners( VCLEVENT_MENU_SHOW, ITEMPOS_INVALID );
else if( pEvent->GetId() == VCLEVENT_WINDOW_HIDE )
@@ -5432,7 +5432,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt )
}
USHORT nEntry = ImplFindEntry( rMEvt.GetPosPixel() );
- if ( ( nEntry != ITEMPOS_INVALID )
+ if ( ( nEntry != ITEMPOS_INVALID )
#ifdef OS2
&& ( ImplHilite(rMEvt) )
#endif
@@ -5444,7 +5444,7 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
{
if( ! pMenu )
return;
-
+
// #57934# ggf. das aktive Popup sofort schliessen, damit TH's Hintergrundsicherung funktioniert.
MenuItemData* pNextData = pMenu->pItemList->GetDataFromPos( n );
if ( pActivePopup && pActivePopup->ImplGetWindow() && ( !pNextData || ( pActivePopup != pNextData->pSubMenu ) ) )
@@ -5465,10 +5465,10 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
if( !ImplGetSVData()->maWinData.mbNoSaveFocus )
{
// we didn't clean up last time
- Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up
+ Window::EndSaveFocus( nSaveFocusId, FALSE ); // clean up
nSaveFocusId = 0;
if( !bNoSaveFocus )
- nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
+ nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
}
else {
; // do nothing: we 're activated again from taskpanelist, focus was already saved
@@ -5477,7 +5477,7 @@ void MenuBarWindow::ChangeHighlightItem( USHORT n, BOOL bSelectEntry, BOOL bAllo
else
{
if( !bNoSaveFocus )
- nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
+ nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated
}
}
else
@@ -5527,7 +5527,7 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
{
if( ! pMenu )
return;
-
+
long nX = 0;
ULONG nCount = pMenu->pItemList->Count();
for ( ULONG n = 0; n < nCount; n++ )
@@ -5558,7 +5558,7 @@ void MenuBarWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
aControlValue,
OUString() );
ImplAddNWFSeparator( this, aControlValue );
-
+
// draw selected item
DrawNativeControl( CTRL_MENUBAR, PART_MENU_ITEM,
aRect,
@@ -5618,7 +5618,7 @@ Rectangle MenuBarWindow::ImplGetItemRect( USHORT nPos )
aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
break;
}
-
+
nX += pData->aSz.Width();
}
}
@@ -5635,7 +5635,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
{
if( ! pMenu )
return FALSE;
-
+
if ( pMenu->bInCallback )
return TRUE; // schlucken
@@ -5681,7 +5681,7 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
else
n = pMenu->GetItemCount()-1;
}
-
+
// handling gtk like (aka mbOpenMenuOnF10)
// do not highlight an item when opening a sub menu
// unless there already was a higlighted sub menu item
@@ -5805,7 +5805,7 @@ void MenuBarWindow::Paint( const Rectangle& )
{
if( ! pMenu )
return;
-
+
// no VCL paint if native menus
if( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() )
{
@@ -5935,7 +5935,7 @@ void MenuBarWindow::ImplLayoutChanged()
// depending on the native implementation or the displayable flag
// the menubar windows is supressed (ie, height=0)
- if( !((MenuBar*) pMenu)->IsDisplayable() ||
+ if( !((MenuBar*) pMenu)->IsDisplayable() ||
( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) )
nHeight = 0;
@@ -6011,7 +6011,7 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi
std::map< USHORT, AddButtonEntry >::const_iterator it;
if( i_nPos > m_aAddButtons.size() )
i_nPos = static_cast<USHORT>(m_aAddButtons.size());
- do
+ do
{
nId++;
it = m_aAddButtons.find( nId );
@@ -6026,10 +6026,10 @@ USHORT MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link& i_rLi
aFloatBtn.IsVisible(),
aHideBtn.IsVisible() );
ImplLayoutChanged();
-
+
if( pMenu->mpSalMenu )
pMenu->mpSalMenu->AddMenuBarButton( SalMenuButtonItem( nId, i_rImage, i_rToolTip ) );
-
+
return nId;
}
@@ -6054,7 +6054,7 @@ Rectangle MenuBarWindow::GetMenuBarButtonRectPixel( USHORT nId )
return Rectangle();
}
}
-
+
if( aRect.IsEmpty() )
{
aRect = aCloser.GetItemRect( nId );
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index c2c6c18135f2..fecb265aba9e 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -344,7 +344,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// do
// {
// c = aKey.GetChar( nIndex );
-//
+//
// nMnemonicIndex = ImplGetMnemonicIndex( c );
// if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
// {
@@ -353,7 +353,7 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
// bChanged = TRUE;
// break;
// }
-//
+//
// // Search for next word
// do
// {
@@ -387,7 +387,7 @@ String MnemonicGenerator::EraseAllMnemonicChars( const String& rStr )
String aStr = rStr;
xub_StrLen nLen = aStr.Len();
xub_StrLen i = 0;
-
+
while ( i < nLen )
{
if ( aStr.GetChar( i ) == '~' )
@@ -396,8 +396,8 @@ String MnemonicGenerator::EraseAllMnemonicChars( const String& rStr )
if( i > 0 && (i+2) < nLen )
{
sal_Unicode c = aStr.GetChar(i+1);
- if( aStr.GetChar( i-1 ) == '(' &&
- aStr.GetChar( i+2 ) == ')' &&
+ if( aStr.GetChar( i-1 ) == '(' &&
+ aStr.GetChar( i+2 ) == ')' &&
c >= MNEMONIC_RANGE_2_START && c <= MNEMONIC_RANGE_2_END )
{
aStr.Erase( i-1, 4 );
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index 241aea1cf336..673537b26a37 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/mouseevent.cxx b/vcl/source/window/mouseevent.cxx
index 4bfe08b3f3d8..e5e6f6a8ec00 100644
--- a/vcl/source/window/mouseevent.cxx
+++ b/vcl/source/window/mouseevent.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 7f7a65cd7fb9..b122aa170965 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,11 +73,11 @@ static void ImplInitMsgBoxImageList()
void MessBox::ImplInitMessBoxData()
{
- mpFixedText = NULL;
- mpFixedImage = NULL;
- mnSoundType = 0;
- mbHelpBtn = FALSE;
- mbSound = TRUE;
+ mpFixedText = NULL;
+ mpFixedImage = NULL;
+ mnSoundType = 0;
+ mbHelpBtn = FALSE;
+ mbSound = TRUE;
mpCheckBox = NULL;
mbCheck = FALSE;
}
@@ -87,11 +87,11 @@ void MessBox::ImplInitMessBoxData()
void MessBox::ImplInitButtons()
{
WinBits nStyle = GetStyle();
- USHORT nOKFlags = BUTTONDIALOG_OKBUTTON;
- USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
- USHORT nRetryFlags = 0;
- USHORT nYesFlags = 0;
- USHORT nNoFlags = 0;
+ USHORT nOKFlags = BUTTONDIALOG_OKBUTTON;
+ USHORT nCancelFlags = BUTTONDIALOG_CANCELBUTTON;
+ USHORT nRetryFlags = 0;
+ USHORT nYesFlags = 0;
+ USHORT nNoFlags = 0;
if ( nStyle & WB_OK_CANCEL )
{
@@ -192,13 +192,13 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) :
ImplInitMessBoxData();
GetRes( rResId.SetRT( RSC_MESSBOX ) );
- USHORT nHiButtons = ReadShortRes();
- USHORT nLoButtons = ReadShortRes();
+ USHORT nHiButtons = ReadShortRes();
+ USHORT nLoButtons = ReadShortRes();
USHORT nHiDefButton = ReadShortRes();
USHORT nLoDefButton = ReadShortRes();
- USHORT nHiHelpId = ReadShortRes();
- USHORT nLoHelpId = ReadShortRes();
- /* USHORT bSysModal = */ ReadShortRes();
+ USHORT nHiHelpId = ReadShortRes();
+ USHORT nLoHelpId = ReadShortRes();
+ /* USHORT bSysModal = */ ReadShortRes();
SetHelpId( ((ULONG)nHiHelpId << 16) + nLoHelpId );
WinBits nBits = (((ULONG)nHiButtons << 16) + nLoButtons) |
(((ULONG)nHiDefButton << 16) + nLoDefButton);
@@ -250,21 +250,21 @@ void MessBox::ImplPosControls()
}
}
- XubString aMessText( maMessText );
- TextRectInfo aTextInfo;
- Rectangle aRect( 0, 0, 30000, 30000 );
- Rectangle aFormatRect;
- Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
- Size aImageSize;
- Size aPageSize;
- Size aFixedSize;
- long nTitleWidth;
- long nButtonSize = ImplGetButtonSize();
- long nMaxWidth = GetDesktopRectPixel().GetWidth()-8;
- long nMaxLineWidth;
- long nWidth;
- WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO;
- USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
+ XubString aMessText( maMessText );
+ TextRectInfo aTextInfo;
+ Rectangle aRect( 0, 0, 30000, 30000 );
+ Rectangle aFormatRect;
+ Point aTextPos( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+IMPL_MSGBOX_OFFSET_EXTRA_Y );
+ Size aImageSize;
+ Size aPageSize;
+ Size aFixedSize;
+ long nTitleWidth;
+ long nButtonSize = ImplGetButtonSize();
+ long nMaxWidth = GetDesktopRectPixel().GetWidth()-8;
+ long nMaxLineWidth;
+ long nWidth;
+ WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL | WB_INFO;
+ USHORT nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | TEXT_DRAW_LEFT;
if ( mpFixedText )
delete mpFixedText;
@@ -282,8 +282,8 @@ void MessBox::ImplPosControls()
// Message-Text um Tabs bereinigen
- XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) );
- USHORT nIndex = 0;
+ XubString aTabStr( RTL_CONSTASCII_USTRINGPARAM( " " ) );
+ USHORT nIndex = 0;
while ( nIndex != STRING_NOTFOUND )
nIndex = aMessText.SearchAndReplace( '\t', aTabStr, nIndex );
@@ -307,7 +307,7 @@ void MessBox::ImplPosControls()
aImageSize = maImage.GetSizePixel();
if ( aImageSize.Width() )
{
- aImageSize.Width() += 4;
+ aImageSize.Width() += 4;
aImageSize.Height() += 4;
aTextPos.X() += aImageSize.Width()+IMPL_SEP_MSGBOX_IMAGE;
mpFixedImage = new FixedImage( this );
@@ -351,19 +351,19 @@ void MessBox::ImplPosControls()
}
// Style fuer FixedText ermitteln
- aPageSize.Width() = aImageSize.Width();
- aFixedSize.Width() = aTextInfo.GetMaxLineWidth()+1;
+ aPageSize.Width() = aImageSize.Width();
+ aFixedSize.Width() = aTextInfo.GetMaxLineWidth()+1;
aFixedSize.Height() = aFormatRect.GetHeight();
if ( aFixedSize.Height() < aImageSize.Height() )
{
nWinStyle |= WB_VCENTER;
- aPageSize.Height() = aImageSize.Height();
+ aPageSize.Height() = aImageSize.Height();
aFixedSize.Height() = aImageSize.Height();
}
else
{
nWinStyle |= WB_TOP;
- aPageSize.Height() = aFixedSize.Height();
+ aPageSize.Height() = aFixedSize.Height();
}
if ( aImageSize.Width() )
aPageSize.Width() += IMPL_SEP_MSGBOX_IMAGE;
@@ -588,7 +588,7 @@ void ErrorBox::ImplInitErrorBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
+ SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_ERROR)+1;
}
diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx
index 78ef0bcf1068..3a5e750181f0 100644
--- a/vcl/source/window/popupmenuwindow.cxx
+++ b/vcl/source/window/popupmenuwindow.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d0fae33acf3b..38d6e219955d 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -167,7 +167,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
aNewSize.Height() -= 2;
Size aScaledSize;
double fScale = 1.0;
-
+
// #i106435# catch corner case of Size(0,0)
Size aOrigSize( maOrigSize );
if( aOrigSize.Width() < 1 )
@@ -188,9 +188,9 @@ void PrintDialog::PrintPreviewWindow::Resize()
}
aScaledSize.Width() = long(aScaledSize.Width()*fScale);
aScaledSize.Height() = long(aScaledSize.Height()*fScale);
-
+
maPreviewSize = aScaledSize;
-
+
// #i104784# if we render the page too small then rounding issues result in
// layout artifacts looking really bad. So scale the page unto a device that is not
// full page size but not too small either. This also results in much better visual
@@ -204,7 +204,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
aScaledSize.Height() *= 2;
fZoom /= 2.0;
}
-
+
maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
}
@@ -232,10 +232,10 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
else
{
GDIMetaFile aMtf( maMtf );
-
+
Point aOffset( (aSize.Width() - maPreviewSize.Width()) / 2,
(aSize.Height() - maPreviewSize.Height()) / 2 );
-
+
Size aVDevSize( maPageVDev.GetOutputSizePixel() );
const Size aLogicSize( maPageVDev.PixelToLogic( aVDevSize, MapMode( MAP_100TH_MM ) ) );
Size aOrigSize( maOrigSize );
@@ -244,8 +244,8 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
if( aOrigSize.Height() < 1 )
aOrigSize.Height() = aLogicSize.Height();
double fScale = double(aLogicSize.Width())/double(aOrigSize.Width());
-
-
+
+
maPageVDev.Erase();
maPageVDev.Push();
maPageVDev.SetMapMode( MAP_100TH_MM );
@@ -254,11 +254,11 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
aMtf.WindStart();
aMtf.Play( &maPageVDev, Point( 0, 0 ), aLogicSize );
maPageVDev.Pop();
-
+
SetMapMode( MAP_PIXEL );
maPageVDev.SetMapMode( MAP_PIXEL );
DrawOutDev( aOffset, maPreviewSize, Point( 0, 0 ), aVDevSize, maPageVDev );
-
+
DecorationView aVw( this );
Rectangle aFrame( aOffset + Point( -1, -1 ), Size( maPreviewSize.Width() + 2, maPreviewSize.Height() + 2 ) );
aVw.DrawFrame( aFrame, FRAME_DRAW_GROUP );
@@ -339,7 +339,7 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
Window::Paint( i_rRect );
SetMapMode( MAP_PIXEL );
SetTextColor( GetSettings().GetStyleSettings().GetFieldTextColor() );
-
+
int nPages = mnRows * mnColumns;
Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
aFont.SetSize( Size( 0, 24 ) );
@@ -355,7 +355,7 @@ void PrintDialog::ShowNupOrderWindow::Paint( const Rectangle& i_rRect )
long nFontHeight = long(24.0*fScale) - 3;
if( nFontHeight < 5 )
nFontHeight = 5;
- aFont.SetSize( Size( 0, nFontHeight ) );
+ aFont.SetSize( Size( 0, nFontHeight ) );
SetFont( aFont );
long nTextHeight = GetTextHeight();
for( int i = 0; i < nPages; i++ )
@@ -407,11 +407,11 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
, maBorderCB( this, VclResId( SV_PRINT_PRT_NUP_BORDER_CB ) )
{
FreeResource();
-
+
maNupOrderWin.Show();
maPagesBtn.Check( TRUE );
maBrochureBtn.Show( FALSE );
-
+
// setup field units for metric fields
const LocaleDataWrapper& rLocWrap( maPageMarginEdt.GetLocaleDataWrapper() );
FieldUnit eUnit = FUNIT_MM;
@@ -428,7 +428,7 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
// set precision
maPageMarginEdt.SetDecimalDigits( nDigits );
maSheetMarginEdt.SetDecimalDigits( nDigits );
-
+
SMHID1( "NUpPage" );
maNupLine.SMHID2("NUpPage", "Layout");
maBrochureBtn.SMHID2("NUpPage", "Brochure" );
@@ -436,7 +436,7 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
maPagesBoxTitleTxt.SMHID2( "NUpPage", "PagesPerSheetLabel" );
maNupPagesBox.SMHID2( "NUpPage", "PagesPerSheetBox" );
maNupNumPagesTxt.SMHID2( "NUpPage", "Columns" );
- maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
+ maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
maNupTimesTxt.SMHID2( "NUpPage", "Rows" );
maNupRowsEdt.SMHID2( "NUpPage", "RowsBox" );
maPageMarginTxt1.SMHID2( "NUpPage", "PageMargin" );
@@ -505,7 +505,7 @@ void PrintDialog::NUpTabPage::setupLayout()
maLayout.setParentWindow( this );
maLayout.setOuterBorder( aBorder.Width() );
-
+
maLayout.addWindow( &maNupLine );
boost::shared_ptr< vcl::RowOrColumn > xRow( new vcl::RowOrColumn( &maLayout, false ) );
maLayout.addChild( xRow );
@@ -518,12 +518,12 @@ void PrintDialog::NUpTabPage::setupLayout()
boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( xShowNupCol.get() ) );
xShowNupCol->addChild( xSpacer );
- boost::shared_ptr< vcl::LabelColumn > xMainCol( new vcl::LabelColumn( xIndent.get() ) );
+ boost::shared_ptr< vcl::LabelColumn > xMainCol( new vcl::LabelColumn( xIndent.get() ) );
xIndent->setChild( xMainCol );
-
+
size_t nPagesIndex = xMainCol->addRow( &maPagesBtn, &maNupPagesBox );
mxPagesBtnLabel = boost::dynamic_pointer_cast<vcl::LabeledElement>( xMainCol->getChild( nPagesIndex ) );
-
+
xRow.reset( new vcl::RowOrColumn( xMainCol.get(), false ) );
xMainCol->addRow( &maNupNumPagesTxt, xRow, nIndent );
xRow->addWindow( &maNupColEdt );
@@ -534,16 +534,16 @@ void PrintDialog::NUpTabPage::setupLayout()
xLab->setLabel( &maPageMarginEdt );
xLab->setElement( &maPageMarginTxt2 );
xMainCol->addRow( &maPageMarginTxt1, xLab, nIndent );
-
+
xLab.reset( new vcl::LabeledElement( xMainCol.get(), 2 ) );
xLab->setLabel( &maSheetMarginEdt );
xLab->setElement( &maSheetMarginTxt2 );
xMainCol->addRow( &maSheetMarginTxt1, xLab, nIndent );
xMainCol->addRow( &maNupOrientationTxt, &maNupOrientationBox, nIndent );
- xMainCol->addRow( &maNupOrderTxt, &maNupOrderBox, nIndent );
+ xMainCol->addRow( &maNupOrderTxt, &maNupOrderBox, nIndent );
xMainCol->setBorders( xMainCol->addWindow( &maBorderCB ), nIndent, 0, 0, 0 );
-
+
xSpacer.reset( new vcl::Spacer( xMainCol.get(), 0, Size( 10, aBorder.Width() ) ) );
xMainCol->addChild( xSpacer );
@@ -551,7 +551,7 @@ void PrintDialog::NUpTabPage::setupLayout()
xMainCol->addRow( &maBrochureBtn, xRow );
// remember brochure row for dependencies
mxBrochureDep = xRow;
-
+
// initially advanced controls are not shown, rows=columns=1
showAdvancedControls( false );
}
@@ -622,12 +622,12 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId )
maCopyCountField.SMHID2( "JobPage", "Copies" );
maCollateBox.SMHID2( "JobPage", "Collate" );
maCollateImage.SMHID2( "JobPage", "CollateImage" );
-
+
maCopySpacer.Show();
maStatusTxt.Show();
maCommentTxt.Show();
maLocationTxt.Show();
-
+
setupLayout();
}
@@ -640,7 +640,7 @@ void PrintDialog::JobTabPage::setupLayout()
// HACK: this is not a dropdown box, but the dropdown line count
// sets the results of GetOptimalSize in a normal ListBox
maPrinters.SetDropDownLineCount( 4 );
-
+
Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
maLayout.setParentWindow( this );
@@ -655,9 +655,9 @@ void PrintDialog::JobTabPage::setupLayout()
boost::shared_ptr< vcl::RowOrColumn > xDetRow( new vcl::RowOrColumn( &maLayout, false ) );
maLayout.addChild( xDetRow );
xDetRow->addWindow( &maDetailsBtn );
- xDetRow->addChild( new vcl::Spacer( xDetRow.get(), 2 ) );
+ xDetRow->addChild( new vcl::Spacer( xDetRow.get(), 2 ) );
xDetRow->addWindow( &maSetupButton );
-
+
// create an indent for details
boost::shared_ptr< vcl::Indenter > xIndent( new vcl::Indenter( &maLayout ) );
maLayout.addChild( xIndent );
@@ -674,7 +674,7 @@ void PrintDialog::JobTabPage::setupLayout()
maLayout.addWindow( &maCopies );
boost::shared_ptr< vcl::RowOrColumn > xRangeRow( new vcl::RowOrColumn( &maLayout, false, aBorder.Width() ) );
maLayout.addChild( xRangeRow );
-
+
// create print range and add to range row
mxPrintRange.reset( new vcl::RowOrColumn( xRangeRow.get() ) );
xRangeRow->addChild( mxPrintRange );
@@ -682,7 +682,7 @@ void PrintDialog::JobTabPage::setupLayout()
boost::shared_ptr< vcl::RowOrColumn > xCopyCollateCol( new vcl::RowOrColumn( xRangeRow.get() ) );
xRangeRow->addChild( xCopyCollateCol );
-
+
// add copies row to copy/collate column
boost::shared_ptr< vcl::LabeledElement > xCopiesRow( new vcl::LabeledElement( xCopyCollateCol.get(), 2 ) );
xCopyCollateCol->addChild( xCopiesRow );
@@ -701,7 +701,7 @@ void PrintDialog::JobTabPage::readFromSettings()
{
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue;
-
+
#if 0
// do not actually make copy count persistent
// the assumption is that this would lead to a lot of unwanted copies
@@ -710,7 +710,7 @@ void PrintDialog::JobTabPage::readFromSettings()
sal_Int32 nVal = aValue.toInt32();
maCopyCountField.SetValue( sal_Int64(nVal > 1 ? nVal : 1) );
#endif
-
+
aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CollateBox" ) ) );
if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) )
@@ -758,7 +758,7 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe
maToFileBox.SMHID2( "OptPage", "ToFile" );
maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" );
maReverseOrderBox.SMHID2( "OptPage", "Reverse" );
-
+
setupLayout();
}
@@ -772,7 +772,7 @@ void PrintDialog::OutputOptPage::setupLayout()
maLayout.setParentWindow( this );
maLayout.setOuterBorder( aBorder.Width() );
-
+
maLayout.addWindow( &maOptionsLine );
boost::shared_ptr<vcl::Indenter> xIndent( new vcl::Indenter( &maLayout, aBorder.Width() ) );
maLayout.addChild( xIndent );
@@ -789,7 +789,7 @@ void PrintDialog::OutputOptPage::readFromSettings()
#if 0
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue;
-
+
aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ) );
maToFileBox.Check( aValue.equalsIgnoreAsciiCaseAscii( "true" ) );
@@ -803,7 +803,7 @@ void PrintDialog::OutputOptPage::storeToSettings()
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ),
rtl::OUString::createFromAscii( maToFileBox.IsChecked() ? "true" : "false" ) );
}
-
+
void PrintDialog::OutputOptPage::Resize()
{
maLayout.setManagedArea( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
@@ -834,32 +834,32 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
, mbShowLayoutPage( sal_True )
{
FreeResource();
-
+
// save printbutton text, gets exchanged occasionally with print to file
maPrintText = maOKButton.GetText();
-
+
// setup preview controls
maForwardBtn.SetStyle( maForwardBtn.GetStyle() | WB_BEVELBUTTON );
maBackwardBtn.SetStyle( maBackwardBtn.GetStyle() | WB_BEVELBUTTON );
-
+
// insert the job (general) tab page first
maTabCtrl.InsertPage( SV_PRINT_TAB_JOB, maJobPage.GetText() );
maTabCtrl.SetTabPage( SV_PRINT_TAB_JOB, &maJobPage );
-
+
// set symbols on forward and backward button
maBackwardBtn.SetSymbol( SYMBOL_PREV );
maForwardBtn.SetSymbol( SYMBOL_NEXT );
maBackwardBtn.ImplSetSmallSymbol( TRUE );
maForwardBtn.ImplSetSmallSymbol( TRUE );
-
+
maPageStr = maNumPagesText.GetText();
-
+
// init reverse print
maOptionsPage.maReverseOrderBox.Check( maPController->getReversePrint() );
// get the first page
preparePreview( true, true );
-
+
// fill printer listbox
const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() );
for( std::vector< rtl::OUString >::const_iterator it = rQueues.begin();
@@ -892,10 +892,10 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
}
// update the text fields for the printer
updatePrinterText();
-
+
// set a select handler
maJobPage.maPrinters.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
-
+
// setup sizes for N-Up
Size aNupSize( maPController->getPrinter()->PixelToLogic(
maPController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
@@ -911,7 +911,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
}
maNUpPage.initFromMultiPageSetup( maPController->getMultipage() );
-
+
// setup click handler on the various buttons
maOKButton.SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
#if OSL_DEBUG_LEVEL > 1
@@ -928,7 +928,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maOptionsPage.maReverseOrderBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maOptionsPage.maCollateSingleJobsBox.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
maNUpPage.maPagesBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
-
+
// setup modify hdl
maPageEdit.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
maJobPage.maCopyCountField.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
@@ -937,20 +937,20 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maNUpPage.maPageMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
maNUpPage.maSheetMarginEdt.SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
- // setup select hdl
+ // setup select hdl
maNUpPage.maNupPagesBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
maNUpPage.maNupOrientationBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
maNUpPage.maNupOrderBox.SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
// setup the layout
setupLayout();
-
+
// setup optional UI options set by application
setupOptionalUI();
-
+
// set change handler for UI options
maPController->setOptionChangeHdl( LINK( this, PrintDialog, UIOptionsChanged ) );
-
+
// set min size pixel to current size
Size aOutSize( GetOutputSizePixel() );
SetMinOutputSizePixel( aOutSize );
@@ -976,7 +976,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
SetOutputSizePixel( aOutSize );
}
}
-
+
// set HelpIDs
SMHID1( "Dialog" );
maOKButton.SMHID1( "OK" );
@@ -1000,10 +1000,10 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
// restore settings from last run
readFromSettings();
-
+
// setup dependencies
checkControlDependencies();
-
+
}
PrintDialog::~PrintDialog()
@@ -1020,11 +1020,11 @@ void PrintDialog::setupLayout()
Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) );
maLayout.setParentWindow( this );
-
+
boost::shared_ptr< vcl::RowOrColumn > xPreviewAndTab( new vcl::RowOrColumn( &maLayout, false ) );
size_t nIndex = maLayout.addChild( xPreviewAndTab, 5 );
maLayout.setBorders( nIndex, aBorder.Width(), aBorder.Width(), aBorder.Width(), 0 );
-
+
// setup column for preview and sub controls
boost::shared_ptr< vcl::RowOrColumn > xPreview( new vcl::RowOrColumn( xPreviewAndTab.get() ) );
xPreviewAndTab->addChild( xPreview, 5 );
@@ -1042,18 +1042,18 @@ void PrintDialog::setupLayout()
mxPreviewCtrls->addWindow( &maForwardBtn );
xSpacer.reset( new vcl::Spacer( mxPreviewCtrls.get(), 2 ) );
mxPreviewCtrls->addChild( xSpacer );
-
+
// continue with the tab ctrl
xPreviewAndTab->addWindow( &maTabCtrl );
-
+
// add the button line
maLayout.addWindow( &maButtonLine );
-
+
// add the row for the buttons
boost::shared_ptr< vcl::RowOrColumn > xButtons( new vcl::RowOrColumn( &maLayout, false ) );
nIndex = maLayout.addChild( xButtons );
maLayout.setBorders( nIndex, aBorder.Width(), 0, aBorder.Width(), aBorder.Width() );
-
+
Size aMinSize( maCancelButton.GetSizePixel() );
// insert help button
xButtons->setMinimumSize( xButtons->addWindow( &maHelpButton ), aMinSize );
@@ -1069,7 +1069,7 @@ void PrintDialog::readFromSettings()
maJobPage.readFromSettings();
maNUpPage.readFromSettings();
maOptionsPage.readFromSettings();
-
+
// read last selected tab page; if it exists, actiavte it
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
@@ -1092,7 +1092,7 @@ void PrintDialog::storeToSettings()
maJobPage.storeToSettings();
maNUpPage.storeToSettings();
maOptionsPage.storeToSettings();
-
+
// store last selected printer
SettingsConfigItem* pItem = SettingsConfigItem::get();
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
@@ -1151,7 +1151,7 @@ static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >&
{
// without a help text set and the correct smartID,
// help texts will be retrieved from the online help system
-
+
// passed help texts for optional UI is used only for native dialogs which currently
// cannot access the same (rather implicit) mechanism
#if 0
@@ -1179,9 +1179,9 @@ void PrintDialog::setupOptionalUI()
USHORT nOptPageId = 9, nCurSubGroup = 0;
bool bOnStaticPage = false;
bool bSubgroupOnStaticPage = false;
-
+
std::multimap< rtl::OUString, vcl::RowOrColumn* > aPropertyToDependencyRowMap;
-
+
const Sequence< PropertyValue >& rOptions( maPController->getUIOptions() );
for( int i = 0; i < rOptions.getLength(); i++ )
{
@@ -1272,10 +1272,10 @@ void PrintDialog::setupOptionalUI()
mbShowLayoutPage = ! bNoLayoutPage;
}
}
-
+
// bUseDependencyRow should only be true if a dependency exists
bUseDependencyRow = bUseDependencyRow && (aDependsOnName.getLength() != 0);
-
+
// is it necessary to switch between static and dynamic pages ?
bool bSwitchPage = false;
if( aGroupingHint.getLength() )
@@ -1332,12 +1332,12 @@ void PrintDialog::setupOptionalUI()
pNewGroup->SetText( aText );
maTabCtrl.InsertPage( ++nOptPageId, aText );
maTabCtrl.SetTabPage( nOptPageId, pNewGroup );
-
+
// set help id
setSmartId( pNewGroup, "TabPage", nOptPageId );
// set help text
setHelpText( pNewGroup, aHelpTexts, 0 );
-
+
// reset subgroup counter
nCurSubGroup = 0;
@@ -1364,7 +1364,7 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pNewSub );
pNewSub->SetText( aText );
pNewSub->Show();
-
+
// set help id
setSmartId( pNewSub, "FixedLine", sal_Int32( nCurSubGroup++ ) );
// set help text
@@ -1397,16 +1397,16 @@ void PrintDialog::setupOptionalUI()
maNUpPage.maBrochureBtn.Check( bVal );
maNUpPage.maBrochureBtn.Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
maNUpPage.maBrochureBtn.SetToggleHdl( LINK( this, PrintDialog, ClickHdl ) );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( &maNUpPage.maBrochureBtn );
maControlToPropertyMap[&maNUpPage.maBrochureBtn] = aPropertyName;
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, maNUpPage.mxBrochureDep.get() ) );
- }
+ }
else
{
vcl::RowOrColumn* pSaveCurColumn = pCurColumn;
-
+
if( bUseDependencyRow )
{
// find the correct dependency row (if any)
@@ -1434,26 +1434,26 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pNewBox );
pNewBox->SetText( aText );
pNewBox->Show();
-
+
sal_Bool bVal = sal_False;
PropertyValue* pVal = maPController->getValue( aPropertyName );
if( pVal )
pVal->Value >>= bVal;
pNewBox->Check( bVal );
pNewBox->SetToggleHdl( LINK( this, PrintDialog, UIOption_CheckHdl ) );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pNewBox );
maControlToPropertyMap[pNewBox] = aPropertyName;
-
+
// set help id
setSmartId( pNewBox, "CheckBox", -1, aPropertyName );
// set help text
setHelpText( pNewBox, aHelpTexts, 0 );
-
+
vcl::RowOrColumn* pDependencyRow = new vcl::RowOrColumn( pCurColumn, false );
pCurColumn->addChild( pDependencyRow );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow ) );
-
+
// add checkbox to current column
pDependencyRow->addWindow( pNewBox );
}
@@ -1467,7 +1467,7 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pHeading );
pHeading->SetText( aText );
pHeading->Show();
-
+
// set help id
setSmartId( pHeading, "FixedText", -1, aPropertyName );
// set help text
@@ -1493,7 +1493,7 @@ void PrintDialog::setupOptionalUI()
boost::shared_ptr<vcl::RowOrColumn> pDependencyRow( new vcl::RowOrColumn( pLabel.get(), false ) );
pLabel->setElement( pDependencyRow );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pDependencyRow.get() ) );
-
+
RadioButton* pBtn = new RadioButton( pCurParent, m == 0 ? WB_GROUP : 0 );
maControls.push_front( pBtn );
pBtn->SetText( aChoices[m] );
@@ -1503,7 +1503,7 @@ void PrintDialog::setupOptionalUI()
maPropertyToWindowMap[ aPropertyName ].push_back( pBtn );
maControlToPropertyMap[pBtn] = aPropertyName;
maControlToNumValMap[pBtn] = m;
-
+
// set help id
setSmartId( pBtn, "RadioButton", m, aPropertyName );
// set help text
@@ -1521,7 +1521,7 @@ void PrintDialog::setupOptionalUI()
vcl::RowOrColumn* pFieldColumn = new vcl::RowOrColumn( pCurColumn, false );
pCurColumn->addChild( pFieldColumn );
aPropertyToDependencyRowMap.insert( std::pair< rtl::OUString, vcl::RowOrColumn* >( aPropertyName, pFieldColumn ) );
-
+
vcl::LabeledElement* pLabel = NULL;
if( aText.getLength() )
{
@@ -1530,21 +1530,21 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pHeading );
pHeading->SetText( aText );
pHeading->Show();
-
+
// set help id
setSmartId( pHeading, "FixedText", -1, aPropertyName );
-
+
// add to row
pLabel = new vcl::LabeledElement( pFieldColumn, 2 );
pFieldColumn->addChild( pLabel );
pLabel->setLabel( pHeading );
}
-
+
if( aCtrlType.equalsAscii( "List" ) )
{
ListBox* pList = new ListBox( pCurParent, WB_DROPDOWN | WB_BORDER );
maControls.push_front( pList );
-
+
// iterate options
for( sal_Int32 m = 0; m < aChoices.getLength(); m++ )
{
@@ -1558,15 +1558,15 @@ void PrintDialog::setupOptionalUI()
pList->SetSelectHdl( LINK( this, PrintDialog, UIOption_SelectHdl ) );
pList->SetDropDownLineCount( static_cast<USHORT>(aChoices.getLength()) );
pList->Show();
-
+
// set help id
setSmartId( pList, "ListBox", -1, aPropertyName );
// set help text
setHelpText( pList, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pList );
maControlToPropertyMap[pList] = aPropertyName;
-
+
// finish the pair
if( pLabel )
pLabel->setElement( pList );
@@ -1577,7 +1577,7 @@ void PrintDialog::setupOptionalUI()
{
NumericField* pField = new NumericField( pCurParent, WB_BORDER | WB_SPIN );
maControls.push_front( pField );
-
+
// set min/max and current value
if( nMinValue != nMaxValue )
{
@@ -1591,15 +1591,15 @@ void PrintDialog::setupOptionalUI()
pField->SetValue( nCurVal );
pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
pField->Show();
-
+
// set help id
setSmartId( pField, "NumericField", -1, aPropertyName );
// set help text
setHelpText( pField, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pField );
maControlToPropertyMap[pField] = aPropertyName;
-
+
// add to row
if( pLabel )
pLabel->setElement( pField );
@@ -1610,7 +1610,7 @@ void PrintDialog::setupOptionalUI()
{
Edit* pField = new Edit( pCurParent, WB_BORDER );
maControls.push_front( pField );
-
+
rtl::OUString aCurVal;
PropertyValue* pVal = maPController->getValue( aPropertyName );
if( pVal && pVal->Value.hasValue() )
@@ -1618,15 +1618,15 @@ void PrintDialog::setupOptionalUI()
pField->SetText( aCurVal );
pField->SetModifyHdl( LINK( this, PrintDialog, UIOption_ModifyHdl ) );
pField->Show();
-
+
// set help id
setSmartId( pField, "Edit", -1, aPropertyName );
// set help text
setHelpText( pField, aHelpTexts, 0 );
-
+
maPropertyToWindowMap[ aPropertyName ].push_back( pField );
maControlToPropertyMap[pField] = aPropertyName;
-
+
// add to row
if( pLabel )
pLabel->setElement( pField );
@@ -1638,11 +1638,11 @@ void PrintDialog::setupOptionalUI()
{
DBG_ERROR( "Unsupported UI option" );
}
-
+
pCurColumn = pSaveCurColumn;
}
}
-
+
// #i106506# if no brochure button, then the singular Pages radio button
// makes no sense, so replace it by a FixedText label
if( ! maNUpPage.maBrochureBtn.IsVisible() )
@@ -1655,17 +1655,17 @@ void PrintDialog::setupOptionalUI()
maNUpPage.maPagesBtn.Show( FALSE );
}
}
-
+
// update enable states
checkOptionalControlDependencies();
-
+
// print range empty (currently math only) -> hide print range and spacer line
if( maJobPage.mxPrintRange->countElements() == 0 )
{
maJobPage.mxPrintRange->show( false, false );
maJobPage.maCopySpacer.Show( FALSE );
}
-
+
#ifdef WNT
// FIXME: the GetNativeControlRegion call on Windows has some issues
// (which skew the results of GetOptimalSize())
@@ -1729,7 +1729,7 @@ void PrintDialog::setupOptionalUI()
maJobPage.Resize();
maNUpPage.Resize();
maOptionsPage.Resize();
-
+
Size aSz = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
SetOutputSizePixel( aSz );
}
@@ -1748,14 +1748,14 @@ void PrintDialog::checkControlDependencies()
maJobPage.maCollateBox.Enable( maJobPage.mnCollateUIMode == 0 );
else
maJobPage.maCollateBox.Enable( FALSE );
-
+
Image aImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateImg : maJobPage.maNoCollateImg );
Image aHCImg( maJobPage.maCollateBox.IsChecked() ? maJobPage.maCollateHCImg : maJobPage.maNoCollateHCImg );
bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
-
+
Size aImgSize( aImg.GetSizePixel() );
Size aHCImgSize( aHCImg.GetSizePixel() );
-
+
if( aHCImgSize.Width() > aImgSize.Width() )
aImgSize.Width() = aHCImgSize.Width();
if( aHCImgSize.Height() > aImgSize.Height() )
@@ -1822,7 +1822,7 @@ void PrintDialog::checkOptionalControlDependencies()
bShouldbeEnabled = true;
}
}
-
+
bool bIsEnabled = it->first->IsEnabled();
// Enable does not do a change check first, so can be less cheap than expected
if( bShouldbeEnabled != bIsEnabled )
@@ -1871,7 +1871,7 @@ void PrintDialog::setPreviewText( sal_Int32 )
{
rtl::OUString aNewText( searchAndReplace( maPageStr, "%n", 2, rtl::OUString::valueOf( mnCachedPages ) ) );
maNumPagesText.SetText( aNewText );
-
+
// if layout is already established the refresh layout of
// preview controls since text length may have changes
if( mxPreviewCtrls.get() )
@@ -1883,17 +1883,17 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
// page range may have changed depending on options
sal_Int32 nPages = maPController->getFilteredPageCount();
mnCachedPages = nPages;
-
+
if( mnCurPage >= nPages )
mnCurPage = nPages-1;
if( mnCurPage < 0 )
mnCurPage = 0;
-
+
setPreviewText( mnCurPage );
maPageEdit.SetMin( 1 );
maPageEdit.SetMax( nPages );
-
+
if( i_bNewPage )
{
const MapMode aMapMode( MAP_100TH_MM );
@@ -1909,12 +1909,12 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
aMtf.Move( aOff.X(), aOff.Y() );
}
}
-
+
Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr,
aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY()
);
-
+
maForwardBtn.Enable( mnCurPage < nPages-1 );
maBackwardBtn.Enable( mnCurPage != 0 );
maPageEdit.Enable( nPages > 1 );
@@ -1944,7 +1944,7 @@ void PrintDialog::updateNupFromPages()
long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
bool bCustom = false;
-
+
if( nPages == 1 )
{
nRows = nCols = 1;
@@ -1980,12 +1980,12 @@ void PrintDialog::updateNupFromPages()
}
else
bCustom = true;
-
+
if( nPages > 1 )
{
// set upper limits for margins based on job page size and rows/columns
Size aSize( getJobPageSize() );
-
+
// maximum sheet distance: 1/2 sheet
long nHorzMax = aSize.Width()/2;
long nVertMax = aSize.Height()/2;
@@ -1993,11 +1993,11 @@ void PrintDialog::updateNupFromPages()
nSheetMargin = nHorzMax;
if( nSheetMargin > nVertMax )
nSheetMargin = nVertMax;
-
- maNUpPage.maSheetMarginEdt.SetMax(
- maNUpPage.maSheetMarginEdt.Normalize(
+
+ maNUpPage.maSheetMarginEdt.SetMax(
+ maNUpPage.maSheetMarginEdt.Normalize(
nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
-
+
// maximum page distance
nHorzMax = (aSize.Width() - 2*nSheetMargin);
if( nCols > 1 )
@@ -2005,12 +2005,12 @@ void PrintDialog::updateNupFromPages()
nVertMax = (aSize.Height() - 2*nSheetMargin);
if( nRows > 1 )
nHorzMax /= (nRows-1);
-
+
if( nPageMargin > nHorzMax )
nPageMargin = nHorzMax;
if( nPageMargin > nVertMax )
nPageMargin = nVertMax;
-
+
maNUpPage.maPageMarginEdt.SetMax(
maNUpPage.maSheetMarginEdt.Normalize(
nHorzMax > nVertMax ? nVertMax : nHorzMax ), FUNIT_100TH_MM );
@@ -2020,7 +2020,7 @@ void PrintDialog::updateNupFromPages()
maNUpPage.maNupColEdt.SetValue( nCols );
maNUpPage.maPageMarginEdt.SetValue( maNUpPage.maPageMarginEdt.Normalize( nPageMargin ), FUNIT_100TH_MM );
maNUpPage.maSheetMarginEdt.SetValue( maNUpPage.maSheetMarginEdt.Normalize( nSheetMargin ), FUNIT_100TH_MM );
-
+
maNUpPage.showAdvancedControls( bCustom );
if( bCustom )
{
@@ -2044,29 +2044,29 @@ void PrintDialog::updateNup()
int nCols = int(maNUpPage.maNupColEdt.GetValue());
long nPageMargin = long(maNUpPage.maPageMarginEdt.Denormalize(maNUpPage.maPageMarginEdt.GetValue( FUNIT_100TH_MM )));
long nSheetMargin = long(maNUpPage.maSheetMarginEdt.Denormalize(maNUpPage.maSheetMarginEdt.GetValue( FUNIT_100TH_MM )));
-
+
PrinterController::MultiPageSetup aMPS;
aMPS.nRows = nRows;
aMPS.nColumns = nCols;
aMPS.nRepeat = 1;
- aMPS.nLeftMargin =
- aMPS.nTopMargin =
- aMPS.nRightMargin =
+ aMPS.nLeftMargin =
+ aMPS.nTopMargin =
+ aMPS.nRightMargin =
aMPS.nBottomMargin = nSheetMargin;
-
+
aMPS.nHorizontalSpacing =
aMPS.nVerticalSpacing = nPageMargin;
aMPS.bDrawBorder = maNUpPage.maBorderCB.IsChecked();
-
- int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
+
+ int nOrderMode = int(sal_IntPtr(maNUpPage.maNupOrderBox.GetEntryData(
maNUpPage.maNupOrderBox.GetSelectEntryPos() )));
if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_LRTD )
aMPS.nOrder = PrinterController::LRTB;
else if( nOrderMode == SV_PRINT_PRT_NUP_ORDER_TDLR )
aMPS.nOrder = PrinterController::TBLR;
-
- int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
+
+ int nOrientationMode = int(sal_IntPtr(maNUpPage.maNupOrientationBox.GetEntryData(
maNUpPage.maNupOrientationBox.GetSelectEntryPos() )));
if( nOrientationMode == SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE )
aMPS.aPaperSize = maNupLandscapeSize;
@@ -2077,18 +2077,18 @@ void PrintDialog::updateNup()
// get size of first real page to see if it is portrait or landscape
// we assume same page sizes for all the pages for this
Size aPageSize = getJobPageSize();
-
+
Size aMultiSize( aPageSize.Width() * nCols, aPageSize.Height() * nRows );
if( aMultiSize.Width() > aMultiSize.Height() ) // fits better on landscape
aMPS.aPaperSize = maNupLandscapeSize;
else
- aMPS.aPaperSize = maNupPortraitSize;
+ aMPS.aPaperSize = maNupPortraitSize;
}
-
+
maPController->setMultipage( aMPS );
-
+
maNUpPage.maNupOrderWin.setValues( nOrderMode, nCols, nRows );
-
+
preparePreview( true, true );
}
@@ -2112,7 +2112,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
maNUpPage.maPagesBtn.Check();
updateNupFromPages();
}
-
+
return 0;
}
@@ -2153,9 +2153,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
{
sal_Bool bVal = maNUpPage.maBrochureBtn.IsChecked();
pVal->Value <<= bVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2348,12 +2348,12 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
if( pVal )
{
makeEnabled( i_pBox );
-
+
sal_Bool bVal = i_pBox->IsChecked();
pVal->Value <<= bVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2372,12 +2372,12 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
if( pVal && it != maControlToNumValMap.end() )
{
makeEnabled( i_pBtn );
-
+
sal_Int32 nVal = it->second;
pVal->Value <<= nVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2391,12 +2391,12 @@ IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox )
if( pVal )
{
makeEnabled( i_pBox );
-
+
sal_Int32 nVal( i_pBox->GetSelectEntryPos() );
pVal->Value <<= nVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2427,9 +2427,9 @@ IMPL_LINK( PrintDialog, UIOption_ModifyHdl, Edit*, i_pBox )
rtl::OUString aVal( i_pBox->GetText() );
pVal->Value <<= aVal;
}
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2492,9 +2492,9 @@ PrintProgressDialog::PrintProgressDialog( Window* i_pParent, int i_nMax ) :
if( mnMax < 1 )
mnMax = 1;
-
+
maStr = maText.GetText();
-
+
maButton.SetClickHdl( LINK( this, PrintProgressDialog, ClickHdl ) );
}
@@ -2507,7 +2507,7 @@ IMPL_LINK( PrintProgressDialog, ClickHdl, Button*, pButton )
{
if( pButton == &maButton )
mbCanceled = true;
-
+
return 0;
}
@@ -2534,7 +2534,7 @@ void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
mnCur = i_nCurrent;
if( i_nMax != -1 )
mnMax = i_nMax;
@@ -2545,7 +2545,7 @@ void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
rtl::OUString aNewText( searchAndReplace( maStr, "%p", 2, rtl::OUString::valueOf( mnCur ) ) );
aNewText = searchAndReplace( aNewText, "%n", 2, rtl::OUString::valueOf( mnMax ) );
maText.SetText( aNewText );
-
+
// update progress
Invalidate( maProgressRect, INVALIDATE_UPDATE );
}
@@ -2565,7 +2565,7 @@ void PrintProgressDialog::Paint( const Rectangle& )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Color aPrgsColor = rStyleSettings.GetHighlightColor();
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 735add842518..e7a4d7939a68 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx
index d808fa73e321..e0eb77e7b2e1 100644
--- a/vcl/source/window/scrwnd.hxx
+++ b/vcl/source/window/scrwnd.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,13 +33,13 @@
// - Defines -
// -----------
-#define WHEELMODE_NONE 0x00000000UL
-#define WHEELMODE_VH 0x00000001UL
-#define WHEELMODE_V 0x00000002UL
-#define WHEELMODE_H 0x00000004UL
-#define WHEELMODE_SCROLL_VH 0x00000008UL
-#define WHEELMODE_SCROLL_V 0x00000010UL
-#define WHEELMODE_SCROLL_H 0x00000020UL
+#define WHEELMODE_NONE 0x00000000UL
+#define WHEELMODE_VH 0x00000001UL
+#define WHEELMODE_V 0x00000002UL
+#define WHEELMODE_H 0x00000004UL
+#define WHEELMODE_SCROLL_VH 0x00000008UL
+#define WHEELMODE_SCROLL_V 0x00000010UL
+#define WHEELMODE_SCROLL_H 0x00000020UL
// -------------------
// - ImplWheelWindow -
@@ -51,42 +51,42 @@ class ImplWheelWindow : public FloatingWindow
{
private:
- ImageList maImgList;
- Bitmap maWheelBmp;
- CommandScrollData maCommandScrollData;
- Point maLastMousePos;
- Point maCenter;
- Timer* mpTimer;
- ULONG mnRepaintTime;
- ULONG mnTimeout;
- ULONG mnWheelMode;
- ULONG mnMaxWidth;
- ULONG mnActWidth;
- ULONG mnActDist;
- long mnActDeltaX;
- long mnActDeltaY;
-
- void ImplCreateImageList();
- void ImplSetRegion( const Bitmap& rRegionBmp );
+ ImageList maImgList;
+ Bitmap maWheelBmp;
+ CommandScrollData maCommandScrollData;
+ Point maLastMousePos;
+ Point maCenter;
+ Timer* mpTimer;
+ ULONG mnRepaintTime;
+ ULONG mnTimeout;
+ ULONG mnWheelMode;
+ ULONG mnMaxWidth;
+ ULONG mnActWidth;
+ ULONG mnActDist;
+ long mnActDeltaX;
+ long mnActDeltaY;
+
+ void ImplCreateImageList();
+ void ImplSetRegion( const Bitmap& rRegionBmp );
using Window::ImplGetMousePointer;
- PointerStyle ImplGetMousePointer( long nDistX, long nDistY );
- void ImplDrawWheel();
- void ImplRecalcScrollValues();
-
+ PointerStyle ImplGetMousePointer( long nDistX, long nDistY );
+ void ImplDrawWheel();
+ void ImplRecalcScrollValues();
+
DECL_LINK( ImplScrollHdl, Timer* pTimer );
-
-protected:
-
- virtual void Paint( const Rectangle& rRect );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
-
-public:
-
+
+protected:
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+
+public:
+
ImplWheelWindow( Window* pParent );
~ImplWheelWindow();
void ImplStop();
- void ImplSetWheelMode( ULONG nWheelMode );
- ULONG ImplGetWheelMode() const { return mnWheelMode; }
+ void ImplSetWheelMode( ULONG nWheelMode );
+ ULONG ImplGetWheelMode() const { return mnWheelMode; }
};
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index d4ee01c26d61..6368acd163d6 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@
inline BOOL SelectionEngine::ShouldDeselect( BOOL bModifierKey1 ) const
{
-// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
+// return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 );
return eSelMode != MULTIPLE_SELECTION || !bModifierKey1;
}
@@ -202,7 +202,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
nFlags &= (~SELENG_CMDEVT);
if ( !pFunctionSet || !pWin )
return FALSE;
- const bool bRightClickCursorPositioning =
+ const bool bRightClickCursorPositioning =
rMEvt.IsRight() && rMEvt.GetClicks() == 1 && !IsInSelection();
if ( (rMEvt.GetClicks() > 1 || rMEvt.IsRight()) && !bRightClickCursorPositioning )
return FALSE;
@@ -218,8 +218,15 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
Point aPos = rMEvt.GetPosPixel();
aLastMove = rMEvt;
- pWin->CaptureMouse();
- nFlags |= SELENG_IN_SEL;
+ if( !rMEvt.IsRight() )
+ {
+ pWin->CaptureMouse();
+ nFlags |= SELENG_IN_SEL;
+ }
+ else
+ {
+ nModifier = 0;
+ }
switch ( nModifier )
{
@@ -327,7 +334,7 @@ BOOL SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
|*
*************************************************************************/
-BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
+BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
{
aWTimer.Stop();
//DbgOut("Up");
@@ -336,7 +343,11 @@ BOOL SelectionEngine::SelMouseButtonUp( const MouseEvent& /* rMEvt */ )
nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL);
return FALSE;
}
- pWin->ReleaseMouse();
+
+ if( !rMEvt.IsRight() )
+ {
+ pWin->ReleaseMouse();
+ }
if( (nFlags & SELENG_WAIT_UPEVT) && !(nFlags & SELENG_CMDEVT) &&
eSelMode != SINGLE_SELECTION)
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index b4553a4cf8a7..b9647ea6ceb7 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,8 +42,8 @@
#include <rtl/instance.hxx>
#include <vcl/window.h>
-namespace
-{
+namespace
+{
struct ImplBlackWall
: public rtl::StaticWithInit<Wallpaper, ImplBlackWall> {
Wallpaper operator () () {
@@ -55,7 +55,7 @@ namespace
Wallpaper operator () () {
return Wallpaper(COL_LIGHTGRAY);
}
- };
+ };
}
// =======================================================================
@@ -63,11 +63,11 @@ namespace
void Splitter::ImplInitSplitterData()
{
ImplGetWindowImpl()->mbSplitter = TRUE;
- mpRefWin = NULL;
- mnSplitPos = 0;
- mnLastSplitPos = 0;
+ mpRefWin = NULL;
+ mnSplitPos = 0;
+ mnLastSplitPos = 0;
mnStartSplitPos = 0;
- mbDragFull = FALSE;
+ mbDragFull = FALSE;
mbKbdSplitting = FALSE;
mbInKeyEvent = 0;
mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE;
@@ -104,11 +104,11 @@ void Splitter::ImplInit( Window* pParent, WinBits nWinStyle )
if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
SetBackground( ImplWhiteWall::get() );
- else
+ else
SetBackground( ImplBlackWall::get() );
TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
- pTList->AddWindow( this );
+ pTList->AddWindow( this );
}
// -----------------------------------------------------------------------
@@ -139,13 +139,13 @@ void Splitter::ImplDrawSplitter()
if ( mbHorzSplit )
{
- aInvRect.Left() = maDragPos.X() - 1;
- aInvRect.Right() = maDragPos.X() + 1;
+ aInvRect.Left() = maDragPos.X() - 1;
+ aInvRect.Right() = maDragPos.X() + 1;
}
else
{
- aInvRect.Top() = maDragPos.Y() - 1;
- aInvRect.Bottom() = maDragPos.Y() + 1;
+ aInvRect.Top() = maDragPos.Y() - 1;
+ aInvRect.Bottom() = maDragPos.Y() + 1;
}
mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), SHOWTRACK_SPLIT );
@@ -180,7 +180,7 @@ Splitter::Splitter( Window* pParent, const ResId& rResId ) :
Splitter::~Splitter()
{
TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
- pTList->RemoveWindow( this );
+ pTList->RemoveWindow( this );
}
// -----------------------------------------------------------------------
@@ -196,7 +196,7 @@ long Splitter::GetKeyboardStepSize() const
{
return mnKeyboardStepSize;
}
-
+
// -----------------------------------------------------------------------
Splitter* Splitter::ImplFindSibling()
@@ -218,7 +218,7 @@ Splitter* Splitter::ImplFindSibling()
}
// -----------------------------------------------------------------------
-
+
BOOL Splitter::ImplSplitterActive()
{
// is splitter in document or at scrollbar handle ?
@@ -402,7 +402,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
int maxiter = 500; // avoid endless loop
int delta=0;
int delta_step = mbHorzSplit ? aSize.Width()/10 : aSize.Height()/10;
-
+
// use the specified step size if it was set
if( mnKeyboardStepSize != SPLITTER_DEFAULTSTEPSIZE )
delta_step = mnKeyboardStepSize;
@@ -418,16 +418,16 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
switch( nCode )
{
- case KEY_LEFT:
+ case KEY_LEFT:
aNewPos.X()-=delta;
break;
- case KEY_RIGHT:
+ case KEY_RIGHT:
aNewPos.X()+=delta;
break;
- case KEY_UP:
+ case KEY_UP:
aNewPos.Y()-=delta;
break;
- case KEY_DOWN:
+ case KEY_DOWN:
aNewPos.Y()+=delta;
break;
default:
@@ -448,7 +448,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode )
if ( aNewPos.Y() == maDragPos.Y() )
continue;
}
-
+
maDragPos = aNewPos;
long nNewPos;
if ( mbHorzSplit )
@@ -558,7 +558,7 @@ void Splitter::ImplStartKbdSplitting()
StartSplit();
- // determine start position
+ // determine start position
// because we have no mouse position we take either the position
// of the splitter window or the last split position
// the other coordinate is just the center of the reference window
@@ -729,7 +729,7 @@ void Splitter::KeyInput( const KeyEvent& rKEvt )
GrabFocusToDocument();
break;
}
- mbInKeyEvent = 0;
+ mbInKeyEvent = 0;
}
// -----------------------------------------------------------------------
@@ -752,7 +752,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
{
if( newFaceColor.IsDark() )
SetBackground( ImplWhiteWall::get() );
- else
+ else
SetBackground( ImplBlackWall::get() );
}
}
@@ -763,7 +763,7 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
void Splitter::Paint( const Rectangle& rPaintRect )
{
if( HasFocus() || mbKbdSplitting )
- {
+ {
Color oldFillCol = GetFillColor();
Color oldLineCol = GetLineColor();
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 689c56cbe619..d896cc631d41 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,49 +52,49 @@
// Achtung: Darf keine Objekte enthalten, da mit memmove/memcpy gearbeitet wird
struct ImplSplitItem
{
- long mnSize;
- long mnPixSize;
- long mnLeft;
- long mnTop;
- long mnWidth;
- long mnHeight;
- long mnSplitPos;
- long mnSplitSize;
- long mnOldSplitPos;
- long mnOldSplitSize;
- long mnOldWidth;
- long mnOldHeight;
- ImplSplitSet* mpSet;
- Window* mpWindow;
- Window* mpOrgParent;
- USHORT mnId;
+ long mnSize;
+ long mnPixSize;
+ long mnLeft;
+ long mnTop;
+ long mnWidth;
+ long mnHeight;
+ long mnSplitPos;
+ long mnSplitSize;
+ long mnOldSplitPos;
+ long mnOldSplitSize;
+ long mnOldWidth;
+ long mnOldHeight;
+ ImplSplitSet* mpSet;
+ Window* mpWindow;
+ Window* mpOrgParent;
+ USHORT mnId;
SplitWindowItemBits mnBits;
- BOOL mbFixed;
- BOOL mbSubSize;
+ BOOL mbFixed;
+ BOOL mbSubSize;
};
struct ImplSplitSet
{
- ImplSplitItem* mpItems;
- Wallpaper* mpWallpaper;
- Bitmap* mpBitmap;
- long mnLastSize;
- long mnSplitSize;
- USHORT mnItems;
- USHORT mnId;
- BOOL mbCalcPix;
+ ImplSplitItem* mpItems;
+ Wallpaper* mpWallpaper;
+ Bitmap* mpBitmap;
+ long mnLastSize;
+ long mnSplitSize;
+ USHORT mnItems;
+ USHORT mnId;
+ BOOL mbCalcPix;
};
-#define SPLITWIN_SPLITSIZE 3
-#define SPLITWIN_SPLITSIZEEX 4
-#define SPLITWIN_SPLITSIZEEXLN 6
-#define SPLITWIN_SPLITSIZEAUTOHIDE 36
-#define SPLITWIN_SPLITSIZEFADE 36
+#define SPLITWIN_SPLITSIZE 3
+#define SPLITWIN_SPLITSIZEEX 4
+#define SPLITWIN_SPLITSIZEEXLN 6
+#define SPLITWIN_SPLITSIZEAUTOHIDE 36
+#define SPLITWIN_SPLITSIZEFADE 36
-#define SPLIT_HORZ ((USHORT)0x0001)
-#define SPLIT_VERT ((USHORT)0x0002)
-#define SPLIT_WINDOW ((USHORT)0x0004)
-#define SPLIT_NOSPLIT ((USHORT)0x8000)
+#define SPLIT_HORZ ((USHORT)0x0001)
+#define SPLIT_VERT ((USHORT)0x0002)
+#define SPLIT_WINDOW ((USHORT)0x0004)
+#define SPLIT_NOSPLIT ((USHORT)0x8000)
// -----------------------------------------------------------------------
@@ -108,39 +108,39 @@ static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign,
{
if ( bNoAlign )
{
- rLeft = 2;
- rTop = 2;
- rRight = 2;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 2;
rBottom = 2;
}
else
{
if ( eAlign == WINDOWALIGN_TOP )
{
- rLeft = 2;
- rTop = 2;
- rRight = 2;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 2;
rBottom = 0;
}
else if ( eAlign == WINDOWALIGN_LEFT )
{
- rLeft = 2;
- rTop = 2;
- rRight = 0;
+ rLeft = 2;
+ rTop = 2;
+ rRight = 0;
rBottom = 2;
}
else if ( eAlign == WINDOWALIGN_BOTTOM )
{
- rLeft = 2;
- rTop = 0;
- rRight = 2;
+ rLeft = 2;
+ rTop = 0;
+ rRight = 2;
rBottom = 2;
}
else
{
- rLeft = 0;
- rTop = 2;
- rRight = 2;
+ rLeft = 0;
+ rTop = 2;
+ rRight = 2;
rBottom = 2;
}
}
@@ -150,15 +150,15 @@ static void ImplCalcBorder( WindowAlign eAlign, BOOL bNoAlign,
void SplitWindow::ImplDrawBorder( SplitWindow* pWin )
{
- const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
- long nDX = pWin->mnDX;
- long nDY = pWin->mnDY;
+ const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
+ long nDX = pWin->mnDX;
+ long nDY = pWin->mnDY;
if ( pWin->mbNoAlign )
{
- DecorationView aDecoView( pWin );
- Point aTmpPoint;
- Rectangle aRect( aTmpPoint, Size( nDX, nDY ) );
+ DecorationView aDecoView( pWin );
+ Point aTmpPoint;
+ Rectangle aRect( aTmpPoint, Size( nDX, nDY ) );
aDecoView.DrawFrame( aRect, FRAME_DRAW_DOUBLEIN );
}
else
@@ -255,9 +255,9 @@ void SplitWindow::ImplDrawBorderLine( SplitWindow* pWin )
{
if ( pWin->mbFadeOut || pWin->mbAutoHide )
{
- const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
- long nDX = pWin->mnDX;
- long nDY = pWin->mnDY;
+ const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings();
+ long nDX = pWin->mnDX;
+ long nDY = pWin->mnDY;
if ( pWin->meAlign == WINDOWALIGN_LEFT )
{
@@ -297,9 +297,9 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
if ( pSet->mnId == nId )
return pSet;
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -324,9 +324,9 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, USHORT nId )
static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -354,9 +354,9 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, USHORT nId, USHORT& rPos
static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -381,18 +381,18 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, Window* pWindow )
static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
BOOL bRows, BOOL bDown = TRUE )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnWidth && pItems[i].mnHeight )
{
// Wegen ICC auftrennen
- Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
- Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
- Rectangle aRect( aPoint, aSize );
+ Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
+ Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
+ Rectangle aRect( aPoint, aSize );
if ( bRows )
{
if ( bDown )
@@ -428,9 +428,9 @@ static USHORT ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
static void ImplDeleteSet( ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
{
@@ -470,27 +470,27 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT j;
- USHORT nMins;
- USHORT nCalcItems;
- USHORT nItems = pSet->mnItems;
- USHORT nVisItems;
- USHORT nAbsItems;
- long nCalcSize;
- long nSizeDelta;
- long nCurSize;
- long nSizeWinSize;
- long nNewSizeWinSize;
- long nTemp;
- long nTempErr;
- long nErrorSum;
- long nCurSizeDelta;
- long nPos;
- long nMaxPos;
- long* pSize;
- ImplSplitItem* pItems = pSet->mpItems;
- BOOL bEmpty;
+ USHORT i;
+ USHORT j;
+ USHORT nMins;
+ USHORT nCalcItems;
+ USHORT nItems = pSet->mnItems;
+ USHORT nVisItems;
+ USHORT nAbsItems;
+ long nCalcSize;
+ long nSizeDelta;
+ long nCurSize;
+ long nSizeWinSize;
+ long nNewSizeWinSize;
+ long nTemp;
+ long nTempErr;
+ long nErrorSum;
+ long nCurSizeDelta;
+ long nPos;
+ long nMaxPos;
+ long* pSize;
+ ImplSplitItem* pItems = pSet->mpItems;
+ BOOL bEmpty;
// Anzahl sichtbarer Items ermitteln
nVisItems = 0;
@@ -510,10 +510,10 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( pSet->mbCalcPix || (pSet->mnLastSize != nCalcSize) )
{
long nPercentFactor = 10;
- long nRelCount = 0;
- long nPercent = 0;
- long nRelPercent = 0;
- long nAbsSize = 0;
+ long nRelCount = 0;
+ long nPercent = 0;
+ long nRelPercent = 0;
+ long nAbsSize = 0;
for ( i = 0; i < nItems; i++ )
{
if ( !(pItems[i].mnBits & SWIB_INVISIBLE) )
@@ -574,11 +574,11 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pSet->mnLastSize = nCalcSize;
// Fenster einpassen
- nSizeDelta = nCalcSize-nCurSize;
+ nSizeDelta = nCalcSize-nCurSize;
if ( nSizeDelta )
{
- nAbsItems = 0;
- nSizeWinSize = 0;
+ nAbsItems = 0;
+ nSizeWinSize = 0;
nNewSizeWinSize = 0;
// Zuerst die absoluten Items relativ resizen
@@ -611,8 +611,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// Jetzt die Rundunsfehler ausgleichen
- j = 0;
- nMins = 0;
+ j = 0;
+ nMins = 0;
while ( nSizeDelta && (nItems != nMins) )
{
// Feststellen, welche Items berechnet werden duerfen
@@ -650,9 +650,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
// Groessen von den einzelnen Items abziehen
- nErrorSum = nSizeDelta % nCalcItems;
- nCurSizeDelta = nSizeDelta / nCalcItems;
- nMins = 0;
+ nErrorSum = nSizeDelta % nCalcItems;
+ nCurSizeDelta = nSizeDelta / nCalcItems;
+ nMins = 0;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnBits & SWIB_INVISIBLE )
@@ -729,8 +729,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
pItems[i].mnOldSplitPos = pItems[i].mnSplitPos;
pItems[i].mnOldSplitSize = pItems[i].mnSplitSize;
- pItems[i].mnOldWidth = pItems[i].mnWidth;
- pItems[i].mnOldHeight = pItems[i].mnHeight;
+ pItems[i].mnOldWidth = pItems[i].mnWidth;
+ pItems[i].mnOldHeight = pItems[i].mnHeight;
if ( pItems[i].mnBits & SWIB_INVISIBLE )
bEmpty = TRUE;
@@ -752,8 +752,8 @@ static void ImplCalcSet( ImplSplitSet* pSet,
if ( bEmpty )
{
- pItems[i].mnWidth = 0;
- pItems[i].mnHeight = 0;
+ pItems[i].mnWidth = 0;
+ pItems[i].mnHeight = 0;
pItems[i].mnSplitSize = 0;
}
else
@@ -844,9 +844,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL bHide,
BOOL bRows, BOOL /*bDown*/ )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
if ( pWindow->IsReallyVisible() && pWindow->IsUpdateMode() && pWindow->mbInvalidate )
{
@@ -857,7 +857,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// Evt. alles invalidieren oder nur einen kleinen Teil
if ( (pItems[i].mnOldSplitPos != pItems[i].mnSplitPos) ||
(pItems[i].mnOldSplitSize != pItems[i].mnSplitSize) ||
- (pItems[i].mnOldWidth != pItems[i].mnWidth) ||
+ (pItems[i].mnOldWidth != pItems[i].mnWidth) ||
(pItems[i].mnOldHeight != pItems[i].mnHeight) )
{
Rectangle aRect;
@@ -865,33 +865,33 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// Old Rect invalidieren
if ( bRows )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnOldWidth-1;
- aRect.Top() = pItems[i].mnOldSplitPos;
- aRect.Bottom() = aRect.Top() + pItems[i].mnOldSplitSize;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnOldWidth-1;
+ aRect.Top() = pItems[i].mnOldSplitPos;
+ aRect.Bottom() = aRect.Top() + pItems[i].mnOldSplitSize;
}
else
{
- aRect.Top() = pItems[i].mnTop;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnOldHeight-1;
- aRect.Left() = pItems[i].mnOldSplitPos;
- aRect.Right() = aRect.Left() + pItems[i].mnOldSplitSize;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnOldHeight-1;
+ aRect.Left() = pItems[i].mnOldSplitPos;
+ aRect.Right() = aRect.Left() + pItems[i].mnOldSplitSize;
}
pWindow->Invalidate( aRect );
// New Rect invalidieren
if ( bRows )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
- aRect.Top() = pItems[i].mnSplitPos;
- aRect.Bottom() = aRect.Top() + pItems[i].mnSplitSize;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
+ aRect.Top() = pItems[i].mnSplitPos;
+ aRect.Bottom() = aRect.Top() + pItems[i].mnSplitSize;
}
else
{
- aRect.Top() = pItems[i].mnTop;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
- aRect.Left() = pItems[i].mnSplitPos;
- aRect.Right() = aRect.Left() + pItems[i].mnSplitSize;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
+ aRect.Left() = pItems[i].mnSplitPos;
+ aRect.Right() = aRect.Left() + pItems[i].mnSplitSize;
}
pWindow->Invalidate( aRect );
@@ -899,10 +899,10 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
// nicht von Fenstern ueberladen werden
if ( pItems[i].mpSet && !pItems[i].mpSet->mpItems )
{
- aRect.Left() = pItems[i].mnLeft;
- aRect.Top() = pItems[i].mnTop;
- aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
- aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
+ aRect.Left() = pItems[i].mnLeft;
+ aRect.Top() = pItems[i].mnTop;
+ aRect.Right() = pItems[i].mnLeft+pItems[i].mnWidth-1;
+ aRect.Bottom() = pItems[i].mnTop+pItems[i].mnHeight-1;
pWindow->Invalidate( aRect );
}
}
@@ -947,9 +947,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, BOOL b
static void ImplCalcLogSize( ImplSplitItem* pItems, USHORT nItems )
{
// Original-Groessen updaten
- USHORT i;
- long nRelSize = 0;
- long nPerSize = 0;
+ USHORT i;
+ long nRelSize = 0;
+ long nPerSize = 0;
for ( i = 0; i < nItems; i++ )
{
if ( pItems[i].mnBits & SWIB_RELATIVESIZE )
@@ -986,8 +986,8 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
{
if ( pBitmap )
{
- Point aPos = rRect.TopLeft();
- Size aBmpSize = pBitmap->GetSizePixel();
+ Point aPos = rRect.TopLeft();
+ Size aBmpSize = pBitmap->GetSizePixel();
pWindow->Push( PUSH_CLIPREGION );
pWindow->IntersectClipRegion( rRect );
do
@@ -1012,9 +1012,9 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
{
- USHORT i;
- USHORT nItems = pSet->mnItems;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ ImplSplitItem* pItems = pSet->mpItems;
// Beim Mainset auch den Hintergrund zeichnen
if ( pSet->mnId == 0 )
@@ -1037,9 +1037,9 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet )
if ( pSet->mpBitmap || pSet->mpWallpaper )
{
// Wegen ICC auftrennen
- Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
- Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
- Rectangle aRect( aPoint, aSize );
+ Point aPoint( pItems[i].mnLeft, pItems[i].mnTop );
+ Size aSize( pItems[i].mnWidth, pItems[i].mnHeight );
+ Rectangle aRect( aPoint, aSize );
ImplDrawBack( pWindow, aRect, pSet->mpWallpaper, pSet->mpBitmap );
}
}
@@ -1060,13 +1060,13 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
if ( !pSet->mpItems )
return;
- USHORT i;
- USHORT nItems = pSet->mnItems;
- long nPos;
- long nTop;
- long nBottom;
- ImplSplitItem* pItems = pSet->mpItems;
- const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
+ USHORT i;
+ USHORT nItems = pSet->mnItems;
+ long nPos;
+ long nTop;
+ long nBottom;
+ ImplSplitItem* pItems = pSet->mpItems;
+ const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
BOOL bFlat = (pWindow->GetStyle() & WB_FLATSPLITDRAW) == WB_FLATSPLITDRAW;
@@ -1080,7 +1080,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
long nSplitSize = pSet->mnSplitSize;
if ( bRows )
{
- nTop = pItems[i].mnLeft;
+ nTop = pItems[i].mnLeft;
nBottom = pItems[i].mnLeft+pItems[i].mnWidth-1;
if ( bFlat ) nPos--;
@@ -1110,7 +1110,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet,
}
else
{
- nTop = pItems[i].mnTop;
+ nTop = pItems[i].mnTop;
nBottom = pItems[i].mnTop+pSet->mpItems[i].mnHeight-1;
if ( bFlat ) nPos--;
@@ -1156,15 +1156,15 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
if ( !pSet->mpItems )
return 0;
- USHORT i;
- USHORT nSplitTest;
- USHORT nItems = pSet->mnItems;
- long nMPos1;
- long nMPos2;
- long nPos;
- long nTop;
- long nBottom;
- ImplSplitItem* pItems = pSet->mpItems;
+ USHORT i;
+ USHORT nSplitTest;
+ USHORT nItems = pSet->mnItems;
+ long nMPos1;
+ long nMPos2;
+ long nPos;
+ long nTop;
+ long nBottom;
+ ImplSplitItem* pItems = pSet->mpItems;
if ( bRows )
{
@@ -1183,12 +1183,12 @@ USHORT SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
{
if ( bRows )
{
- nTop = pItems[i].mnLeft;
+ nTop = pItems[i].mnLeft;
nBottom = pItems[i].mnLeft+pItems[i].mnWidth-1;
}
else
{
- nTop = pItems[i].mnTop;
+ nTop = pItems[i].mnTop;
nBottom = pItems[i].mnTop+pItems[i].mnHeight-1;
}
nPos = pItems[i].mnSplitPos;
@@ -1235,9 +1235,9 @@ USHORT SplitWindow::ImplTestSplit( SplitWindow* pWindow, const Point& rPos,
// Resizeable SplitWindow muss anders behandelt werden
if ( pWindow->mnWinStyle & WB_SIZEABLE )
{
- long nTPos;
- long nPos;
- long nBorder;
+ long nTPos;
+ long nPos;
+ long nBorder;
if ( pWindow->mbHorz )
{
@@ -1314,10 +1314,10 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos )
}
else
{
- aRect.Left() = pThis->maDragRect.Left();
- aRect.Right() = pThis->maDragRect.Right();
- aRect.Top() = rPos.Y();
- aRect.Bottom() = aRect.Top()+pThis->mpSplitSet->mnSplitSize-1;
+ aRect.Left() = pThis->maDragRect.Left();
+ aRect.Right() = pThis->maDragRect.Right();
+ aRect.Top() = rPos.Y();
+ aRect.Bottom() = aRect.Top()+pThis->mpSplitSet->mnSplitSize-1;
if ( !(pThis->mnWinStyle & WB_NOSPLITDRAW) )
aRect.Bottom()--;
if ( (pThis->mnSplitTest & SPLIT_WINDOW) &&
@@ -1334,53 +1334,53 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos )
void SplitWindow::ImplInit( Window* pParent, WinBits nStyle )
{
- ImplSplitSet* pNewSet = new ImplSplitSet;
- pNewSet->mpItems = NULL;
- pNewSet->mpWallpaper = NULL;
- pNewSet->mpBitmap = NULL;
- pNewSet->mnLastSize = 0;
- pNewSet->mnItems = 0;
- pNewSet->mnId = 0;
- pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- pNewSet->mbCalcPix = TRUE;
-
- mpMainSet = pNewSet;
- mpBaseSet = pNewSet;
- mpSplitSet = NULL;
- mpLastSizes = NULL;
- mnDX = 0;
- mnDY = 0;
- mnLeftBorder = 0;
- mnTopBorder = 0;
- mnRightBorder = 0;
- mnBottomBorder = 0;
- mnMaxSize = 0;
- mnMouseOff = 0;
- meAlign = WINDOWALIGN_TOP;
- mnWinStyle = nStyle;
- mnSplitTest = 0;
- mnSplitPos = 0;
- mnMouseModifier = 0;
- mnMStartPos = 0;
- mnMSplitPos = 0;
- mbDragFull = FALSE;
- mbHorz = TRUE;
- mbBottomRight = FALSE;
- mbCalc = FALSE;
- mbRecalc = TRUE;
- mbInvalidate = TRUE;
- mbAutoHide = FALSE;
- mbFadeIn = FALSE;
- mbFadeOut = FALSE;
- mbAutoHideIn = FALSE;
- mbAutoHideDown = FALSE;
- mbFadeInDown = FALSE;
- mbFadeOutDown = FALSE;
- mbAutoHidePressed = FALSE;
- mbFadeInPressed = FALSE;
- mbFadeOutPressed = FALSE;
- mbFadeNoButtonMode = FALSE;
- mbNoAlign = FALSE;
+ ImplSplitSet* pNewSet = new ImplSplitSet;
+ pNewSet->mpItems = NULL;
+ pNewSet->mpWallpaper = NULL;
+ pNewSet->mpBitmap = NULL;
+ pNewSet->mnLastSize = 0;
+ pNewSet->mnItems = 0;
+ pNewSet->mnId = 0;
+ pNewSet->mnSplitSize = SPLITWIN_SPLITSIZE;
+ pNewSet->mbCalcPix = TRUE;
+
+ mpMainSet = pNewSet;
+ mpBaseSet = pNewSet;
+ mpSplitSet = NULL;
+ mpLastSizes = NULL;
+ mnDX = 0;
+ mnDY = 0;
+ mnLeftBorder = 0;
+ mnTopBorder = 0;
+ mnRightBorder = 0;
+ mnBottomBorder = 0;
+ mnMaxSize = 0;
+ mnMouseOff = 0;
+ meAlign = WINDOWALIGN_TOP;
+ mnWinStyle = nStyle;
+ mnSplitTest = 0;
+ mnSplitPos = 0;
+ mnMouseModifier = 0;
+ mnMStartPos = 0;
+ mnMSplitPos = 0;
+ mbDragFull = FALSE;
+ mbHorz = TRUE;
+ mbBottomRight = FALSE;
+ mbCalc = FALSE;
+ mbRecalc = TRUE;
+ mbInvalidate = TRUE;
+ mbAutoHide = FALSE;
+ mbFadeIn = FALSE;
+ mbFadeOut = FALSE;
+ mbAutoHideIn = FALSE;
+ mbAutoHideDown = FALSE;
+ mbFadeInDown = FALSE;
+ mbFadeOutDown = FALSE;
+ mbAutoHidePressed = FALSE;
+ mbFadeInPressed = FALSE;
+ mbFadeOutPressed = FALSE;
+ mbFadeNoButtonMode = FALSE;
+ mbNoAlign = FALSE;
if ( nStyle & WB_NOSPLITDRAW )
{
@@ -1507,7 +1507,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
{
Size aSize( aNewSize );
long nSplitSize = mpMainSet->mnSplitSize-2;
-
+
if ( mbAutoHide || mbFadeOut )
nSplitSize += SPLITWIN_SPLITSIZEEXLN;
@@ -1516,9 +1516,9 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
// ist
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
- long nCalcSize = 0;
- USHORT i;
+ long nCurSize;
+ long nCalcSize = 0;
+ USHORT i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1530,9 +1530,9 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
if ( i == mpMainSet->mnItems )
{
- long nDelta = 0;
- Point aPos = GetPosPixel();
-
+ long nDelta = 0;
+ Point aPos = GetPosPixel();
+
if ( mbHorz )
nCurSize = aNewSize.Height()-mnTopBorder-mnBottomBorder;
else
@@ -1584,9 +1584,9 @@ void SplitWindow::ImplCalcLayout()
// ist
if ( mnWinStyle & WB_SIZEABLE )
{
- long nCurSize;
- long nCalcSize = 0;
- USHORT i;
+ long nCurSize;
+ long nCalcSize = 0;
+ USHORT i;
for ( i = 0; i < mpMainSet->mnItems; i++ )
{
@@ -1615,10 +1615,10 @@ void SplitWindow::ImplCalcLayout()
return;
// Groessen/Position vorberechnen
- long nL;
- long nT;
- long nW;
- long nH;
+ long nL;
+ long nT;
+ long nW;
+ long nH;
if ( mbHorz )
{
@@ -1688,22 +1688,22 @@ void SplitWindow::ImplUpdateSet( ImplSplitSet* pSet )
Rectangle aRect;
if ( pSet == mpMainSet )
{
- aRect.Left() = mnLeftBorder;
- aRect.Top() = mnTopBorder;
- aRect.Right() = mnDX-mnRightBorder-1;
- aRect.Bottom() = mnDY-mnBottomBorder-1;
+ aRect.Left() = mnLeftBorder;
+ aRect.Top() = mnTopBorder;
+ aRect.Right() = mnDX-mnRightBorder-1;
+ aRect.Bottom() = mnDY-mnBottomBorder-1;
}
else
{
- ImplSplitItem* pItem;
- USHORT nPos;
+ ImplSplitItem* pItem;
+ USHORT nPos;
pSet = ImplFindItem( mpMainSet, pSet->mnId, nPos );
pItem = &(pSet->mpItems[nPos]);
- aRect.Left() = pItem->mnLeft;
- aRect.Top() = pItem->mnTop;
- aRect.Right() = aRect.Left()+pItem->mnWidth;
- aRect.Bottom() = aRect.Top()+pItem->mnHeight;
+ aRect.Left() = pItem->mnLeft;
+ aRect.Top() = pItem->mnTop;
+ aRect.Right() = aRect.Left()+pItem->mnWidth;
+ aRect.Bottom() = aRect.Top()+pItem->mnHeight;
}
Invalidate( aRect );
}
@@ -1759,50 +1759,50 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, BOOL bTest ) co
if ( meAlign == WINDOWALIGN_TOP )
{
- rRect.Left() = mnLeftBorder+nEx;
- rRect.Top() = mnDY-mnBottomBorder-nSplitSize;
- rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
- rRect.Bottom() = mnDY-mnBottomBorder-1;
+ rRect.Left() = mnLeftBorder+nEx;
+ rRect.Top() = mnDY-mnBottomBorder-nSplitSize;
+ rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Bottom() = mnDY-mnBottomBorder-1;
if ( bTest )
{
- rRect.Top() -= mnTopBorder;
- rRect.Bottom() += mnBottomBorder;
+ rRect.Top() -= mnTopBorder;
+ rRect.Bottom() += mnBottomBorder;
}
}
else if ( meAlign == WINDOWALIGN_BOTTOM )
{
- rRect.Left() = mnLeftBorder+nEx;
- rRect.Top() = mnTopBorder;
- rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
- rRect.Bottom() = mnTopBorder+nSplitSize-1;
+ rRect.Left() = mnLeftBorder+nEx;
+ rRect.Top() = mnTopBorder;
+ rRect.Right() = rRect.Left()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Bottom() = mnTopBorder+nSplitSize-1;
if ( bTest )
{
- rRect.Top() -= mnTopBorder;
- rRect.Bottom() += mnBottomBorder;
+ rRect.Top() -= mnTopBorder;
+ rRect.Bottom() += mnBottomBorder;
}
}
else if ( meAlign == WINDOWALIGN_LEFT )
{
- rRect.Left() = mnDX-mnRightBorder-nSplitSize;
- rRect.Top() = mnTopBorder+nEx;
- rRect.Right() = mnDX-mnRightBorder-1;
- rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Left() = mnDX-mnRightBorder-nSplitSize;
+ rRect.Top() = mnTopBorder+nEx;
+ rRect.Right() = mnDX-mnRightBorder-1;
+ rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
if ( bTest )
{
- rRect.Left() -= mnLeftBorder;
- rRect.Right() += mnRightBorder;
+ rRect.Left() -= mnLeftBorder;
+ rRect.Right() += mnRightBorder;
}
}
else if ( meAlign == WINDOWALIGN_RIGHT )
{
- rRect.Left() = mnLeftBorder;
- rRect.Top() = mnTopBorder+nEx;
- rRect.Right() = mnLeftBorder+nSplitSize-1;
- rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
+ rRect.Left() = mnLeftBorder;
+ rRect.Top() = mnTopBorder+nEx;
+ rRect.Right() = mnLeftBorder+nSplitSize-1;
+ rRect.Bottom() = rRect.Top()+SPLITWIN_SPLITSIZEAUTOHIDE;
if ( bTest )
{
- rRect.Left() -= mnLeftBorder;
- rRect.Right() += mnRightBorder;
+ rRect.Left() -= mnLeftBorder;
+ rRect.Right() += mnRightBorder;
}
}
}
@@ -1930,7 +1930,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
// ImageListe laden, wenn noch nicht vorhanden
ImplSVData* pSVData = ImplGetSVData();
- ImageList* pImageList;
+ ImageList* pImageList;
if ( mbHorz )
{
if ( !pSVData->maCtrlData.mpSplitHPinImgList )
@@ -1943,7 +1943,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
pSVData->maCtrlData.mpSplitHPinImgList->InsertFromHorizontalBitmap
( ResId( SV_RESID_BITMAP_SPLITHPIN, *pResMgr ), 4, &aNonAlphaMask );
}
- }
+ }
pImageList = pSVData->maCtrlData.mpSplitHPinImgList;
}
else
@@ -1960,7 +1960,7 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
}
}
pImageList = pSVData->maCtrlData.mpSplitVPinImgList;
- }
+ }
// Image ermitteln und zurueckgeben
USHORT nId;
@@ -1979,11 +1979,11 @@ void SplitWindow::ImplDrawAutoHide( BOOL bInPaint )
nId = 2;
}
- Image aImage = pImageList->GetImage( nId );
- Size aImageSize = aImage.GetSizePixel();
- Point aPos( aTempRect.Left()+((aTempRect.GetWidth()-aImageSize.Width())/2),
+ Image aImage = pImageList->GetImage( nId );
+ Size aImageSize = aImage.GetSizePixel();
+ Point aPos( aTempRect.Left()+((aTempRect.GetWidth()-aImageSize.Width())/2),
aTempRect.Top()+((aTempRect.GetHeight()-aImageSize.Height())/2) );
- long nSize;
+ long nSize;
if ( mbHorz )
nSize = aImageSize.Width();
else
@@ -2113,19 +2113,19 @@ void SplitWindow::ImplDrawFadeIn( BOOL bInPaint )
{
if ( mbFadeIn )
{
- Rectangle aTempRect;
- Image aImage;
+ Rectangle aTempRect;
+ Image aImage;
ImplGetFadeInRect( aTempRect );
BOOL bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = TRUE;
+ bLeft = TRUE;
else
bLeft = TRUE;
@@ -2142,19 +2142,19 @@ void SplitWindow::ImplDrawFadeOut( BOOL bInPaint )
{
if ( mbFadeOut )
{
- Rectangle aTempRect;
- Image aImage;
+ Rectangle aTempRect;
+ Image aImage;
ImplGetFadeOutRect( aTempRect );
BOOL bLeft;
if ( meAlign == WINDOWALIGN_TOP )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_BOTTOM )
- bLeft = FALSE;
+ bLeft = FALSE;
else if ( meAlign == WINDOWALIGN_LEFT )
- bLeft = TRUE;
+ bLeft = TRUE;
else if ( meAlign == WINDOWALIGN_RIGHT )
- bLeft = FALSE;
+ bLeft = FALSE;
else
bLeft = TRUE;
@@ -2173,11 +2173,11 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( mnSplitTest && !(mnSplitTest & SPLIT_NOSPLIT) )
{
- ImplSplitItem* pSplitItem;
- long nCurMaxSize;
- USHORT nTemp;
- BOOL bDown;
- BOOL bPropSmaller;
+ ImplSplitItem* pSplitItem;
+ long nCurMaxSize;
+ USHORT nTemp;
+ BOOL bDown;
+ BOOL bPropSmaller;
mnMouseModifier = rMEvt.GetModifier();
if ( !(mnMouseModifier & KEY_SHIFT) || (mnSplitPos+1 >= mpSplitSet->mnItems) )
@@ -2205,10 +2205,10 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
if ( (mpSplitSet == mpMainSet) && mbBottomRight )
bDown = FALSE;
- pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]);
- maDragRect.Left() = pSplitItem->mnLeft;
- maDragRect.Top() = pSplitItem->mnTop;
- maDragRect.Right() = pSplitItem->mnLeft+pSplitItem->mnWidth-1;
+ pSplitItem = &(mpSplitSet->mpItems[mnSplitPos]);
+ maDragRect.Left() = pSplitItem->mnLeft;
+ maDragRect.Top() = pSplitItem->mnTop;
+ maDragRect.Right() = pSplitItem->mnLeft+pSplitItem->mnWidth-1;
maDragRect.Bottom() = pSplitItem->mnTop+pSplitItem->mnHeight-1;
if ( mnSplitTest & SPLIT_HORZ )
@@ -2303,9 +2303,9 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
}
else
{
- maDragRect.Left() = mnLeftBorder;
- maDragRect.Top() = mnTopBorder;
- maDragRect.Right() = mnDX-mnRightBorder-1;
+ maDragRect.Left() = mnLeftBorder;
+ maDragRect.Top() = mnTopBorder;
+ maDragRect.Right() = mnDX-mnRightBorder-1;
maDragRect.Bottom() = mnDY-mnBottomBorder-1;
if ( mbHorz )
{
@@ -2333,8 +2333,8 @@ void SplitWindow::ImplStartSplit( const MouseEvent& rMEvt )
ImplDrawSplitTracking( this, aMousePosPixel );
else
{
- ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
+ ImplSplitItem* pItems = mpSplitSet->mpItems;
+ USHORT nItems = mpSplitSet->mnItems;
mpLastSizes = new long[nItems*2];
for ( USHORT i = 0; i < nItems; i++ )
{
@@ -2408,8 +2408,8 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
return;
}
- Point aMousePosPixel = rMEvt.GetPosPixel();
- Rectangle aTestRect;
+ Point aMousePosPixel = rMEvt.GetPosPixel();
+ Rectangle aTestRect;
mbFadeNoButtonMode = FALSE;
ImplGetAutoHideRect( aTestRect, TRUE );
@@ -2458,15 +2458,15 @@ void SplitWindow::MouseMove( const MouseEvent& rMEvt )
{
if ( !IsTracking() )
{
- Point aPos = rMEvt.GetPosPixel();
- long nTemp;
- ImplSplitSet* pTempSplitSet;
- USHORT nTempSplitPos;
- USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
- PointerStyle eStyle = POINTER_ARROW;
- Rectangle aAutoHideRect;
- Rectangle aFadeInRect;
- Rectangle aFadeOutRect;
+ Point aPos = rMEvt.GetPosPixel();
+ long nTemp;
+ ImplSplitSet* pTempSplitSet;
+ USHORT nTempSplitPos;
+ USHORT nSplitTest = ImplTestSplit( this, aPos, nTemp, &pTempSplitSet, nTempSplitPos );
+ PointerStyle eStyle = POINTER_ARROW;
+ Rectangle aAutoHideRect;
+ Rectangle aFadeInRect;
+ Rectangle aFadeOutRect;
ImplGetAutoHideRect( aAutoHideRect );
ImplGetFadeInRect( aFadeInRect );
@@ -2598,11 +2598,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( rTEvt.IsTrackingCanceled() )
{
- ImplSplitItem* pItems = mpSplitSet->mpItems;
- USHORT nItems = mpSplitSet->mnItems;
+ ImplSplitItem* pItems = mpSplitSet->mpItems;
+ USHORT nItems = mpSplitSet->mnItems;
for ( USHORT i = 0; i < nItems; i++ )
{
- pItems[i].mnSize = mpLastSizes[i*2];
+ pItems[i].mnSize = mpLastSizes[i*2];
pItems[i].mnPixSize = mpLastSizes[i*2+1];
}
ImplUpdate();
@@ -2627,9 +2627,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
if ( bSplit )
{
- BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE;
- BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE;
- long nDelta = mnMSplitPos-mnMStartPos;
+ BOOL bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? TRUE : FALSE;
+ BOOL bPropGreater = (mnMouseModifier & KEY_MOD1) ? TRUE : FALSE;
+ long nDelta = mnMSplitPos-mnMStartPos;
if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems )
{
@@ -2661,14 +2661,14 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
{
if ( mpLastSizes )
delete mpLastSizes;
- mpLastSizes = NULL;
- mpSplitSet = NULL;
- mnMouseOff = 0;
- mnMStartPos = 0;
- mnMSplitPos = 0;
+ mpLastSizes = NULL;
+ mpSplitSet = NULL;
+ mnMouseOff = 0;
+ mnMStartPos = 0;
+ mnMSplitPos = 0;
mnMouseModifier = 0;
- mnSplitTest = 0;
- mnSplitPos = 0;
+ mnSplitTest = 0;
+ mnSplitPos = 0;
}
}
}
@@ -2688,7 +2688,7 @@ long SplitWindow::PreNotify( NotifyEvent& rNEvt )
Rectangle aFadeOutRect;
ImplGetFadeInRect( aFadeInRect );
ImplGetFadeOutRect( aFadeOutRect );
-
+
if ( aFadeInRect.IsInside( GetPointerPosPixel() ) != aFadeInRect.IsInside( GetLastPointerPosPixel() ) )
Invalidate( aFadeInRect );
if ( aFadeOutRect.IsInside( GetPointerPosPixel() ) != aFadeOutRect.IsInside( GetLastPointerPosPixel() ) )
@@ -2750,9 +2750,9 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
// no keyboard help for splitwin
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) && !rHEvt.KeyboardActivated() )
{
- Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- Rectangle aHelpRect;
- USHORT nHelpResId = 0;
+ Point aMousePosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
+ Rectangle aHelpRect;
+ USHORT nHelpResId = 0;
ImplGetAutoHideRect( aHelpRect, TRUE );
if ( aHelpRect.IsInside( aMousePosPixel ) )
@@ -2854,7 +2854,7 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
if ( nSize < 1 )
nSize = 1;
- ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
+ ImplSplitSet* pSet = ImplFindSet( mpMainSet, nSetId );
ImplSplitSet* pNewSet;
ImplSplitItem* pItem;
@@ -2872,16 +2872,16 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
pSet->mbCalcPix = TRUE;
// Item anlegen und erweitern
- pItem = &(pSet->mpItems[nPos]);
+ pItem = &(pSet->mpItems[nPos]);
memset( pItem, 0, sizeof( ImplSplitItem ) );
- pItem->mnSize = nSize;
- pItem->mnId = nId;
- pItem->mnBits = nBits;
+ pItem->mnSize = nSize;
+ pItem->mnId = nId;
+ pItem->mnBits = nBits;
if ( pWindow )
{
- pItem->mpWindow = pWindow;
- pItem->mpOrgParent = pWindow->GetParent();
+ pItem->mpWindow = pWindow;
+ pItem->mpOrgParent = pWindow->GetParent();
// Window mit SplitWindow verbinden
pWindow->Hide();
@@ -2889,17 +2889,17 @@ void SplitWindow::InsertItem( USHORT nId, Window* pWindow, long nSize,
}
else
{
- pNewSet = new ImplSplitSet;
- pNewSet->mpItems = NULL;
- pNewSet->mpWallpaper = NULL;
- pNewSet->mpBitmap = NULL;
- pNewSet->mnLastSize = 0;
- pNewSet->mnItems = 0;
- pNewSet->mnId = nId;
- pNewSet->mnSplitSize = pSet->mnSplitSize;
- pNewSet->mbCalcPix = TRUE;
+ pNewSet = new ImplSplitSet;
+ pNewSet->mpItems = NULL;
+ pNewSet->mpWallpaper = NULL;
+ pNewSet->mpBitmap = NULL;
+ pNewSet->mnLastSize = 0;
+ pNewSet->mnItems = 0;
+ pNewSet->mnId = nId;
+ pNewSet->mnSplitSize = pSet->mnSplitSize;
+ pNewSet->mbCalcPix = TRUE;
- pItem->mpSet = pNewSet;
+ pItem->mpSet = pNewSet;
}
ImplUpdate();
@@ -2924,10 +2924,10 @@ void SplitWindow::MoveItem( USHORT nId, USHORT nNewPos, USHORT nNewSetId )
DBG_ASSERT( ImplFindSet( mpMainSet, nNewSetId ), "SplitWindow::MoveItem() - Set not exists" );
#endif
- USHORT nPos;
- ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId );
- ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
- ImplSplitItem aTempItem;
+ USHORT nPos;
+ ImplSplitSet* pNewSet = ImplFindSet( mpMainSet, nNewSetId );
+ ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
+ ImplSplitItem aTempItem;
if ( pNewSet == pSet )
{
@@ -2995,11 +2995,11 @@ void SplitWindow::RemoveItem( USHORT nId, BOOL bHide )
#endif
// Set suchen
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
- ImplSplitItem* pItem = &(pSet->mpItems[nPos]);
- Window* pWindow = pItem->mpWindow;
- Window* pOrgParent = pItem->mpOrgParent;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpMainSet, nId, nPos );
+ ImplSplitItem* pItem = &(pSet->mpItems[nPos]);
+ Window* pWindow = pItem->mpWindow;
+ Window* pOrgParent = pItem->mpOrgParent;
// Evt. Set loeschen
if ( !pWindow )
@@ -3041,18 +3041,18 @@ void SplitWindow::Clear()
ImplDeleteSet( mpMainSet );
// Main-Set wieder anlegen
- mpMainSet = new ImplSplitSet;
- mpMainSet->mpItems = NULL;
- mpMainSet->mpWallpaper = NULL;
- mpMainSet->mpBitmap = NULL;
- mpMainSet->mnLastSize = 0;
- mpMainSet->mnItems = 0;
- mpMainSet->mnId = 0;
- mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE;
- mpMainSet->mbCalcPix = TRUE;
+ mpMainSet = new ImplSplitSet;
+ mpMainSet->mpItems = NULL;
+ mpMainSet->mpWallpaper = NULL;
+ mpMainSet->mpBitmap = NULL;
+ mpMainSet->mnLastSize = 0;
+ mpMainSet->mnItems = 0;
+ mpMainSet->mnId = 0;
+ mpMainSet->mnSplitSize = SPLITWIN_SPLITSIZE;
+ mpMainSet->mbCalcPix = TRUE;
if ( mnWinStyle & WB_NOSPLITDRAW )
mpMainSet->mnSplitSize -= 2;
- mpBaseSet = mpMainSet;
+ mpBaseSet = mpMainSet;
// Und neu invalidieren
ImplUpdate();
@@ -3234,16 +3234,16 @@ Bitmap SplitWindow::GetItemBitmap( USHORT nSetId ) const
void SplitWindow::SplitItem( USHORT nId, long nNewSize,
BOOL bPropSmall, BOOL bPropGreat )
{
- USHORT nItems;
- USHORT nPos;
- USHORT nMin;
- USHORT nMax;
- USHORT i;
- USHORT n;
- long nDelta;
- long nTempDelta;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItems;
+ USHORT nItems;
+ USHORT nPos;
+ USHORT nMin;
+ USHORT nMax;
+ USHORT i;
+ USHORT n;
+ long nDelta;
+ long nTempDelta;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItems;
if ( !pSet )
return;
@@ -3464,9 +3464,9 @@ void SplitWindow::SplitItem( USHORT nId, long nNewSize,
void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItem;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItem;
if ( !pSet )
return;
@@ -3486,8 +3486,8 @@ void SplitWindow::SetItemSize( USHORT nId, long nNewSize )
long SplitWindow::GetItemSize( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mnSize;
@@ -3499,8 +3499,8 @@ long SplitWindow::GetItemSize( USHORT nId ) const
long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
{
@@ -3510,12 +3510,12 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
{
((SplitWindow*)this)->ImplCalcLayout();
- long nRelSize = 0;
- long nPerSize = 0;
- ImplSplitItem* pItems;
- USHORT nItems;
+ long nRelSize = 0;
+ long nPerSize = 0;
+ ImplSplitItem* pItems;
+ USHORT nItems;
SplitWindowItemBits nTempBits;
- USHORT i;
+ USHORT i;
nItems = pSet->mnItems;
pItems = pSet->mpItems;
for ( i = 0; i < nItems; i++ )
@@ -3556,9 +3556,9 @@ long SplitWindow::GetItemSize( USHORT nId, SplitWindowItemBits nBits ) const
void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
- ImplSplitItem* pItem;
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ ImplSplitItem* pItem;
if ( !pSet )
return;
@@ -3580,8 +3580,8 @@ void SplitWindow::SetItemBits( USHORT nId, SplitWindowItemBits nNewBits )
SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mnBits;
@@ -3593,8 +3593,8 @@ SplitWindowItemBits SplitWindow::GetItemBits( USHORT nId ) const
Window* SplitWindow::GetItemWindow( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mpItems[nPos].mpWindow;
@@ -3606,8 +3606,8 @@ Window* SplitWindow::GetItemWindow( USHORT nId ) const
USHORT SplitWindow::GetSet( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return pSet->mnId;
@@ -3633,8 +3633,8 @@ BOOL SplitWindow::GetSet( USHORT nId, USHORT& rSetId, USHORT& rPos ) const
BOOL SplitWindow::IsItemValid( USHORT nId ) const
{
- USHORT nPos;
- ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
+ USHORT nPos;
+ ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
if ( pSet )
return TRUE;
@@ -3660,8 +3660,8 @@ USHORT SplitWindow::GetItemId( const Point& rPos ) const
USHORT SplitWindow::GetItemPos( USHORT nId, USHORT nSetId ) const
{
- ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
- USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND;
+ ImplSplitSet* pSet = ImplFindSet( mpBaseSet, nSetId );
+ USHORT nPos = SPLITWINDOW_ITEM_NOTFOUND;
if ( pSet )
{
@@ -3706,27 +3706,27 @@ void SplitWindow::ImplNewAlign()
{
if ( mbNoAlign )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_TOP )
{
- mbHorz = TRUE;
+ mbHorz = TRUE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_BOTTOM )
{
- mbHorz = TRUE;
+ mbHorz = TRUE;
mbBottomRight = TRUE;
}
else if ( meAlign == WINDOWALIGN_LEFT )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = FALSE;
}
else if ( meAlign == WINDOWALIGN_RIGHT )
{
- mbHorz = FALSE;
+ mbHorz = FALSE;
mbBottomRight = TRUE;
}
@@ -3769,15 +3769,15 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign )
Size SplitWindow::CalcWindowSizePixel( const Size& rSize, WindowAlign eAlign,
WinBits nWinStyle, BOOL bExtra )
{
- long nLeft;
- long nTop;
- long nRight;
- long nBottom;
- Size aSize = rSize;
+ long nLeft;
+ long nTop;
+ long nRight;
+ long nBottom;
+ Size aSize = rSize;
ImplCalcBorder( eAlign, FALSE, nLeft, nTop, nRight, nBottom );
- aSize.Width() += nLeft+nRight;
- aSize.Height() += nTop+nBottom;
+ aSize.Width() += nLeft+nRight;
+ aSize.Height() += nTop+nBottom;
if ( nWinStyle & WB_SIZEABLE )
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 385dd241c770..0c570fb597f9 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,13 +44,13 @@
// =======================================================================
-#define STATUSBAR_OFFSET_X STATUSBAR_OFFSET
-#define STATUSBAR_OFFSET_Y 2
-#define STATUSBAR_OFFSET_TEXTY 3
+#define STATUSBAR_OFFSET_X STATUSBAR_OFFSET
+#define STATUSBAR_OFFSET_Y 2
+#define STATUSBAR_OFFSET_TEXTY 3
-#define STATUSBAR_PRGS_OFFSET 3
-#define STATUSBAR_PRGS_COUNT 100
-#define STATUSBAR_PRGS_MIN 5
+#define STATUSBAR_PRGS_OFFSET 3
+#define STATUSBAR_PRGS_COUNT 100
+#define STATUSBAR_PRGS_MIN 5
// -----------------------------------------------------------------------
@@ -60,7 +60,7 @@ public:
ImplData();
~ImplData();
- VirtualDevice* mpVirDev;
+ VirtualDevice* mpVirDev;
long mnItemBorderWidth;
bool mbTopBorder:1;
bool mbDrawItemFrames:1;
@@ -80,19 +80,19 @@ StatusBar::ImplData::~ImplData()
struct ImplStatusItem
{
- USHORT mnId;
- StatusBarItemBits mnBits;
- long mnWidth;
- long mnOffset;
- long mnExtraWidth;
- long mnX;
- XubString maText;
- XubString maHelpText;
- XubString maQuickHelpText;
- ULONG mnHelpId;
- void* mpUserData;
- BOOL mbVisible;
- XubString maAccessibleName;
+ USHORT mnId;
+ StatusBarItemBits mnBits;
+ long mnWidth;
+ long mnOffset;
+ long mnExtraWidth;
+ long mnX;
+ XubString maText;
+ XubString maHelpText;
+ XubString maQuickHelpText;
+ ULONG mnHelpId;
+ void* mpUserData;
+ BOOL mbVisible;
+ XubString maAccessibleName;
XubString maCommand;
};
@@ -149,20 +149,20 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle )
Window::ImplInit( pParent, nStyle & ~WB_BORDER, NULL );
// WinBits merken
- mpItemList = new ImplStatusItemList;
- mpImplData->mpVirDev = new VirtualDevice( *this );
- mnCurItemId = 0;
- mbFormat = TRUE;
- mbVisibleItems = TRUE;
- mbProgressMode = FALSE;
- mbInUserDraw = FALSE;
- mbBottomBorder = FALSE;
+ mpItemList = new ImplStatusItemList;
+ mpImplData->mpVirDev = new VirtualDevice( *this );
+ mnCurItemId = 0;
+ mbFormat = TRUE;
+ mbVisibleItems = TRUE;
+ mbProgressMode = FALSE;
+ mbInUserDraw = FALSE;
+ mbBottomBorder = FALSE;
mnItemsWidth = STATUSBAR_OFFSET_X;
- mnDX = 0;
- mnDY = 0;
- mnCalcHeight = 0;
- mnItemY = STATUSBAR_OFFSET_Y;
- mnTextY = STATUSBAR_OFFSET_TEXTY;
+ mnDX = 0;
+ mnDY = 0;
+ mnCalcHeight = 0;
+ mnItemY = STATUSBAR_OFFSET_Y;
+ mnTextY = STATUSBAR_OFFSET_TEXTY;
ImplInitSettings( TRUE, TRUE, TRUE );
SetLineColor();
@@ -256,7 +256,7 @@ void StatusBar::ImplInitSettings( BOOL bFont,
aColor = rStyleSettings.GetWindowColor();
SetBackground( aColor );
mpImplData->mpVirDev->SetBackground( GetBackground() );
-
+
// NWF background
if( ! IsControlBackground() &&
IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) )
@@ -272,10 +272,10 @@ void StatusBar::ImplInitSettings( BOOL bFont,
void StatusBar::ImplFormat()
{
ImplStatusItem* pItem;
- long nExtraWidth;
- long nExtraWidth2;
- long nX;
- USHORT nAutoSizeItems = 0;
+ long nExtraWidth;
+ long nExtraWidth2;
+ long nX;
+ USHORT nAutoSizeItems = 0;
// Breiten zusammenrechnen
mnItemsWidth = STATUSBAR_OFFSET_X;
@@ -299,9 +299,9 @@ void StatusBar::ImplFormat()
{
// Bei rechtsbuendiger Ausrichtung wird kein AutoSize ausgewertet,
// da wir links den Text anzeigen, der mit SetText gesetzt wird
- nX = mnDX - mnItemsWidth;
- nExtraWidth = 0;
- nExtraWidth2 = 0;
+ nX = mnDX - mnItemsWidth;
+ nExtraWidth = 0;
+ nExtraWidth2 = 0;
}
else
{
@@ -353,7 +353,7 @@ void StatusBar::ImplFormat()
Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
{
- Rectangle aRect;
+ Rectangle aRect;
ImplStatusItem* pItem;
pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -377,7 +377,7 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
USHORT StatusBar::ImplGetFirstVisiblePos() const
{
ImplStatusItem* pItem;
-
+
for( USHORT nPos = 0; nPos < mpItemList->Count(); nPos++ )
{
pItem = mpItemList->GetObject( nPos );
@@ -387,7 +387,7 @@ USHORT StatusBar::ImplGetFirstVisiblePos() const
return nPos;
}
}
-
+
return ~0;
}
@@ -438,11 +438,11 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
return;
// Ausgabebereich berechnen
- ImplStatusItem* pItem = mpItemList->GetObject( nPos );
+ ImplStatusItem* pItem = mpItemList->GetObject( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
- Size aTextRectSize( aTextRect.GetSize() );
+ Size aTextRectSize( aTextRect.GetSize() );
if ( bOffScreen )
mpImplData->mpVirDev->SetOutputSizePixel( aTextRectSize );
@@ -455,8 +455,8 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
// Text ausgeben
if ( bDrawText )
{
- Size aTextSize( GetTextWidth( pItem->maText ), GetTextHeight() );
- Point aTextPos = ImplGetItemTextPos( aTextRectSize, aTextSize, pItem->mnBits );
+ Size aTextSize( GetTextWidth( pItem->maText ), GetTextHeight() );
+ Point aTextPos = ImplGetItemTextPos( aTextRectSize, aTextSize, pItem->mnBits );
if ( bOffScreen )
mpImplData->mpVirDev->DrawText( aTextPos, pItem->maText );
else
@@ -499,12 +499,12 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
if( !(pItem->mnBits & SIB_FLAT) )
{
USHORT nStyle;
-
+
if ( pItem->mnBits & SIB_IN )
nStyle = FRAME_DRAW_IN;
else
nStyle = FRAME_DRAW_OUT;
-
+
DecorationView aDecoView( this );
aDecoView.DrawFrame( aRect, nStyle );
}
@@ -539,7 +539,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
if( pWindow->IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
bool bNeedErase = ImplGetSVData()->maNWFData.mbProgressNeedsErase;
-
+
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
ImplControlValue aValue( nFullWidth * (long)nPerc / 10000 );
@@ -580,7 +580,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
return;
}
}
-
+
// Werte vorberechnen
USHORT nPerc1 = nPercent1 / nPercentCount;
USHORT nPerc2 = nPercent2 / nPercentCount;
@@ -588,11 +588,11 @@ void DrawProgress( Window* pWindow, const Point& rPos,
if ( nPerc1 > nPerc2 )
{
// Support progress that can also decrease
-
+
// Rechteck berechnen
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X()+((nPerc1-1)*nDX);
- Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
+ long nDX = nPrgsWidth + nOffset;
+ long nLeft = rPos.X()+((nPerc1-1)*nDX);
+ Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
do
{
@@ -604,7 +604,7 @@ void DrawProgress( Window* pWindow, const Point& rPos,
while ( nPerc1 > nPerc2 );
pWindow->Flush();
- }
+ }
else if ( nPerc1 < nPerc2 )
{
// Percent-Rechtecke malen
@@ -617,9 +617,9 @@ void DrawProgress( Window* pWindow, const Point& rPos,
}
// Rechteck berechnen
- long nDX = nPrgsWidth + nOffset;
- long nLeft = rPos.X()+(nPerc1*nDX);
- Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
+ long nDX = nPrgsWidth + nOffset;
+ long nLeft = rPos.X()+(nPerc1*nDX);
+ Rectangle aRect( nLeft, rPos.Y(), nLeft+nPrgsWidth, rPos.Y()+nPrgsHeight );
do
{
@@ -681,12 +681,12 @@ void StatusBar::ImplCalcProgressRect()
{
// calculate text size
Size aPrgsTxtSize( GetTextWidth( maPrgsTxt ), GetTextHeight() );
- maPrgsTxtPos.X() = STATUSBAR_OFFSET_X+1;
-
+ maPrgsTxtPos.X() = STATUSBAR_OFFSET_X+1;
+
// calculate progress frame
- maPrgsFrameRect.Left() = maPrgsTxtPos.X()+aPrgsTxtSize.Width()+STATUSBAR_OFFSET;
- maPrgsFrameRect.Top() = mnItemY;
- maPrgsFrameRect.Bottom() = mnCalcHeight - STATUSBAR_OFFSET_Y;
+ maPrgsFrameRect.Left() = maPrgsTxtPos.X()+aPrgsTxtSize.Width()+STATUSBAR_OFFSET;
+ maPrgsFrameRect.Top() = mnItemY;
+ maPrgsFrameRect.Bottom() = mnCalcHeight - STATUSBAR_OFFSET_Y;
if( IsTopBorder() )
maPrgsFrameRect.Bottom()+=2;
@@ -728,7 +728,7 @@ void StatusBar::ImplCalcProgressRect()
}
}
if( ! bNativeOK )
- maPrgsTxtPos.Y() = mnTextY;
+ maPrgsTxtPos.Y() = mnTextY;
}
// -----------------------------------------------------------------------
@@ -886,7 +886,7 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
}
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
- XubString aStr = GetQuickHelpText( nItemId );
+ XubString aStr = GetQuickHelpText( nItemId );
// Show quickhelp if available
if( aStr.Len() )
{
@@ -1026,14 +1026,14 @@ void StatusBar::InsertItem( USHORT nItemId, ULONG nWidth,
// Item anlegen
long nFudge = GetTextHeight()/4;
- ImplStatusItem* pItem = new ImplStatusItem;
- pItem->mnId = nItemId;
- pItem->mnBits = nBits;
- pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
- pItem->mnOffset = nOffset;
- pItem->mnHelpId = 0;
- pItem->mpUserData = 0;
- pItem->mbVisible = TRUE;
+ ImplStatusItem* pItem = new ImplStatusItem;
+ pItem->mnId = nItemId;
+ pItem->mnBits = nBits;
+ pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
+ pItem->mnOffset = nOffset;
+ pItem->mnHelpId = 0;
+ pItem->mpUserData = 0;
+ pItem->mbVisible = TRUE;
// Item in die Liste einfuegen
mpItemList->Insert( pItem, nPos );
@@ -1291,7 +1291,7 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
Rectangle aRect = ImplGetItemRectPos( nPos );
long nW = mpImplData->mnItemBorderWidth + 1;
- Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
Size( GetTextWidth( pItem->maText ), GetTextHeight() ),
@@ -1361,7 +1361,7 @@ void StatusBar::SetItemText( USHORT nItemId, const XubString& rText )
// adjust item width - see also DataChanged()
long nFudge = GetTextHeight()/4;
long nWidth = GetTextWidth( pItem->maText ) + nFudge;
- if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) ||
+ if( (nWidth > pItem->mnWidth + STATUSBAR_OFFSET) ||
((nWidth < pItem->mnWidth) && (mnDX - STATUSBAR_OFFSET) < mnItemsWidth ))
{
pItem->mnWidth = nWidth + STATUSBAR_OFFSET;
@@ -1585,9 +1585,9 @@ void StatusBar::StartProgressMode( const XubString& rText )
{
DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" );
- mbProgressMode = TRUE;
- mnPercent = 0;
- maPrgsTxt = rText;
+ mbProgressMode = TRUE;
+ mnPercent = 0;
+ maPrgsTxt = rText;
// Groessen berechnen
ImplCalcProgressRect();
@@ -1651,7 +1651,7 @@ void StatusBar::ResetProgressMode()
{
if ( mbProgressMode )
{
- mnPercent = 0;
+ mnPercent = 0;
maPrgsTxt.Erase();
if ( IsReallyVisible() )
{
@@ -1701,11 +1701,11 @@ void StatusBar::SetText( const XubString& rText )
Size StatusBar::CalcWindowSizePixel() const
{
- ULONG i = 0;
- ULONG nCount = mpItemList->Count();
- long nOffset = 0;
- long nCalcWidth = (STATUSBAR_OFFSET_X*2);
- long nCalcHeight;
+ ULONG i = 0;
+ ULONG nCount = mpItemList->Count();
+ long nOffset = 0;
+ long nCalcWidth = (STATUSBAR_OFFSET_X*2);
+ long nCalcHeight;
while ( i < nCount )
{
@@ -1714,7 +1714,7 @@ Size StatusBar::CalcWindowSizePixel() const
nOffset = pItem->mnOffset;
i++;
}
-
+
long nMinHeight = GetTextHeight();
const long nBarTextOffset = STATUSBAR_OFFSET_TEXTY*2;
long nProgressHeight = nMinHeight + nBarTextOffset;
@@ -1732,14 +1732,14 @@ Size StatusBar::CalcWindowSizePixel() const
nProgressHeight = aNativeControlRegion.GetHeight();
}
}
-
+
if( mpImplData->mbDrawItemFrames &&
pThis->IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
{
ImplControlValue aControlValue( FRAME_DRAW_NODRAW );
Rectangle aBound, aContent;
Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
- if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
+ if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
{
mpImplData->mnItemBorderWidth =
@@ -1750,7 +1750,7 @@ Size StatusBar::CalcWindowSizePixel() const
nCalcHeight = nMinHeight+nBarTextOffset + 2*mpImplData->mnItemBorderWidth;
if( nCalcHeight < nProgressHeight+2 )
nCalcHeight = nProgressHeight+2;
-
+
// add border
if( IsTopBorder() )
nCalcHeight += 2;
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index ef71f83df1ee..49669520595a 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f3624ef56f59..0edbabe1e4e2 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -335,7 +335,7 @@ void SystemWindow::EnableSaveBackground( BOOL bSave )
{
if( ImplGetSVData()->maWinData.mbNoSaveBackground )
bSave = false;
-
+
Window* pWindow = this;
while ( pWindow->mpWindowImpl->mpBorderWindow )
pWindow = pWindow->mpWindowImpl->mpBorderWindow;
@@ -563,7 +563,7 @@ static void ImplWindowStateFromStr( WindowStateData& rData, const ByteString& rS
}
else
rData.SetState( 0 );
-
+
// read maximized pos/size
aTokenStr = rStr.GetToken( 0, ',', nIndex );
if ( aTokenStr.Len() )
@@ -677,7 +677,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo
i_nWidth = 50;
if( i_nHeight < 1 )
i_nHeight = 50;
-
+
// check left border
bool bMove = false;
if( io_rX + i_nWidth < aScreenRect.Left() )
@@ -757,7 +757,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
// 91625 - ignore Minimize
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
aState.mnState = nState & SAL_FRAMESTATE_SYSTEMMASK;
-
+
// normalize window positions onto screen
ImplMoveToScreen( aState.mnX, aState.mnY, aState.mnWidth, aState.mnHeight, pWindow );
ImplMoveToScreen( aState.mnMaximizedX, aState.mnMaximizedY, aState.mnMaximizedWidth, aState.mnMaximizedHeight, pWindow );
@@ -773,7 +773,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
BOOL bWrapped = FALSE;
while( pWin )
{
- if( !pWin->ImplIsRealParentPath( this ) &&
+ if( !pWin->ImplIsRealParentPath( this ) &&
pWin->ImplGetWindow()->IsTopWindow() && pWin->mpWindowImpl->mbReallyVisible )
{
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
@@ -783,7 +783,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( (unsigned long) (aState.mnX + displacement + aState.mnWidth + g.nRightDecoration) > (unsigned long) aDesktop.nRight ||
(unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.nBottom )
{
- // displacing would leave screen
+ // displacing would leave screen
aState.mnX = g.nLeftDecoration ? g.nLeftDecoration : 10; // should result in (0,0)
aState.mnY = displacement;
if( bWrapped ||
@@ -841,10 +841,10 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if( IsRollUp() )
RollDown();
- long nX = rData.GetX();
- long nY = rData.GetY();
- long nWidth = rData.GetWidth();
- long nHeight = rData.GetHeight();
+ long nX = rData.GetX();
+ long nY = rData.GetY();
+ long nWidth = rData.GetWidth();
+ long nHeight = rData.GetHeight();
const SalFrameGeometry& rGeom = pWindow->mpWindowImpl->mpFrame->GetGeometry();
if( nX < 0 )
nX = 0;
@@ -1022,7 +1022,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar )
}
MenuBar::ImplDestroy( pOldMenuBar, bDelete );
if( bDelete )
- pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
+ pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
}
}
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 874881c0c5ef..a0b3073f10c6 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,19 +40,19 @@
void TabDialog::ImplInitTabDialogData()
{
- mpFixedLine = NULL;
- mpViewWindow = NULL;
- meViewAlign = WINDOWALIGN_LEFT;
- mbPosControls = TRUE;
+ mpFixedLine = NULL;
+ mpViewWindow = NULL;
+ meViewAlign = WINDOWALIGN_LEFT;
+ mbPosControls = TRUE;
}
// -----------------------------------------------------------------------
void TabDialog::ImplPosControls()
{
- Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
- long nDownCtrl = 0;
- long nOffY = 0;
+ Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
+ long nDownCtrl = 0;
+ long nOffY = 0;
TabControl* pTabControl = NULL;
Window* pChild = GetWindow( WINDOW_FIRSTCHILD );
@@ -92,56 +92,56 @@ void TabDialog::ImplPosControls()
if ( nOffY )
nOffY += IMPL_DIALOG_BAR_OFFSET*2 + 2;
- Point aTabOffset( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+nOffY );
- Size aTabSize = pTabControl->GetSizePixel();
- Size aDlgSize( aTabSize.Width() + IMPL_DIALOG_OFFSET*2,
+ Point aTabOffset( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+nOffY );
+ Size aTabSize = pTabControl->GetSizePixel();
+ Size aDlgSize( aTabSize.Width() + IMPL_DIALOG_OFFSET*2,
aTabSize.Height() + IMPL_DIALOG_OFFSET*2 + nOffY );
- long nBtnEx = 0;
+ long nBtnEx = 0;
// Preview-Fenster beruecksichtigen und die Groessen/Offsets anpassen
if ( mpViewWindow && mpViewWindow->IsVisible() )
{
- long nViewOffX = 0;
- long nViewOffY = 0;
- long nViewWidth = 0;
- long nViewHeight = 0;
- USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
- Size aViewSize = mpViewWindow->GetSizePixel();
+ long nViewOffX = 0;
+ long nViewOffY = 0;
+ long nViewWidth = 0;
+ long nViewHeight = 0;
+ USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ Size aViewSize = mpViewWindow->GetSizePixel();
if ( meViewAlign == WINDOWALIGN_TOP )
{
- nViewOffX = aTabOffset.X();
- nViewOffY = nOffY+IMPL_DIALOG_OFFSET;
- nViewWidth = aTabSize.Width();
+ nViewOffX = aTabOffset.X();
+ nViewOffY = nOffY+IMPL_DIALOG_OFFSET;
+ nViewWidth = aTabSize.Width();
nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
aTabOffset.Y() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
else if ( meViewAlign == WINDOWALIGN_BOTTOM )
{
- nViewOffX = aTabOffset.X();
- nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
- nViewWidth = aTabSize.Width();
+ nViewOffX = aTabOffset.X();
+ nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
+ nViewWidth = aTabSize.Width();
nViewPosFlags |= WINDOW_POSSIZE_WIDTH;
aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
}
else if ( meViewAlign == WINDOWALIGN_RIGHT )
{
- nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
- nViewOffY = aTabOffset.Y();
- nViewHeight = aTabSize.Height();
+ nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
+ nViewOffY = aTabOffset.Y();
+ nViewHeight = aTabSize.Height();
nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
- nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
+ nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
}
else // meViewAlign == WINDOWALIGN_LEFT
{
- nViewOffX = IMPL_DIALOG_OFFSET;
- nViewOffY = aTabOffset.Y();
- nViewHeight = aTabSize.Height();
+ nViewOffX = IMPL_DIALOG_OFFSET;
+ nViewOffY = aTabOffset.Y();
+ nViewHeight = aTabSize.Height();
nViewPosFlags |= WINDOW_POSSIZE_HEIGHT;
aTabOffset.X() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
- nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
+ nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET;
}
mpViewWindow->SetPosSizePixel( nViewOffX, nViewOffY,
@@ -153,11 +153,11 @@ void TabDialog::ImplPosControls()
pTabControl->SetPosPixel( aTabOffset );
// Alle anderen Childs positionieren
- BOOL bTabCtrl = FALSE;
- int nLines = 0;
+ BOOL bTabCtrl = FALSE;
+ int nLines = 0;
long nX;
- long nY = aDlgSize.Height();
- long nTopX = IMPL_DIALOG_OFFSET;
+ long nY = aDlgSize.Height();
+ long nTopX = IMPL_DIALOG_OFFSET;
// Unter Windows 95 werden die Buttons rechtsbuendig angeordnet
nX = IMPL_DIALOG_OFFSET;
@@ -180,7 +180,7 @@ void TabDialog::ImplPosControls()
if ( nX+aCtrlSize.Width()-IMPL_DIALOG_OFFSET > (aTabSize.Width()+nBtnEx) )
{
nY += aCtrlSize.Height()+IMPL_DIALOG_OFFSET;
- nX = IMPL_DIALOG_OFFSET;
+ nX = IMPL_DIALOG_OFFSET;
nLines++;
}
@@ -251,7 +251,7 @@ void TabDialog::Resize()
// !!! In the future the controls should be automaticly rearrange
// !!! if the window is resized
// !!! if ( !IsRollUp() )
-// !!! ImplPosControls();
+// !!! ImplPosControls();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index 0589d57009f4..a7b6e6557d8e 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -175,7 +175,7 @@ void TabPage::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, UL
Wallpaper aWallpaper = GetBackground();
if ( !aWallpaper.IsBitmap() )
ImplInitSettings();
-
+
pDev->Push();
pDev->SetMapMode();
pDev->SetLineColor();
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index c09dc464b809..380d74cfb8d8 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ Point ImplTaskPaneListGetPos( const Window *w )
else
pos = w->OutputToAbsoluteScreenPixel( pos );
}
- else
+ else
pos = w->OutputToAbsoluteScreenPixel( w->GetPosPixel() );
return pos;
@@ -391,7 +391,7 @@ Window* TaskPaneList::FindNextFloat( Window *pWindow, BOOL bForward )
++p;
}
- return pWindow;
+ return pWindow;
}
// --------------------------------------------------
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index cde91a8dcd97..46a7384180b8 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -233,11 +233,11 @@ ButtonType determineButtonType( ImplToolItem* pItem, ButtonType defaultType )
ToolBoxItemBits nBits( pItem->mnBits & 0x300 );
if ( nBits & TIB_TEXTICON ) // item has custom setting
{
- tmpButtonType = BUTTON_SYMBOLTEXT;
+ tmpButtonType = BUTTON_SYMBOLTEXT;
if ( nBits == TIB_TEXT_ONLY )
- tmpButtonType = BUTTON_TEXT;
+ tmpButtonType = BUTTON_TEXT;
else if ( nBits == TIB_ICON_ONLY )
- tmpButtonType = BUTTON_SYMBOL;
+ tmpButtonType = BUTTON_SYMBOL;
}
return tmpButtonType;
}
@@ -320,7 +320,7 @@ static void ImplCheckUpdate( ToolBox *pThis )
// which would result in erasing the background only and not painting any items
// this must not be done when we're already in Paint()
- // this is only required for transparent toolbars (see ImplDrawTransparentBackground() )
+ // this is only required for transparent toolbars (see ImplDrawTransparentBackground() )
if( !pThis->IsBackground() && pThis->HasPaintEvent() && !pThis->IsInPaint() )
pThis->Update();
}
@@ -344,7 +344,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis )
Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
- bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
+ bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_VERT : PART_THUMB_HORZ,
aCtrlRegion, nState, aToolbarValue, rtl::OUString() );
}
@@ -558,7 +558,7 @@ BOOL ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & )
Rectangle aCtrlRegion( aPt, pThis->GetOutputSizePixel() );
ControlState nState = CTRL_STATE_ENABLED;
- return pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
+ return pThis->DrawNativeControl( CTRL_TOOLBAR, pThis->mbHorz ? PART_DRAW_BACKGROUND_HORZ : PART_DRAW_BACKGROUND_VERT,
aCtrlRegion, nState, ImplControlValue(), rtl::OUString() );
}
@@ -566,11 +566,11 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi
{
// just invalidate to trigger paint of the parent
- const bool bOldPaintLock = pThis->mpData->mbIsPaintLocked;
+ const bool bOldPaintLock = pThis->mpData->mbIsPaintLocked;
pThis->mpData->mbIsPaintLocked = true;
// send an invalidate to the first opaque parent and invalidate the whole hierarchy from there (noclipchildren)
- pThis->Invalidate( rRegion, INVALIDATE_UPDATE|INVALIDATE_NOCLIPCHILDREN );
+ pThis->Invalidate( rRegion, INVALIDATE_UPDATE|INVALIDATE_NOCLIPCHILDREN );
pThis->mpData->mbIsPaintLocked = bOldPaintLock;
}
@@ -584,7 +584,7 @@ void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion,
else
{
// use different color in popupmode
- pThis->DrawWallpaper( rRegion.GetBoundRect(),
+ pThis->DrawWallpaper( rRegion.GetBoundRect(),
Wallpaper( pThis->GetSettings().GetStyleSettings().GetFaceGradientColor() ) );
}
}
@@ -646,7 +646,7 @@ void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, BOOL bHighlight
// the background of non NWF buttons is painted in a constant color
// to have the same highlight color (transparency in DrawSelectionBackground())
// items with open popups will also painted using a constant color
- if( !pThis->mpData->mbNativeButtons &&
+ if( !pThis->mpData->mbNativeButtons &&
(bHighlight || ! (((Window*) pThis)->GetStyle() & WB_3DLOOK ) ) )
{
if( (((Window*) pThis)->GetStyle() & WB_3DLOOK ) )
@@ -1046,12 +1046,12 @@ USHORT ToolBox::ImplCalcLines( ToolBox* pThis, long nToolSize )
nLineHeight += TB_LINESPACING;
nToolSize += TB_LINESPACING;
}
-
+
// #i91917# always report at least one line
long nLines = nToolSize/nLineHeight;
if( nLines < 1 )
nLines = 1;
-
+
return static_cast<USHORT>(nLines);
}
@@ -1578,7 +1578,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
ImplGetWindowImpl()->mbToolBox = TRUE;
mpBtnDev = NULL;
mpFloatSizeAry = NULL;
- mpData = new ImplToolBoxPrivateData;
+ mpData = new ImplToolBoxPrivateData;
mpFloatWin = NULL;
mnDX = 0;
mnDY = 0;
@@ -1597,7 +1597,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mnCurItemId = 0;
mnDownItemId = 0;
mnCurPos = TOOLBOX_ITEM_NOTFOUND;
- mnFocusPos = TOOLBOX_ITEM_NOTFOUND; // current position during keyboard access
+ mnFocusPos = TOOLBOX_ITEM_NOTFOUND; // current position during keyboard access
mnLines = 1;
mnCurLine = 1;
mnCurLines = 1;
@@ -1623,7 +1623,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
mbDragging = FALSE;
mbHideStatusText = FALSE;
mbMenuStrings = FALSE;
- mbIsShift = FALSE;
+ mbIsShift = FALSE;
mbIsKeyEvent = FALSE;
mbChangingHighlight = FALSE;
meButtonType = BUTTON_SYMBOL;
@@ -1631,7 +1631,7 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle )
meLastStyle = POINTER_ARROW;
mnWinStyle = nStyle;
mnLastFocusItemId = 0;
- mnKeyModifier = 0;
+ mnKeyModifier = 0;
mnActivateCount = 0;
maTimer.SetTimeout( 50 );
@@ -1728,7 +1728,7 @@ void ToolBox::ImplLoadRes( const ResId& rResId )
ResMgr* pMgr = rResId.GetResMgr();
if( ! pMgr )
return;
-
+
DockingWindow::ImplLoadRes( rResId );
ULONG nObjMask;
@@ -1940,7 +1940,7 @@ BOOL ToolBox::ImplCalcItem()
mpData->mnMenuButtonWidth = TB_MENUBUTTON_SIZE;
}
}
-
+
// also calculate the area for comboboxes, drop down list boxes and spinfields
// as these are often inserted into toolboxes; set mnWinHeight to the
// greater of those values to prevent toolbar flickering (#i103385#)
@@ -1980,10 +1980,10 @@ BOOL ToolBox::ImplCalcItem()
if( aRect.GetHeight() > mnWinHeight )
mnWinHeight = aRect.GetHeight();
}
- }
-
+ }
+
if ( ! mpData->m_aItems.empty() )
- {
+ {
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
{
@@ -2003,7 +2003,7 @@ BOOL ToolBox::ImplCalcItem()
bText = FALSE;
else
bText = TRUE;
- ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
+ ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting
if ( bImage || bText )
{
@@ -2094,7 +2094,7 @@ BOOL ToolBox::ImplCalcItem()
{
// add borders
ImplAddButtonBorder( it->maItemSize.Width(), it->maItemSize.Height(), mnOutStyle, mpData->mbNativeButtons );
-
+
if( it->meType == TOOLBOXITEM_BUTTON )
{
if( it->maItemSize.Width() < nMinWidth )
@@ -3419,13 +3419,13 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, USHORT highl
ControlState nState = 0;
if ( highlight == 1 ) nState |= CTRL_STATE_PRESSED;
- if ( highlight == 2 ) nState |= CTRL_STATE_ROLLOVER;
+ if ( highlight == 2 ) nState |= CTRL_STATE_ROLLOVER;
if ( bEnabled ) nState |= CTRL_STATE_ENABLED;
aControlValue.setTristateVal( bChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
- bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
+ bNativeOk = pThis->DrawNativeControl( CTRL_TOOLBAR, PART_BUTTON,
rRect, nState, aControlValue, rtl::OUString() );
}
@@ -3636,7 +3636,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
// determine what has to be drawn on the button: image, text or both
BOOL bImage;
BOOL bText;
- ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
+ ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting
pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText );
// compute output values
@@ -3688,7 +3688,7 @@ void ToolBox::ImplDrawItem( USHORT nPos, BOOL bHighlight, BOOL bPaint, BOOL bLay
nImageOffX += (nBtnWidth-aImageSize.Width())/2;
nImageOffY += (nBtnHeight-aImageSize.Height())/2;
}
- if ( bHighlight || (pItem->meState == STATE_CHECK) )
+ if ( bHighlight || (pItem->meState == STATE_CHECK) )
{
if( bHasOpenPopup )
ImplDrawFloatwinBorder( pItem );
@@ -3926,7 +3926,7 @@ void ToolBox::ImplFloatControl( BOOL bStart, FloatingWindow* pFloatWindow )
// draw current item with highlight and keep old state
BOOL bWasKeyboardActivate = mpData->mbDropDownByKeyboard;
-
+
if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND )
ImplDrawItem( mnCurPos, bWasKeyboardActivate ? 2 : 0 );
Deactivate();
@@ -3965,7 +3965,7 @@ void ToolBox::ShowLine( BOOL bNext )
mnCurLine = mnCurLine - delta;
else
mnCurLine = 1;
- }
+ }
}
else
{
@@ -4063,7 +4063,7 @@ BOOL ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, BOOL bCancel )
{
mpData->maDropdownTimer.Stop();
}
-
+
if ( mbDrag || mbSelection )
{
// Hier die MouseDaten setzen, wenn Selection-Modus, da dann kein
@@ -4756,7 +4756,7 @@ void ToolBox::Move()
// -----------------------------------------------------------------------
void ToolBox::Resize()
-{
+{
Size aSize = GetOutputSizePixel();
// #i31422# some WindowManagers send (0,0) sizes when
// switching virtual desktops - ignore this and avoid reformatting
@@ -4893,7 +4893,7 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
{
String aCommand = GetItemCommand( nItemId );
ULONG nHelpId = GetHelpId( nItemId );
-
+
if ( aCommand.Len() || nHelpId )
{
// Wenn eine Hilfe existiert, dann ausloesen
@@ -5391,7 +5391,7 @@ Size ToolBox::CalcWindowSizePixel( USHORT nCalcLines, WindowAlign eAlign ) const
USHORT ToolBox::ImplCountLineBreaks( const ToolBox *pThis )
{
USHORT nLines = 0;
-
+
std::vector< ImplToolItem >::const_iterator it = ((ToolBox*)pThis)->mpData->m_aItems.begin();
while ( it != ((ToolBox*)pThis)->mpData->m_aItems.end() )
{
@@ -5406,7 +5406,7 @@ Size ToolBox::CalcPopupWindowSizePixel() const
{
// count number of breaks and calc corresponding floating window size
USHORT nLines = ImplCountLineBreaks( this );
-
+
if( nLines )
nLines++; // add the first line
else
@@ -5735,7 +5735,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
case KEY_UP:
{
// Ctrl-Cursor activates next toolbox, indicated by a blue arrow pointing to the left/up
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
ImplChangeHighlightUpDn( TRUE );
@@ -5745,7 +5745,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_LEFT:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
ImplChangeHighlightUpDn( TRUE );
@@ -5755,7 +5755,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_DOWN:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( !IsHorizontal() )
ImplChangeHighlightUpDn( FALSE );
@@ -5765,7 +5765,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_RIGHT:
{
- if( aKeyCode.GetModifier() ) // allow only pure cursor keys
+ if( aKeyCode.GetModifier() ) // allow only pure cursor keys
break;
if( IsHorizontal() )
ImplChangeHighlightUpDn( FALSE );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 334cdd2d0a64..9f15df63be68 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ using namespace rtl;
// =======================================================================
-#define TB_SEP_SIZE 8
+#define TB_SEP_SIZE 8
// -----------------------------------------------------------------------
@@ -96,22 +96,22 @@ ImplToolBoxPrivateData::~ImplToolBoxPrivateData()
// -----------------------------------------------------------------------
ImplToolItem::ImplToolItem()
{
- mnId = 0;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = 0;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = TRUE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = 0;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = 0;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = TRUE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = FALSE;
+ mnImageAngle = 0;
+ mbMirrorMode = FALSE;
mbVisibleText = FALSE;
}
@@ -121,22 +121,22 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
ToolBoxItemBits nItemBits ) :
maImage( rImage )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
@@ -146,22 +146,22 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const XubString& rText,
ToolBoxItemBits nItemBits ) :
maText( rText )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
@@ -172,54 +172,54 @@ ImplToolItem::ImplToolItem( USHORT nItemId, const Image& rImage,
maImage( rImage ),
maText( rText )
{
- mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
- mnHelpId = 0;
- meType = TOOLBOXITEM_BUTTON;
- mnBits = nItemBits;
- meState = STATE_NOCHECK;
- mbEnabled = TRUE;
- mbVisible = TRUE;
- mbEmptyBtn = FALSE;
- mbShowWindow = FALSE;
- mbBreak = FALSE;
- mnSepSize = TB_SEP_SIZE;
+ mnId = nItemId;
+ mpWindow = NULL;
+ mpUserData = NULL;
+ mnHelpId = 0;
+ meType = TOOLBOXITEM_BUTTON;
+ mnBits = nItemBits;
+ meState = STATE_NOCHECK;
+ mbEnabled = TRUE;
+ mbVisible = TRUE;
+ mbEmptyBtn = FALSE;
+ mbShowWindow = FALSE;
+ mbBreak = FALSE;
+ mnSepSize = TB_SEP_SIZE;
mnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
- mnImageAngle = 0;
- mbMirrorMode = false;
+ mnImageAngle = 0;
+ mbMirrorMode = false;
mbVisibleText = false;
}
// -----------------------------------------------------------------------
ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) :
- mpWindow ( rItem.mpWindow ),
- mpUserData ( rItem.mpUserData ),
- maImage ( rItem.maImage ),
- maHighImage ( rItem.maHighImage ),
- mnImageAngle ( rItem.mnImageAngle ),
- mbMirrorMode ( rItem.mbMirrorMode ),
- maText ( rItem.maText ),
- maQuickHelpText ( rItem.maQuickHelpText ),
- maHelpText ( rItem.maHelpText ),
- maCommandStr ( rItem.maCommandStr ),
- mnHelpId ( rItem.mnHelpId ),
- maRect ( rItem.maRect ),
- maCalcRect ( rItem.maCalcRect ),
- maItemSize ( rItem.maItemSize ),
- mnSepSize ( rItem.mnSepSize ),
+ mpWindow ( rItem.mpWindow ),
+ mpUserData ( rItem.mpUserData ),
+ maImage ( rItem.maImage ),
+ maHighImage ( rItem.maHighImage ),
+ mnImageAngle ( rItem.mnImageAngle ),
+ mbMirrorMode ( rItem.mbMirrorMode ),
+ maText ( rItem.maText ),
+ maQuickHelpText ( rItem.maQuickHelpText ),
+ maHelpText ( rItem.maHelpText ),
+ maCommandStr ( rItem.maCommandStr ),
+ mnHelpId ( rItem.mnHelpId ),
+ maRect ( rItem.maRect ),
+ maCalcRect ( rItem.maCalcRect ),
+ maItemSize ( rItem.maItemSize ),
+ mnSepSize ( rItem.mnSepSize ),
mnDropDownArrowWidth ( rItem.mnDropDownArrowWidth ),
- meType ( rItem.meType ),
- mnBits ( rItem.mnBits ),
- meState ( rItem.meState ),
- mnId ( rItem.mnId ),
- mbEnabled ( rItem.mbEnabled ),
- mbVisible ( rItem.mbVisible ),
- mbEmptyBtn ( rItem.mbEmptyBtn ),
- mbShowWindow ( rItem.mbShowWindow ),
- mbBreak ( rItem.mbBreak ),
- mbVisibleText ( rItem.mbVisibleText )
+ meType ( rItem.meType ),
+ mnBits ( rItem.mnBits ),
+ meState ( rItem.meState ),
+ mnId ( rItem.mnId ),
+ mbEnabled ( rItem.mbEnabled ),
+ mbVisible ( rItem.mbVisible ),
+ mbEmptyBtn ( rItem.mbEmptyBtn ),
+ mbShowWindow ( rItem.mbShowWindow ),
+ mbBreak ( rItem.mbBreak ),
+ mbVisibleText ( rItem.mbVisibleText )
{
}
@@ -233,32 +233,32 @@ ImplToolItem::~ImplToolItem()
ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem )
{
- mpWindow = rItem.mpWindow;
- mpUserData = rItem.mpUserData;
- maImage = rItem.maImage;
- maHighImage = rItem.maHighImage;
- mnImageAngle = rItem.mnImageAngle;
- mbMirrorMode = rItem.mbMirrorMode;
- maText = rItem.maText;
- maQuickHelpText = rItem.maQuickHelpText;
- maHelpText = rItem.maHelpText;
- maCommandStr = rItem.maCommandStr;
- mnHelpId = rItem.mnHelpId;
- maRect = rItem.maRect;
- maCalcRect = rItem.maCalcRect;
- mnSepSize = rItem.mnSepSize;
+ mpWindow = rItem.mpWindow;
+ mpUserData = rItem.mpUserData;
+ maImage = rItem.maImage;
+ maHighImage = rItem.maHighImage;
+ mnImageAngle = rItem.mnImageAngle;
+ mbMirrorMode = rItem.mbMirrorMode;
+ maText = rItem.maText;
+ maQuickHelpText = rItem.maQuickHelpText;
+ maHelpText = rItem.maHelpText;
+ maCommandStr = rItem.maCommandStr;
+ mnHelpId = rItem.mnHelpId;
+ maRect = rItem.maRect;
+ maCalcRect = rItem.maCalcRect;
+ mnSepSize = rItem.mnSepSize;
mnDropDownArrowWidth = rItem.mnDropDownArrowWidth;
- maItemSize = rItem.maItemSize;
- mbVisibleText = rItem.mbVisibleText;
- meType = rItem.meType;
- mnBits = rItem.mnBits;
- meState = rItem.meState;
- mnId = rItem.mnId;
- mbEnabled = rItem.mbEnabled;
- mbVisible = rItem.mbVisible;
- mbEmptyBtn = rItem.mbEmptyBtn;
- mbShowWindow = rItem.mbShowWindow;
- mbBreak = rItem.mbBreak;
+ maItemSize = rItem.maItemSize;
+ mbVisibleText = rItem.mbVisibleText;
+ meType = rItem.meType;
+ mnBits = rItem.mnBits;
+ meState = rItem.meState;
+ mnId = rItem.mnId;
+ mbEnabled = rItem.mbEnabled;
+ mbVisible = rItem.mbVisible;
+ mbEmptyBtn = rItem.mbEmptyBtn;
+ mbShowWindow = rItem.mbShowWindow;
+ mbBreak = rItem.mbBreak;
return *this;
}
@@ -574,14 +574,14 @@ void ToolBox::UserDraw( const UserDrawEvent& )
void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
{
- ULONG nObjMask;
- BOOL bImage = FALSE; // Wurde Image gesetzt
+ ULONG nObjMask;
+ BOOL bImage = FALSE; // Wurde Image gesetzt
// Item anlegen
ImplToolItem aItem;
GetRes( rResId.SetRT( RSC_TOOLBOXITEM ) );
- nObjMask = ReadLongRes();
+ nObjMask = ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_ID )
aItem.mnId = sal::static_int_cast<USHORT>(ReadLongRes());
@@ -622,7 +622,7 @@ void ToolBox::InsertItem( const ResId& rResId, USHORT nPos )
aItem.mbEnabled = !(BOOL)ReadShortRes();
if ( nObjMask & RSC_TOOLBOXITEM_STATE )
- aItem.meState = (TriState)ReadLongRes();
+ aItem.meState = (TriState)ReadLongRes();
if ( nObjMask & RSC_TOOLBOXITEM_HIDE )
aItem.mbVisible = !((BOOL)ReadShortRes());
@@ -735,10 +735,10 @@ void ToolBox::InsertWindow( USHORT nItemId, Window* pWindow,
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.mnId = nItemId;
- aItem.meType = TOOLBOXITEM_BUTTON;
- aItem.mnBits = nBits;
- aItem.mpWindow = pWindow;
+ aItem.mnId = nItemId;
+ aItem.meType = TOOLBOXITEM_BUTTON;
+ aItem.mnBits = nBits;
+ aItem.mpWindow = pWindow;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -758,8 +758,8 @@ void ToolBox::InsertSpace( USHORT nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_SPACE;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_SPACE;
+ aItem.mbEnabled = FALSE;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -776,8 +776,8 @@ void ToolBox::InsertSeparator( USHORT nPos, USHORT nPixSize )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_SEPARATOR;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_SEPARATOR;
+ aItem.mbEnabled = FALSE;
if ( nPixSize )
aItem.mnSepSize = nPixSize;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
@@ -796,8 +796,8 @@ void ToolBox::InsertBreak( USHORT nPos )
{
// Item anlegen und in die Liste einfuegen
ImplToolItem aItem;
- aItem.meType = TOOLBOXITEM_BREAK;
- aItem.mbEnabled = FALSE;
+ aItem.meType = TOOLBOXITEM_BREAK;
+ aItem.mbEnabled = FALSE;
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem );
mpData->ImplClearLayoutData();
@@ -893,7 +893,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, USHORT nItemId,
// ToolBox-Item in der Liste verschieben
ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos];
// Bestimme Daten zuruecksetzen
- aNewItem.mpWindow = NULL;
+ aNewItem.mpWindow = NULL;
aNewItem.mbShowWindow = FALSE;
mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem );
@@ -920,8 +920,8 @@ void ToolBox::CopyItems( const ToolBox& rToolBox )
for( std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
it != mpData->m_aItems.end(); ++it )
{
- it->mpWindow = NULL;
- it->mbShowWindow = FALSE;
+ it->mpWindow = NULL;
+ it->mbShowWindow = FALSE;
}
ImplInvalidate( TRUE, TRUE );
@@ -1384,8 +1384,8 @@ void ToolBox::SetImageList( const ImageList& rImageList )
static Image ImplRotImage( const Image& rImage, long nAngle10 )
{
- Image aRet;
- BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
+ Image aRet;
+ BitmapEx aRotBitmapEx( rImage.GetBitmapEx() );
aRotBitmapEx.Rotate( nAngle10, Color( COL_WHITE ) );
@@ -1427,8 +1427,8 @@ void ToolBox::SetItemImageAngle( USHORT nItemId, long nAngle10 )
static Image ImplMirrorImage( const Image& rImage )
{
- Image aRet;
- BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
+ Image aRet;
+ BitmapEx aMirrBitmapEx( rImage.GetBitmapEx() );
aMirrBitmapEx.Mirror( BMP_MIRROR_HORZ );
@@ -1605,7 +1605,7 @@ void ToolBox::StartSelection()
if ( !mbSelection )
{
mbSelection = TRUE;
- mnCurPos = TOOLBOX_ITEM_NOTFOUND;
+ mnCurPos = TOOLBOX_ITEM_NOTFOUND;
mnCurItemId = 0;
Activate();
}
@@ -1629,10 +1629,10 @@ void ToolBox::EndSelection()
Deactivate();
}
- mnCurPos = TOOLBOX_ITEM_NOTFOUND;
- mnCurItemId = 0;
- mnDownItemId = 0;
- mnMouseClicks = 0;
+ mnCurPos = TOOLBOX_ITEM_NOTFOUND;
+ mnCurItemId = 0;
+ mnDownItemId = 0;
+ mnMouseClicks = 0;
mnMouseModifier = 0;
}
@@ -1674,9 +1674,9 @@ void ToolBox::SetItemDown( USHORT nItemId, BOOL bDown, BOOL bRelease )
Deactivate();
}
- mnCurItemId = 0;
- mnDownItemId = 0;
- mnMouseClicks = 0;
+ mnCurItemId = 0;
+ mnDownItemId = 0;
+ mnMouseClicks = 0;
mnMouseModifier = 0;
}
}
@@ -1711,9 +1711,9 @@ void ToolBox::SetItemState( USHORT nItemId, TriState eState )
if ( (eState == STATE_CHECK) && (pItem->mnBits & TIB_AUTOCHECK) &&
(pItem->mnBits & TIB_RADIOCHECK) )
{
- ImplToolItem* pGroupItem;
- USHORT nGroupPos;
- USHORT nItemCount = GetItemCount();
+ ImplToolItem* pGroupItem;
+ USHORT nGroupPos;
+ USHORT nItemCount = GetItemCount();
nGroupPos = nPos;
while ( nGroupPos )
@@ -2423,7 +2423,7 @@ void ToolBox::ImplUpdateImageList()
vcl::IImageListProvider* pImageListProvider = mpData->mpImageListProvider;
SetImageList( pImageListProvider->getImageList(eType) );
mpData->meImageListType = eType;
- }
+ }
}
catch (com::sun::star::lang::IllegalArgumentException &) {}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index adedbde4c0f2..72e0e2063014 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -396,7 +396,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
};
static std::set< LanguageType > aBrokenSystemFontSizeLanguagesSet(
eBrokenSystemFontSizeLanguages,
- eBrokenSystemFontSizeLanguages +
+ eBrokenSystemFontSizeLanguages +
(sizeof(eBrokenSystemFontSizeLanguages)/sizeof(eBrokenSystemFontSizeLanguages[0]))
);
LanguageType aLang = Application::GetSettings().GetUILanguage();
@@ -501,7 +501,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
}
}
}
-
+
static const char* pEnvHC = getenv( "SAL_FORCE_HC" );
if( pEnvHC && *pEnvHC )
{
@@ -637,10 +637,10 @@ void Window::ImplInitWindowData( WindowType nType )
mpWindowImpl->mbDockWin = FALSE; // TRUE: DockingWindow is the base class
mpWindowImpl->mbFloatWin = FALSE; // TRUE: FloatingWindow is the base class
mpWindowImpl->mbPushButton = FALSE; // TRUE: PushButton is the base class
- mpWindowImpl->mbToolBox = FALSE; // TRUE: ToolBox is the base class
- mpWindowImpl->mbMenuFloatingWindow= FALSE; // TRUE: MenuFloatingWindow is the base class
- mpWindowImpl->mbToolbarFloatingWindow= FALSE; // TRUE: ImplPopupFloatWin is the base class, used for subtoolbars
- mpWindowImpl->mbSplitter = FALSE; // TRUE: Splitter is the base class
+ mpWindowImpl->mbToolBox = FALSE; // TRUE: ToolBox is the base class
+ mpWindowImpl->mbMenuFloatingWindow= FALSE; // TRUE: MenuFloatingWindow is the base class
+ mpWindowImpl->mbToolbarFloatingWindow= FALSE; // TRUE: ImplPopupFloatWin is the base class, used for subtoolbars
+ mpWindowImpl->mbSplitter = FALSE; // TRUE: Splitter is the base class
mpWindowImpl->mbVisible = FALSE; // TRUE: Show( TRUE ) called
mpWindowImpl->mbOverlapVisible = FALSE; // TRUE: Hide called for visible window from ImplHideAllOverlapWindow()
mpWindowImpl->mbDisabled = FALSE; // TRUE: Enable( FALSE ) called
@@ -723,7 +723,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
ImplSVData* pSVData = ImplGetSVData();
Window* pRealParent = pParent;
-
+
// 3D-Look vererben
if ( !mpWindowImpl->mbOverlapWin && pParent && (pParent->GetStyle() & WB_3DLOOK) )
nStyle |= WB_3DLOOK;
@@ -1319,7 +1319,7 @@ ImplWinData* Window::ImplGetWinData() const
mpWindowImpl->mpWinData->mpFocusRect = NULL;
mpWindowImpl->mpWinData->mpTrackRect = NULL;
mpWindowImpl->mpWinData->mnTrackFlags = 0;
- mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
+ mpWindowImpl->mpWinData->mnIsTopWindow = (USHORT) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
mpWindowImpl->mpWinData->mbMouseOver = FALSE;
mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? FALSE : TRUE; // TRUE: try to draw this control with native theme API
mpWindowImpl->mpWinData->mpSmartHelpId = NULL;
@@ -2341,7 +2341,7 @@ void Window::ImplCallPaint( const Region* pRegion, USHORT nPaintFlags )
// call PrePaint. PrePaint may add to the invalidate region as well as
// other parameters used below.
PrePaint();
-
+
mpWindowImpl->mbPaintFrame = FALSE;
if ( nPaintFlags & IMPL_PAINT_PAINTALLCHILDS )
@@ -3282,7 +3282,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
nX = mpWindowImpl->mpParent->mnOutWidth - mnOutWidth - nX;
}
}
-
+
// check maPos as well, as it could have been changed for client windows (ImplCallMove())
if ( mpWindowImpl->mnAbsScreenX != aPtDev.X() || nX != mpWindowImpl->mnX || nOrgX != mpWindowImpl->maPos.X() )
{
@@ -3295,7 +3295,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
}
mpWindowImpl->mnX = nX;
mpWindowImpl->maPos.X() = nOrgX;
- mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos)
+ mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos)
bNewPos = TRUE;
}
}
@@ -8711,8 +8711,8 @@ Reference< XClipboard > Window::GetPrimarySelection()
mpWindowImpl->mpFrameData->mxSelection = Reference< XClipboard >( xFactory->createInstanceWithArguments(
OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.SystemClipboard" ), aArgumentList ), UNO_QUERY );
-# else
- static Reference< XClipboard > s_xSelection;
+# else
+ static Reference< XClipboard > s_xSelection;
if ( !s_xSelection.is() )
s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboardExt" ) ), UNO_QUERY );
@@ -8721,7 +8721,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
s_xSelection = Reference< XClipboard >( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.datatransfer.clipboard.GenericClipboard" ) ), UNO_QUERY );
mpWindowImpl->mpFrameData->mxSelection = s_xSelection;
-# endif
+# endif
}
}
@@ -9344,7 +9344,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
{
if( rRect.IsEmpty() )
return;
-
+
bool bRoundEdges = nCornerRadius > 0;
const StyleSettings& rStyles = GetSettings().GetStyleSettings();
@@ -9823,7 +9823,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
// preserve graphicsstate
Push();
Region aClipRegion( GetClipRegion() );
- SetClipRegion();
+ SetClipRegion();
GDIMetaFile* pOldMtf = GetConnectMetaFile();
GDIMetaFile aMtf;
@@ -9885,7 +9885,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
SetConnectMetaFile( pOldMtf );
EnableOutput( bOutput );
mpWindowImpl->mbReallyVisible = bRVisible;
-
+
// paint metafile to VDev
VirtualDevice* pMaskedDevice = new VirtualDevice( *i_pTargetOutDev, 0, 0 );
pMaskedDevice->SetOutputSizePixel( GetOutputSizePixel() );
@@ -9907,7 +9907,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
nDeltaX = mnOutWidth - nDeltaX - pChild->mnOutWidth;
long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel();
Point aPos( i_rPos );
- Point aDelta( nDeltaX, nDeltaY );
+ Point aDelta( nDeltaX, nDeltaY );
aPos += aDelta;
pChild->ImplPaintToDevice( i_pTargetOutDev, aPos );
}
@@ -9926,11 +9926,11 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /*rSize*/ )
{
// FIXME: scaling: currently this is for pixel copying only
-
+
DBG_ASSERT( ! pDev->ImplHasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
-
-
+
+
Point aPos = pDev->LogicToPixel( rPos );
Window* pRealParent = NULL;
@@ -9948,7 +9948,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
BOOL bVisible = mpWindowImpl->mbVisible;
mpWindowImpl->mbVisible = TRUE;
-
+
if( mpWindowImpl->mpBorderWindow )
mpWindowImpl->mpBorderWindow->ImplPaintToDevice( pDev, rPos );
else
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 02b2713b01cc..349e5f477734 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -356,13 +356,13 @@ Bitmap Window::SnapShot() const
void Window::ShowFocus( const Rectangle& rRect )
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
+
if( mpWindowImpl->mbInShowFocus )
return;
mpWindowImpl->mbInShowFocus = TRUE;
ImplWinData* pWinData = ImplGetWinData();
-
+
// native themeing suggest not to use focus rects
if( ! ( mpWindowImpl->mbUseNativeFocus &&
IsNativeWidgetEnabled() ) )
@@ -376,10 +376,10 @@ void Window::ShowFocus( const Rectangle& rRect )
mpWindowImpl->mbInShowFocus = FALSE;
return;
}
-
+
ImplInvertFocus( *(pWinData->mpFocusRect) );
}
-
+
ImplInvertFocus( rRect );
}
if ( !pWinData->mpFocusRect )
@@ -405,7 +405,7 @@ void Window::ShowFocus( const Rectangle& rRect )
void Window::HideFocus()
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
-
+
if( mpWindowImpl->mbInHideFocus )
return;
mpWindowImpl->mbInHideFocus = TRUE;
@@ -1227,9 +1227,9 @@ BOOL Window::HandleScrollCommand( const CommandEvent& rCmd,
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
- ImplHandleScroll( NULL,
- 0L,
- pData->IsHorz() ? pHScrl : pVScrl,
+ ImplHandleScroll( NULL,
+ 0L,
+ pData->IsHorz() ? pHScrl : pVScrl,
nLines );
bRet = TRUE;
}
@@ -1309,7 +1309,7 @@ void Window::ImplHandleScroll( ScrollBar* pHScrl, long nX,
}
}
-// support for docking
+// support for docking
// this is currently handled in ImplDockingWindowWrapper
/*
void Window::ImplSetFloatingMode( BOOL bFloatMode )
@@ -1444,14 +1444,14 @@ Window* Window::ImplGetTopmostFrameWindow()
// making these Methods out of line to be able to change them lateron without complete rebuild
// TODO: Set the SmartId in here and remove mpWindowImpl->mnHelpId
-void Window::SetHelpId( ULONG nHelpId )
-{
- SetSmartHelpId(SmartId(nHelpId));
+void Window::SetHelpId( ULONG nHelpId )
+{
+ SetSmartHelpId(SmartId(nHelpId));
}
-ULONG Window::GetHelpId() const
-{
- return mpWindowImpl->mnHelpId;
+ULONG Window::GetHelpId() const
+{
+ return mpWindowImpl->mnHelpId;
}
void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
@@ -1466,7 +1466,7 @@ void Window::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
// if we have a SmartId (eather from earlier call or just created) fill with new values
if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartHelpId )
ImplGetWinData()->mpSmartHelpId->UpdateId( aId, aMode );
-
+
if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
{
mpWindowImpl->mnHelpId = aId.GetNum();
@@ -1509,7 +1509,7 @@ void Window::SetSmartUniqueId( const SmartId& aId, SmartIdUpdateMode aMode )
// if we have a SmartId (eather from earlier call or just created) fill with new values
if ( mpWindowImpl->mpWinData && mpWindowImpl->mpWinData->mpSmartUniqueId )
ImplGetWinData()->mpSmartUniqueId->UpdateId( aId, aMode );
-
+
if ( (aMode == SMART_SET_NUM) || (aMode == SMART_SET_ALL) || ( (aMode == SMART_SET_SMART) && aId.HasNumeric() ) )
mpWindowImpl->mnUniqId = aId.GetNum();
}
@@ -1823,210 +1823,210 @@ BOOL Window::IsControlFont() const
}
Color Window::GetControlForeground() const
-{
- return mpWindowImpl->maControlForeground;
+{
+ return mpWindowImpl->maControlForeground;
}
-BOOL Window::IsControlForeground() const
-{
- return mpWindowImpl->mbControlForeground;
+BOOL Window::IsControlForeground() const
+{
+ return mpWindowImpl->mbControlForeground;
}
-Color Window::GetControlBackground() const
-{
- return mpWindowImpl->maControlBackground;
+Color Window::GetControlBackground() const
+{
+ return mpWindowImpl->maControlBackground;
}
-BOOL Window::IsControlBackground() const
-{
- return mpWindowImpl->mbControlBackground;
+BOOL Window::IsControlBackground() const
+{
+ return mpWindowImpl->mbControlBackground;
}
-BOOL Window::IsInPaint() const
-{
- return mpWindowImpl->mbInPaint;
+BOOL Window::IsInPaint() const
+{
+ return mpWindowImpl->mbInPaint;
}
-Window* Window::GetParent() const
-{
- return mpWindowImpl->mpRealParent;
+Window* Window::GetParent() const
+{
+ return mpWindowImpl->mpRealParent;
}
-BOOL Window::IsVisible() const
-{
- return mpWindowImpl->mbVisible;
+BOOL Window::IsVisible() const
+{
+ return mpWindowImpl->mbVisible;
}
-BOOL Window::IsReallyVisible() const
-{
- return mpWindowImpl->mbReallyVisible;
+BOOL Window::IsReallyVisible() const
+{
+ return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsParentPathVisible() const
-{
- return mpWindowImpl->mbReallyVisible;
+BOOL Window::IsParentPathVisible() const
+{
+ return mpWindowImpl->mbReallyVisible;
}
-BOOL Window::IsReallyShown() const
-{
- return mpWindowImpl->mbReallyShown;
+BOOL Window::IsReallyShown() const
+{
+ return mpWindowImpl->mbReallyShown;
}
-BOOL Window::IsInInitShow() const
-{
- return mpWindowImpl->mbInInitShow;
+BOOL Window::IsInInitShow() const
+{
+ return mpWindowImpl->mbInInitShow;
}
-BOOL Window::IsEnabled() const
-{
- return !mpWindowImpl->mbDisabled;
+BOOL Window::IsEnabled() const
+{
+ return !mpWindowImpl->mbDisabled;
}
-BOOL Window::IsInputEnabled() const
-{
- return !mpWindowImpl->mbInputDisabled;
+BOOL Window::IsInputEnabled() const
+{
+ return !mpWindowImpl->mbInputDisabled;
}
-BOOL Window::IsAlwaysEnableInput() const
-{
- return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
+BOOL Window::IsAlwaysEnableInput() const
+{
+ return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled;
}
-BOOL Window::IsAlwaysDisableInput() const
-{
- return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled;
+BOOL Window::IsAlwaysDisableInput() const
+{
+ return mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled;
}
-USHORT Window::GetActivateMode() const
-{
- return mpWindowImpl->mnActivateMode;
+USHORT Window::GetActivateMode() const
+{
+ return mpWindowImpl->mnActivateMode;
}
-BOOL Window::IsAlwaysOnTopEnabled() const
-{
- return mpWindowImpl->mbAlwaysOnTop;
+BOOL Window::IsAlwaysOnTopEnabled() const
+{
+ return mpWindowImpl->mbAlwaysOnTop;
}
-BOOL Window::IsDefaultPos() const
-{
- return mpWindowImpl->mbDefPos;
+BOOL Window::IsDefaultPos() const
+{
+ return mpWindowImpl->mbDefPos;
}
-BOOL Window::IsDefaultSize() const
-{
- return mpWindowImpl->mbDefSize;
+BOOL Window::IsDefaultSize() const
+{
+ return mpWindowImpl->mbDefSize;
}
-void Window::EnablePaint( BOOL bEnable )
-{
- mpWindowImpl->mbPaintDisabled = !bEnable;
+void Window::EnablePaint( BOOL bEnable )
+{
+ mpWindowImpl->mbPaintDisabled = !bEnable;
}
-BOOL Window::IsPaintEnabled() const
-{
- return !mpWindowImpl->mbPaintDisabled;
+BOOL Window::IsPaintEnabled() const
+{
+ return !mpWindowImpl->mbPaintDisabled;
}
-BOOL Window::IsUpdateMode() const
-{
- return !mpWindowImpl->mbNoUpdate;
+BOOL Window::IsUpdateMode() const
+{
+ return !mpWindowImpl->mbNoUpdate;
}
-void Window::SetParentUpdateMode( BOOL bUpdate )
-{
- mpWindowImpl->mbNoParentUpdate = !bUpdate;
+void Window::SetParentUpdateMode( BOOL bUpdate )
+{
+ mpWindowImpl->mbNoParentUpdate = !bUpdate;
}
-BOOL Window::IsParentUpdateMode() const
-{
- return !mpWindowImpl->mbNoParentUpdate;
+BOOL Window::IsParentUpdateMode() const
+{
+ return !mpWindowImpl->mbNoParentUpdate;
}
-BOOL Window::IsActive() const
-{
- return mpWindowImpl->mbActive;
+BOOL Window::IsActive() const
+{
+ return mpWindowImpl->mbActive;
}
-USHORT Window::GetGetFocusFlags() const
-{
- return mpWindowImpl->mnGetFocusFlags;
+USHORT Window::GetGetFocusFlags() const
+{
+ return mpWindowImpl->mnGetFocusFlags;
}
-BOOL Window::IsCompoundControl() const
-{
- return mpWindowImpl->mbCompoundControl;
+BOOL Window::IsCompoundControl() const
+{
+ return mpWindowImpl->mbCompoundControl;
}
-BOOL Window::HasCompoundControlFocus() const
-{
- return mpWindowImpl->mbCompoundControlHasFocus;
+BOOL Window::HasCompoundControlFocus() const
+{
+ return mpWindowImpl->mbCompoundControlHasFocus;
}
-BOOL Window::IsChildPointerOverwrite() const
+BOOL Window::IsChildPointerOverwrite() const
{
- return mpWindowImpl->mbChildPtrOverwrite;
+ return mpWindowImpl->mbChildPtrOverwrite;
}
-BOOL Window::IsPointerVisible() const
-{
- return !mpWindowImpl->mbNoPtrVisible;
+BOOL Window::IsPointerVisible() const
+{
+ return !mpWindowImpl->mbNoPtrVisible;
}
-BOOL Window::IsWait() const
-{
- return (mpWindowImpl->mnWaitCount != 0);
+BOOL Window::IsWait() const
+{
+ return (mpWindowImpl->mnWaitCount != 0);
}
-Cursor* Window::GetCursor() const
-{
- return mpWindowImpl->mpCursor;
+Cursor* Window::GetCursor() const
+{
+ return mpWindowImpl->mpCursor;
}
-const Fraction& Window::GetZoom() const
-{
- return mpWindowImpl->maZoom;
+const Fraction& Window::GetZoom() const
+{
+ return mpWindowImpl->maZoom;
}
-BOOL Window::IsZoom() const
-{
- return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
+BOOL Window::IsZoom() const
+{
+ return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator();
}
-void Window::SetHelpText( const XubString& rHelpText )
-{
+void Window::SetHelpText( const XubString& rHelpText )
+{
mpWindowImpl->maHelpText = rHelpText;
mpWindowImpl->mbHelpTextDynamic = TRUE;
}
-void Window::SetQuickHelpText( const XubString& rHelpText )
-{
- mpWindowImpl->maQuickHelpText = rHelpText;
+void Window::SetQuickHelpText( const XubString& rHelpText )
+{
+ mpWindowImpl->maQuickHelpText = rHelpText;
}
-const XubString& Window::GetQuickHelpText() const
-{
- return mpWindowImpl->maQuickHelpText;
+const XubString& Window::GetQuickHelpText() const
+{
+ return mpWindowImpl->maQuickHelpText;
}
-void Window::SetData( void* pNewData )
-{
- mpWindowImpl->mpUserData = pNewData;
+void Window::SetData( void* pNewData )
+{
+ mpWindowImpl->mpUserData = pNewData;
}
-void* Window::GetData() const
-{
- return mpWindowImpl->mpUserData;
+void* Window::GetData() const
+{
+ return mpWindowImpl->mpUserData;
}
-BOOL Window::IsCreatedWithToolkit() const
-{
- return mpWindowImpl->mbCreatedWithToolkit;
+BOOL Window::IsCreatedWithToolkit() const
+{
+ return mpWindowImpl->mbCreatedWithToolkit;
}
-void Window::SetCreatedWithToolkit( BOOL b )
-{
- mpWindowImpl->mbCreatedWithToolkit = b;
+void Window::SetCreatedWithToolkit( BOOL b )
+{
+ mpWindowImpl->mbCreatedWithToolkit = b;
}
const Pointer& Window::GetPointer() const
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index 65019ba2a4af..15d8d1738cf2 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c964ad0d739b..7db22b195023 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -479,9 +479,9 @@ long ImplHandleMouseEvent( Window* pWindow, USHORT nSVEvent, BOOL bMouseLeave,
MouseEvent aMEvt( aChildPos, pWinFrameData->mnClickCount, nMode, nCode, nCode );
NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt );
Application::CallEventHooks( aNEvt );
-
+
if( pChild->IsCallHandlersOnInputDisabled() )
- {
+ {
pWinFrameData->mpMouseMoveWin = pChild;
pChild->ImplNotifyKeyMouseCommandEventListeners( aNEvt );
}
@@ -1258,7 +1258,7 @@ static long ImplHandleExtTextInput( Window* pWindow,
{
ImplSVData* pSVData = ImplGetSVData();
Window* pChild = NULL;
-
+
int nTries = 200;
while( nTries-- )
{
@@ -1544,7 +1544,7 @@ static long ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv
}
}
}
-
+
// close floaters
if( ! bIsFloat && pSVData->maWinData.mpFirstFloat )
{
@@ -1695,7 +1695,7 @@ static void ImplHandleMove( Window* pWindow )
pWindow->ImplGetWindowImpl()->mbCallMove = TRUE; // make sure the framepos will be updated on the next Show()
if ( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplGetWindowImpl()->mpClientWindow )
- pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry
+ pWindow->ImplGetWindowImpl()->mpClientWindow->ImplCallMove(); // notify client to update geometry
}
@@ -2276,7 +2276,7 @@ static long ImplHandleShowDialog( Window* pWindow, int nDialogId )
{
if( ! pWindow )
return FALSE;
-
+
if( pWindow->GetType() == WINDOW_BORDERWINDOW )
{
Window* pWrkWin = pWindow->GetWindow( WINDOW_CLIENT );
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 8fb2f2f8346a..916dc8e56d9a 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -298,7 +298,7 @@ BOOL WorkWindow::Close()
// Ist es das Applikationsfenster, dann beende die Applikation
if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) )
GetpApp()->Quit();
-
+
return bCanClose;
}
@@ -314,8 +314,8 @@ BOOL WorkWindow::IsMaximized() const
SalFrameState aState;
if( mpWindowImpl->mpFrame->GetWindowState( &aState ) )
{
- if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED |
- SAL_FRAMESTATE_MAXIMIZED_HORZ |
+ if( aState.mnState & (SAL_FRAMESTATE_MAXIMIZED |
+ SAL_FRAMESTATE_MAXIMIZED_HORZ |
SAL_FRAMESTATE_MAXIMIZED_VERT ) )
bRet = TRUE;
}