[Libreoffice-commits] .: svtools/source toolkit/inc toolkit/source toolkit/workben vcl/inc vcl/source
Joseph Powers
jpowers at kemper.freedesktop.org
Sat Nov 13 00:40:01 PST 2010
svtools/source/dialogs/printdlg.cxx | 10
toolkit/inc/layout/layout.hxx | 9
toolkit/source/layout/vcl/wbutton.cxx | 6
toolkit/workben/layout/number-format.xml | 5
vcl/inc/vcl/button.hxx | 25 +-
vcl/inc/vcl/fixed.hxx | 12 -
vcl/inc/vcl/ilstbox.hxx | 9
vcl/inc/vcl/imgctrl.hxx | 7
vcl/inc/vcl/msgbox.hxx | 11 -
vcl/inc/vcl/svids.hrc | 3
vcl/source/control/button.cxx | 222 ++++++---------------
vcl/source/control/fixed.cxx | 55 -----
vcl/source/control/ilstbox.cxx | 87 +++-----
vcl/source/control/imgctrl.cxx | 29 --
vcl/source/window/msgbox.cxx | 91 ++------
vcl/source/window/printdlg.cxx | 315 +++++++++++++++----------------
16 files changed, 342 insertions(+), 554 deletions(-)
New commits:
commit 659c57b40a031a4be7d72e1e4a6ecbf35d3a81ba
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sat Nov 13 00:35:47 2010 -0800
Purged BmpColorMode from libs-gui - libs-gui
diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx
index cd0657e..b294413 100644
--- a/svtools/source/dialogs/printdlg.cxx
+++ b/svtools/source/dialogs/printdlg.cxx
@@ -2,7 +2,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
@@ -165,10 +165,8 @@ PrintDialog::~PrintDialog()
void PrintDialog::ImplSetImages()
{
- maImgCollate.SetModeImage(Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ),
- BMP_COLOR_NORMAL );
- maImgNotCollate.SetModeImage(Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ),
- BMP_COLOR_NORMAL );
+ maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ) );
+ maImgNotCollate.SetModeImage(Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ) );
}
// -----------------------------------------------------------------------
@@ -745,7 +743,7 @@ short PrintDialog::Execute()
DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" );
return FALSE;
}
-
+
// check if the printer brings up its own dialog
// in that case leave the work to that dialog
if( mpPrinter->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) )
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
index 6c3320c..9322cdc 100644
--- a/toolkit/inc/layout/layout.hxx
+++ b/toolkit/inc/layout/layout.hxx
@@ -2,7 +2,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,8 +61,6 @@ class PushButton;
class RadioButton;
class ResId;
struct SfxChildWinInfo;
-//class SvxFontListBox;
-//class SvxLanguageBox;
class TabControl;
class TabPage;
class VCLXRadioButton;
@@ -170,8 +168,6 @@ public:
void EnterWait ();
void LeaveWait ();
bool IsWait () const;
- //void Enable (bool enable=true, bool child=true);
- //void Disable (bool child=true);
bool IsEnabled () const;
void EnableInput (bool enable=true, bool child=true);
bool IsInputEnabled () const;
@@ -268,7 +264,7 @@ public:
static String GetStandardText (sal_uInt16 button_type);
void SetText( rtl::OUString const& rStr );
bool SetModeImage (Image const& image);
- bool SetModeImage (::Image const& image, BmpColorMode mode=BMP_COLOR_NORMAL);
+ bool SetModeImage (::Image const& image);
void SetImageAlign( ImageAlign eAlign );
void SetClickHdl( Link const& rLink );
@@ -776,7 +772,6 @@ class PluginImpl;
class TOOLKIT_DLLPUBLIC Plugin : public Control
{
DECL_GET_IMPL( Plugin );
- //DECL_CONSTRUCTORS( Plugin, Control, 0 );
public:
::Control *mpPlugin;
Plugin( Context *context, char const* id, ::Control *plugin );
diff --git a/toolkit/source/layout/vcl/wbutton.cxx b/toolkit/source/layout/vcl/wbutton.cxx
index 0354f18..0a7e0e4 100644
--- a/toolkit/source/layout/vcl/wbutton.cxx
+++ b/toolkit/source/layout/vcl/wbutton.cxx
@@ -2,7 +2,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
@@ -166,9 +166,9 @@ bool Button::SetModeImage (Image const& image)
return getImpl().SetModeImage (image.getImpl().mxGraphic);
}
-bool Button::SetModeImage (::Image const& image, BmpColorMode mode)
+bool Button::SetModeImage (::Image const& image)
{
- return GetButton ()->SetModeImage (image, mode);
+ return GetButton ()->SetModeImage (image);
}
void Button::SetImageAlign( ImageAlign eAlign )
diff --git a/toolkit/workben/layout/number-format.xml b/toolkit/workben/layout/number-format.xml
index 6f4c61d..77460ea 100644
--- a/toolkit/workben/layout/number-format.xml
+++ b/toolkit/workben/layout/number-format.xml
@@ -10,11 +10,6 @@
<idlist none="IID_INFO"/>
<idcount none="3"/>
</imagelist>
- <imagelist prefix="nuh" id="IL_ICON_HC">
- <maskcolor blue="0xFFFF" green="0x0000" red="0xFFFF" type="Color"/>
- <idlist none="IID_INFO"/>
- <idcount none="3"/>
- </imagelist>
!-->
<vbox spacing="5" border="5">
<string id="STR_EUROPE" _text="Europe"/>
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 81da432..206a956 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -2,7 +2,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,14 +87,14 @@ public:
static XubString GetStandardText( StandardButtonType eButton );
static XubString GetStandardHelpText( StandardButtonType eButton );
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Image GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeImage( const Image& rImage );
+ const Image GetModeImage( ) const;
BOOL HasImage() const;
void SetImageAlign( ImageAlign eAlign );
ImageAlign GetImageAlign() const;
- BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
- BitmapEx GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeBitmap( const BitmapEx& rBitmap );
+ BitmapEx GetModeBitmap( ) const;
void EnableImageDisplay( BOOL bEnable );
BOOL IsImageDisplayEnabled();
@@ -298,7 +298,6 @@ private:
Rectangle maStateRect;
Rectangle maMouseRect;
Image maImage;
- Image maImageHC;
BOOL mbChecked;
BOOL mbSaveValue;
BOOL mbRadioCheck;
@@ -374,8 +373,8 @@ public:
void EnableRadioCheck( BOOL bRadioCheck = TRUE ) { mbRadioCheck = bRadioCheck; }
BOOL IsRadioCheckEnabled() const { return mbRadioCheck; }
- BOOL SetModeRadioImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Image& GetModeRadioImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeRadioImage( const Image& rImage );
+ const Image& GetModeRadioImage( ) const;
void SetState( BOOL bCheck );
void Check( BOOL bCheck = TRUE );
@@ -391,17 +390,17 @@ public:
void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
const Link& GetToggleHdl() const { return maToggleHdl; }
-
+
/** GetRadioButtonGroup returns a list of pointers to <code>RadioButton</code>s in the same group.
-
+
The pointers in the returned list are valid at the time call returns. However rescheduling
or giving up the SolarMutex may mean events get executed that lead to the pointers getting
invalid.
-
+
@param io_rGroup
gets cleared on entering the function. on return contains the <code>RadioButton</code>s
in the same group as this <code>RadioButton</code>.
-
+
@param bIncludeThis
defines whether <code>this</code> is contained in the returned list
*/
@@ -453,7 +452,7 @@ protected:
SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; }
SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; }
public:
- SAL_DLLPRIVATE void ImplCheck();
+ SAL_DLLPRIVATE void ImplCheck();
SAL_DLLPRIVATE void ImplSetMinimumNWFSize();
public:
CheckBox( Window* pParent, WinBits nStyle = 0 );
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index a2a52ef..13da01c 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -2,7 +2,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
@@ -118,7 +118,6 @@ class VCL_DLLPUBLIC FixedBitmap : public Control
{
private:
Bitmap maBitmap;
- Bitmap maBitmapHC;
using Control::ImplInitSettings;
using Window::ImplInit;
@@ -145,8 +144,8 @@ public:
void SetBitmap( const Bitmap& rBitmap );
using OutputDevice::GetBitmap;
const Bitmap& GetBitmap() const { return maBitmap; }
- BOOL SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Bitmap& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeBitmap( const Bitmap& rBitmap );
+ const Bitmap& GetModeBitmap( ) const;
};
// --------------
@@ -157,7 +156,6 @@ class VCL_DLLPUBLIC FixedImage : public Control
{
private:
Image maImage;
- Image maImageHC;
BOOL mbInUserDraw;
private:
@@ -188,8 +186,8 @@ public:
void SetImage( const Image& rImage );
const Image& GetImage() const { return maImage; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeImage( const Image& rImage );
+ const Image& GetModeImage( ) const;
Point CalcImagePos( const Point& rPos,
const Size& rObjSize, const Size& rWinSize );
diff --git a/vcl/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx
index 17ddd30..fd42ab2 100644
--- a/vcl/inc/vcl/ilstbox.hxx
+++ b/vcl/inc/vcl/ilstbox.hxx
@@ -2,7 +2,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
@@ -178,7 +178,7 @@ public:
void SetMaxMRUCount( USHORT n ) { mnMaxMRUCount = n; }
USHORT GetMaxMRUCount() const { return mnMaxMRUCount; }
- /** An Entry is selectable if its mnFlags does not have the
+ /** An Entry is selectable if its mnFlags does not have the
LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */
bool IsEntrySelectable( USHORT nPos ) const;
@@ -559,7 +559,6 @@ private:
USHORT mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle.
XubString maString;
Image maImage;
- Image maImageHC;
Rectangle maFocusRect;
Size maUserItemSize;
@@ -595,8 +594,8 @@ public:
const Image& GetImage() const { return maImage; }
void SetImage( const Image& rImg ) { maImage = rImg; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeImage( const Image& rImage );
+ const Image& GetModeImage( ) const;
virtual void MBDown();
diff --git a/vcl/inc/vcl/imgctrl.hxx b/vcl/inc/vcl/imgctrl.hxx
index c727433..2430e6c 100644
--- a/vcl/inc/vcl/imgctrl.hxx
+++ b/vcl/inc/vcl/imgctrl.hxx
@@ -2,7 +2,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,6 @@ class VCL_DLLPUBLIC ImageControl : public FixedImage
{
private:
BitmapEx maBmp;
- BitmapEx maBmpHC;
::sal_Int16 mnScaleMode;
public:
@@ -61,8 +60,8 @@ public:
void SetBitmap( const BitmapEx& rBmp );
using OutputDevice::GetBitmap;
const BitmapEx& GetBitmap() const { return maBmp; }
- BOOL SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const BitmapEx& GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeBitmap( const BitmapEx& rBitmap );
+ const BitmapEx& GetModeBitmap( ) const;
};
#endif // _SV_IMGCTRL_HXX
diff --git a/vcl/inc/vcl/msgbox.hxx b/vcl/inc/vcl/msgbox.hxx
index d3af984..14ad0c8 100644
--- a/vcl/inc/vcl/msgbox.hxx
+++ b/vcl/inc/vcl/msgbox.hxx
@@ -2,7 +2,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,6 @@ protected:
FixedImage* mpFixedImage;
XubString maMessText;
Image maImage;
- Image maImageHC;
USHORT mnSoundType;
BOOL mbHelpBtn;
BOOL mbSound;
@@ -101,8 +100,8 @@ public:
void SetImage( const Image& rImage ) { maImage = rImage; }
const Image& GetImage() const { return maImage; }
- BOOL SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
- const Image& GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
+ BOOL SetModeImage( const Image& rImage );
+ const Image& GetModeImage( ) const;
void SetDefaultCheckBoxText();
void SetCheckBoxText( const XubString& rText ) { maCheckBoxText = rText;}
@@ -127,7 +126,6 @@ public:
InfoBox( Window* pParent, const ResId & rResId );
static Image GetStandardImage();
- static Image GetStandardImageHC();
};
// --------------
@@ -147,7 +145,6 @@ public:
void SetDefaultCheckBoxText();
static Image GetStandardImage();
- static Image GetStandardImageHC();
};
// ------------
@@ -165,7 +162,6 @@ public:
ErrorBox( Window* pParent, const ResId& rResId );
static Image GetStandardImage();
- static Image GetStandardImageHC();
};
// ------------
@@ -185,7 +181,6 @@ public:
void SetDefaultCheckBoxText();
static Image GetStandardImage();
- static Image GetStandardImageHC();
};
#endif // _SV_MSGBOX_HXX
diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc
index 1f688bc..e44f8f3 100644
--- a/vcl/inc/vcl/svids.hrc
+++ b/vcl/inc/vcl/svids.hrc
@@ -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,6 @@
#define SV_RESID_BITMAP_RADIO 1010
#define SV_RESID_BITMAP_MSGBOX 1020
-#define SV_RESID_BITMAP_MSGBOX_HC 1021
#define SV_RESID_BITMAP_PIN 1030
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7110598..f041aef 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2,7 +2,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
@@ -81,9 +81,7 @@ public:
BOOL mbSmallSymbol;
Image maImage;
- Image maImageHC;
BitmapEx* mpBitmapEx;
- BitmapEx* mpBitmapExHC;
ImageAlign meImageAlign;
SymbolAlign meSymbolAlign;
@@ -99,7 +97,6 @@ ImplCommonButtonData::ImplCommonButtonData()
mbSmallSymbol = FALSE;
mpBitmapEx = NULL;
- mpBitmapExHC = NULL;
meImageAlign = IMAGEALIGN_TOP;
meSymbolAlign = SYMBOLALIGN_LEFT;
}
@@ -108,7 +105,6 @@ ImplCommonButtonData::ImplCommonButtonData()
ImplCommonButtonData::~ImplCommonButtonData()
{
delete mpBitmapEx;
- delete mpBitmapExHC;
}
// =======================================================================
@@ -203,51 +199,24 @@ XubString Button::GetStandardHelpText( StandardButtonType /* eButton */ )
return aHelpText;
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeImage( const Image& rImage, BmpColorMode eMode )
+BOOL Button::SetModeImage( const Image& rImage )
{
- if( eMode == BMP_COLOR_NORMAL )
+ if ( rImage != mpButtonData->maImage )
{
- if ( rImage != mpButtonData->maImage )
- {
- delete mpButtonData->mpBitmapEx;
+ delete mpButtonData->mpBitmapEx;
- mpButtonData->mpBitmapEx = NULL;
- mpButtonData->maImage = rImage;
+ mpButtonData->mpBitmapEx = NULL;
+ mpButtonData->maImage = rImage;
- StateChanged( STATE_CHANGE_DATA );
- }
- }
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- if( rImage != mpButtonData->maImageHC )
- {
- delete mpButtonData->mpBitmapExHC;
-
- mpButtonData->mpBitmapExHC = NULL;
- mpButtonData->maImageHC = rImage;
-
- StateChanged( STATE_CHANGE_DATA );
- }
+ StateChanged( STATE_CHANGE_DATA );
}
- else
- return FALSE;
-
return TRUE;
}
// -----------------------------------------------------------------------
-const Image Button::GetModeImage( BmpColorMode eMode ) const
+const Image Button::GetModeImage( ) const
{
- if( eMode == BMP_COLOR_NORMAL )
- {
- return mpButtonData->maImage;
- }
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- return mpButtonData->maImageHC;
- }
- else
- return Image();
+ return mpButtonData->maImage;
}
// -----------------------------------------------------------------------
@@ -273,43 +242,24 @@ ImageAlign Button::GetImageAlign() const
}
// -----------------------------------------------------------------------
-BOOL Button::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
+BOOL Button::SetModeBitmap( const BitmapEx& rBitmap )
{
- if ( SetModeImage( rBitmap, eMode ) )
+ if ( SetModeImage( rBitmap ) )
{
- if( eMode == BMP_COLOR_NORMAL )
- {
- if ( !mpButtonData->mpBitmapEx )
- mpButtonData->mpBitmapEx = new BitmapEx( rBitmap );
- }
- else if ( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- if ( !mpButtonData->mpBitmapExHC )
- mpButtonData->mpBitmapExHC = new BitmapEx( rBitmap );
- }
- else
- return FALSE;
-
+ if ( !mpButtonData->mpBitmapEx )
+ mpButtonData->mpBitmapEx = new BitmapEx( rBitmap );
return TRUE;
}
return FALSE;
}
// -----------------------------------------------------------------------
-BitmapEx Button::GetModeBitmap( BmpColorMode eMode ) const
+BitmapEx Button::GetModeBitmap( ) const
{
BitmapEx aBmp;
- if ( eMode == BMP_COLOR_NORMAL )
- {
- if ( mpButtonData->mpBitmapEx )
- aBmp = *( mpButtonData->mpBitmapEx );
- }
- else if ( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- if ( mpButtonData->mpBitmapExHC )
- aBmp = *( mpButtonData->mpBitmapExHC );
- }
+ if ( mpButtonData->mpBitmapEx )
+ aBmp = *( mpButtonData->mpBitmapEx );
return aBmp;
}
@@ -401,7 +351,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 )
{
@@ -423,15 +373,6 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
Image *pImage = &(mpButtonData->maImage);
BitmapEx *pBitmapEx = mpButtonData->mpBitmapEx;
- if( !!(mpButtonData->maImageHC) )
- {
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- {
- pImage = &(mpButtonData->maImageHC);
- pBitmapEx = mpButtonData->mpBitmapExHC;
- }
- }
-
if ( pBitmapEx && ( pDev->GetOutDevType() == OUTDEV_PRINTER ) )
{
// Die Groesse richtet sich nach dem Bildschirm, soll auf
@@ -483,21 +424,21 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
if ( bDrawText )
{
- if ( ( eImageAlign == IMAGEALIGN_LEFT_TOP ) ||
- ( eImageAlign == IMAGEALIGN_LEFT ) ||
- ( eImageAlign == IMAGEALIGN_LEFT_BOTTOM ) ||
- ( eImageAlign == IMAGEALIGN_RIGHT_TOP ) ||
- ( eImageAlign == IMAGEALIGN_RIGHT ) ||
- ( eImageAlign == IMAGEALIGN_RIGHT_BOTTOM ) )
+ if ( ( eImageAlign == IMAGEALIGN_LEFT_TOP ) ||
+ ( eImageAlign == IMAGEALIGN_LEFT ) ||
+ ( eImageAlign == IMAGEALIGN_LEFT_BOTTOM ) ||
+ ( eImageAlign == IMAGEALIGN_RIGHT_TOP ) ||
+ ( eImageAlign == IMAGEALIGN_RIGHT ) ||
+ ( eImageAlign == IMAGEALIGN_RIGHT_BOTTOM ) )
{
aRect.Right() -= ( aImageSize.Width() + nImageSep );
}
- else if ( ( eImageAlign == IMAGEALIGN_TOP_LEFT ) ||
- ( eImageAlign == IMAGEALIGN_TOP ) ||
- ( eImageAlign == IMAGEALIGN_TOP_RIGHT ) ||
- ( eImageAlign == IMAGEALIGN_BOTTOM_LEFT ) ||
- ( eImageAlign == IMAGEALIGN_BOTTOM ) ||
- ( eImageAlign == IMAGEALIGN_BOTTOM_RIGHT ) )
+ else if ( ( eImageAlign == IMAGEALIGN_TOP_LEFT ) ||
+ ( eImageAlign == IMAGEALIGN_TOP ) ||
+ ( eImageAlign == IMAGEALIGN_TOP_RIGHT ) ||
+ ( eImageAlign == IMAGEALIGN_BOTTOM_LEFT ) ||
+ ( eImageAlign == IMAGEALIGN_BOTTOM ) ||
+ ( eImageAlign == IMAGEALIGN_BOTTOM_RIGHT ) )
{
aRect.Bottom() -= ( aImageSize.Height() + nImageSep );
}
@@ -509,7 +450,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;
@@ -518,7 +459,7 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos,
}
}
- aMax.Width() = aTSSize.Width() > aImageSize.Width() ? aTSSize.Width() : aImageSize.Width();
+ aMax.Width() = aTSSize.Width() > aImageSize.Width() ? aTSSize.Width() : aImageSize.Width();
aMax.Height() = aTSSize.Height() > aImageSize.Height() ? aTSSize.Height() : aImageSize.Height();
// Now calculate the output area for the image and the text acording to the image align flags
@@ -684,9 +625,9 @@ void Button::ImplSetFocusRect( const Rectangle &rFocusRect )
aFocusRect.Bottom()++;
}
- if ( aFocusRect.Left() < aOutputRect.Left() ) aFocusRect.Left() = aOutputRect.Left();
- if ( aFocusRect.Top() < aOutputRect.Top() ) aFocusRect.Top() = aOutputRect.Top();
- if ( aFocusRect.Right() > aOutputRect.Right() ) aFocusRect.Right() = aOutputRect.Right();
+ if ( aFocusRect.Left() < aOutputRect.Left() ) aFocusRect.Left() = aOutputRect.Left();
+ if ( aFocusRect.Top() < aOutputRect.Top() ) aFocusRect.Top() = aOutputRect.Top();
+ if ( aFocusRect.Right() > aOutputRect.Right() ) aFocusRect.Right() = aOutputRect.Right();
if ( aFocusRect.Bottom() > aOutputRect.Bottom() ) aFocusRect.Bottom() = aOutputRect.Bottom();
mpButtonData->maFocusRect = aFocusRect;
@@ -725,6 +666,7 @@ SymbolAlign Button::ImplGetSymbolAlign() const
{
return mpButtonData->meSymbolAlign;
}
+
// -----------------------------------------------------------------------
void Button::ImplSetSmallSymbol( BOOL bSmall )
{
@@ -855,10 +797,10 @@ WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle )
if ( !(nStyle & WB_NOGROUP) &&
(!pPrevWindow ||
- ((pPrevWindow->GetType() != WINDOW_PUSHBUTTON) &&
- (pPrevWindow->GetType() != WINDOW_OKBUTTON) &&
+ ((pPrevWindow->GetType() != WINDOW_PUSHBUTTON ) &&
+ (pPrevWindow->GetType() != WINDOW_OKBUTTON ) &&
(pPrevWindow->GetType() != WINDOW_CANCELBUTTON) &&
- (pPrevWindow->GetType() != WINDOW_HELPBUTTON)) ) )
+ (pPrevWindow->GetType() != WINDOW_HELPBUTTON )) ) )
nStyle |= WB_GROUP;
return nStyle;
}
@@ -1363,7 +1305,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if ( bRollOver )
nState |= CTRL_STATE_ROLLOVER;
-
+
if( GetStyle() & WB_BEVELBUTTON )
aControlValue.mbBevelButton = true;
@@ -1378,7 +1320,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() );
@@ -2034,7 +1976,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
return CalcWindowSize( aSize );
-}
+}
Size PushButton::GetOptimalSize(WindowSizeType eType) const
{
@@ -2405,13 +2347,7 @@ if ( bNativeOK == FALSE )
if ( !bEnabled )
nButtonStyle |= IMAGE_DRAW_DISABLE;
- // check for HC mode
Image *pImage = &maImage;
- if( !!maImageHC )
- {
- if( rStyleSettings.GetHighContrastMode() )
- pImage = &maImageHC;
- }
Point aImagePos( aImageRect.TopLeft() );
aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
@@ -2626,7 +2562,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 )
@@ -3107,38 +3043,21 @@ void RadioButton::Toggle()
// -----------------------------------------------------------------------
-BOOL RadioButton::SetModeRadioImage( const Image& rImage, BmpColorMode eMode )
-{
- if( eMode == BMP_COLOR_NORMAL )
+BOOL RadioButton::SetModeRadioImage( const Image& rImage )
{
if ( rImage != maImage )
{
maImage = rImage;
StateChanged( STATE_CHANGE_DATA );
}
-}
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- if( maImageHC != rImage )
- {
- maImageHC = rImage;
- StateChanged( STATE_CHANGE_DATA );
- }
- }
- else
- return FALSE;
-
return TRUE;
}
// -----------------------------------------------------------------------
-const Image& RadioButton::GetModeRadioImage( BmpColorMode eMode ) const
+const Image& RadioButton::GetModeRadioImage( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maImageHC;
- else
- return maImage;
+ return maImage;
}
// -----------------------------------------------------------------------
@@ -3247,7 +3166,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));
}
@@ -3291,10 +3210,11 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
ResMgr* pResMgr = ImplGetResMgr();
pSVData->maCtrlData.mpRadioImgList = new ImageList();
if( pResMgr )
- LoadThemedImageList( rStyleSettings,
+ LoadThemedImageList( rStyleSettings,
pSVData->maCtrlData.mpRadioImgList,
- ResId( SV_RESID_BITMAP_RADIO+nStyle, *pResMgr ), 6 );
- pSVData->maCtrlData.mnRadioStyle = nStyle;
+ ResId( SV_RESID_BITMAP_RADIO+nStyle, *pResMgr ), 6
+ );
+ pSVData->maCtrlData.mnRadioStyle = nStyle;
}
USHORT nId;
@@ -3333,21 +3253,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();
}
@@ -3378,13 +3298,13 @@ Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
if ( aSize.Height() < aTextSize.Height() )
aSize.Height() = aTextSize.Height();
}
- else if ( !maImage )
- {
+// else if ( !maImage )
+// {
/* da ansonsten im Writer die Control zu weit oben haengen
aSize.Width() += 2;
aSize.Height() += 2;
*/
- }
+// }
return CalcWindowSize( aSize );
}
@@ -3563,7 +3483,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 ) );
@@ -3637,7 +3557,7 @@ 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() )
@@ -4080,9 +4000,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() )
{
@@ -4154,7 +4074,7 @@ Size CheckBox::ImplGetCheckImageSize() const
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(),
@@ -4164,7 +4084,7 @@ Size CheckBox::ImplGetCheckImageSize() const
bDefaultSize = false;
}
}
- if( bDefaultSize )
+ if( bDefaultSize )
aSize = GetCheckImage( GetSettings(), 0 ).GetSizePixel();
return aSize;
}
@@ -4242,21 +4162,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();
}
@@ -4446,9 +4366,9 @@ 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;
@@ -4471,21 +4391,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/fixed.cxx b/vcl/source/control/fixed.cxx
index c0588e9..da28c07 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -2,7 +2,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
@@ -758,11 +758,6 @@ void FixedBitmap::ImplDraw( OutputDevice* pDev, ULONG /* nDrawFlags */,
USHORT nStyle = 0;
Bitmap* pBitmap = &maBitmap;
Color aCol;
- if( !!maBitmapHC )
- {
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pBitmap = &maBitmapHC;
- }
if( nStyle & IMAGE_DRAW_COLORTRANSFORM )
{
@@ -884,28 +879,17 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap )
// -----------------------------------------------------------------------
-BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap, BmpColorMode eMode )
+BOOL FixedBitmap::SetModeBitmap( const Bitmap& rBitmap )
{
- if( eMode == BMP_COLOR_NORMAL )
- SetBitmap( rBitmap );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- maBitmapHC = rBitmap;
- StateChanged( STATE_CHANGE_DATA );
- }
- else
- return FALSE;
+ SetBitmap( rBitmap );
return TRUE;
}
// -----------------------------------------------------------------------
-const Bitmap& FixedBitmap::GetModeBitmap( BmpColorMode eMode) const
+const Bitmap& FixedBitmap::GetModeBitmap( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maBitmapHC;
- else
- return maBitmap;
+ return maBitmap;
}
// =======================================================================
@@ -1009,11 +993,6 @@ void FixedImage::ImplDraw( OutputDevice* pDev, ULONG nDrawFlags,
Image *pImage = &maImage;
Color aCol;
- if( !!maImageHC )
- {
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pImage = &maImageHC;
- }
// Haben wir ueberhaupt ein Image
if ( !(!(*pImage)) )
@@ -1044,7 +1023,7 @@ void FixedImage::Paint( const Rectangle& )
Size FixedImage::GetOptimalSize( WindowSizeType ) const
{
- const Image* pImage = GetSettings().GetStyleSettings().GetHighContrastMode() ? &maImageHC : &maImage;
+ const Image* pImage = &maImage;
return pImage->GetSizePixel();
}
@@ -1139,31 +1118,17 @@ void FixedImage::SetImage( const Image& rImage )
// -----------------------------------------------------------------------
-BOOL FixedImage::SetModeImage( const Image& rImage, BmpColorMode eMode )
+BOOL FixedImage::SetModeImage( const Image& rImage )
{
- if( eMode == BMP_COLOR_NORMAL )
- SetImage( rImage );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- if( maImageHC != rImage )
- {
- maImageHC = rImage;
- StateChanged( STATE_CHANGE_DATA );
- }
- }
- else
- return FALSE;
+ SetImage( rImage );
return TRUE;
}
// -----------------------------------------------------------------------
-const Image& FixedImage::GetModeImage( BmpColorMode eMode ) const
+const Image& FixedImage::GetModeImage( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maImageHC;
- else
- return maImage;
+ return maImage;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 78f535e..688617d 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2,7 +2,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
@@ -336,7 +336,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 )
{
@@ -725,7 +725,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxImgTxtWidth = Max( mnMaxImgTxtWidth, aMetrics.nTextWidth );
aMetrics.nEntryHeight = Max( aMetrics.nImgHeight, aMetrics.nEntryHeight );
-
+
}
if ( IsUserDrawEnabled() || aMetrics.bImage )
{
@@ -747,7 +747,7 @@ void ImplListBoxWindow::ImplUpdateEntryMetrics( ImplEntryType& rEntry )
mnMaxWidth = aMetrics.nEntryWidth;
if ( aMetrics.nEntryHeight > mnMaxHeight )
mnMaxHeight = aMetrics.nEntryHeight;
-
+
rEntry.mnHeight = aMetrics.nEntryHeight;
}
@@ -803,7 +803,7 @@ USHORT ImplListBoxWindow::InsertEntry( USHORT nPos, ImplEntryType* pNewEntry )
if( (GetStyle() & WB_WORDBREAK) )
pNewEntry->mnFlags |= LISTBOX_ENTRY_FLAG_MULTILINE;
-
+
ImplUpdateEntryMetrics( *pNewEntry );
return nNewPos;
}
@@ -856,7 +856,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 )
@@ -875,7 +875,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 ) <
@@ -884,7 +884,7 @@ BOOL ImplListBoxWindow::IsVisible( USHORT i_nEntry ) const
bRet = TRUE;
}
}
-
+
return bRet;
}
@@ -898,13 +898,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;
}
@@ -986,7 +986,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 ) ) ) )
{
@@ -1435,7 +1435,7 @@ BOOL ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt )
BOOL bDone = FALSE;
switch( aKeyCode.GetCode() )
- {
+ {
case KEY_UP:
{
if ( IsReadOnly() )
@@ -1512,7 +1512,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 );
}
@@ -1660,16 +1660,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;
}
@@ -1743,7 +1743,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;
@@ -1796,8 +1796,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 )
@@ -1871,7 +1871,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 );
}
}
@@ -1947,7 +1947,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 );
@@ -2020,16 +2020,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();
@@ -2107,7 +2107,7 @@ 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;
@@ -2711,25 +2711,17 @@ ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) :
// -----------------------------------------------------------------------
-BOOL ImplWin::SetModeImage( const Image& rImage, BmpColorMode eMode )
+BOOL ImplWin::SetModeImage( const Image& rImage )
{
- if( eMode == BMP_COLOR_NORMAL )
- SetImage( rImage );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- maImageHC = rImage;
- else
- return FALSE;
+ SetImage( rImage );
return TRUE;
}
// -----------------------------------------------------------------------
-const Image& ImplWin::GetModeImage( BmpColorMode eMode ) const
+const Image& ImplWin::GetModeImage( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maImageHC;
- else
- return maImage;
+ return maImage;
}
// -----------------------------------------------------------------------
@@ -2746,7 +2738,6 @@ void ImplWin::MouseButtonDown( const MouseEvent& )
{
if( IsEnabled() )
{
-// Control::MouseButtonDown( rMEvt );
MBDown();
}
}
@@ -2807,7 +2798,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.
@@ -2823,10 +2814,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();
@@ -2836,7 +2827,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() );
}
@@ -2908,12 +2899,6 @@ void ImplWin::DrawEntry( BOOL bDrawImage, BOOL bDrawText, BOOL bDrawTextAtImageP
// check for HC mode
Image *pImage = &maImage;
- if( !!maImageHC )
- {
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pImage = &maImageHC;
- }
-
if ( !IsZoom() )
{
DrawImage( aPtImg, *pImage, nStyle );
@@ -3043,7 +3028,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) :
mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND;
EnableSaveBackground();
-
+
Window * pBorderWindow = ImplGetBorderWindow();
if( pBorderWindow )
{
diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx
index 436ab5e..c5ae529 100644
--- a/vcl/source/control/imgctrl.cxx
+++ b/vcl/source/control/imgctrl.cxx
@@ -2,7 +2,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,12 +91,6 @@ void ImageControl::UserDraw( const UserDrawEvent& rUDEvt )
{
USHORT nStyle = 0;
BitmapEx* pBitmap = &maBmp;
- if( !!maBmpHC )
- {
- if( GetSettings().GetStyleSettings().GetHighContrastMode() )
- pBitmap = &maBmpHC;
- }
-
if ( !*pBitmap )
{
String sText( GetText() );
@@ -201,28 +195,17 @@ void ImageControl::SetBitmap( const BitmapEx& rBmp )
// -----------------------------------------------------------------------
-BOOL ImageControl::SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode )
+BOOL ImageControl::SetModeBitmap( const BitmapEx& rBitmap )
{
- if( eMode == BMP_COLOR_NORMAL )
- SetBitmap( rBitmap );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- {
- maBmpHC = rBitmap;
- StateChanged( STATE_CHANGE_DATA );
- }
- else
- return FALSE;
+ SetBitmap( rBitmap );
return TRUE;
}
// -----------------------------------------------------------------------
-const BitmapEx& ImageControl::GetModeBitmap( BmpColorMode eMode ) const
+const BitmapEx& ImageControl::GetModeBitmap( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maBmpHC;
- else
- return maBmp;
+ return maBmp;
}
// -----------------------------------------------------------------------
@@ -233,7 +216,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/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index bad0c0c..395bbbf 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -2,7 +2,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,14 +54,11 @@ static void ImplInitMsgBoxImageList()
{
ResMgr* pResMgr = ImplGetResMgr();
pSVData->maWinData.mpMsgBoxImgList = new ImageList(4);
- pSVData->maWinData.mpMsgBoxHCImgList = new ImageList(4);
if( pResMgr )
{
Color aNonAlphaMask( 0xC0, 0xC0, 0xC0 );
pSVData->maWinData.mpMsgBoxImgList->InsertFromHorizontalBitmap
( ResId( SV_RESID_BITMAP_MSGBOX, *pResMgr ), 4, &aNonAlphaMask );
- pSVData->maWinData.mpMsgBoxHCImgList->InsertFromHorizontalBitmap
- ( ResId( SV_RESID_BITMAP_MSGBOX_HC, *pResMgr ), 4, &aNonAlphaMask );
}
}
}
@@ -209,7 +206,7 @@ MessBox::MessBox( Window* pParent, const ResId& rResId ) :
void MessBox::ImplLoadRes( const ResId& )
{
- SetText( ReadStringRes() );
+ SetText( ReadStringRes() );
SetMessText( ReadStringRes() );
SetHelpText( ReadStringRes() );
}
@@ -312,9 +309,6 @@ void MessBox::ImplPosControls()
IMPL_DIALOG_OFFSET-2+IMPL_MSGBOX_OFFSET_EXTRA_Y ),
aImageSize );
mpFixedImage->SetImage( maImage );
- // forward the HC image
- if( !!maImageHC )
- mpFixedImage->SetModeImage( maImageHC, BMP_COLOR_HIGHCONTRAST );
mpFixedImage->Show();
nMaxWidth -= aImageSize.Width()+IMPL_SEP_MSGBOX_IMAGE;
}
@@ -465,37 +459,41 @@ void MessBox::SetDefaultCheckBoxText()
// -----------------------------------------------------------------------
-BOOL MessBox::SetModeImage( const Image& rImage, BmpColorMode eMode )
+BOOL MessBox::SetModeImage( const Image& rImage )
{
- if( eMode == BMP_COLOR_NORMAL )
- SetImage( rImage );
- else if( eMode == BMP_COLOR_HIGHCONTRAST )
- maImageHC = rImage;
- else
- return FALSE;
+ SetImage( rImage );
return TRUE;
}
// -----------------------------------------------------------------------
-const Image& MessBox::GetModeImage( BmpColorMode eMode ) const
+const Image& MessBox::GetModeImage( ) const
{
- if( eMode == BMP_COLOR_HIGHCONTRAST )
- return maImageHC;
- else
- return maImage;
+ return maImage;
}
// -----------------------------------------------------------------------
+Size MessBox::GetOptimalSize(WindowSizeType eType) const
+{
+ switch( eType ) {
+ case WINDOWSIZE_MINIMUM:
+ // FIXME: base me on the font size ?
+ return Size( 250, 100 );
+ default:
+ return Window::GetOptimalSize( eType );
+ }
+}
+
+// ============================================================================
+
void InfoBox::ImplInitInfoBoxData()
{
// Default Text is the display title from the application
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
- InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
+ SetImage( InfoBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_INFO)+1;
}
@@ -523,15 +521,7 @@ Image InfoBox::GetStandardImage()
return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 4 );
}
-// -----------------------------------------------------------------------
-
-Image InfoBox::GetStandardImageHC()
-{
- ImplInitMsgBoxImageList();
- return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 4 );
-}
-
-// -----------------------------------------------------------------------
+// ============================================================================
void WarningBox::ImplInitWarningBoxData()
{
@@ -577,7 +567,7 @@ Image WarningBox::GetStandardImage()
return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 3 );
}
-// -----------------------------------------------------------------------
+// ============================================================================
void ErrorBox::ImplInitErrorBoxData()
{
@@ -585,8 +575,7 @@ void ErrorBox::ImplInitErrorBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
- ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
+ SetImage( ErrorBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_ERROR)+1;
}
@@ -615,15 +604,7 @@ Image ErrorBox::GetStandardImage()
return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 1 );
}
-// -----------------------------------------------------------------------
-
-Image ErrorBox::GetStandardImageHC()
-{
- ImplInitMsgBoxImageList();
- return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 1 );
-}
-
-// -----------------------------------------------------------------------
+// ============================================================================
void QueryBox::ImplInitQueryBoxData()
{
@@ -631,8 +612,7 @@ void QueryBox::ImplInitQueryBoxData()
if ( !GetText().Len() )
SetText( Application::GetDisplayName() );
- SetImage( GetSettings().GetStyleSettings().GetHighContrastMode() ?
- QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
+ SetImage( QueryBox::GetStandardImage() );
mnSoundType = ((USHORT)SOUND_QUERY)+1;
}
@@ -669,25 +649,4 @@ Image QueryBox::GetStandardImage()
return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 2 );
}
-// -----------------------------------------------------------------------
-
-Image QueryBox::GetStandardImageHC()
-{
- ImplInitMsgBoxImageList();
- return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 2 );
-}
-
-// -----------------------------------------------------------------------
-
-Size MessBox::GetOptimalSize(WindowSizeType eType) const
-{
- switch( eType ) {
- case WINDOWSIZE_MINIMUM:
- // FIXME: base me on the font size ?
- return Size( 250, 100 );
- default:
- return Window::GetOptimalSize( eType );
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 8ce5ed6..709ee79 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2,7 +2,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
@@ -168,7 +168,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 )
@@ -189,9 +189,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
@@ -205,7 +205,7 @@ void PrintDialog::PrintPreviewWindow::Resize()
aScaledSize.Height() *= 2;
fZoom /= 2.0;
}
-
+
maPageVDev.SetOutputSizePixel( aScaledSize, FALSE );
}
@@ -233,10 +233,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 );
@@ -245,8 +245,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 );
@@ -255,11 +255,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 );
@@ -340,7 +340,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 ) );
@@ -356,7 +356,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++ )
@@ -408,11 +408,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;
@@ -429,7 +429,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" );
@@ -437,7 +437,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" );
@@ -506,7 +506,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 );
@@ -519,12 +519,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 );
@@ -535,16 +535,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 );
@@ -552,7 +552,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 );
}
@@ -623,12 +623,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();
}
@@ -641,7 +641,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 );
@@ -656,9 +656,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 );
@@ -675,7 +675,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 );
@@ -683,7 +683,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 );
@@ -702,7 +702,7 @@ void PrintDialog::JobTabPage::readFromSettings()
{
SettingsConfigItem* pItem = SettingsConfigItem::get();
rtl::OUString aValue;
-
+
aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CollateBox" ) ) );
if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) )
@@ -750,7 +750,7 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe
maToFileBox.SMHID2( "OptPage", "ToFile" );
maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" );
maReverseOrderBox.SMHID2( "OptPage", "Reverse" );
-
+
setupLayout();
}
@@ -764,7 +764,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 );
@@ -787,7 +787,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() ) );
@@ -818,32 +818,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();
@@ -876,10 +876,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 ) ) );
@@ -895,7 +895,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
@@ -912,7 +912,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 ) );
@@ -921,20 +921,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 );
@@ -960,7 +960,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
SetOutputSizePixel( aOutSize );
}
}
-
+
// set HelpIDs
SMHID1( "Dialog" );
maOKButton.SMHID1( "OK" );
@@ -984,10 +984,10 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
// restore settings from last run
readFromSettings();
-
+
// setup dependencies
checkControlDependencies();
-
+
}
PrintDialog::~PrintDialog()
@@ -1004,11 +1004,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 );
@@ -1026,18 +1026,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 );
@@ -1053,7 +1053,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" ) ),
@@ -1076,7 +1076,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" ) ),
@@ -1135,7 +1135,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
}
@@ -1159,9 +1159,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++ )
{
@@ -1252,10 +1252,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() )
@@ -1312,12 +1312,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;
@@ -1344,7 +1344,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
@@ -1377,16 +1377,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)
@@ -1414,26 +1414,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 );
}
@@ -1447,7 +1447,7 @@ void PrintDialog::setupOptionalUI()
maControls.push_front( pHeading );
pHeading->SetText( aText );
pHeading->Show();
-
+
// set help id
setSmartId( pHeading, "FixedText", -1, aPropertyName );
// set help text
@@ -1473,7 +1473,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] );
@@ -1483,7 +1483,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
@@ -1501,7 +1501,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() )
{
@@ -1510,21 +1510,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++ )
{
@@ -1538,15 +1538,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 );
@@ -1557,7 +1557,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 )
{
@@ -1571,15 +1571,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 );
@@ -1590,7 +1590,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() )
@@ -1598,15 +1598,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 );
@@ -1618,11 +1618,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() )
@@ -1635,17 +1635,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())
@@ -1709,7 +1709,7 @@ void PrintDialog::setupOptionalUI()
maJobPage.Resize();
maNUpPage.Resize();
maOptionsPage.Resize();
-
+
Size aSz = maLayout.getOptimalSize( WINDOWSIZE_PREFERRED );
SetOutputSizePixel( aSz );
}
@@ -1728,14 +1728,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() )
@@ -1744,7 +1744,6 @@ void PrintDialog::checkControlDependencies()
// adjust size of image
maJobPage.maCollateImage.SetSizePixel( aImgSize );
maJobPage.maCollateImage.SetImage( bHC ? aHCImg : aImg );
- maJobPage.maCollateImage.SetModeImage( aHCImg, BMP_COLOR_HIGHCONTRAST );
maJobPage.maLayout.resize();
// enable setup button only for printers that can be setup
@@ -1802,7 +1801,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 )
@@ -1851,7 +1850,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() )
@@ -1863,17 +1862,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 );
@@ -1889,12 +1888,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 );
@@ -1924,7 +1923,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;
@@ -1960,12 +1959,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;
@@ -1973,11 +1972,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 )
@@ -1985,12 +1984,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 );
@@ -2000,7 +1999,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 )
{
@@ -2024,29 +2023,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;
@@ -2057,18 +2056,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 );
}
@@ -2092,7 +2091,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
maNUpPage.maPagesBtn.Check();
updateNupFromPages();
}
-
+
return 0;
}
@@ -2133,9 +2132,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
{
sal_Bool bVal = maNUpPage.maBrochureBtn.IsChecked();
pVal->Value <<= bVal;
-
+
checkOptionalControlDependencies();
-
+
// update preview and page settings
preparePreview();
}
@@ -2328,12 +2327,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();
}
@@ -2352,12 +2351,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();
}
@@ -2371,12 +2370,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();
}
@@ -2407,9 +2406,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();
}
@@ -2472,9 +2471,9 @@ PrintProgressDialog::PrintProgressDialog( Window* i_pParent, int i_nMax ) :
if( mnMax < 1 )
mnMax = 1;
-
+
maStr = maText.GetText();
-
+
maButton.SetClickHdl( LINK( this, PrintProgressDialog, ClickHdl ) );
}
@@ -2487,7 +2486,7 @@ IMPL_LINK( PrintProgressDialog, ClickHdl, Button*, pButton )
{
if( pButton == &maButton )
mbCanceled = true;
-
+
return 0;
}
@@ -2514,7 +2513,7 @@ void PrintProgressDialog::setProgress( int i_nCurrent, int i_nMax )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
mnCur = i_nCurrent;
if( i_nMax != -1 )
mnMax = i_nMax;
@@ -2525,7 +2524,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 );
}
@@ -2545,7 +2544,7 @@ void PrintProgressDialog::Paint( const Rectangle& )
{
if( maProgressRect.IsEmpty() )
implCalcProgressRect();
-
+
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Color aPrgsColor = rStyleSettings.GetHighlightColor();
More information about the Libreoffice-commits
mailing list