summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx4
-rw-r--r--vcl/source/app/settings.cxx46
-rw-r--r--vcl/source/app/svapp.cxx1
-rw-r--r--vcl/source/control/button.cxx178
-rw-r--r--vcl/source/control/menubtn.cxx9
-rw-r--r--vcl/source/control/scrbar.cxx57
-rw-r--r--vcl/source/control/slider.cxx7
-rw-r--r--vcl/source/control/tabctrl.cxx149
-rw-r--r--vcl/source/gdi/bmpconv.cxx16
-rw-r--r--vcl/source/gdi/outdev3.cxx6
-rwxr-xr-x[-rw-r--r--]vcl/source/gdi/outdevnative.cxx63
-rw-r--r--vcl/source/gdi/print.cxx105
-rwxr-xr-xvcl/source/gdi/print3.cxx86
-rw-r--r--vcl/source/src/btntext.src64
-rw-r--r--vcl/source/src/images.src39
-rw-r--r--vcl/source/src/print.src85
-rw-r--r--vcl/source/window/decoview.cxx100
-rwxr-xr-x[-rw-r--r--]vcl/source/window/menu.cxx60
-rw-r--r--vcl/source/window/printdlg.cxx162
-rw-r--r--[-rwxr-xr-x]vcl/source/window/window.cxx61
-rw-r--r--vcl/source/window/winproc.cxx1
21 files changed, 348 insertions, 951 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2a04389d8f44..73eaa8f965d2 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -38,7 +38,6 @@
#include <vcl/salbmp.hxx>
#include <vcl/salobj.hxx>
#include <vcl/salmenu.hxx>
-#include <vcl/salctrlhandle.hxx>
// this file contains the virtual destructors of the sal interface
// compilers ususally put their vtables where the destructor is
@@ -161,7 +160,4 @@ Rectangle SalMenu::GetMenuBarButtonRectPixel( USHORT, SalFrame* )
SalMenuItem::~SalMenuItem()
{
}
-SalControlHandle::~SalControlHandle()
-{
-}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index b91afbbae9fe..dbc792039f80 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -419,10 +419,6 @@ ImplStyleData::ImplStyleData()
mnCursorBlinkTime = STYLE_CURSOR_NOBLINKTIME;
mnScreenZoom = 100;
mnScreenFontZoom = 100;
- mnRadioButtonStyle = 0;
- mnCheckBoxStyle = 0;
- mnPushButtonStyle = 0;
- mnTabControlStyle = 0;
mnLogoDisplayTime = LOGO_DISPLAYTIME_STARTTIME;
mnDragFullOptions = DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE |
DRAGFULL_OPTION_OBJECTMOVE | DRAGFULL_OPTION_OBJECTSIZE |
@@ -523,10 +519,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
mnCursorBlinkTime = rData.mnCursorBlinkTime;
mnScreenZoom = rData.mnScreenZoom;
mnScreenFontZoom = rData.mnScreenFontZoom;
- mnRadioButtonStyle = rData.mnRadioButtonStyle;
- mnCheckBoxStyle = rData.mnCheckBoxStyle;
- mnPushButtonStyle = rData.mnPushButtonStyle;
- mnTabControlStyle = rData.mnTabControlStyle;
mnLogoDisplayTime = rData.mnLogoDisplayTime;
mnDragFullOptions = rData.mnDragFullOptions;
mnAnimationOptions = rData.mnAnimationOptions;
@@ -617,12 +609,6 @@ void ImplStyleData::SetStandardStyles()
maHighlightLinkColor = Color( COL_LIGHTBLUE );
maFontColor = Color( COL_BLACK );
- mnRadioButtonStyle &= ~STYLE_RADIOBUTTON_STYLE;
- mnCheckBoxStyle &= ~STYLE_CHECKBOX_STYLE;
- mnPushButtonStyle &= ~STYLE_PUSHBUTTON_STYLE;
- mnTabControlStyle = 0;
-
- mnOptions &= ~(STYLE_OPTION_SYSTEMSTYLE | STDSYS_STYLE);
mnBorderSize = 1;
mnTitleHeight = 18;
mnFloatTitleHeight = 13;
@@ -874,34 +860,6 @@ void StyleSettings::SetStandardStyles()
// -----------------------------------------------------------------------
-void StyleSettings::SetStandardWinStyles()
-{
- return; // no more style changes since NWF
-}
-
-// -----------------------------------------------------------------------
-
-void StyleSettings::SetStandardOS2Styles()
-{
- return; // no more style changes since NWF
-}
-
-// -----------------------------------------------------------------------
-
-void StyleSettings::SetStandardMacStyles()
-{
- return; // no more style changes since NWF
-}
-
-// -----------------------------------------------------------------------
-
-void StyleSettings::SetStandardUnixStyles()
-{
- return; // no more style changes since NWF
-}
-
-// -----------------------------------------------------------------------
-
Color StyleSettings::GetFaceGradientColor() const
{
// compute a brighter face color that can be used in gradients
@@ -1036,10 +994,6 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const
(mpData->mnAntialiasedMin == rSet.mpData->mnAntialiasedMin) &&
(mpData->mnScreenZoom == rSet.mpData->mnScreenZoom) &&
(mpData->mnScreenFontZoom == rSet.mpData->mnScreenFontZoom) &&
- (mpData->mnRadioButtonStyle == rSet.mpData->mnRadioButtonStyle) &&
- (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) &&
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e503172eb2c6..dd1ea7c0469e 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -45,7 +45,6 @@
#include "vcl/event.hxx"
#include "vcl/vclevent.hxx"
#include "vcl/virdev.hxx"
-#include "vcl/windata.hxx"
#include "vcl/window.h"
#include "vcl/wrkwin.hxx"
#include "vcl/idlemgr.hxx"
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index db7649a90258..82bec2214dff 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -769,47 +769,6 @@ BOOL Button::IsTextDisplayEnabled()
}
// -----------------------------------------------------------------------
-void Button::DataChanged( const DataChangedEvent& rDCEvt )
-{
- Control::DataChanged( rDCEvt );
-
- // The flag SETTINGS_IN_UPDATE_SETTINGS is set when the settings changed due to a
- // Application::SettingsChanged event. In this scenario we want to keep the style settings
- // of our radio buttons and our check boxes.
- if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) &&
- ( rDCEvt.GetFlags() & SETTINGS_IN_UPDATE_SETTINGS ) )
-
- {
- const AllSettings* pOldSettings = rDCEvt.GetOldSettings();
- if ( pOldSettings )
- {
- BOOL bResetStyleSettings = FALSE;
- AllSettings aAllSettings = GetSettings();
- StyleSettings aStyleSetting = aAllSettings.GetStyleSettings();
-
- USHORT nCheckBoxStyle = aStyleSetting.GetCheckBoxStyle();
- if ( nCheckBoxStyle != pOldSettings->GetStyleSettings().GetCheckBoxStyle() )
- {
- aStyleSetting.SetCheckBoxStyle( pOldSettings->GetStyleSettings().GetCheckBoxStyle() );
- bResetStyleSettings = TRUE;
- }
-
- USHORT nRadioButtonStyle = aStyleSetting.GetRadioButtonStyle();
- if ( nRadioButtonStyle != pOldSettings->GetStyleSettings().GetRadioButtonStyle() )
- {
- aStyleSetting.SetRadioButtonStyle( pOldSettings->GetStyleSettings().GetRadioButtonStyle() );
- bResetStyleSettings = TRUE;
- }
-
- if ( bResetStyleSettings )
- {
- aAllSettings.SetStyleSettings( pOldSettings->GetStyleSettings() );
- SetSettings( aAllSettings );
- }
- }
- }
-}
-
void Button::SetSmallSymbol (bool small)
{
ImplSetSmallSymbol (small);
@@ -925,125 +884,6 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev,
StyleSettings aStyleSettings = pDev->GetSettings().GetStyleSettings();
if ( pDev->IsControlBackground() )
aStyleSettings.Set3DColors( pDev->GetControlBackground() );
-
- USHORT nPushButtonSysStyle = aStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
- if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC )
- {
- pDev->SetLineColor();
- pDev->SetFillColor( aStyleSettings.GetFaceColor() );
- pDev->DrawRect( rRect );
-
- if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) ||
- (pDev->GetOutDevType() == OUTDEV_PRINTER) )
- nStyle |= BUTTON_DRAW_MONO;
-
- if ( nStyle & BUTTON_DRAW_DEFAULT )
- {
- if ( nStyle & BUTTON_DRAW_MONO )
- pDev->SetLineColor( Color( COL_BLACK ) );
- else
- pDev->SetLineColor( aStyleSettings.GetDarkShadowColor() );
-
- pDev->DrawLine( Point( rRect.Left()+3, rRect.Top() ),
- Point( rRect.Right()-3, rRect.Top() ) );
- pDev->DrawLine( Point( rRect.Left()+3, rRect.Bottom() ),
- Point( rRect.Right()-3, rRect.Bottom() ) );
- pDev->DrawLine( Point( rRect.Left(), rRect.Top()+3 ),
- Point( rRect.Left(), rRect.Bottom()-3 ) );
- pDev->DrawLine( Point( rRect.Right(), rRect.Top()+3 ),
- Point( rRect.Right(), rRect.Bottom()-3 ) );
- pDev->DrawPixel( Point( rRect.Left()+2, rRect.Top()+1 ) );
- pDev->DrawPixel( Point( rRect.Left()+1, rRect.Top()+2 ) );
- pDev->DrawPixel( Point( rRect.Right()-2, rRect.Top()+1 ) );
- pDev->DrawPixel( Point( rRect.Right()-1, rRect.Top()+2 ) );
- pDev->DrawPixel( Point( rRect.Left()+2, rRect.Bottom()-1 ) );
- pDev->DrawPixel( Point( rRect.Left()+1, rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-1 ) );
- pDev->DrawPixel( Point( rRect.Right()-1, rRect.Bottom()-2 ) );
-
- if ( nStyle & BUTTON_DRAW_MONO )
- pDev->SetLineColor( Color( COL_BLACK ) );
- else
- pDev->SetLineColor( aStyleSettings.GetShadowColor() );
- pDev->DrawLine( Point( rRect.Left()+3, rRect.Bottom()-1 ),
- Point( rRect.Right()-3, rRect.Bottom()-1 ) );
- pDev->DrawLine( Point( rRect.Right()-1, rRect.Top()+3 ),
- Point( rRect.Right()-1, rRect.Bottom()-3 ) );
- pDev->DrawPixel( Point( rRect.Right()-3, rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-3 ) );
- }
-
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
-
- if ( nStyle & BUTTON_DRAW_MONO )
- pDev->SetLineColor( Color( COL_BLACK ) );
- else
- pDev->SetLineColor( aStyleSettings.GetDarkShadowColor() );
-
- pDev->DrawLine( Point( rRect.Left()+2, rRect.Top() ),
- Point( rRect.Right()-2, rRect.Top() ) );
- pDev->DrawLine( Point( rRect.Left()+2, rRect.Bottom() ),
- Point( rRect.Right()-2, rRect.Bottom() ) );
- pDev->DrawLine( Point( rRect.Left(), rRect.Top()+2 ),
- Point( rRect.Left(), rRect.Bottom()-2 ) );
- pDev->DrawLine( Point( rRect.Right(), rRect.Top()+2 ),
- Point( rRect.Right(), rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Left()+1, rRect.Top()+1 ) );
- pDev->DrawPixel( Point( rRect.Right()-1, rRect.Top()+1 ) );
- pDev->DrawPixel( Point( rRect.Left()+1, rRect.Bottom()-1 ) );
- pDev->DrawPixel( Point( rRect.Right()-1, rRect.Bottom()-1 ) );
-
- pDev->SetLineColor();
- if ( nStyle & BUTTON_DRAW_CHECKED )
- pDev->SetFillColor( aStyleSettings.GetCheckedColor() );
- else
- pDev->SetFillColor( aStyleSettings.GetFaceColor() );
- pDev->DrawRect( Rectangle( rRect.Left()+2, rRect.Top()+2, rRect.Right()-2, rRect.Bottom()-2 ) );
-
- if ( !(nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED)) )
- {
- if ( nStyle & BUTTON_DRAW_MONO )
- pDev->SetLineColor( Color( COL_BLACK ) );
- else
- pDev->SetLineColor( aStyleSettings.GetShadowColor() );
- pDev->DrawLine( Point( rRect.Left()+2, rRect.Bottom()-1 ),
- Point( rRect.Right()-2, rRect.Bottom()-1 ) );
- pDev->DrawLine( Point( rRect.Right()-1, rRect.Top()+2 ),
- Point( rRect.Right()-1, rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-2 ) );
- pDev->SetLineColor( aStyleSettings.GetLightColor() );
- }
- else
- pDev->SetLineColor( aStyleSettings.GetShadowColor() );
-
- if ( !(nStyle & BUTTON_DRAW_MONO) )
- {
- pDev->DrawLine( Point( rRect.Left()+2, rRect.Top()+1 ),
- Point( rRect.Right()-2, rRect.Top()+1 ) );
- pDev->DrawLine( Point( rRect.Left()+1, rRect.Top()+2 ),
- Point( rRect.Left()+1, rRect.Bottom()-2 ) );
- pDev->DrawPixel( Point( rRect.Top()+2, rRect.Right()+2 ) );
- }
-
- rRect.Left() += 2;
- rRect.Top() += 2;
- rRect.Right() -= 2;
- rRect.Bottom() -= 2;
-
- if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
- {
- rRect.Left()++;
- rRect.Top()++;
- rRect.Right()++;
- rRect.Bottom()++;
- }
-
- return;
- }
}
DecorationView aDecoView( pDev );
@@ -1070,20 +910,6 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev,
Point aTempPoint;
Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() );
- if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) )
- {
- const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings();
-
- USHORT nPushButtonSysStyle = rStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE;
- if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC )
- {
- aTestRect.Left() += 2;
- aTestRect.Top() += 2;
- aTestRect.Right() -= 2;
- aTestRect.Bottom() -= 2;
- }
- }
-
return aTestRect.IsInside( rPos );
}
@@ -3274,7 +3100,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = rStyleSettings.GetRadioButtonStyle() & STYLE_RADIOBUTTON_STYLE;
+ USHORT nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_RADIOBUTTON_MONO;
@@ -4192,7 +4018,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags )
{
ImplSVData* pSVData = ImplGetSVData();
const StyleSettings& rStyleSettings = rSettings.GetStyleSettings();
- USHORT nStyle = rStyleSettings.GetCheckBoxStyle() & STYLE_CHECKBOX_STYLE;
+ USHORT nStyle = 0;
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
nStyle = STYLE_CHECKBOX_MONO;
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 1c83779da1a9..c264d01916fc 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -78,15 +78,6 @@ void MenuButton::ImplExecuteMenu()
Point aPos( 0, 1 );
Size aSize = GetSizePixel();
Rectangle aRect( aPos, aSize );
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if ( !((GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) ||
- !(rStyleSettings.GetOptions() & STYLE_OPTION_MACSTYLE)) )
- {
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
- }
SetPressed( TRUE );
EndSelection();
mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN );
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 9c82bb096dec..4261965995fa 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -770,64 +770,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev )
if ( bEnabled )
{
nStyle = BUTTON_DRAW_NOLIGHTBORDER;
- // pressed thumbs only in OS2 style
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_OS2STYLE )
- if ( mnStateFlags & SCRBAR_STATE_THUMB_DOWN )
- nStyle |= BUTTON_DRAW_PRESSED;
aTempRect = aDecoView.DrawButton( maThumbRect, nStyle );
- // OS2 style requires pattern on the thumb
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_OS2STYLE )
- {
- if ( GetStyle() & WB_HORZ )
- {
- if ( aTempRect.GetWidth() > 6 )
- {
- long nX = aTempRect.Center().X();
- nX -= 6;
- if ( nX < aTempRect.Left() )
- nX = aTempRect.Left();
- for ( int i = 0; i < 6; i++ )
- {
- if ( nX > aTempRect.Right()-1 )
- break;
-
- pOutDev->SetLineColor( rStyleSettings.GetButtonTextColor() );
- pOutDev->DrawLine( Point( nX, aTempRect.Top()+1 ),
- Point( nX, aTempRect.Bottom()-1 ) );
- nX++;
- pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
- pOutDev->DrawLine( Point( nX, aTempRect.Top()+1 ),
- Point( nX, aTempRect.Bottom()-1 ) );
- nX++;
- }
- }
- }
- else
- {
- if ( aTempRect.GetHeight() > 6 )
- {
- long nY = aTempRect.Center().Y();
- nY -= 6;
- if ( nY < aTempRect.Top() )
- nY = aTempRect.Top();
- for ( int i = 0; i < 6; i++ )
- {
- if ( nY > aTempRect.Bottom()-1 )
- break;
-
- pOutDev->SetLineColor( rStyleSettings.GetButtonTextColor() );
- pOutDev->DrawLine( Point( aTempRect.Left()+1, nY ),
- Point( aTempRect.Right()-1, nY ) );
- nY++;
- pOutDev->SetLineColor( rStyleSettings.GetLightColor() );
- pOutDev->DrawLine( Point( aTempRect.Left()+1, nY ),
- Point( aTempRect.Right()-1, nY ) );
- nY++;
- }
- }
- }
- pOutDev->SetLineColor();
- }
}
else
{
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index daf733a57a33..26a4c1cfd205 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -713,13 +713,6 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt )
mnMouseOff = rMousePos.X()-aCenterPos.X();
else
mnMouseOff = rMousePos.Y()-aCenterPos.Y();
-
- // Im OS2-Look geben wir den Thumb gedrueckt aus
- if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_OS2STYLE )
- {
- mnStateFlags |= SLIDER_STATE_THUMB_DOWN;
- ImplDraw( SLIDER_DRAW_THUMB );
- }
}
else if ( ImplIsPageUp( rMousePos ) )
{
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index e9696aa8c492..2c81b6af241b 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -75,8 +75,6 @@ struct ImplTabItem
struct ImplTabCtrlData
{
- PushButton* mpLeftBtn;
- PushButton* mpRightBtn;
std::hash_map< int, int > maLayoutPageIdToLine;
std::hash_map< int, int > maLayoutLineToPageId;
std::vector< Rectangle > maTabRectangles;
@@ -88,27 +86,6 @@ struct ImplTabCtrlData
// -----------------------------------------------------------------------
-#if 0
-// not used
-#define TABCOLORCOUNT 10
-
-static ColorData aImplTabColorAry[TABCOLORCOUNT] =
-{
- RGB_COLORDATA( 80, 216, 248 ),
- RGB_COLORDATA( 128, 216, 168 ),
- RGB_COLORDATA( 128, 144, 248 ),
- RGB_COLORDATA( 208, 180, 168 ),
- RGB_COLORDATA( 248, 252, 168 ),
- RGB_COLORDATA( 168, 144, 168 ),
- RGB_COLORDATA( 248, 144, 80 ),
- RGB_COLORDATA( 248, 216, 80 ),
- RGB_COLORDATA( 248, 180, 168 ),
- RGB_COLORDATA( 248, 216, 168 )
-};
-#endif
-
-// -----------------------------------------------------------------------
-
#define TAB_OFFSET 3
#define TAB_TABOFFSET_X 3
#define TAB_TABOFFSET_Y 3
@@ -132,9 +109,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
- // no single line tabs since NWF
- nStyle &= ~WB_SINGLELINE;
-
Control::ImplInit( pParent, nStyle, NULL );
mnLastWidth = 0;
@@ -143,18 +117,12 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
mnMaxPageWidth = 0;
mnActPageId = 0;
mnCurPageId = 0;
- mnFirstPagePos = 0;
- mnLastFirstPagePos = 0;
mbFormat = TRUE;
mbRestoreHelpId = FALSE;
mbRestoreUnqId = FALSE;
- mbSingleLine = FALSE;
- mbScroll = FALSE;
mbSmallInvalidate = FALSE;
mbExtraSpace = FALSE;
mpTabCtrlData = new ImplTabCtrlData;
- mpTabCtrlData->mpLeftBtn = NULL;
- mpTabCtrlData->mpRightBtn = NULL;
mpTabCtrlData->mpListBox = NULL;
@@ -226,8 +194,6 @@ void TabControl::ImplInitSettings( BOOL bFont,
SetBackground( pParent->GetBackground() );
}
}
-
- ImplScrollBtnsColor();
}
// -----------------------------------------------------------------------
@@ -299,10 +265,6 @@ TabControl::~TabControl()
{
if( mpTabCtrlData->mpListBox )
delete mpTabCtrlData->mpListBox;
- if ( mpTabCtrlData->mpLeftBtn )
- delete mpTabCtrlData->mpLeftBtn;
- if ( mpTabCtrlData->mpRightBtn )
- delete mpTabCtrlData->mpRightBtn;
delete mpTabCtrlData;
}
}
@@ -323,74 +285,6 @@ ImplTabItem* TabControl::ImplGetItem( USHORT nId ) const
// -----------------------------------------------------------------------
-void TabControl::ImplScrollBtnsColor()
-{
- if ( mpTabCtrlData && mpTabCtrlData->mpLeftBtn )
- {
- mpTabCtrlData->mpLeftBtn->SetControlForeground();
- mpTabCtrlData->mpRightBtn->SetControlForeground();
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TabControl::ImplSetScrollBtnsState()
-{
- if ( mbScroll )
- {
- mpTabCtrlData->mpLeftBtn->Enable( mnFirstPagePos != 0 );
- mpTabCtrlData->mpRightBtn->Enable( mnFirstPagePos < mnLastFirstPagePos );
- }
-}
-
-// -----------------------------------------------------------------------
-
-void TabControl::ImplPosScrollBtns()
-{
- if ( mbScroll )
- {
- if ( !mpTabCtrlData->mpLeftBtn )
- {
- mpTabCtrlData->mpLeftBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT );
- mpTabCtrlData->mpLeftBtn->SetSymbol( SYMBOL_PREV );
- mpTabCtrlData->mpLeftBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) );
- }
- if ( !mpTabCtrlData->mpRightBtn )
- {
- mpTabCtrlData->mpRightBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT );
- mpTabCtrlData->mpRightBtn->SetSymbol( SYMBOL_NEXT );
- mpTabCtrlData->mpRightBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) );
- }
-
- Rectangle aRect = ImplGetTabRect( TAB_PAGERECT );
- aRect.Left() -= TAB_OFFSET;
- aRect.Top() -= TAB_OFFSET;
- aRect.Right() += TAB_OFFSET;
- aRect.Bottom() += TAB_OFFSET;
- long nX = aRect.Right()-mnBtnSize+1;
- long nY = aRect.Top()-mnBtnSize;
- mpTabCtrlData->mpRightBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize );
- nX -= mnBtnSize;
- mpTabCtrlData->mpLeftBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize );
- ImplScrollBtnsColor();
- ImplSetScrollBtnsState();
- mpTabCtrlData->mpLeftBtn->Show();
- mpTabCtrlData->mpRightBtn->Show();
- }
- else
- {
- if ( mpTabCtrlData )
- {
- if ( mpTabCtrlData->mpLeftBtn )
- mpTabCtrlData->mpLeftBtn->Hide();
- if ( mpTabCtrlData->mpRightBtn )
- mpTabCtrlData->mpRightBtn->Hide();
- }
- }
-}
-
-// -----------------------------------------------------------------------
-
Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
{
pItem->maFormatText = pItem->maText;
@@ -524,8 +418,6 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
nMaxWidth = mnMaxPageWidth;
nMaxWidth -= GetItemsOffset().X();
- mbScroll = FALSE;
-
USHORT nLines = 0;
USHORT nCurLine = 0;
long nLineWidthAry[100];
@@ -650,8 +542,6 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight
mnLastWidth = nWidth;
mnLastHeight = nHeight;
mbFormat = FALSE;
-
- ImplPosScrollBtns();
}
return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle();
@@ -795,13 +685,6 @@ void TabControl::ImplActivateTabPage( BOOL bNext )
// -----------------------------------------------------------------------
-void TabControl::ImplSetFirstPagePos( USHORT )
-{
- return; // was only required for single line
-}
-
-// -----------------------------------------------------------------------
-
void TabControl::ImplShowFocus()
{
if ( !GetPageCount() || mpTabCtrlData->mpListBox )
@@ -1101,14 +984,6 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
// -----------------------------------------------------------------------
-IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG )
-{
- ImplSetScrollBtnsState();
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG )
{
SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) );
@@ -1387,19 +1262,14 @@ void TabControl::Resize()
// Feststellen, was invalidiert werden muss
Size aNewSize = Control::GetOutputSizePixel();
long nNewWidth = aNewSize.Width();
- if ( mbScroll )
- mbSmallInvalidate = FALSE;
- else
+ for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
+ it != mpTabCtrlData->maItemList.end(); ++it )
{
- for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
- it != mpTabCtrlData->maItemList.end(); ++it )
+ if ( !it->mbFullVisible ||
+ (it->maRect.Right()-2 >= nNewWidth) )
{
- if ( !it->mbFullVisible ||
- (it->maRect.Right()-2 >= nNewWidth) )
- {
- mbSmallInvalidate = FALSE;
- break;
- }
+ mbSmallInvalidate = FALSE;
+ break;
}
}
@@ -2013,13 +1883,6 @@ USHORT TabControl::GetCurPageId() const
// -----------------------------------------------------------------------
-void TabControl::SetFirstPageId( USHORT )
-{
- return; // was only required for single line
-}
-
-// -----------------------------------------------------------------------
-
void TabControl::SelectTabPage( USHORT nPageId )
{
if ( nPageId && (nPageId != mnCurPageId) )
diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx
index d949f519d197..188b4e49f0c5 100644
--- a/vcl/source/gdi/bmpconv.cxx
+++ b/vcl/source/gdi/bmpconv.cxx
@@ -28,14 +28,14 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/bitmap.hxx>
-#include <vcl/impbmpconv.hxx>
-#include <vcl/svapp.hxx>
-#include <vos/mutex.hxx>
-#include <tools/stream.hxx>
-#include <com/sun/star/script/XInvocation.hpp>
-#include <com/sun/star/awt/XBitmap.hpp>
-#include <cppuhelper/compbase1.hxx>
+#include "vcl/bitmap.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/salctype.hxx"
+#include "vos/mutex.hxx"
+#include "tools/stream.hxx"
+#include "com/sun/star/script/XInvocation.hpp"
+#include "com/sun/star/awt/XBitmap.hpp"
+#include "cppuhelper/compbase1.hxx"
using namespace com::sun::star::uno;
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index f4ea98484c33..ca50e4bf6c82 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1686,15 +1686,15 @@ void ImplDevFontList::InitMatchData() const
}
//----------------------------------------------------------------------------
-ImplDevFontListData* ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale lc) const
+ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Locale& rLocale ) const
{
// get the default font for a specified locale
const DefaultFontConfiguration& rDefaults = *DefaultFontConfiguration::get();
- String aDefault = rDefaults.getUserInterfaceFont( lc );
+ const String aDefault = rDefaults.getUserInterfaceFont( rLocale );
ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault );
if( pFontData )
return pFontData;
- return 0;
+ return NULL;
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx
index 521f4d7ea62d..b5b745b708fa 100644..100755
--- a/vcl/source/gdi/outdevnative.cxx
+++ b/vcl/source/gdi/outdevnative.cxx
@@ -87,6 +87,10 @@ MenubarValue::~MenubarValue()
{
}
+MenupopupValue::~MenupopupValue()
+{
+}
+
PushButtonValue::~PushButtonValue()
{
}
@@ -200,49 +204,20 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im
case CTRL_GENERIC:
aResult.reset( new ImplControlValue( rVal ) );
break;
- default:
- OSL_ENSURE( 0, "unknown ImplControlValue type !" );
- break;
- }
- return aResult;
-}
-
-#if 0
-static void lcl_moveControlValue( ControlType nType, const ImplControlValue& aValue, const Point& rDelta )
-{
- switch( aValue.getType() )
- {
- case CTRL_SLIDER:
- {
- SliderValue* pSlVal = static_cast<SliderValue*>(const_cast<ImplControlValue*>(&aValue));
- pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- case CTRL_SCROLLBAR:
- {
- ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(const_cast<ImplControlValue*>(&aValue));
- pScVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
- pScVal->maButton1Rect.Move( rDelta.X(), rDelta.Y() );
- pScVal->maButton2Rect.Move( rDelta.X(), rDelta.Y() );
- }
- break;
- case CTRL_SPINBOX:
- case CTRL_SPINBUTTONS:
+ case CTRL_MENU_POPUP:
{
- SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(const_cast<ImplControlValue*>(&aValue));
- pSpVal->maUpperRect.Move( rDelta.X(), rDelta.Y() );
- pSpVal->maLowerRect.Move( rDelta.X(), rDelta.Y() );
+ const MenupopupValue* pMVal = static_cast<const MenupopupValue*>(&rVal);
+ MenupopupValue* pNew = new MenupopupValue( *pMVal );
+ pNew->maItemRect = rDev.ImplLogicToDevicePixel( pMVal->maItemRect );
+ aResult.reset( pNew );
}
break;
- case CTRL_TOOLBAR:
- {
- ToolbarValue* pTVal = static_cast<ToolbarValue*>(const_cast<ImplControlValue*>(&aValue));
- pTVal->maGripRect.Move( rDelta.X(), rDelta.Y() );
- }
+ default:
+ OSL_ENSURE( 0, "unknown ImplControlValue type !" );
break;
}
+ return aResult;
}
-#endif
BOOL OutputDevice::DrawNativeControl( ControlType nType,
ControlPart nPart,
@@ -254,20 +229,6 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType,
if( !lcl_enableNativeWidget( *this ) )
return FALSE;
- /*
- if( !IsInPaint() && IsPaintTransparent() )
- {
- // only required if called directly (ie, we're not in Paint() ):
- // force redraw (Paint()) for transparent controls
- // to trigger a repaint of the background
- Region aClipRgn( GetClipRegion() );
- if( !rControlRegion.IsEmpty() )
- aClipRgn.Intersect( rControlRegion );
- Invalidate( aClipRgn, INVALIDATE_UPDATE );
- return TRUE;
- }
- */
-
// make sure the current clip region is initialized correctly
if ( !mpGraphics )
if ( !ImplGetGraphics() )
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 2ea9bfcc4c11..78456992340f 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -57,8 +57,14 @@
#include <comphelper/processfactory.hxx>
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
+using namespace com::sun::star::beans;
+using namespace com::sun::star::container;
int nImplSysDialog = 0;
@@ -130,6 +136,105 @@ PrinterOptions::~PrinterOptions()
{
}
+#define PROPERTYNAME_REDUCETRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceTransparency"))
+#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedTransparencyMode"))
+#define PROPERTYNAME_REDUCEGRADIENTS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceGradients"))
+#define PROPERTYNAME_REDUCEDGRADIENTMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientMode"))
+#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientStepCount"))
+#define PROPERTYNAME_REDUCEBITMAPS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceBitmaps"))
+#define PROPERTYNAME_REDUCEDBITMAPMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapMode"))
+#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapResolution"))
+#define PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapIncludesTransparency"))
+#define PROPERTYNAME_CONVERTTOGREYSCALES rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales"))
+
+bool PrinterOptions::ReadFromConfig( bool i_bFile )
+{
+ bool bSuccess = false;
+ // save old state in case something goes wrong
+ PrinterOptions aOldValues( *this );
+
+ // get the configuration service
+ Reference< XMultiServiceFactory > xConfigProvider;
+ Reference< XNameAccess > xConfigAccess;
+ try
+ {
+ // get service provider
+ Reference< XMultiServiceFactory > xSMgr( comphelper::getProcessServiceFactory() );
+ // create configuration hierachical access name
+ if( xSMgr.is() )
+ {
+ try
+ {
+ xConfigProvider = Reference< XMultiServiceFactory >(
+ xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.configuration.ConfigurationProvider" ))),
+ UNO_QUERY );
+ if( xConfigProvider.is() )
+ {
+ Sequence< Any > aArgs(1);
+ PropertyValue aVal;
+ aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
+ if( i_bFile )
+ aVal.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Print/Option/File" ) );
+ else
+ aVal.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Print/Option/Printer" ) );
+ aArgs.getArray()[0] <<= aVal;
+ xConfigAccess = Reference< XNameAccess >(
+ xConfigProvider->createInstanceWithArguments(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), aArgs ),
+ UNO_QUERY );
+ if( xConfigAccess.is() )
+ {
+ Reference< XPropertySet > xSet( xConfigAccess, UNO_QUERY );
+ if( xSet.is() )
+ {
+ sal_Int32 nValue = 0;
+ sal_Bool bValue = 0;
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCETRANSPARENCY) >>= bValue )
+ SetReduceTransparency( bValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDTRANSPARENCYMODE) >>= nValue )
+ SetReducedTransparencyMode( (PrinterTransparencyMode)nValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEGRADIENTS) >>= bValue )
+ SetReduceGradients( bValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTMODE) >>= nValue )
+ SetReducedGradientMode( (PrinterGradientMode)nValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT) >>= nValue )
+ SetReducedGradientStepCount( (USHORT)nValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEBITMAPS) >>= bValue )
+ SetReduceBitmaps( bValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPMODE) >>= nValue )
+ SetReducedBitmapMode( (PrinterBitmapMode)nValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPRESOLUTION) >>= nValue )
+ SetReducedBitmapResolution( (USHORT)nValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY) >>= bValue )
+ SetReducedBitmapIncludesTransparency( bValue );
+ if( xSet->getPropertyValue(PROPERTYNAME_CONVERTTOGREYSCALES) >>= bValue )
+ SetConvertToGreyscales( bValue );
+
+ bSuccess = true;
+ }
+ }
+ }
+ }
+ catch( Exception& )
+ {
+ }
+ }
+ }
+ catch( WrappedTargetException& )
+ {
+ }
+
+ if( ! bSuccess )
+ *this = aOldValues;
+ return bSuccess;
+}
+
+void Printer::SetPrinterOptions( const PrinterOptions& i_rOptions )
+{
+ *mpPrinterOptions = i_rOptions;
+}
+
// -------------
// - QueueInfo -
// -------------
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 98eac5e982d3..8207282add99 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -533,10 +533,6 @@ 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
- // of only using the LocalFileName property
beans::PropertyValue* pFileValue = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ) );
if( pFileValue )
{
@@ -553,6 +549,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl::
XubString* pPrintFile = NULL;
if ( mbPrintFile )
pPrintFile = &maPrintFile;
+ mpPrinterOptions->ReadFromConfig( mbPrintFile );
maJobName = i_rJobName;
mnCurPage = 1;
@@ -733,6 +730,13 @@ void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter
mpImplData->mnFixedPaperBin = -1;
}
+void PrinterController:: resetPrinterOptions( bool i_bFileOutput )
+{
+ PrinterOptions aOpt;
+ aOpt.ReadFromConfig( i_bFileOutput );
+ mpImplData->mpPrinter->SetPrinterOptions( aOpt );
+}
+
bool PrinterController::setupPrinter( Window* i_pParent )
{
bool bRet = false;
@@ -1729,7 +1733,7 @@ void PrinterOptionsHelper::appendPrintUIOptions( uno::Sequence< beans::PropertyV
}
Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
- const Sequence< rtl::OUString >& i_rHelpTexts,
+ const Sequence< rtl::OUString >& i_rHelpIds,
const rtl::OUString& i_rType,
const PropertyValue* i_pVal,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
@@ -1738,7 +1742,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
sal_Int32 nElements =
1 // ControlType
+ (i_rTitle.getLength() ? 1 : 0) // Text
- + (i_rHelpTexts.getLength() ? 1 : 0) // HelpText
+ + (i_rHelpIds.getLength() ? 1 : 0) // HelpId
+ (i_pVal ? 1 : 0) // Property
+ i_rControlOptions.maAddProps.getLength() // additional props
+ (i_rControlOptions.maGroupHint.getLength() ? 1 : 0) // grouping
@@ -1761,10 +1765,10 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) );
aCtrl[nUsed++].Value = makeAny( i_rTitle );
}
- if( i_rHelpTexts.getLength() )
+ if( i_rHelpIds.getLength() )
{
- aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) );
- aCtrl[nUsed++].Value = makeAny( i_rHelpTexts );
+ aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpId" ) );
+ aCtrl[nUsed++].Value = makeAny( i_rHelpIds );
}
aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlType" ) );
aCtrl[nUsed++].Value = makeAny( i_rType );
@@ -1813,53 +1817,53 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle,
return makeAny( aCtrl );
}
-Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpText )
+Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpId )
{
- Sequence< rtl::OUString > aHelpText;
- if( i_rHelpText.getLength() > 0 )
+ Sequence< rtl::OUString > aHelpId;
+ if( i_rHelpId.getLength() > 0 )
{
- aHelpText.realloc( 1 );
- *aHelpText.getArray() = i_rHelpText;
+ aHelpId.realloc( 1 );
+ *aHelpId.getArray() = i_rHelpId;
}
- return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Group" ) ) );
+ return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Group" ) ) );
}
Any PrinterOptionsHelper::getSubgroupControlOpt( const rtl::OUString& i_rTitle,
- const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rHelpId,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
)
{
- Sequence< rtl::OUString > aHelpText;
- if( i_rHelpText.getLength() > 0 )
+ Sequence< rtl::OUString > aHelpId;
+ if( i_rHelpId.getLength() > 0 )
{
- aHelpText.realloc( 1 );
- *aHelpText.getArray() = i_rHelpText;
+ aHelpId.realloc( 1 );
+ *aHelpId.getArray() = i_rHelpId;
}
- return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Subgroup" ) ),
+ return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Subgroup" ) ),
NULL, i_rControlOptions );
}
Any PrinterOptionsHelper::getBoolControlOpt( const rtl::OUString& i_rTitle,
- const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rHelpId,
const rtl::OUString& i_rProperty,
sal_Bool i_bValue,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
)
{
- Sequence< rtl::OUString > aHelpText;
- if( i_rHelpText.getLength() > 0 )
+ Sequence< rtl::OUString > aHelpId;
+ if( i_rHelpId.getLength() > 0 )
{
- aHelpText.realloc( 1 );
- *aHelpText.getArray() = i_rHelpText;
+ aHelpId.realloc( 1 );
+ *aHelpId.getArray() = i_rHelpId;
}
PropertyValue aVal;
aVal.Name = i_rProperty;
aVal.Value = makeAny( i_bValue );
- return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bool" ) ), &aVal, i_rControlOptions );
+ return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bool" ) ), &aVal, i_rControlOptions );
}
Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle,
- const Sequence< rtl::OUString >& i_rHelpText,
+ const Sequence< rtl::OUString >& i_rHelpId,
const rtl::OUString& i_rProperty,
const Sequence< rtl::OUString >& i_rChoices,
sal_Int32 i_nValue,
@@ -1882,11 +1886,11 @@ Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle,
PropertyValue aVal;
aVal.Name = i_rProperty;
aVal.Value = makeAny( i_nValue );
- return getUIControlOpt( i_rTitle, i_rHelpText, i_rType, &aVal, aOpt );
+ return getUIControlOpt( i_rTitle, i_rHelpId, i_rType, &aVal, aOpt );
}
Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle,
- const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rHelpId,
const rtl::OUString& i_rProperty,
sal_Int32 i_nValue,
sal_Int32 i_nMinValue,
@@ -1905,17 +1909,17 @@ Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle,
aOpt.maAddProps[nUsed++].Value = makeAny( i_nMaxValue );
}
- Sequence< rtl::OUString > aHelpText;
- if( i_rHelpText.getLength() > 0 )
+ Sequence< rtl::OUString > aHelpId;
+ if( i_rHelpId.getLength() > 0 )
{
- aHelpText.realloc( 1 );
- *aHelpText.getArray() = i_rHelpText;
+ aHelpId.realloc( 1 );
+ *aHelpId.getArray() = i_rHelpId;
}
PropertyValue aVal;
aVal.Name = i_rProperty;
aVal.Value = makeAny( i_nValue );
return getUIControlOpt( i_rTitle,
- aHelpText,
+ aHelpId,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Range" ) ),
&aVal,
aOpt
@@ -1923,23 +1927,23 @@ Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle,
}
Any PrinterOptionsHelper::getEditControlOpt( const rtl::OUString& i_rTitle,
- const rtl::OUString& i_rHelpText,
+ const rtl::OUString& i_rHelpId,
const rtl::OUString& i_rProperty,
const rtl::OUString& i_rValue,
const PrinterOptionsHelper::UIControlOptions& i_rControlOptions
)
{
- Sequence< rtl::OUString > aHelpText;
- if( i_rHelpText.getLength() > 0 )
+ Sequence< rtl::OUString > aHelpId;
+ if( i_rHelpId.getLength() > 0 )
{
- aHelpText.realloc( 1 );
- *aHelpText.getArray() = i_rHelpText;
+ aHelpId.realloc( 1 );
+ *aHelpId.getArray() = i_rHelpId;
}
PropertyValue aVal;
aVal.Name = i_rProperty;
aVal.Value = makeAny( i_rValue );
return getUIControlOpt( i_rTitle,
- aHelpText,
+ aHelpId,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Edit" ) ),
&aVal,
i_rControlOptions
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index 6d2360dae6cb..b786184fa2f3 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -81,67 +81,3 @@ String SV_BUTTONTEXT_ABORT
Text [ en-US ] = "~Abort";
};
-/* HelpTexte, die wir derzeit nicht mehr verwenden:
-SV_BUTTONHELPTEXT_OK
-{
- Text = "Schliet dieses Dialogfeld und speichert alle vorgenommenen nderungen." ;
-};
-
-SV_BUTTONHELPTEXT_CANCEL
-{
- Text = "Schliet dieses Dialogfeld, ohne Ihre nderungen zu speichern." ;
-};
-
-SV_BUTTONHELPTEXT_HELP
-{
- Text = "Zeigt Hilfe zu diesem Fenster an." ;
-};
-
-SV_BUTTONHELPTEXT_MORE
-{
- Text = "Zeigt weitere Einstellmglichkeiten an oder versteckt diese wieder." ;
-};
-
-Finnische-Texte:
-OK OK
-CANCEL Peruuta
-HELP ~Ohje
-MORE ~Enemmn
-YES ~Kyll
-NO ~Ei
-RETRY ~Yrituudelleen
-*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index fdb1e755c86a..000d7215d80d 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -38,25 +38,6 @@ Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_STDOFFSET)
File = "check.bmp";
};
-Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_WINOFFSET)
-{
- File = "checkwin.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_OS2OFFSET)
-{
- File = "checkos2.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MACOFFSET)
-{
- File = "checkmac.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_UNIXOFFSET)
-{
- File = "checkunx.bmp";
-};
Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MONOOFFSET)
{
@@ -80,26 +61,6 @@ Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_STDOFFSET)
File = "radio.bmp";
};
-Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_WINOFFSET)
-{
- File = "radiowin.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_OS2OFFSET)
-{
- File = "radioos2.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_MACOFFSET)
-{
- File = "radiomac.bmp";
-};
-
-Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_UNIXOFFSET)
-{
- File = "radiounx.bmp";
-};
-
Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_MONOOFFSET)
{
File = "radiomono.bmp";
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 436ab40bdc5f..04ab77f09288 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -29,7 +29,7 @@
ModalDialog SV_DLG_PRINT
{
- HelpID = "vcl:ModalDialog:SV_DLG_PRINT";
+ HelpID = ".HelpID:vcl:PrintDialog:Dialog";
Text [en-US] = "Print";
Closeable = TRUE;
Sizeable = TRUE;
@@ -45,16 +45,19 @@ ModalDialog SV_DLG_PRINT
Pos = MAP_APPFONT( 240, 195 );
Size = MAP_APPFONT( 50, 15 );
Text [en-US] = "~Print";
+ HelpID = ".HelpID:vcl:PrintDialog:OK";
};
CancelButton SV_PRINT_CANCEL
{
Pos = MAP_APPFONT( 295, 195 );
Size = MAP_APPFONT( 50, 15 );
+ HelpID = ".HelpID:vcl:PrintDialog:Cancel";
};
HelpButton SV_PRINT_HELP
{
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 50, 15 );
+ HelpID = ".HelpID:vcl:PrintDialog:Help";
};
Window SV_PRINT_PAGE_PREVIEW
@@ -62,16 +65,16 @@ ModalDialog SV_DLG_PRINT
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 130, 130 );
Border = FALSE;
+ HelpID = ".HelpID:vcl:PrintDialog:Preview";
};
NumericField SV_PRINT_PAGE_EDIT
{
- HelpID = "vcl:NumericField:SV_DLG_PRINT:SV_PRINT_PAGE_EDIT";
Pos = MAP_APPFONT( 5, 140 );
Size = MAP_APPFONT( 30, 12 );
SVLook = TRUE;
Spin = FALSE;
Border = TRUE;
- HelpText [en-US] = "Select page to display in preview.";
+ HelpID = ".HelpID:vcl:PrintDialog:PageEdit";
};
FixedText SV_PRINT_PAGE_TXT
{
@@ -79,26 +82,25 @@ ModalDialog SV_DLG_PRINT
Size = MAP_APPFONT( 30, 12 );
Text [ en-US ] = "/ %n";
VCenter = TRUE;
+ HelpID = ".HelpID:vcl:PrintDialog:NumPagesText";
};
PushButton SV_PRINT_PAGE_FORWARD
{
- HelpID = "vcl:PushButton:SV_DLG_PRINT:SV_PRINT_PAGE_FORWARD";
Pos = MAP_APPFONT( 95, 140 );
Size = MAP_APPFONT( 15, 12 );
- HelpText [en-US] = "Scroll one page forward.";
+ HelpID = ".HelpID:vcl:PrintDialog:ForwardBtn";
};
PushButton SV_PRINT_PAGE_BACKWARD
{
- HelpID = "vcl:PushButton:SV_DLG_PRINT:SV_PRINT_PAGE_BACKWARD";
Pos = MAP_APPFONT( 80, 140 );
Size = MAP_APPFONT( 15, 12 );
- HelpText [en-US] = "Scroll one page backward.";
+ HelpID = ".HelpID:vcl:PrintDialog:BackwardBtn";
};
TabControl SV_PRINT_TABCTRL
{
- HelpID = "vcl:TabControl:SV_DLG_PRINT:SV_PRINT_TABCTRL";
Pos = MAP_APPFONT( 140, 5 );
Size = MAP_APPFONT( 205, 175 );
+ HelpID = ".HelpID:vcl:PrintDialog:TabPages";
};
FixedLine SV_PRINT_BUTTONLINE
{
@@ -128,7 +130,7 @@ ModalDialog SV_DLG_PRINT
TabPage SV_PRINT_TAB_NUP
{
- HelpID = "vcl:TabPage:SV_PRINT_TAB_NUP";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage";
Text [en-US] = "Page Layout";
Hide = TRUE;
@@ -138,38 +140,28 @@ ModalDialog SV_DLG_PRINT
Size = MAP_APPFONT( 150, 10 );
Text [en-US] = "Layout";
};
- RadioButton SV_PRINT_PRT_NUP_DEFAULT_BTN
- {
- HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_DEFAULT_BTN";
- Pos = MAP_APPFONT( 0, 0 );
- Size = MAP_APPFONT( 10, 10 );
- Text [en-US] = "~Default";
- HelpText [en-US] = "Print one page per sheet of paper.";
- };
RadioButton SV_PRINT_PRT_NUP_BROCHURE_BTN
{
- HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_BROCHURE_BTN";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:Brochure";
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 10, 10 );
Text = "";
};
RadioButton SV_PRINT_PRT_NUP_PAGES_BTN
{
- HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_PAGES_BTN";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PagesPerSheet";
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 10, 10 );
Text [en-US] = "Pa~ges per sheet";
- HelpText [en-US] = "Print multiple pages per sheet of paper.";
};
ListBox SV_PRINT_PRT_NUP_PAGES_BOX
{
- HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_PAGES_BOX";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PagesPerSheetBox";
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 10, 80 );
Border = TRUE;
DropDown = TRUE;
CurPos = 0;
- HelpText [en-US] = "Select how many pages to print per sheet of paper.";
StringList [en-US] =
{
< "1"; 1; >;
@@ -190,7 +182,7 @@ ModalDialog SV_DLG_PRINT
};
NumericField SV_PRINT_PRT_NUP_COLS_EDT
{
- HelpID = "vcl:NumericField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_COLS_EDT";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:ColumnsBox";
Pos = MAP_APPFONT( 55, 20 );
Size = MAP_APPFONT( 40, 12 );
Border = TRUE;
@@ -198,7 +190,6 @@ ModalDialog SV_DLG_PRINT
Minimum = 1;
Maximum = 32;
Value = 1;
- HelpText [en-US] = "Select number of columns.";
};
FixedText SV_PRINT_PRT_NUP_TIMES_TXT
{
@@ -209,7 +200,7 @@ ModalDialog SV_DLG_PRINT
};
NumericField SV_PRINT_PRT_NUP_ROWS_EDT
{
- HelpID = "vcl:NumericField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ROWS_EDT";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:RowsBox";
Pos = MAP_APPFONT( 55, 35 );
Size = MAP_APPFONT( 40, 12 );
Border = TRUE;
@@ -217,7 +208,6 @@ ModalDialog SV_DLG_PRINT
Minimum = 1;
Maximum = 32;
Value = 1;
- HelpText [en-US] = "Select number of rows.";
};
FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT
{
@@ -227,14 +217,13 @@ ModalDialog SV_DLG_PRINT
};
MetricField SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT
{
- HelpID = "vcl:MetricField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PageMarginBox";
Pos = MAP_APPFONT( 55, 95 );
Size = MAP_APPFONT( 40, 12 );
Spin = TRUE;
Border = TRUE;
Value = 0;
Unit = FUNIT_MM;
- HelpText [en-US] = "Select margin between individual pages on each sheet of paper.";
};
FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT
{
@@ -250,14 +239,13 @@ ModalDialog SV_DLG_PRINT
};
MetricField SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT
{
- HelpID = "vcl:MetricField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:SheetMarginBox";
Pos = MAP_APPFONT( 155, 95 );
Size = MAP_APPFONT( 40, 12 );
Spin = TRUE;
Border = TRUE;
Value = 0;
Unit = FUNIT_MM;
- HelpText [en-US] = "Select margin between the printed pages and paper edge.";
};
FixedText SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT
{
@@ -273,7 +261,7 @@ ModalDialog SV_DLG_PRINT
};
ListBox SV_PRINT_PRT_NUP_ORIENTATION_BOX
{
- HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ORIENTATION_BOX";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:OrientationBox";
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 10, 40 );
Border = TRUE;
@@ -285,7 +273,6 @@ ModalDialog SV_DLG_PRINT
< "Portrait"; SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT; >;
< "Landscape"; SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE; >;
};
- HelpText [en-US] = "Select the orientation of the paper.";
};
FixedText SV_PRINT_PRT_NUP_ORDER_TXT
{
@@ -295,7 +282,7 @@ ModalDialog SV_DLG_PRINT
};
ListBox SV_PRINT_PRT_NUP_ORDER_BOX
{
- HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ORDER_BOX";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:OrderBox";
Pos = MAP_APPFONT( 0, 0 );
Size = MAP_APPFONT( 10, 50 );
DropDown = TRUE;
@@ -308,21 +295,19 @@ ModalDialog SV_DLG_PRINT
< "top to bottom, then left"; SV_PRINT_PRT_NUP_ORDER_TBRL; >;
< "right to left, then down"; SV_PRINT_PRT_NUP_ORDER_RLTB; >;
};
- HelpText [en-US] = "Select order in which pages are to be printed.";
};
CheckBox SV_PRINT_PRT_NUP_BORDER_CB
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_BORDER_CB";
+ HelpID = ".HelpID:vcl:PrintDialog:NUpPage:BorderBox";
Pos = MAP_APPFONT( 10, 65 );
Size = MAP_APPFONT( 150, 12 );
Text [en-US] = "Draw a border around each page";
- HelpText [en-US] = "Check to draw a border around each page.";
};
};
TabPage SV_PRINT_TAB_JOB
{
- HelpID = "vcl:TabPage:SV_PRINT_TAB_JOB";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage";
Text [en-US] = "General";
Hide = TRUE;
@@ -334,20 +319,18 @@ ModalDialog SV_DLG_PRINT
};
ListBox SV_PRINT_PRINTERS
{
- HelpID = "vcl:ListBox:SV_PRINT_TAB_JOB:SV_PRINT_PRINTERS";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage:PrinterList";
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 100, 80 );
Border = TRUE;
Sort = TRUE;
- HelpText [en-US] = "Select the printer to print on.";
};
CheckBox SV_PRINT_DETAILS_BTN
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_JOB:SV_PRINT_DETAILS_BTN";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage:DetailsBtn";
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 5, 5 );
Text [en-US] = "Details";
- HelpText [en-US] = "Show/Hide detailed information of the selected printer.";
};
FixedText SV_PRINT_STATUS_TXT
{
@@ -369,11 +352,10 @@ ModalDialog SV_DLG_PRINT
};
PushButton SV_PRINT_PRT_SETUP
{
- HelpID = "vcl:PushButton:SV_PRINT_TAB_JOB:SV_PRINT_PRT_SETUP";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage:Properties";
Pos = MAP_APPFONT( 115, 5 );
Size = MAP_APPFONT( 50, 15 );
Text [en-US] = "Properties...";
- HelpText [en-US] = "Call the setup dialog of the selected printer.";
};
FixedLine SV_PRINT_COPIES
{
@@ -389,7 +371,7 @@ ModalDialog SV_DLG_PRINT
};
NumericField SV_PRINT_COPYCOUNT_FIELD
{
- HelpID = "vcl:NumericField:SV_PRINT_TAB_JOB:SV_PRINT_COPYCOUNT_FIELD";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage:Copies";
Pos = MAP_APPFONT( 10, 56 );
Size = MAP_APPFONT( 40, 12 );
Border = TRUE;
@@ -397,7 +379,6 @@ ModalDialog SV_DLG_PRINT
Minimum = 1;
Maximum = 16384;
Value = 1;
- HelpText [en-US] = "Select the number of copies to be produced.";
};
FixedImage SV_PRINT_COLLATE_IMAGE
{
@@ -406,11 +387,10 @@ ModalDialog SV_DLG_PRINT
};
CheckBox SV_PRINT_COLLATE
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_JOB:SV_PRINT_COLLATE";
+ HelpID = ".HelpID:vcl:PrintDialog:JobPage:Collate";
Pos = MAP_APPFONT( 95, 45 );
Size = MAP_APPFONT( 70, 10 );
Text [en-US] = "Collate";
- HelpText [en-US] = "Select whether copies should be collated or not.";
};
Image SV_PRINT_COLLATE_IMG
@@ -436,9 +416,9 @@ ModalDialog SV_DLG_PRINT
TabPage SV_PRINT_TAB_OPT
{
- HelpID = "vcl:TabPage:SV_PRINT_TAB_OPT";
Text [en-US] = "Options";
Hide = TRUE;
+ HelpID = ".HelpID:vcl:PrintDialog:OptPage";
FixedLine SV_PRINT_OPT_PRINT_FL
{
@@ -448,27 +428,24 @@ ModalDialog SV_DLG_PRINT
};
CheckBox SV_PRINT_OPT_TOFILE
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_TOFILE";
+ HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToFile";
Pos = MAP_APPFONT( 10, 20 );
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "Print to ~file";
- HelpText [en-US] = "Check to send output to a file instead of the actual printer.";
};
CheckBox SV_PRINT_OPT_SINGLEJOBS
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_SINGLEJOBS";
+ HelpID = ".HelpID:vcl:PrintDialog:OptPage:SingleJobs";
Pos = MAP_APPFONT( 10, 35 );
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "~Create single print jobs for collated output";
- HelpText [en-US] = "Check to not rely on the printer to create collated copies but create a print job for each copy instead.";
};
CheckBox SV_PRINT_OPT_REVERSE
{
- HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_REVERSE";
+ HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse";
Pos = MAP_APPFONT( 10, 50 );
Size = MAP_APPFONT( 200, 12 );
Text [en-US] = "Print in ~reverse page order";
- HelpText [en-US] = "Check to print pages in reverse order.";
};
};
};
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index e5c3dc525cec..d51988d4d5d3 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -44,71 +44,6 @@
// =======================================================================
-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;
-
- pDev->SetFillColor();
-
- if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
- {
- aColor1 = rStyleSettings.GetShadowColor();
- aColor2 = rStyleSettings.GetLightColor();
- }
- else
- {
- aColor1 = rStyleSettings.GetLightColor();
- aColor2 = rStyleSettings.GetShadowColor();
- }
- aView.DrawFrame( aRect, aColor1, aColor2 );
-
- aRect.Left() += 2;
- aRect.Top() += 2;
- aRect.Right() -= 2;
- aRect.Bottom() -= 2;
-
- if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
- pDev->SetLineColor( rStyleSettings.GetLightColor() );
- else
- pDev->SetLineColor( rStyleSettings.GetShadowColor() );
- if ( bClose )
- {
- pDev->DrawLine( aRect.TopLeft(), Point( aRect.Left(), aRect.Bottom()-2 ) );
- pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-2, aRect.Top() ) );
- pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom()-1 ),
- Point( aRect.Right()-1, aRect.Top()+2 ) );
- }
- else
- {
- pDev->DrawLine( aRect.TopLeft(), aRect.BottomLeft() );
- pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-1, aRect.Top() ) );
- }
-
- if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) )
- pDev->SetLineColor( rStyleSettings.GetShadowColor() );
- else
- pDev->SetLineColor( rStyleSettings.GetLightColor() );
- if ( bClose )
- {
- pDev->DrawLine( Point( aRect.Right(), aRect.Top()+2 ), aRect.BottomRight() );
- pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom() ), aRect.BottomRight() );
- pDev->DrawLine( Point( aRect.Right()-2, aRect.Top()+1 ),
- Point( aRect.Left()+1, aRect.Bottom()-2 ) );
- }
- else
- {
- pDev->DrawLine( aRect.TopRight(), aRect.BottomRight() );
- pDev->DrawLine( Point( aRect.Left()+1, aRect.Bottom() ), aRect.BottomRight() );
- }
-}
-
-// =======================================================================
-
static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
SymbolType eType )
{
@@ -630,41 +565,6 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect,
pDev->DrawRect( aRect );
}
break;
-
- case SYMBOL_OS2CLOSE:
- {
- Rectangle aRect( nCenterX-n2, nCenterY-n2,
- nCenterX+n2, nCenterY+n2 );
- ImplDrawOS2Symbol( pDev, aRect, 0, TRUE );
- }
- break;
-
- case SYMBOL_OS2FLOAT:
- {
- Rectangle aRect( nCenterX-n2+4, nCenterY-n2+4,
- nCenterX+n2-4, nCenterY+n2-3 );
- ImplDrawOS2Symbol( pDev, aRect, 0, FALSE );
- DecorationView aDecoView( pDev );
- Rectangle aRect2( nCenterX-n2, nCenterY-n2,
- nCenterX-n2+2, nCenterY+n2 );
- aDecoView.DrawFrame( aRect2,
- pDev->GetSettings().GetStyleSettings().GetLightColor(),
- pDev->GetSettings().GetStyleSettings().GetShadowColor() );
- Rectangle aRect3( nCenterX+n2-2, nCenterY-n2,
- nCenterX+n2, nCenterY+n2 );
- aDecoView.DrawFrame( aRect3,
- pDev->GetSettings().GetStyleSettings().GetLightColor(),
- pDev->GetSettings().GetStyleSettings().GetShadowColor() );
- }
- break;
-
- case SYMBOL_OS2HIDE:
- {
- Rectangle aRect( nCenterX-n2+3, nCenterY-n2+3,
- nCenterX+n2-3, nCenterY+n2-3 );
- ImplDrawOS2Symbol( pDev, aRect, 0, FALSE );
- }
- break;
}
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 52ad54957dd0..5909ab9f8489 100644..100755
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -96,6 +96,7 @@ DBG_NAME( Menu )
#define EXTRASPACEY 2
#define EXTRAITEMHEIGHT 4
+#define GUTTERBORDER 8
// document closer
#define IID_DOCUMENTCLOSE 1
@@ -2670,14 +2671,36 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
// Separator
if ( !bLayout && !bIsMenuBar && ( pData->eType == MENUITEM_SEPARATOR ) )
{
- aTmpPos.Y() = aPos.Y() + ((pData->aSz.Height()-2)/2);
- aTmpPos.X() = aPos.X() + 2 + nOuterSpace;
- pWin->SetLineColor( rSettings.GetShadowColor() );
- pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) );
- aTmpPos.Y()++;
- pWin->SetLineColor( rSettings.GetLightColor() );
- pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) );
- pWin->SetLineColor();
+ bool bNativeOk = false;
+ if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP,
+ PART_MENU_SEPARATOR ) )
+ {
+ ControlState nState = 0;
+ if ( pData->bEnabled )
+ nState |= CTRL_STATE_ENABLED;
+ if ( bHighlighted )
+ nState |= CTRL_STATE_SELECTED;
+ Size aSz( pData->aSz );
+ aSz.Width() = aOutSz.Width() - 2*nOuterSpace;
+ Rectangle aItemRect( aPos, aSz );
+ MenupopupValue aVal( nTextPos-GUTTERBORDER, aItemRect );
+ bNativeOk = pWin->DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_SEPARATOR,
+ aItemRect,
+ nState,
+ aVal,
+ OUString() );
+ }
+ if( ! bNativeOk )
+ {
+ aTmpPos.Y() = aPos.Y() + ((pData->aSz.Height()-2)/2);
+ aTmpPos.X() = aPos.X() + 2 + nOuterSpace;
+ pWin->SetLineColor( rSettings.GetShadowColor() );
+ pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) );
+ aTmpPos.Y()++;
+ pWin->SetLineColor( rSettings.GetLightColor() );
+ pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) );
+ pWin->SetLineColor();
+ }
}
Rectangle aOuterCheckRect( Point( aPos.X()+nCheckPos, aPos.Y() ), Size( pData->aSz.Height(), pData->aSz.Height() ) );
@@ -2722,10 +2745,11 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
+ MenupopupValue aVal( nTextPos-GUTTERBORDER, Rectangle( aPos, pData->aSz ) );
pWin->DrawNativeControl( CTRL_MENU_POPUP, nPart,
aCheckRect,
nState,
- ImplControlValue(),
+ aVal,
OUString() );
}
else if ( pData->bChecked ) // by default do nothing for unchecked items
@@ -2845,16 +2869,6 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData*
aDecoView.DrawSymbol(
Rectangle( aTmpPos, Size( nFontHeight/2, nFontHeight/2 ) ),
SYMBOL_SPIN_RIGHT, pWin->GetTextColor(), nSymbolStyle );
-// if ( pData->nBits & MIB_POPUPSELECT )
-// {
-// aTmpPos.Y() += nFontHeight/2 ;
-// pWin->SetLineColor( rSettings.GetShadowColor() );
-// pWin->DrawLine( aTmpPos, Point( aTmpPos.X() + nFontHeight/3, aTmpPos.Y() ) );
-// pWin->SetLineColor( rSettings.GetLightColor() );
-// aTmpPos.Y()++;
-// pWin->DrawLine( aTmpPos, Point( aTmpPos.X() + nFontHeight/3, aTmpPos.Y() ) );
-// pWin->SetLineColor();
-// }
}
if ( pThisItemOnly && bHighlighted )
@@ -4724,10 +4738,11 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
Push( PUSH_CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ) );
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
+ MenupopupValue aVal( pMenu->nTextPos-GUTTERBORDER, aItemRect );
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
aCtrlRect,
CTRL_STATE_ENABLED,
- ImplControlValue(),
+ aVal,
OUString() );
if( bHighlight &&
IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) )
@@ -4736,7 +4751,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight )
if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
aItemRect,
CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ),
- ImplControlValue(),
+ aVal,
OUString() ) )
{
bDrawItemRect = bHighlight;
@@ -5071,10 +5086,11 @@ void MenuFloatingWindow::Paint( const Rectangle& )
long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0;
Size aPxSize( GetOutputSizePixel() );
aPxSize.Width() -= nX;
+ ImplControlValue aVal( pMenu->nTextPos-GUTTERBORDER );
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
Rectangle( Point( nX, 0 ), aPxSize ),
CTRL_STATE_ENABLED,
- ImplControlValue(),
+ aVal,
OUString() );
ImplInitClipRegion();
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 73420e6ef8b5..574cef4e5a07 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -60,15 +60,12 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
-#define HELPID_PREFIX ".HelpId:vcl:PrintDialog"
-#define SMHID2( a, b ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ":" b ) )
-#define SMHID1( a ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ) )
-
PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const ResId& i_rId )
: Window( i_pParent, i_rId )
, maOrigSize( 10, 10 )
, maPageVDev( *this )
, maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) )
+ , mbGreyscale( false )
, maHorzDim( this, WB_HORZ | WB_CENTER )
, maVertDim( this, WB_VERT | WB_VCENTER )
{
@@ -269,6 +266,11 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
maPageVDev.Erase();
maPageVDev.Push();
maPageVDev.SetMapMode( MAP_100TH_MM );
+ ULONG nOldDrawMode = maPageVDev.GetDrawMode();
+ if( mbGreyscale )
+ maPageVDev.SetDrawMode( maPageVDev.GetDrawMode() |
+ ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
aMtf.WindStart();
aMtf.Scale( fScale, fScale );
aMtf.WindStart();
@@ -278,6 +280,7 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& )
SetMapMode( MAP_PIXEL );
maPageVDev.SetMapMode( MAP_PIXEL );
DrawOutDev( aOffset, maPreviewSize, Point( 0, 0 ), aVDevSize, maPageVDev );
+ maPageVDev.SetDrawMode( nOldDrawMode );
DecorationView aVw( this );
Rectangle aFrame( aOffset + Point( -1, -1 ), Size( maPreviewSize.Width() + 2, maPreviewSize.Height() + 2 ) );
@@ -309,7 +312,8 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
const Size& i_rOrigSize,
const rtl::OUString& i_rReplacement,
sal_Int32 i_nDPIX,
- sal_Int32 i_nDPIY
+ sal_Int32 i_nDPIY,
+ bool i_bGreyscale
)
{
rtl::OUStringBuffer aBuf( 256 );
@@ -323,6 +327,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi
maOrigSize = i_rOrigSize;
maReplacementString = i_rReplacement;
+ mbGreyscale = i_bGreyscale;
maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY );
maPageVDev.EnableOutput( TRUE );
@@ -469,28 +474,6 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId )
maPageMarginEdt.SetDecimalDigits( nDigits );
maSheetMarginEdt.SetDecimalDigits( nDigits );
- SMHID1( "NUpPage" );
- maNupLine.SMHID2("NUpPage", "Layout");
- maBrochureBtn.SMHID2("NUpPage", "Brochure" );
- maPagesBtn.SMHID2( "NUpPage", "PagesPerSheet" );
- maPagesBoxTitleTxt.SMHID2( "NUpPage", "PagesPerSheetLabel" );
- maNupPagesBox.SMHID2( "NUpPage", "PagesPerSheetBox" );
- maNupNumPagesTxt.SMHID2( "NUpPage", "Columns" );
- maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" );
- maNupTimesTxt.SMHID2( "NUpPage", "Rows" );
- maNupRowsEdt.SMHID2( "NUpPage", "RowsBox" );
- maPageMarginTxt1.SMHID2( "NUpPage", "PageMargin" );
- maPageMarginEdt.SMHID2( "NUpPage", "PageMarginBox" );
- maPageMarginTxt2.SMHID2( "NUpPage", "PageMarginCont" );
- maSheetMarginTxt1.SMHID2( "NUpPage", "SheetMargin" );
- maSheetMarginEdt.SMHID2( "NUpPage", "SheetMarginBox" );
- maSheetMarginTxt2.SMHID2( "NUpPage", "SheetMarginCont" );
- maNupOrientationTxt.SMHID2( "NUpPage", "Orientation" );
- maNupOrientationBox.SMHID2( "NUpPage", "OrientationBox" );
- maNupOrderTxt.SMHID2( "NUpPage", "Order" );
- maNupOrderBox.SMHID2( "NUpPage", "OrderBox" );
- maBorderCB.SMHID2( "NUpPage", "BorderBox" );
-
setupLayout();
}
@@ -638,24 +621,6 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId )
{
FreeResource();
- SMHID1( "JobPage" );
- maPrinterFL.SMHID2( "JobPage", "Printer" );
- maPrinters.SMHID2( "JobPage", "PrinterList" );
- maDetailsBtn.SMHID2( "JobPage", "DetailsBtn" );
- maStatusLabel.SMHID2( "JobPage", "StatusLabel" );
- maStatusTxt.SMHID2( "JobPage", "StatusText" );
- maLocationLabel.SMHID2( "JobPage", "LocationLabel" );
- maLocationTxt.SMHID2( "JobPage", "LocationText" );
- maCommentLabel.SMHID2( "JobPage", "CommentLabel" );
- maCommentTxt.SMHID2( "JobPage", "CommentText" );
- maSetupButton.SMHID2( "JobPage", "Properties" );
- maCopies.SMHID2( "JobPage", "CopiesLine" );
- maCopySpacer.SMHID2( "JobPage", "CopySpacer" );
- maCopyCount.SMHID2( "JobPage", "CopiesText" );
- maCopyCountField.SMHID2( "JobPage", "Copies" );
- maCollateBox.SMHID2( "JobPage", "Collate" );
- maCollateImage.SMHID2( "JobPage", "CollateImage" );
-
maCopySpacer.Show();
maStatusTxt.Show();
maCommentTxt.Show();
@@ -779,11 +744,6 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe
, maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) )
{
FreeResource();
- SMHID1( "OptPage" );
- maOptionsLine.SMHID2( "OptPage", "Options" );
- maToFileBox.SMHID2( "OptPage", "ToFile" );
- maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" );
- maReverseOrderBox.SMHID2( "OptPage", "Reverse" );
setupLayout();
}
@@ -875,9 +835,6 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
// 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();
@@ -908,6 +865,12 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( Printer::GetDefaultPrinterName() ) ) );
}
}
+ // not printing to file
+ maPController->resetPrinterOptions( false );
+
+ // get the first page
+ preparePreview( true, true );
+
// update the text fields for the printer
updatePrinterText();
@@ -995,18 +958,6 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont
}
}
- // set HelpIDs
- SMHID1( "Dialog" );
- maOKButton.SMHID1( "OK" );
- maCancelButton.SMHID1( "Cancel" );
- maHelpButton.SMHID1( "Help" );
- maPreviewWindow.SMHID1( "Preview" );
- maNumPagesText.SMHID1( "NumPagesText" );
- maPageEdit.SMHID1( "PageEdit" );
- maForwardBtn.SMHID1( "ForwardBtn" );
- maBackwardBtn.SMHID1( "BackwardBtn" );
- maTabCtrl.SMHID1( "TabPages" );
-
// append further tab pages
if( mbShowLayoutPage )
{
@@ -1104,6 +1055,11 @@ void PrintDialog::readFromSettings()
}
}
maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+ if( maOptionsPage.maToFileBox.IsChecked() )
+ {
+ maPController->resetPrinterOptions( true );
+ preparePreview( true, true );
+ }
}
void PrintDialog::storeToSettings()
@@ -1144,39 +1100,18 @@ bool PrintDialog::isSingleJobs()
return maOptionsPage.maCollateSingleJobsBox.IsChecked();
}
-static void setSmartId( Window* i_pWindow, const char* i_pType, sal_Int32 i_nId = -1, const rtl::OUString& i_rPropName = rtl::OUString() )
+void setHelpId( Window* i_pWindow, const Sequence< rtl::OUString >& i_rHelpIds, sal_Int32 i_nIndex )
{
- rtl::OStringBuffer aBuf( 256 );
- aBuf.append( HELPID_PREFIX );
- if( i_rPropName.getLength() )
- {
- aBuf.append( ':' );
- aBuf.append( rtl::OUStringToOString( i_rPropName, RTL_TEXTENCODING_UTF8 ) );
- }
- if( i_pType )
- {
- aBuf.append( ':' );
- aBuf.append( i_pType );
- }
- if( i_nId >= 0 )
- {
- aBuf.append( ':' );
- aBuf.append( i_nId );
- }
- i_pWindow->SetHelpId( aBuf.makeStringAndClear() );
+ if( i_nIndex >= 0 && i_nIndex < i_rHelpIds.getLength() )
+ i_pWindow->SetHelpId( rtl::OUStringToOString( i_rHelpIds.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8 ) );
}
-static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >& /*i_rHelpTexts*/, sal_Int32 /*i_nIndex*/ )
+static void setHelpText( Window* i_pWindow, const Sequence< rtl::OUString >& i_rHelpTexts, sal_Int32 i_nIndex )
{
// 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
if( i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength() )
i_pWindow->SetHelpText( i_rHelpTexts.getConstArray()[i_nIndex] );
- #endif
}
void updateMaxSize( const Size& i_rCheckSize, Size& o_rMaxSize )
@@ -1213,6 +1148,7 @@ void PrintDialog::setupOptionalUI()
Sequence< rtl::OUString > aChoices;
Sequence< sal_Bool > aChoicesDisabled;
Sequence< rtl::OUString > aHelpTexts;
+ Sequence< rtl::OUString > aHelpIds;
sal_Int64 nMinValue = 0, nMaxValue = 0;
sal_Int32 nCurHelpText = 0;
rtl::OUString aGroupingHint;
@@ -1287,6 +1223,18 @@ void PrintDialog::setupOptionalUI()
}
}
}
+ else if( rEntry.Name.equalsAscii( "HelpId" ) )
+ {
+ if( ! (rEntry.Value >>= aHelpIds ) )
+ {
+ rtl::OUString aHelpId;
+ if( (rEntry.Value >>= aHelpId) )
+ {
+ aHelpIds.realloc( 1 );
+ *aHelpIds.getArray() = aHelpId;
+ }
+ }
+ }
else if( rEntry.Name.equalsAscii( "HintNoLayoutPage" ) )
{
sal_Bool bNoLayoutPage = sal_False;
@@ -1359,7 +1307,7 @@ void PrintDialog::setupOptionalUI()
maTabCtrl.SetTabPage( nOptPageId, pNewGroup );
// set help id
- setSmartId( pNewGroup, "TabPage", nOptPageId );
+ setHelpId( pNewGroup, aHelpIds, 0 );
// set help text
setHelpText( pNewGroup, aHelpTexts, 0 );
@@ -1390,7 +1338,7 @@ void PrintDialog::setupOptionalUI()
pNewSub->Show();
// set help id
- setSmartId( pNewSub, "FixedLine", sal_Int32( nCurSubGroup++ ) );
+ setHelpId( pNewSub, aHelpIds, 0 );
// set help text
setHelpText( pNewSub, aHelpTexts, 0 );
// add group to current column
@@ -1470,7 +1418,7 @@ void PrintDialog::setupOptionalUI()
maControlToPropertyMap[pNewBox] = aPropertyName;
// set help id
- setSmartId( pNewBox, "CheckBox", -1, aPropertyName );
+ setHelpId( pNewBox, aHelpIds, 0 );
// set help text
setHelpText( pNewBox, aHelpTexts, 0 );
@@ -1493,9 +1441,10 @@ void PrintDialog::setupOptionalUI()
pHeading->Show();
// set help id
- setSmartId( pHeading, "FixedText", -1, aPropertyName );
+ setHelpId( pHeading, aHelpIds, nCurHelpText );
// set help text
- setHelpText( pHeading, aHelpTexts, nCurHelpText++ );
+ setHelpText( pHeading, aHelpTexts, nCurHelpText );
+ nCurHelpText++;
// add fixed text to current column
pCurColumn->addWindow( pHeading );
// add an indent to the current column
@@ -1531,9 +1480,10 @@ void PrintDialog::setupOptionalUI()
maControlToNumValMap[pBtn] = m;
// set help id
- setSmartId( pBtn, "RadioButton", m, aPropertyName );
+ setHelpId( pBtn, aHelpIds, nCurHelpText );
// set help text
- setHelpText( pBtn, aHelpTexts, nCurHelpText++ );
+ setHelpText( pBtn, aHelpTexts, nCurHelpText );
+ nCurHelpText++;
// add the radio button to the column
pLabel->setLabel( pBtn );
}
@@ -1557,9 +1507,6 @@ void PrintDialog::setupOptionalUI()
pHeading->SetText( aText );
pHeading->Show();
- // set help id
- setSmartId( pHeading, "FixedText", -1, aPropertyName );
-
// add to row
pLabel = new vcl::LabeledElement( pFieldColumn.get(), 2 );
pFieldColumn->addChild( pLabel );
@@ -1586,7 +1533,7 @@ void PrintDialog::setupOptionalUI()
pList->Show();
// set help id
- setSmartId( pList, "ListBox", -1, aPropertyName );
+ setHelpId( pList, aHelpIds, 0 );
// set help text
setHelpText( pList, aHelpTexts, 0 );
@@ -1619,7 +1566,7 @@ void PrintDialog::setupOptionalUI()
pField->Show();
// set help id
- setSmartId( pField, "NumericField", -1, aPropertyName );
+ setHelpId( pField, aHelpIds, 0 );
// set help text
setHelpText( pField, aHelpTexts, 0 );
@@ -1646,7 +1593,7 @@ void PrintDialog::setupOptionalUI()
pField->Show();
// set help id
- setSmartId( pField, "Edit", -1, aPropertyName );
+ setHelpId( pField, aHelpIds, 0 );
// set help text
setHelpText( pField, aHelpTexts, 0 );
@@ -1936,7 +1883,8 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache )
Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) );
maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr,
- aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY()
+ aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY(),
+ aPrt->GetPrinterOptions().IsConvertToGreyscales()
);
maForwardBtn.Enable( mnCurPage < nPages-1 );
@@ -2127,6 +2075,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
String aNewPrinter( pBox->GetSelectEntry() );
// set new printer
maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aNewPrinter ) ) );
+ maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() );
// update text fields
updatePrinterText();
}
@@ -2157,8 +2106,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
Help* pHelp = Application::GetHelp();
if( pHelp )
{
- // FIXME: find out proper help URL and use here
- pHelp->Start( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ), GetParent() );
+ pHelp->Start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:OK" ) ), &maOKButton );
}
}
else if( pButton == &maForwardBtn )
@@ -2172,7 +2120,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton )
else if( pButton == &maOptionsPage.maToFileBox )
{
maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+ maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() );
getLayout()->resize();
+ preparePreview( true, true );
}
else if( pButton == &maNUpPage.maBrochureBtn )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index fe2af486c53a..0762a07476e2 100755..100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -35,7 +35,6 @@
#include "vcl/salinst.hxx"
#include "vcl/salgtype.hxx"
#include "vcl/salgdi.hxx"
-#include "vcl/salctrlhandle.hxx"
#include "vcl/unohelp.hxx"
#include "tools/time.hxx"
@@ -44,7 +43,6 @@
#include "tools/rc.h"
#endif
#include "vcl/svdata.hxx"
-#include "vcl/windata.hxx"
#include "vcl/dbggui.hxx"
#include "vcl/outfont.hxx"
#include "vcl/outdev.h"
@@ -68,6 +66,7 @@
#include "unotools/fontcfg.hxx"
#include "vcl/sysdata.hxx"
#include "vcl/sallayout.hxx"
+#include "vcl/salctype.hxx"
#include "vcl/button.hxx" // Button::GetStandardText
#include "vcl/taskpanelist.hxx"
#include "com/sun/star/awt/XWindowPeer.hpp"
@@ -90,7 +89,6 @@
#include "vcl/unowrap.hxx"
#include "vcl/dndlcon.hxx"
#include "vcl/dndevdis.hxx"
-#include "vcl/impbmpconv.hxx"
#include "unotools/confignode.hxx"
#include "vcl/gdimtf.hxx"
@@ -270,19 +268,41 @@ bool Window::ImplCheckUIFont( const Font& rFont )
if( ImplGetSVData()->maGDIData.mbNativeFontConfig )
return true;
+ // create a text string using the localized text of important buttons
String aTestText;
- aTestText.Append( Button::GetStandardText( BUTTON_OK ) );
- aTestText.Append( Button::GetStandardText( BUTTON_CANCEL ) );
- aTestText.Append( Button::GetStandardText( BUTTON_YES ) );
- aTestText.Append( Button::GetStandardText( BUTTON_NO ) );
- aTestText.Append( Button::GetStandardText( BUTTON_RETRY ) );
- aTestText.Append( Button::GetStandardText( BUTTON_HELP ) );
- aTestText.Append( Button::GetStandardText( BUTTON_CLOSE ) );
- aTestText.Append( Button::GetStandardText( BUTTON_MORE ) );
- aTestText.Append( Button::GetStandardText( BUTTON_LESS ) );
- aTestText.Append( Button::GetStandardText( BUTTON_ABORT ) );
+ static const StandardButtonType aTestButtons[] =
+ {
+ BUTTON_OK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_ABORT,
+ BUTTON_YES, BUTTON_NO, BUTTON_MORE, BUTTON_IGNORE,
+ BUTTON_RETRY, BUTTON_HELP
+ };
- return HasGlyphs( rFont, aTestText ) >= aTestText.Len();
+ const int nTestButtonCount = sizeof(aTestButtons)/sizeof(*aTestButtons);
+ for( int n = 0; n < nTestButtonCount; ++n )
+ {
+ String aButtonStr = Button::GetStandardText( aTestButtons[n] );
+ // #i115432# ignore mnemonic+accelerator part of each string
+ // TODO: use a string filtering method when it becomes available
+ const int nLen = aButtonStr.Len();
+ bool bInside = false;
+ for( int i = 0; i < nLen; ++i ) {
+ const sal_Unicode c = aButtonStr.GetChar( i );
+ if( (c == '('))
+ bInside = true;
+ if( (c == ')'))
+ bInside = false;
+ if( (c == '~')
+ || (c == '(') || (c == ')')
+ || ((c >= 'A') && (c <= 'Z') && bInside) )
+ aButtonStr.SetChar( i, ' ' );
+ }
+ // append sanitized button text to test string
+ aTestText.Append( aButtonStr );
+ }
+
+ const int nFirstChar = HasGlyphs( rFont, aTestText );
+ const bool bUIFontOk = (nFirstChar >= aTestText.Len());
+ return bUIFontOk;
}
// -----------------------------------------------------------------------
@@ -9716,11 +9736,14 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi
// =========================================
if ( xFactory.is() )
{
- static Reference<lang::XMultiServiceFactory> xCanvasFactory(
- xFactory->createInstance(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star."
- "rendering.CanvasFactory") ) ), UNO_QUERY );
+ static ::vcl::DeleteUnoReferenceOnDeinit<XMultiServiceFactory> xStaticCanvasFactory(
+ Reference<XMultiServiceFactory>(
+ xFactory->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.rendering.CanvasFactory") ) ),
+ UNO_QUERY ));
+ uno::Reference<XMultiServiceFactory> xCanvasFactory(xStaticCanvasFactory.get());
+
if(xCanvasFactory.is())
{
#ifdef WNT
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index c964ad0d739b..2fce7e52f24c 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -42,7 +42,6 @@
#include <unotools/localedatawrapper.hxx>
#include <vcl/svdata.hxx>
#include <vcl/dbggui.hxx>
-#include <vcl/windata.hxx>
#include <vcl/timer.hxx>
#include <vcl/event.hxx>
#include <vcl/sound.hxx>