[Libreoffice-commits] .: toolkit/inc toolkit/source toolkit/workben unusedcode.easy
Jan Holesovsky
kendy at kemper.freedesktop.org
Wed Nov 2 06:30:24 PDT 2011
toolkit/inc/layout/layout-post.hxx | 23
toolkit/inc/layout/layout-pre.hxx | 29
toolkit/inc/layout/layout.hxx | 346 ---
toolkit/source/layout/vcl/wbutton.cxx | 447 ----
toolkit/source/layout/vcl/wcontainer.cxx | 135 -
toolkit/source/layout/vcl/wfield.cxx | 407 ---
toolkit/source/layout/vcl/wrapper.cxx | 405 ---
toolkit/workben/controls.cxx | 272 --
toolkit/workben/layout/.gitignore | 4
toolkit/workben/layout/README | 43
toolkit/workben/layout/TEST | 11
toolkit/workben/layout/adjust.xml | 44
toolkit/workben/layout/align-test.xml | 30
toolkit/workben/layout/align.xml | 44
toolkit/workben/layout/boxtest.xml | 36
toolkit/workben/layout/dialogbuttons-ok.xml | 49
toolkit/workben/layout/dialogbuttons-reset.xml | 54
toolkit/workben/layout/dialogbuttons-save.xml | 49
toolkit/workben/layout/dialogbuttons-yes.xml | 49
toolkit/workben/layout/editor-normal.xml | 53
toolkit/workben/layout/editor.cxx | 1856 -----------------
toolkit/workben/layout/editor.hxx | 51
toolkit/workben/layout/editor.xml | 52
toolkit/workben/layout/empty.xml | 26
toolkit/workben/layout/flow-container.xml | 48
toolkit/workben/layout/flow.xml | 17
toolkit/workben/layout/insert-sheet.xml | 57
toolkit/workben/layout/interactable-containers.xml | 49
toolkit/workben/layout/layout-flat.xml | 14
toolkit/workben/layout/layout.xml | 15
toolkit/workben/layout/message-box.xml | 41
toolkit/workben/layout/more.xml | 19
toolkit/workben/layout/move-copy-sheet.xml | 21
toolkit/workben/layout/non-interactable-containers.xml | 41
toolkit/workben/layout/number-format.xml | 65
toolkit/workben/layout/numeric.xml | 10
toolkit/workben/layout/ooo-patch | 7
toolkit/workben/layout/paragraph.xml | 77
toolkit/workben/layout/plugin.cxx | 68
toolkit/workben/layout/plugin.hxx | 59
toolkit/workben/layout/plugin.xml | 29
toolkit/workben/layout/radio-groups.xml | 21
toolkit/workben/layout/recover.cxx | 113 -
toolkit/workben/layout/recover.hxx | 81
toolkit/workben/layout/recover.xml | 67
toolkit/workben/layout/refresh | 7
toolkit/workben/layout/run-s2x | 6
toolkit/workben/layout/scroller.xml | 32
toolkit/workben/layout/sequence.xml | 13
toolkit/workben/layout/shutdown.xml | 54
toolkit/workben/layout/simple-paragraph.cxx | 183 -
toolkit/workben/layout/simple-paragraph.hxx | 55
toolkit/workben/layout/simple-paragraph.xml | 11
toolkit/workben/layout/sort-options.xml | 40
toolkit/workben/layout/sortdlg.cxx | 72
toolkit/workben/layout/sortdlg.hrc | 71
toolkit/workben/layout/sortdlg.hxx | 76
toolkit/workben/layout/sortdlg.src | 331 ---
toolkit/workben/layout/sortdlg.xml | 65
toolkit/workben/layout/splitter.xml | 13
toolkit/workben/layout/string-input.xml | 16
toolkit/workben/layout/tab-dialog.xml | 20
toolkit/workben/layout/tabcontrol.xml | 18
toolkit/workben/layout/table.xml | 15
toolkit/workben/layout/test.cxx | 369 ---
toolkit/workben/layout/test.xml | 12
toolkit/workben/layout/testrc.in | 8
toolkit/workben/layout/tpsort.cxx | 1107 ----------
toolkit/workben/layout/tpsort.hxx | 219 --
toolkit/workben/layout/un-test.sh | 14
toolkit/workben/layout/uno.hxx | 109
toolkit/workben/layout/wordcount-plain.xml | 37
toolkit/workben/layout/wordcount-tight.xml | 43
toolkit/workben/layout/wordcount.xml | 59
toolkit/workben/layout/wordcountdialog.cxx | 111 -
toolkit/workben/layout/wordcountdialog.hxx | 70
toolkit/workben/layout/zoom-1.xml | 38
toolkit/workben/layout/zoom-2.xml | 39
toolkit/workben/layout/zoom-indent.xml | 41
toolkit/workben/layout/zoom-plain.xml | 20
toolkit/workben/layout/zoom.cxx | 614 -----
toolkit/workben/layout/zoom.hrc | 53
toolkit/workben/layout/zoom.hxx | 121 -
toolkit/workben/layout/zoom.xml | 60
toolkit/workben/layout/zoom_def.hxx | 38
toolkit/workben/no_localization | 1
toolkit/workben/unodialog.cxx | 270 --
unusedcode.easy | 217 -
88 files changed, 60 insertions(+), 10142 deletions(-)
New commits:
commit 8c4b9f7c6bdecca8ec405272a23c7ca35ca0617e
Author: Felix Zhang <fezhang at suse.com>
Date: Wed Nov 2 18:47:32 2011 +0800
remove unused methods in layout
diff --git a/toolkit/inc/layout/layout-post.hxx b/toolkit/inc/layout/layout-post.hxx
index 46d4c38..da9a052 100644
--- a/toolkit/inc/layout/layout-post.hxx
+++ b/toolkit/inc/layout/layout-post.hxx
@@ -35,45 +35,24 @@
#undef _LAYOUT_PRE_HXX
-#undef AdvancedButton
-#undef ApplyButton
#undef Box
#undef Button
#undef CancelButton
-#undef CheckBox
-#undef ComboBox
#undef Container
#undef Control
#undef Dialog
#undef Edit
-#undef ErrorBox
#undef FixedImage
-#undef FixedInfo
-#undef FixedLine
#undef FixedText
-#undef HBox
#undef HelpButton
#undef IgnoreButton
-#undef ImageButton
-#undef InfoBox
#undef ListBox
#undef MessBox
#undef MessageBox
-#undef MetricField
#undef MetricFormatter
-#undef MoreButton
-#undef MultiLineEdit
-#undef MultiListBox
#undef NoButton
-#undef NumericField
#undef NumericFormatter
-#undef OKButton
-#undef Plugin
-#undef ProgressBar
#undef PushButton
-#undef QueryBox
-#undef RadioButton
-#undef ResetButton
#undef RetryButton
#undef SfxTabDialog
#undef SfxTabPage
@@ -84,8 +63,6 @@
#undef TabControl
#undef TabPage
#undef Table
-#undef VBox
-#undef WarningBox
#undef YesButton
#undef SvxFontListBox
diff --git a/toolkit/inc/layout/layout-pre.hxx b/toolkit/inc/layout/layout-pre.hxx
index 4205a44..9f6b59e 100644
--- a/toolkit/inc/layout/layout-pre.hxx
+++ b/toolkit/inc/layout/layout-pre.hxx
@@ -34,57 +34,32 @@
///* Allow re-inclusion for next hxx file. */
#undef _LAYOUT_POST_HXX
-#define AdvancedButton layout::AdvancedButton
-#define ApplyButton layout::ApplyButton
#define Box layout::Box
#define Button layout::Button
#define CancelButton layout::CancelButton
-#define CheckBox layout::CheckBox
-#define ComboBox layout::ComboBox
#define Container layout::Container
#define Control layout::Control
#define Dialog layout::Dialog
#define Edit layout::Edit
-#define ErrorBox layout::ErrorBox
#define FixedImage layout::FixedImage
-#define FixedInfo layout::FixedInfo
-#define FixedLine layout::FixedLine
#define FixedText layout::FixedText
-#define HBox layout::HBox
#define HelpButton layout::HelpButton
#define IgnoreButton layout::IgnoreButton
-#define ImageButton layout::ImageButton
-#define InfoBox layout::InfoBox
-#define LocalizedString layout::LocalizedString
#define ListBox layout::ListBox
#define MessBox layout::MessBox
#define MessageBox layout::MessageBox
-#define MetricField layout::MetricField
#define MetricFormatter layout::MetricFormatter
-#define MoreButton layout::MoreButton
-#define MultiLineEdit layout::MultiLineEdit
-#define MultiListBox layout::MultiListBox
#define NoButton layout::NoButton
-#define NumericField layout::NumericField
#define NumericFormatter layout::NumericFormatter
-#define OKButton layout::OKButton
-#define Plugin layout::Plugin
-#define ProgressBar layout::ProgressBar
#define PushButton layout::PushButton
-#define QueryBox layout::QueryBox
-#define RadioButton layout::RadioButton
-#define ResetButton layout::ResetButton
#define RetryButton layout::RetryButton
#define SfxTabDialog layout::SfxTabDialog
#define SfxTabPage layout::SfxTabPage
#define SvxFontListBox layout::SvxFontListBox
#define SvxLanguageBox layout::SvxLanguageBox
-#define SpinField layout::SpinField
#define TabControl layout::TabControl
#define TabPage layout::TabPage
#define Table layout::Table
-#define VBox layout::VBox
-#define WarningBox layout::WarningBox
#define YesButton layout::YesButton
#define ModalDialog Dialog
@@ -97,12 +72,10 @@
#define Window ::Window
-#else
+#endif /* ENABLE_LAYOUT */
#define LocalizedString String
-#endif /* ENABLE_LAYOUT */
-
#endif /* _LAYOUT_PRE_HXX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
index de53a46..e2f8d76 100644
--- a/toolkit/inc/layout/layout.hxx
+++ b/toolkit/inc/layout/layout.hxx
@@ -38,13 +38,11 @@
#include <tools/link.hxx>
#include <tools/string.hxx>
#include <vcl/bitmap.hxx>
-#include <vcl/combobox.h>
#include <tools/fldunit.hxx>
#include <vcl/lstbox.h>
#include <tools/wintypes.hxx>
class Button;
-class ComboBox;
class Color;
class Control;
class Dialog;
@@ -53,16 +51,12 @@ class Font;
class Image;
class ListBox;
class MapMode;
-class MultiListBox;
-class NotifyEvent;
class Pointer;
class PushButton;
-class RadioButton;
class ResId;
struct SfxChildWinInfo;
class TabControl;
class TabPage;
-class VCLXRadioButton;
class VCLXWindow;
class Window;
@@ -89,8 +83,6 @@ public:
Context( char const* pPath );
virtual ~Context();
PeerHandle GetPeerHandle( char const* id, sal_uInt32 nId = 0 ) const;
- void setToplevel( PeerHandle xToplevel );
- PeerHandle getToplevel();
PeerHandle getRoot();
};
@@ -195,28 +187,16 @@ class TOOLKIT_DLLPUBLIC Control : public Window
public:
~Control ();
void SetGetFocusHdl (Link const& link);
- Link& GetGetFocusHdl ();
void SetLoseFocusHdl (Link const& link);
- Link& GetLoseFocusHdl ();
-};
-
-class FixedLineImpl;
-class TOOLKIT_DLLPUBLIC FixedLine : public Control
-{
- DECL_GET_IMPL( FixedLine );
- DECL_CONSTRUCTORS( FixedLine, Control, WB_HORZ );
-
-public:
- bool IsEnabled() const;
};
class FixedTextImpl;
class TOOLKIT_DLLPUBLIC FixedText : public Control
{
DECL_GET_IMPL( FixedText );
- DECL_CONSTRUCTORS( FixedText, Control, 0 );
public:
+ FixedText( Context *context, char const* id, sal_uInt32 nId = 0 );
~FixedText ();
void SetText( rtl::OUString const& rStr );
};
@@ -225,16 +205,9 @@ class FixedImageImpl;
class TOOLKIT_DLLPUBLIC FixedImage : public Control
{
DECL_GET_IMPL( FixedImage );
- DECL_CONSTRUCTORS( FixedImage, Control, 0 );
-public:
- void setImage( ::Image const& );
-};
-class FixedInfoImpl;
-class TOOLKIT_DLLPUBLIC FixedInfo : public FixedText
-{
- DECL_GET_IMPL( FixedInfo );
- DECL_CONSTRUCTORS( FixedInfo, FixedText, 0 );
+public:
+ FixedImage( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class ImageImpl;
@@ -242,8 +215,6 @@ class TOOLKIT_DLLPUBLIC Image
{
ImageImpl *pImpl;
public:
- Image( char const* pName );
- ~Image();
ImageImpl &getImpl() const { return *pImpl; }
};
@@ -258,133 +229,55 @@ public:
~Button ();
static String GetStandardText (sal_uInt16 button_type);
void SetText( rtl::OUString const& rStr );
- bool SetModeImage (Image const& image);
- bool SetModeImage (::Image const& image);
- void SetImageAlign( ImageAlign eAlign );
- void SetClickHdl( Link const& rLink );
virtual void Click() /* pure virtual? */;
- Link& GetClickHdl ();
};
class PushButtonImpl;
class TOOLKIT_DLLPUBLIC PushButton : public Button
{
DECL_GET_IMPL( PushButton );
- DECL_CONSTRUCTORS( PushButton, Button, 0 );
DECL_GET_WINDOW (PushButton);
+protected:
+ explicit PushButton( WindowImpl *pImpl ) : Button( pImpl ) {}
+
public:
~PushButton ();
void Check( bool bCheck=true );
- bool IsChecked() const;
- void Toggle();
void SetToggleHdl( Link const& rLink );
};
-class TOOLKIT_DLLPUBLIC OKButton : public PushButton
-{
- DECL_CONSTRUCTORS( OKButton, PushButton, WB_DEFBUTTON );
-};
class TOOLKIT_DLLPUBLIC CancelButton : public PushButton
{
- DECL_CONSTRUCTORS( CancelButton, PushButton, 0 );
+public:
+ CancelButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class TOOLKIT_DLLPUBLIC YesButton : public PushButton
{
- DECL_CONSTRUCTORS( YesButton, PushButton, WB_DEFBUTTON );
+public:
+ YesButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class TOOLKIT_DLLPUBLIC NoButton : public PushButton
{
- DECL_CONSTRUCTORS( NoButton, PushButton, 0 );
+public:
+ NoButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class TOOLKIT_DLLPUBLIC RetryButton : public PushButton
{
- DECL_CONSTRUCTORS( RetryButton, PushButton, 0 );
+public:
+ RetryButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class TOOLKIT_DLLPUBLIC IgnoreButton : public PushButton
{
- DECL_CONSTRUCTORS( IgnoreButton, PushButton, 0 );
-};
-class TOOLKIT_DLLPUBLIC ResetButton : public PushButton
-{
- DECL_CONSTRUCTORS( ResetButton, PushButton, 0 );
-};
-class TOOLKIT_DLLPUBLIC ApplyButton : public PushButton
-{
- DECL_CONSTRUCTORS( ApplyButton, PushButton, 0 );
-};
-class TOOLKIT_DLLPUBLIC HelpButton : public PushButton
-{
- DECL_CONSTRUCTORS( HelpButton, PushButton, 0 );
-};
-class TOOLKIT_DLLPUBLIC ImageButton : public PushButton
-{
- DECL_CONSTRUCTORS( ImageButton, PushButton, 0 );
-};
-
-class AdvancedButtonImpl;
-class TOOLKIT_DLLPUBLIC AdvancedButton : public PushButton
-{
- DECL_CONSTRUCTORS( AdvancedButton, PushButton, 0 );
- DECL_GET_IMPL( AdvancedButton );
-
- void AddAdvanced( Window* w );
- void AddSimple( Window* w );
- void RemoveAdvanced( Window* w );
- void RemoveSimple( Window* w );
-
- void SetAdvancedText (rtl::OUString const& text);
- void SetSimpleText (rtl::OUString const& text);
- rtl::OUString GetAdvancedText () const;
- rtl::OUString GetSimpleText () const;
- void SetDelta (int);
-};
-
-class MoreButtonImpl;
-class TOOLKIT_DLLPUBLIC MoreButton : public AdvancedButton
-{
- DECL_CONSTRUCTORS( MoreButton, AdvancedButton, 0 );
- DECL_GET_IMPL( MoreButton );
- void AddWindow( Window* w );
- void RemoveWindow( Window* w );
-
- void SetMoreText (rtl::OUString const& text);
- void SetLessText (rtl::OUString const& text);
- rtl::OUString GetMoreText () const;
- rtl::OUString GetLessText () const;
-};
-
-class RadioButtonImpl;
-class TOOLKIT_DLLPUBLIC RadioButton : public Button
-{
- DECL_GET_IMPL( RadioButton );
- DECL_CONSTRUCTORS( RadioButton, Button, 0 );
- DECL_GET_WINDOW( RadioButton );
- DECL_GET_VCLXWINDOW( RadioButton );
public:
- ~RadioButton ();
- void Check( bool bCheck=true );
- bool IsChecked() const;
-
- void Toggle();
- void SetToggleHdl( Link const& rLink );
+ IgnoreButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
-
-class CheckBoxImpl;
-class TOOLKIT_DLLPUBLIC CheckBox : public Button
+class TOOLKIT_DLLPUBLIC HelpButton : public PushButton
{
- DECL_GET_IMPL( CheckBox );
- DECL_CONSTRUCTORS( CheckBox, Button, 0 );
-
public:
- ~CheckBox ();
- void Check( bool bCheck=true );
- bool IsChecked() const;
-
- void Toggle();
- void SetToggleHdl( Link const& rLink );
+ HelpButton( Context *context, char const* id, sal_uInt32 nId = 0 );
};
class EditImpl;
@@ -396,24 +289,7 @@ class TOOLKIT_DLLPUBLIC Edit : public Control
public:
~Edit ();
- void SetText( rtl::OUString const& rStr );
- String GetText() const;
void SetModifyHdl( Link const& rLink );
- void SetSelection( Selection const& rSelection );
-};
-
-class MultiLineEditImpl;
-class TOOLKIT_DLLPUBLIC MultiLineEdit : public Edit
-{
- DECL_GET_IMPL( MultiLineEdit );
- DECL_CONSTRUCTORS( MultiLineEdit, Edit, WB_LEFT|WB_BORDER );
-};
-
-class SpinFieldImpl;
-class TOOLKIT_DLLPUBLIC SpinField : public Edit
-{
- DECL_GET_IMPL( SpinField );
- DECL_CONSTRUCTORS( SpinField, Edit, 0 );
};
class FormatterBaseImpl;
@@ -430,24 +306,6 @@ class TOOLKIT_DLLPUBLIC NumericFormatter : public FormatterBase
protected:
explicit NumericFormatter( FormatterBaseImpl *pImpl );
NumericFormatterImpl &getFormatImpl() const;
-public:
- void SetMin( sal_Int64 nNewMin );
- void SetMax( sal_Int64 nNewMax );
- void SetFirst( sal_Int64 nNewFirst );
- void SetLast( sal_Int64 nNewLast );
- void SetSpinSize( sal_Int64 nNewSize );
-
- void SetValue( sal_Int64 nNewValue );
- sal_Int64 GetValue() const;
-};
-
-class NumericFieldImpl;
-class TOOLKIT_DLLPUBLIC NumericField : public SpinField, public NumericFormatter
-{
- DECL_GET_IMPL( NumericField );
-public:
- NumericField( Context *context, char const* id, sal_uInt32 nId=0 );
- NumericField( Window *parent, WinBits nStyle );
};
class MetricFormatterImpl;
@@ -457,47 +315,6 @@ class TOOLKIT_DLLPUBLIC MetricFormatter : public FormatterBase
protected:
explicit MetricFormatter( FormatterBaseImpl *pImpl );
MetricFormatterImpl &getFormatImpl() const;
-public:
- void SetMin( sal_Int64 nNewMin, FieldUnit nUnit=FUNIT_NONE );
- void SetMax( sal_Int64 nNewMax, FieldUnit nUnit=FUNIT_NONE );
- void SetFirst( sal_Int64 nNewFirst, FieldUnit nUnit=FUNIT_NONE );
- void SetLast( sal_Int64 nNewLast, FieldUnit nUnit=FUNIT_NONE );
- void SetValue( sal_Int64 nNewValue, FieldUnit nUnit=FUNIT_NONE );
- sal_Int64 GetValue( FieldUnit nUnit=FUNIT_NONE ) const;
-
- void SetSpinSize( sal_Int64 nNewSize );
-};
-
-class MetricFieldImpl;
-class TOOLKIT_DLLPUBLIC MetricField : public SpinField, public MetricFormatter
-{
- DECL_GET_IMPL( MetricField );
-public:
- MetricField( Context *context, char const* id, sal_uInt32 nId=0 );
- MetricField( Window *parent, WinBits nStyle );
-};
-
-class ComboBoxImpl;
-class TOOLKIT_DLLPUBLIC ComboBox : public Edit
-{
- DECL_GET_IMPL( ComboBox );
- DECL_GET_WINDOW (ComboBox );
- DECL_CONSTRUCTORS( ComboBox, Edit, 0 );
-
-public:
- ~ComboBox ();
- sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=COMBOBOX_APPEND );
- void RemoveEntry( String const& rStr );
- void RemoveEntry( sal_uInt16 nPos );
- void Clear();
-
- sal_uInt16 GetEntryPos( String const& rStr ) const;
- String GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
-
- void SetClickHdl( Link const& rLink );
- void SetSelectHdl( Link const& rLink );
- void EnableAutocomplete (bool enable, bool matchCase=false );
};
class ListBoxImpl;
@@ -509,46 +326,17 @@ class TOOLKIT_DLLPUBLIC ListBox : public Control
public:
~ListBox ();
- sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=LISTBOX_APPEND );
-
- void RemoveEntry( String const& rStr );
- void RemoveEntry( sal_uInt16 nPos );
- void Clear();
sal_uInt16 GetEntryPos( String const& rStr ) const;
String GetEntry( sal_uInt16 nPos ) const;
- sal_uInt16 GetEntryCount() const;
- void SelectEntry( String const& rStr, bool bSelect=true );
void SelectEntryPos( sal_uInt16 nPos, bool bSelect=true );
- sal_uInt16 GetSelectEntryCount() const;
- String GetSelectEntry( sal_uInt16 nSelIndex=0 ) const;
sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex=0 ) const;
- void SetSelectHdl (Link const& link);
- Link& GetSelectHdl ();
-
- void SetClickHdl (Link const& link);
- Link& GetClickHdl ();
-
- void SetDoubleClickHdl (Link const& link);
- Link& GetDoubleClickHdl ();
-
- void SetEntryData (sal_uInt16 pos, void* data);
- void* GetEntryData (sal_uInt16 pos) const;
-
virtual void SetNoSelection ();
};
-class MultiListBoxImpl;
-class TOOLKIT_DLLPUBLIC MultiListBox : public ListBox
-{
- DECL_GET_IMPL( MultiListBox );
- DECL_CONSTRUCTORS( MultiListBox, ListBox, 0 );
- DECL_GET_WINDOW( MultiListBox );
-};
-
class DialogImpl;
class TOOLKIT_DLLPUBLIC Dialog : public Context, public Window
{
@@ -556,19 +344,14 @@ class TOOLKIT_DLLPUBLIC Dialog : public Context, public Window
public:
DECL_GET_IMPL (Dialog);
- Dialog( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
Dialog( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
~Dialog ();
virtual short Execute();
void EndDialog( long nResult=0 );
- void SetText( rtl::OUString const& rStr );
void SetTitle (rtl::OUString const& rStr );
- bool Close ();
- long Notify (NotifyEvent & event);
// Sxf*Dialog
bool bConstruct;
- void Initialize (SfxChildWinInfo*);
};
#define DECL_MESSAGE_BOX_CTORS(Name)\
@@ -624,8 +407,6 @@ protected:
typedef MessageBox MessBox;
CLASS_MESSAGE_BOX (Error);
CLASS_MESSAGE_BOX (Info);
-CLASS_MESSAGE_BOX (Query);
-CLASS_MESSAGE_BOX (Warning);
#undef CLASS_MESSAGE_BOX
@@ -639,27 +420,13 @@ class TOOLKIT_DLLPUBLIC TabControl : public Control
//#endif /* !TAB_APPEND */
DECL_GET_IMPL (TabControl);
- DECL_CONSTRUCTORS (TabControl, Control, 0);
DECL_GET_WINDOW (TabControl);
- DECL_GET_LAYOUT_VCLXWINDOW (TabControl);
public:
~TabControl ();
- void InsertPage (sal_uInt16 id, rtl::OUString const& title, sal_uInt16 pos=TAB_APPEND);
- void RemovePage (sal_uInt16 id);
- sal_uInt16 GetPageCount () const;
- sal_uInt16 GetPageId (sal_uInt16 pos) const;
- sal_uInt16 GetPagePos (sal_uInt16 id) const;
void SetCurPageId (sal_uInt16 id);
- sal_uInt16 GetCurPageId () const;
- void SetTabPage (sal_uInt16 id, ::TabPage* page);
- ::TabPage* GetTabPage (sal_uInt16 id) const;
void SetActivatePageHdl (Link const& link);
- Link& GetActivatePageHdl () const;
void SetDeactivatePageHdl (Link const& link);
- Link& GetDeactivatePageHdl () const;
- void SetTabPageSizePixel (Size const& size);
- Size GetTabPageSizePixel () const;
};
class TabPageImpl;
@@ -670,27 +437,12 @@ public:
static ::Window* global_parent;
static TabControl* global_tabcontrol;
- TabPage( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
- TabPage( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
~TabPage();
DECL_GET_WINDOW( TabPage );
virtual void ActivatePage();
virtual void DeactivatePage();
};
-class ProgressBarImpl;
-class TOOLKIT_DLLPUBLIC ProgressBar : public Control
-{
- DECL_GET_IMPL( ProgressBar );
- DECL_CONSTRUCTORS( ProgressBar, Control, WB_BORDER );
-public:
- void SetForegroundColor( css::util::Color color );
- void SetBackgroundColor( css::util::Color color );
- void SetValue( sal_Int32 i );
- void SetRange( sal_Int32 min, sal_Int32 max );
- sal_Int32 GetValue();
-};
-
// -----------------------------------------------------------------
// layout container / helper wrappers
// -----------------------------------------------------------------
@@ -703,18 +455,10 @@ protected:
public:
Container( Context const* context, char const* id );
- void Add( Window *pWindow );
- void Add( Container *pContainer );
-
- void Remove( Window *pWindow );
- void Remove( Container *pContainer );
- void Clear();
// we can't really do a GetChildren() as they don't have a common class,
// besides we would need to keep track of children, uh
void ShowAll( bool bVisible );
- void Show();
- void Hide();
css::uno::Reference< css::awt::XLayoutContainer > getImpl()
{ return mxContainer; }
@@ -722,16 +466,6 @@ public:
class TOOLKIT_DLLPUBLIC Table : public Container
{
-protected:
- Table( sal_Int32 nBorder, sal_Int32 nColumns );
-public:
- Table( Context const* context, char const* id );
- void Add( Window *pWindow, bool bXExpand, bool bYExpand,
- sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 );
- void Add( Container *pContainer, bool bXExpand, bool bYExpand,
- sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 );
-
-private:
void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild,
bool bXExpand, bool bYExpand, sal_Int32 nXSpan, sal_Int32 nYSpan );
};
@@ -742,64 +476,18 @@ protected:
Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous );
public:
Box( Context const* context, char const* id );
- void Add( Window *pWindow, bool bExpand, bool bFill, sal_Int32 nPadding);
- void Add( Container *pContainer, bool bExpand, bool bFill, sal_Int32 nPadding);
private:
void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild,
bool bXExpand, bool bYExpand, sal_Int32 nPadding );
};
-class TOOLKIT_DLLPUBLIC HBox : public Box
-{
-public:
- HBox( Context const* context, char const* id );
- HBox( sal_Int32 nBorder, bool bHomogeneous );
-};
-class TOOLKIT_DLLPUBLIC VBox : public Box
-{
-public:
- VBox( Context const* context, char const* id );
- VBox( sal_Int32 nBorder, bool bHomogeneous );
-};
-
-class PluginImpl;
-class TOOLKIT_DLLPUBLIC Plugin : public Control
-{
- DECL_GET_IMPL( Plugin );
-public:
- ::Control *mpPlugin;
- Plugin( Context *context, char const* id, ::Control *plugin );
-};
-
-class LocalizedStringImpl;
-class TOOLKIT_DLLPUBLIC LocalizedString : public Window
-{
- DECL_GET_IMPL( LocalizedString );
-
-public:
- LocalizedString( Context *context, char const* id );
-
- rtl::OUString operator= (rtl::OUString const&);
- rtl::OUString operator+= (sal_Unicode );
- rtl::OUString operator+= (rtl::OUString const&);
-
- operator rtl::OUString ();
- operator rtl::OUString const& ();
- operator String();
- String getString ();
- rtl::OUString getOUString ();
- String GetToken (sal_uInt16 i, sal_Char c);
-};
-
class InPlugImpl;
class TOOLKIT_DLLPUBLIC InPlug : public Context, public Window
{
DECL_GET_IMPL (InPlug);
public:
- InPlug ( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0);
- InPlug ( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0);
void ParentSet (Window *window);
};
diff --git a/toolkit/source/layout/vcl/wbutton.cxx b/toolkit/source/layout/vcl/wbutton.cxx
index 5c72b17..f3272dc 100644
--- a/toolkit/source/layout/vcl/wbutton.cxx
+++ b/toolkit/source/layout/vcl/wbutton.cxx
@@ -31,8 +31,6 @@
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XActionListener.hpp>
#include <com/sun/star/awt/XButton.hpp>
-#include <com/sun/star/awt/XCheckBox.hpp>
-#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <cppuhelper/implbase1.hxx>
#include <toolkit/awt/vclxwindow.hxx>
@@ -69,16 +67,6 @@ class ImageImpl
}
};
-Image::Image( const char *pName )
- : pImpl( new ImageImpl( pName ) )
-{
-}
-
-Image::~Image()
-{
- delete pImpl;
-}
-
class ButtonImpl : public ControlImpl
, public ::cppu::WeakImplHelper1< awt::XActionListener >
{
@@ -150,38 +138,11 @@ void Button::SetText( OUString const& rStr )
getImpl().mxButton->setLabel( rStr );
}
-void Button::SetClickHdl( const Link& link )
-{
- if (&getImpl () && getImpl().mxButton.is ())
- getImpl().SetClickHdl( link );
-}
-
-Link& Button::GetClickHdl ()
-{
- return getImpl().GetClickHdl ();
-}
-
-bool Button::SetModeImage (Image const& image)
-{
- return getImpl().SetModeImage (image.getImpl().mxGraphic);
-}
-
-bool Button::SetModeImage (::Image const& image)
-{
- return GetButton ()->SetModeImage (image);
-}
-
-void Button::SetImageAlign( ImageAlign eAlign )
-{
- getImpl().setProperty( "ImageAlign", uno::Any( (sal_Int16) eAlign ) );
-}
-
void Button::Click()
{
}
IMPL_GET_IMPL( Button );
-IMPL_CONSTRUCTORS( Button, Control, "button" );
IMPL_GET_WINDOW (Button);
class PushButtonImpl : public ButtonImpl
@@ -239,16 +200,6 @@ void PushButton::Check( bool bCheck )
getImpl().fireToggle();
}
-bool PushButton::IsChecked() const
-{
- return !!( getImpl().getProperty( "State" ).get< sal_Int16 >() );
-}
-
-void PushButton::Toggle()
-{
- Check( true );
-}
-
void PushButton::SetToggleHdl( const Link& link )
{
if (&getImpl () && getImpl().mxButton.is ())
@@ -256,173 +207,8 @@ void PushButton::SetToggleHdl( const Link& link )
}
IMPL_GET_IMPL( PushButton );
-IMPL_CONSTRUCTORS( PushButton, Button, "pushbutton" );
IMPL_GET_WINDOW (PushButton);
-class RadioButtonImpl : public ButtonImpl
- , public ::cppu::WeakImplHelper1< awt::XItemListener >
-{
- Link maToggleHdl;
-public:
- uno::Reference< awt::XRadioButton > mxRadioButton;
- RadioButtonImpl( Context *context, const PeerHandle &peer, Window *window )
- : ButtonImpl( context, peer, window )
- , mxRadioButton( peer, uno::UNO_QUERY )
- {
- }
-
- void Check( bool bCheck )
- {
- if ( !mxRadioButton.is() )
- return;
-
- // Have setState fire item event for
- // RadioGroups::RadioGroup::itemStateChanged ()
- ::RadioButton *r = static_cast<RadioButton*>(mpWindow)->GetRadioButton ();
- bool state = r->IsRadioCheckEnabled ();
- r->EnableRadioCheck();
- mxRadioButton->setState( !!bCheck );
- r->EnableRadioCheck (state);
- fireToggle();
- }
-
- bool IsChecked()
- {
- if ( !mxRadioButton.is() )
- return false;
- return mxRadioButton->getState();
- }
-
- void SetToggleHdl( const Link& link )
- {
- if (!link && !!maToggleHdl)
- mxRadioButton->removeItemListener( this );
- else if (!!link && !maToggleHdl)
- mxRadioButton->addItemListener( this );
- maToggleHdl = link;
- }
-
- inline void fireToggle()
- {
- maToggleHdl.Call( static_cast<Window *>( mpWindow ) );
- }
-
- virtual void SetClickHdl( const Link& link )
- {
- // Keep RadioGroups::RadioGroup's actionListener at HEAD
- // of list. This way, it can handle RadioGroup's button
- // states before all other callbacks and make sure the
- // client code has the right state.
-
- // IWBN to add an XRadioButton2 and layout::VCLXRadioButton
- // with {get,set}RadioGroup() (and a "radiogroup" property
- // even) and handle the grouping here in RadioButtonImpl.
- uno::Reference< uno::XInterface > x = static_cast<VCLXRadioButton*> (mpWindow->GetVCLXWindow ())->getFirstActionListener ();
- uno::Reference< awt::XActionListener > a = uno::Reference< awt::XActionListener> (x ,uno::UNO_QUERY );
- mxButton->removeActionListener (a);
- ButtonImpl::SetClickHdl (link);
- mxButton->addActionListener (a);
- }
-
- void SAL_CALL disposing( lang::EventObject const& e )
- throw (uno::RuntimeException)
- {
- ButtonImpl::disposing (e);
- }
-
- virtual void SAL_CALL itemStateChanged( const awt::ItemEvent& )
- throw (uno::RuntimeException)
- {
- maToggleHdl.Call( static_cast<Window *>( mpWindow ) );
- }
-};
-
-RadioButton::~RadioButton ()
-{
- SetToggleHdl (Link ());
-}
-
-void RadioButton::Check( bool bCheck )
-{
- getImpl().Check( bCheck );
-}
-
-bool RadioButton::IsChecked() const
-{
- return getImpl().IsChecked();
-}
-
-void RadioButton::SetToggleHdl( const Link& link )
-{
- if (&getImpl () && getImpl().mxRadioButton.is ())
- getImpl().SetToggleHdl( link );
-}
-
-IMPL_GET_IMPL( RadioButton );
-IMPL_GET_WINDOW( RadioButton );
-IMPL_GET_VCLXWINDOW( RadioButton );
-IMPL_CONSTRUCTORS( RadioButton, Button, "radiobutton" );
-
-class CheckBoxImpl : public ButtonImpl
- , public ::cppu::WeakImplHelper1< awt::XItemListener >
-{
- Link maToggleHdl;
- public:
- uno::Reference< awt::XCheckBox > mxCheckBox;
- CheckBoxImpl( Context *context, const PeerHandle &peer, Window *window )
- : ButtonImpl( context, peer, window )
- , mxCheckBox( peer, uno::UNO_QUERY )
- {
- }
-
- void SetToggleHdl( const Link& link )
- {
- if (!link && !!maToggleHdl)
- mxCheckBox->removeItemListener( this );
- else if (!!link && !maToggleHdl)
- mxCheckBox->addItemListener( this );
- maToggleHdl = link;
- }
- void SAL_CALL disposing( lang::EventObject const& e )
- throw (uno::RuntimeException)
- {
- ButtonImpl::disposing (e);
- }
- virtual void SAL_CALL itemStateChanged( const awt::ItemEvent& )
- throw (uno::RuntimeException)
- {
- maToggleHdl.Call( static_cast<Window *>( mpWindow ) );
- }
-};
-
-CheckBox::~CheckBox ()
-{
- SetToggleHdl (Link ());
-}
-
-void CheckBox::Check( bool bCheck )
-{
- if ( !getImpl().mxCheckBox.is() )
- return;
- getImpl().mxCheckBox->setState( !!bCheck );
-}
-
-bool CheckBox::IsChecked() const
-{
- if ( !getImpl().mxCheckBox.is() )
- return false;
- return getImpl().mxCheckBox->getState() != 0;
-}
-
-void CheckBox::SetToggleHdl( const Link& link )
-{
- if (&getImpl () && getImpl().mxCheckBox.is ())
- getImpl().SetToggleHdl( link );
-}
-
-IMPL_GET_IMPL( CheckBox );
-IMPL_CONSTRUCTORS( CheckBox, Button, "checkbox" );
-
#define BUTTON_IMPL(t, parent, response) \
class t##Impl : public parent##Impl \
{ \
@@ -447,232 +233,59 @@ IMPL_CONSTRUCTORS( CheckBox, Button, "checkbox" );
#define BUTTONID_RESET RET_RESET
#define BUTTONID_APPLY RET_APPLY
-BUTTON_IMPL( OKButton, PushButton, BUTTONID_OK );
BUTTON_IMPL( CancelButton, PushButton, BUTTONID_CANCEL );
BUTTON_IMPL( YesButton, PushButton, BUTTONID_YES );
BUTTON_IMPL( NoButton, PushButton, BUTTONID_NO );
BUTTON_IMPL( RetryButton, PushButton, BUTTONID_RETRY );
BUTTON_IMPL( IgnoreButton, PushButton, BUTTONID_IGNORE );
-BUTTON_IMPL( ResetButton, PushButton, BUTTONID_RESET );
-BUTTON_IMPL( ApplyButton, PushButton, BUTTONID_APPLY ); /* Deprecated? */
BUTTON_IMPL( HelpButton, PushButton, BUTTONID_HELP );
-IMPL_CONSTRUCTORS( OKButton, PushButton, "okbutton" );
-IMPL_CONSTRUCTORS( CancelButton, PushButton, "cancelbutton" );
-IMPL_CONSTRUCTORS( YesButton, PushButton, "yesbutton" );
-IMPL_CONSTRUCTORS( NoButton, PushButton, "nobutton" );
-IMPL_CONSTRUCTORS( RetryButton, PushButton, "retrybutton" );
-IMPL_CONSTRUCTORS( IgnoreButton, PushButton, "ignorebutton" );
-IMPL_CONSTRUCTORS( ResetButton, PushButton, "resetbutton" );
-IMPL_CONSTRUCTORS( ApplyButton, PushButton, "applybutton" ); /* Deprecated? */
-IMPL_CONSTRUCTORS( HelpButton, PushButton, "helpbutton" );
-
-IMPL_IMPL (ImageButton, PushButton)
-
-
-IMPL_CONSTRUCTORS( ImageButton, PushButton, "imagebutton" );
-
-class AdvancedButtonImpl : public PushButtonImpl
-{
-protected:
- bool bAdvancedMode;
- std::list< Window*> maAdvanced;
- std::list< Window*> maSimple;
-
-public:
- rtl::OUString mAdvancedLabel;
- rtl::OUString mSimpleLabel;
-
-protected:
- Window* Remove( std::list< Window*> lst, Window* w )
- {
- for ( std::list< Window*>::iterator it = maAdvanced.begin();
- it != maAdvanced.end(); ++it )
- if ( *it == w )
- {
- it = lst.erase( it );
- return *it;
- }
- return 0;
- }
-
-public:
- AdvancedButtonImpl( Context *context, PeerHandle const& peer, Window *window )
- : PushButtonImpl( context, peer, window )
- , bAdvancedMode( false )
- // TODO: i18n
- // Button::GetStandardText( BUTTON_ADVANCED );
- // Button::GetStandardText( BUTTON_SIMPLE );
- , mAdvancedLabel( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Advanced...")) )
- , mSimpleLabel( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Simple...")) )
- {
- }
- void Click()
- {
- bAdvancedMode = !bAdvancedMode;
- if ( bAdvancedMode )
- advancedMode();
- else
- simpleMode();
- }
- void setAlign ()
- {
- ::PushButton *b = static_cast<PushButton*> (mpWindow)->GetPushButton ();
- b->SetSymbolAlign (SYMBOLALIGN_RIGHT);
- b->SetSmallSymbol ();
- //mpWindow->SetStyle (mpWindow->GetStyle() | WB_CENTER);
- }
- void advancedMode()
- {
- ::PushButton *b = static_cast<PushButton*> (mpWindow)->GetPushButton ();
- b->SetSymbol (SYMBOL_PAGEUP);
- setAlign ();
- if (mSimpleLabel.getLength ())
- b->SetText (mSimpleLabel);
- for ( std::list< Window*>::iterator it = maAdvanced.begin();
- it != maAdvanced.end(); ++it )
- ( *it )->Show();
- for ( std::list< Window*>::iterator it = maSimple.begin();
- it != maSimple.end(); ++it )
- ( *it )->Hide();
-
- redraw ();
- }
- void simpleMode()
- {
- //mxButton->setLabel( mSimpleLabel );
- ::PushButton *b = static_cast<PushButton*> (mpWindow)->GetPushButton ();
- b->SetSymbol (SYMBOL_PAGEDOWN);
- if (mAdvancedLabel.getLength ())
- b->SetText (mAdvancedLabel);
- setAlign ();
- for ( std::list< Window*>::iterator it = maAdvanced.begin();
- it != maAdvanced.end(); ++it )
- ( *it )->Hide();
- for ( std::list< Window*>::iterator it = maSimple.begin();
- it != maSimple.end(); ++it )
- ( *it )->Show();
-
- redraw (true);
- }
- void AddAdvanced( Window* w )
- {
- maAdvanced.push_back( w );
- if ( !bAdvancedMode )
- w->Hide();
- }
- void AddSimple( Window* w )
- {
- maSimple.push_back( w );
- if ( bAdvancedMode )
- w->Hide();
- }
- void RemoveAdvanced( Window* w )
- {
- Remove( maAdvanced, w );
- }
- void RemoveSimple( Window* w )
- {
- Remove( maSimple, w );
- }
-};
-
-void AdvancedButton::AddAdvanced( Window* w )
-{
- getImpl().AddAdvanced( w );
-}
-
-void AdvancedButton::AddSimple( Window* w )
-{
- getImpl().AddSimple( w );
-}
-
-void AdvancedButton::RemoveAdvanced( Window* w )
-{
- getImpl().RemoveAdvanced( w );
-}
-
-void AdvancedButton::RemoveSimple( Window* w )
-{
- getImpl().RemoveSimple( w );
-}
-
-void AdvancedButton::SetAdvancedText (rtl::OUString const& text)
-{
- if (text.getLength ())
- getImpl ().mAdvancedLabel = text;
-}
-
-void AdvancedButton::SetSimpleText (rtl::OUString const& text)
-{
- if (text.getLength ())
- getImpl ().mSimpleLabel = text;
-}
-
-rtl::OUString AdvancedButton::GetAdvancedText () const
-{
- return getImpl ().mAdvancedLabel;
-}
-
-rtl::OUString AdvancedButton::GetSimpleText () const
-{
- return getImpl ().mSimpleLabel;
-}
-
-void AdvancedButton::SetDelta (int)
-{
-}
-
-IMPL_CONSTRUCTORS_BODY( AdvancedButton, PushButton, "advancedbutton", getImpl().simpleMode () );
-IMPL_GET_IMPL( AdvancedButton );
-
-
-class MoreButtonImpl : public AdvancedButtonImpl
-{
-public:
- MoreButtonImpl( Context *context, PeerHandle const& peer, Window *window )
- : AdvancedButtonImpl( context, peer, window)
- {
- mSimpleLabel = Button::GetStandardText( BUTTON_MORE );
- mAdvancedLabel = Button::GetStandardText( BUTTON_LESS );
- }
- void AddWindow( Window* w ) { AddAdvanced( w ); }
- void RemoveWindow( Window* w ) { RemoveAdvanced( w ); }
-};
-
-// TODO
-//BUTTON_IMPL( MoreButton, PushButton, 0 );
-IMPL_CONSTRUCTORS_BODY( MoreButton, AdvancedButton, "morebutton", getImpl().simpleMode () );
-IMPL_GET_IMPL( MoreButton );
-
-void MoreButton::AddWindow( Window* w )
+CancelButton::CancelButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new CancelButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- getImpl().AddWindow( w );
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
-void MoreButton::RemoveWindow( Window* w )
+YesButton::YesButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new YesButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- getImpl().RemoveWindow( w );
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
-void MoreButton::SetMoreText (rtl::OUString const& text)
+NoButton::NoButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new NoButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- SetAdvancedText (text);
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
-void MoreButton::SetLessText (rtl::OUString const& text)
+RetryButton::RetryButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new RetryButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- SetSimpleText (text);
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
-rtl::OUString MoreButton::GetMoreText () const
+IgnoreButton::IgnoreButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new IgnoreButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- return GetAdvancedText ();
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
-rtl::OUString MoreButton::GetLessText () const
+HelpButton::HelpButton ( Context *context, char const* pId, sal_uInt32 nId )
+ : PushButton( new HelpButtonImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
- return GetSimpleText ();
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
}
} // namespace layout
diff --git a/toolkit/source/layout/vcl/wcontainer.cxx b/toolkit/source/layout/vcl/wcontainer.cxx
index 699a1af..868915b 100644
--- a/toolkit/source/layout/vcl/wcontainer.cxx
+++ b/toolkit/source/layout/vcl/wcontainer.cxx
@@ -57,50 +57,6 @@ Container::Container( rtl::OUString const& rName, sal_Int32 nBorder )
uno::Any( nBorder ) );
}
-void Container::Add( Window *pChild )
-{
- if ( pChild )
- {
- uno::Reference< awt::XLayoutConstrains > xChild( pChild->GetPeer(), uno::UNO_QUERY );
- mxContainer->addChild( xChild );
- }
-}
-
-void Container::Add( Container *pChild )
-{
- if ( pChild )
- {
- uno::Reference< awt::XLayoutConstrains > xChild( pChild->getImpl(), uno::UNO_QUERY );
- mxContainer->addChild( xChild );
- }
-}
-
-void Container::Remove( Window *pChild )
-{
- if ( pChild )
- {
- uno::Reference< awt::XLayoutConstrains > xChild( pChild->GetPeer(), uno::UNO_QUERY );
- mxContainer->removeChild( xChild );
- }
-}
-
-void Container::Remove( Container *pChild )
-{
- if ( pChild )
- {
- uno::Reference< awt::XLayoutConstrains > xChild( pChild->getImpl(), uno::UNO_QUERY );
- mxContainer->removeChild( xChild );
- }
-}
-
-void Container::Clear()
-{
- css::uno::Sequence< css::uno::Reference < css::awt::XLayoutConstrains > > children;
- children = mxContainer->getChildren();
- for (int i = 0; i < children.getLength(); i++)
- mxContainer->removeChild( children[i] );
-}
-
void Container::ShowAll( bool bShow )
{
struct inner
@@ -131,47 +87,6 @@ void Container::ShowAll( bool bShow )
inner::setChildrenVisible( mxContainer, bShow );
}
-void Container::Show()
-{
- ShowAll( true );
-}
-
-void Container::Hide()
-{
- ShowAll( false );
-}
-
-Table::Table( sal_Int32 nBorder, sal_Int32 nColumns )
- : Container( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "table" ) ), nBorder )
-{
- uno::Reference< beans::XPropertySet > xProps( mxContainer, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" ) ),
- uno::Any( nColumns ) );
-}
-
-void Table::Add( Window *window, bool bXExpand, bool bYExpand,
- sal_Int32 nXSpan, sal_Int32 nYSpan )
-{
- if ( !window )
- return;
- WindowImpl &rImpl = window->getImpl();
- uno::Reference< awt::XLayoutConstrains > xChild( rImpl.mxWindow,
- uno::UNO_QUERY );
- mxContainer->addChild( xChild );
- setProps( xChild, bXExpand, bYExpand, nXSpan, nYSpan );
-}
-
-void Table::Add( Container *pContainer, bool bXExpand, bool bYExpand,
- sal_Int32 nXSpan, sal_Int32 nYSpan )
-{
- if ( !pContainer )
- return;
- uno::Reference< awt::XLayoutConstrains > xChild( pContainer->getImpl(),
- uno::UNO_QUERY );
- mxContainer->addChild( xChild );
- setProps( xChild, bXExpand, bYExpand, nXSpan, nYSpan );
-}
-
void Table::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
bool bXExpand, bool bYExpand, sal_Int32 nXSpan, sal_Int32 nYSpan )
{
@@ -195,29 +110,6 @@ Box::Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous )
uno::Any( bHomogeneous ) );
}
-void Box::Add( Window *window, bool bExpand, bool bFill, sal_Int32 nPadding)
-{
- if ( !window )
- return;
- WindowImpl &rImpl = window->getImpl();
- uno::Reference< awt::XLayoutConstrains > xChild( rImpl.mxWindow,
- uno::UNO_QUERY );
-
- mxContainer->addChild( xChild );
- setProps( xChild, bExpand, bFill, nPadding );
-}
-
-void Box::Add( Container *pContainer, bool bExpand, bool bFill, sal_Int32 nPadding)
-{
- if ( !pContainer )
- return;
-
- uno::Reference< awt::XLayoutConstrains > xChild( pContainer->getImpl(),
- uno::UNO_QUERY );
- mxContainer->addChild( xChild );
- setProps( xChild, bExpand, bFill, nPadding );
-}
-
void Box::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
bool bExpand, bool bFill, sal_Int32 nPadding )
{
@@ -232,38 +124,11 @@ void Box::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
uno::Any( nPadding ) );
}
-Table::Table( Context const* context, char const* pId )
- : Container( context, pId )
-{
-}
-
Box::Box( Context const* context, char const* pId )
: Container( context, pId )
{
}
-HBox::HBox( sal_Int32 nBorder, bool bHomogeneous )
- : Box( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "hbox" ) ),
- nBorder, bHomogeneous )
-{
-}
-
-HBox::HBox( Context const* context, char const* pId )
- : Box( context, pId )
-{
-}
-
-VBox::VBox( sal_Int32 nBorder, bool bHomogeneous )
- : Box( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vbox" ) ),
- nBorder, bHomogeneous )
-{
-}
-
-VBox::VBox( Context const* context, char const* pId )
- : Box( context, pId )
-{
-}
-
} // namespace layout
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/layout/vcl/wfield.cxx b/toolkit/source/layout/vcl/wfield.cxx
index ce8b59f..04b0757 100644
--- a/toolkit/source/layout/vcl/wfield.cxx
+++ b/toolkit/source/layout/vcl/wfield.cxx
@@ -33,7 +33,6 @@
#include <com/sun/star/awt/XNumericField.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
-#include <com/sun/star/awt/XComboBox.hpp>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/awt/XActionListener.hpp>
#include <com/sun/star/awt/XItemListener.hpp>
@@ -103,89 +102,15 @@ Edit::~Edit ()
SetModifyHdl (Link ());
}
-void Edit::SetSelection( Selection const& rSelection )
-{
-#if LAYOUT_API_CALLS_HANDLER
- if ( !getImpl().mxEdit.is() )
- getImpl().mxEdit->setSelection( awt::Selection( rSelection.Min(), rSelection.Max() ) );
-#else /* !LAYOUT_API_CALLS_HANDLER */
- GetEdit ()->SetSelection (rSelection);
-#endif /* !LAYOUT_API_CALLS_HANDLER */
-}
-
-void Edit::SetText( OUString const& rStr )
-{
-#if LAYOUT_API_CALLS_HANDLER
- if ( getImpl().mxEdit.is() )
- /// this calls handlers; endless loop in numfmt.cxx
- getImpl().mxEdit->setText( rStr );
-#else /* !LAYOUT_API_CALLS_HANDLER */
- GetEdit ()->SetText (rStr);
-#endif /* !LAYOUT_API_CALLS_HANDLER */
-}
-
-String Edit::GetText() const
-{
- if ( !getImpl().mxEdit.is() )
- return getImpl().mxEdit->getText();
- return OUString();
-}
-
void Edit::SetModifyHdl( const Link& link )
{
if (&getImpl () && getImpl().mxEdit.is ())
getImpl().SetModifyHdl( link );
}
-IMPL_CONSTRUCTORS( Edit, Control, "edit" );
IMPL_GET_IMPL( Edit );
IMPL_GET_WINDOW (Edit);
-class MultiLineEditImpl : public EditImpl
-{
-public:
- MultiLineEditImpl( Context *context, const PeerHandle &peer, Window *window )
- : EditImpl( context, peer, window )
- {
- }
-};
-
-IMPL_CONSTRUCTORS( MultiLineEdit, Edit, "multilineedit" );
-IMPL_GET_IMPL( MultiLineEdit );
-
-class SpinFieldImpl : public EditImpl
-{
- public:
- SpinFieldImpl( Context *context, const PeerHandle &peer, Window *window )
- : EditImpl( context, peer, window )
- {
- }
-};
-
-IMPL_CONSTRUCTORS( SpinField, Edit, "spinfield" );
-
-class NumericFieldImpl : public SpinFieldImpl
-{
- public:
- NumericFieldImpl( Context *context, const PeerHandle &peer, Window *window )
- : SpinFieldImpl( context, peer, window )
- {
- }
-};
-
-class MetricFieldImpl : public SpinFieldImpl
-{
- public:
- MetricFieldImpl( Context *context, const PeerHandle &peer, Window *window )
- : SpinFieldImpl( context, peer, window )
- {
- }
-};
-
-IMPL_GET_IMPL( SpinField );
-IMPL_GET_IMPL( NumericField );
-IMPL_GET_IMPL( MetricField );
-
class FormatterBaseImpl
{
protected:
@@ -252,32 +177,6 @@ NumericFormatterImpl& NumericFormatter::getFormatImpl() const
return *( static_cast<NumericFormatterImpl *>( mpFormatImpl ) );
}
-#define SET_IMPL(vclmethod, idlmethod) \
- void NumericFormatter::vclmethod( sal_Int64 nValue ) \
- { \
- if ( !getFormatImpl().mxField.is() ) \
- return; \
- getFormatImpl().mxField->idlmethod( getFormatImpl().valueToDouble( nValue ) ); \
- }
-
-SET_IMPL( SetMin, setMin )
-SET_IMPL( SetMax, setMax )
-SET_IMPL( SetLast, setLast )
-SET_IMPL( SetFirst, setFirst )
-SET_IMPL( SetValue, setValue )
-SET_IMPL( SetSpinSize, setSpinSize )
-
-sal_Int64 NumericFormatter::GetValue() const
-{
- if ( !getFormatImpl().mxField.is() )
- return 0;
- return getFormatImpl().doubleToValue( getFormatImpl().mxField->getValue() );
-}
-
-#undef SET_IMPL
-
-IMPL_CONSTRUCTORS_2( NumericField, SpinField, NumericFormatter, "numericfield" );
-
MetricFormatter::MetricFormatter( FormatterBaseImpl *pImpl )
: FormatterBase( pImpl )
{
@@ -285,225 +184,6 @@ MetricFormatter::MetricFormatter( FormatterBaseImpl *pImpl )
MetricFormatterImpl& MetricFormatter::getFormatImpl() const
{ return *( static_cast<MetricFormatterImpl *>( mpFormatImpl ) ); }
-#define MetricUnitVclToUno(a) ((sal_uInt16)(a))
-
-#define SET_IMPL(vclmethod, idlmethod) \
- void MetricFormatter::vclmethod( sal_Int64 nValue, FieldUnit nUnit ) \
- { \
- if ( !getFormatImpl().mxField.is() ) \
- return; \
- getFormatImpl().mxField->idlmethod( nValue, MetricUnitVclToUno( nUnit ) ); \
- }
-
-SET_IMPL( SetMin, setMin )
-SET_IMPL( SetMax, setMax )
-SET_IMPL( SetLast, setLast )
-SET_IMPL( SetFirst, setFirst )
-SET_IMPL( SetValue, setValue )
-
-#undef SET_IMPL
-
-void MetricFormatter::SetSpinSize( sal_Int64 nValue )
-{
- if ( !getFormatImpl().mxField.is() )
- return;
- getFormatImpl().mxField->setSpinSize( nValue );
-}
-
-sal_Int64 MetricFormatter::GetValue( FieldUnit nUnit ) const
-{
- if ( !getFormatImpl().mxField.is() )
- return 0;
- return getFormatImpl().mxField->getValue( MetricUnitVclToUno( nUnit ) );
-}
-
-IMPL_CONSTRUCTORS_2( MetricField, SpinField, MetricFormatter, "metricfield" );
-
-class ComboBoxImpl : public EditImpl
- , public ::cppu::WeakImplHelper1< awt::XActionListener >
- , public ::cppu::WeakImplHelper1< awt::XItemListener >
-{
-public:
- uno::Reference< awt::XComboBox > mxComboBox;
-
- Link maClickHdl;
- Link maSelectHdl;
-
- Window *parent;
-
- ComboBoxImpl( Context *context, const PeerHandle &peer, Window *window )
- : EditImpl( context, peer, window )
- , mxComboBox( peer, uno::UNO_QUERY )
- {
- }
-
- ~ComboBoxImpl ();
-
- sal_uInt16 InsertEntry( OUString const& rStr, sal_uInt16 nPos )
- {
- if ( nPos == COMBOBOX_APPEND )
- nPos = GetEntryCount();
- mxComboBox->addItem( rtl::OUString( rStr ), nPos );
- return nPos;
- }
-
- void RemoveEntry( sal_uInt16 nPos )
- {
- mxComboBox->removeItems( nPos, 1 );
- }
-
- sal_uInt16 GetEntryPos( String const& rStr ) const
- {
- uno::Sequence< rtl::OUString> aItems( mxComboBox->getItems() );
- rtl::OUString rKey( rStr );
- sal_uInt16 n = sal::static_int_cast< sal_uInt16 >(aItems.getLength());
- for (sal_uInt16 i = 0; i < n; i++)
- {
- if ( aItems[ i ] == rKey )
- return i;
- }
- return COMBOBOX_ENTRY_NOTFOUND;
- }
-
- OUString GetEntry( sal_uInt16 nPos ) const
- {
- return OUString( mxComboBox->getItem( nPos ) );
- }
-
- sal_uInt16 GetEntryCount() const
- {
- return mxComboBox->getItemCount();
- }
-
- void SetClickHdl( Link const& link )
- {
- if (!link && !!maClickHdl)
- mxComboBox->removeActionListener( this );
- else if (!!link && !maClickHdl)
- mxComboBox->addActionListener( this );
- maClickHdl = link;
- }
-
- void SetSelectHdl( Link const& link )
- {
- if (!link && !!maSelectHdl)
- mxComboBox->removeItemListener( this );
- else if (!!link && !maSelectHdl)
- mxComboBox->addItemListener( this );
- maSelectHdl = link;
- }
-
- void SAL_CALL disposing( lang::EventObject const& e )
- throw (uno::RuntimeException);
-
- void SAL_CALL actionPerformed (const awt::ActionEvent&)
- throw (uno::RuntimeException)
- {
- ComboBox* pComboBox = static_cast<ComboBox*>( mpWindow );
- if ( !pComboBox )
- return;
- maClickHdl.Call( pComboBox );
- }
-
- void SAL_CALL itemStateChanged( awt::ItemEvent const&)
- throw (uno::RuntimeException)
- {
- ComboBox* pComboBox = static_cast<ComboBox*>( mpWindow );
- if ( !pComboBox )
- return;
- maSelectHdl.Call( pComboBox );
- }
-};
-
-ComboBox::~ComboBox ()
-{
-#ifndef __SUNPRO_CC
- OSL_TRACE ("%s: deleting ComboBox for window: %p", __FUNCTION__, GetWindow ());
-#endif
-}
-
-ComboBoxImpl::~ComboBoxImpl ()
-{
-#ifndef __SUNPRO_CC
- OSL_TRACE ("%s: deleting ComboBoxImpl for window: %p", __FUNCTION__, mpWindow ? mpWindow->GetWindow () : 0);
- OSL_TRACE ("%s: deleting ComboBoxImpl for listener: %p", __FUNCTION__, static_cast<XFocusListener*> (this));
-#endif
-}
-
-void ComboBoxImpl::disposing( lang::EventObject const& e )
- throw (uno::RuntimeException)
-{
- EditImpl::disposing (e);
- mxComboBox.clear ();
-}
-
-sal_uInt16 ComboBox::InsertEntry( String const& rStr, sal_uInt16 nPos )
-{
- return getImpl().InsertEntry( rStr, nPos );
-}
-
-void ComboBox::RemoveEntry( String const& rStr )
-{
- getImpl().RemoveEntry( GetEntryPos( rStr ) );
-}
-
-void ComboBox::RemoveEntry( sal_uInt16 nPos )
-{
- getImpl().RemoveEntry( nPos );
-}
-
-void ComboBox::Clear()
-{
- uno::Sequence< rtl::OUString> aNoItems;
- getImpl().setProperty( "StringItemList", uno::Any( aNoItems ) );
-}
-
-sal_uInt16 ComboBox::GetEntryPos( String const& rStr ) const
-{
- return getImpl().GetEntryPos( rStr );
-}
-
-String ComboBox::GetEntry( sal_uInt16 nPos ) const
-{
- rtl::OUString rItem = getImpl().mxComboBox->getItem( nPos );
- return OUString( rItem );
-}
-
-sal_uInt16 ComboBox::GetEntryCount() const
-{
- return getImpl().GetEntryCount();
-}
-
-void ComboBox::SetClickHdl( const Link& link )
-{
- if (&getImpl () && getImpl().mxComboBox.is ())
- getImpl().SetClickHdl( link );
-}
-
-void ComboBox::SetSelectHdl( const Link& link )
-{
- if (&getImpl () && getImpl().mxComboBox.is ())
- getImpl().SetSelectHdl( link );
-}
-
-void ComboBox::EnableAutocomplete (bool enable, bool matchCase)
-{
- GetComboBox ()->EnableAutocomplete (enable, matchCase);
-}
-
-IMPL_CONSTRUCTORS_BODY( ComboBox, Edit, "combobox", getImpl().parent = parent; );
-IMPL_GET_WINDOW (ComboBox);
-/// IMPL_GET_IMPL( ComboBox );
-
-static ComboBoxImpl* null_combobox_impl = 0;
-
-ComboBoxImpl &ComboBox::getImpl () const
-{
- if (ComboBoxImpl* c = static_cast<ComboBoxImpl *>(mpImpl))
- return *c;
- return *null_combobox_impl;
-}
-
class ListBoxImpl : public ControlImpl
, public ::cppu::WeakImplHelper1< awt::XActionListener >
, public ::cppu::WeakImplHelper1< awt::XItemListener >
@@ -671,27 +351,6 @@ ListBox::~ListBox ()
{
}
-sal_uInt16 ListBox::InsertEntry (String const& rStr, sal_uInt16 nPos)
-{
- return getImpl().InsertEntry(rStr, nPos);
-}
-
-void ListBox::RemoveEntry( sal_uInt16 nPos )
-{
- return getImpl().RemoveEntry( nPos );
-}
-
-void ListBox::RemoveEntry( String const& rStr )
-{
- return getImpl().RemoveEntry( GetEntryPos( rStr ) );
-}
-
-void ListBox::Clear()
-{
- uno::Sequence< rtl::OUString> aNoItems;
- getImpl().setProperty( "StringItemList", uno::Any( aNoItems ) );
-}
-
sal_uInt16 ListBox::GetEntryPos( String const& rStr ) const
{
return getImpl().GetEntryPos( rStr );
@@ -702,11 +361,6 @@ String ListBox::GetEntry( sal_uInt16 nPos ) const
return getImpl().GetEntry( nPos );
}
-sal_uInt16 ListBox::GetEntryCount() const
-{
- return getImpl().GetEntryCount();
-}
-
void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect )
{
#if LAYOUT_API_CALLS_HANDLER
@@ -716,80 +370,19 @@ void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect )
#endif /* !LAYOUT_API_CALLS_HANDLER */
}
-void ListBox::SelectEntry( String const& rStr, bool bSelect )
-{
- SelectEntryPos( GetEntryPos( rStr ), bSelect );
-}
-
-sal_uInt16 ListBox::GetSelectEntryCount() const
-{
- return getImpl().GetSelectEntryCount();
-}
-
sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
{
return getImpl().GetSelectEntryPos( nSelIndex );
}
-String ListBox::GetSelectEntry( sal_uInt16 nSelIndex ) const
-{
- return GetEntry( GetSelectEntryPos( nSelIndex ) );
-}
-
-Link& ListBox::GetSelectHdl ()
-{
- return getImpl ().GetSelectHdl ();
-}
-
-void ListBox::SetSelectHdl( Link const& link )
-{
- getImpl().SetSelectHdl( link );
-}
-
-Link& ListBox::GetClickHdl ()
-{
- return getImpl ().GetSelectHdl ();
-}
-
-void ListBox::SetClickHdl( Link const& link )
-{
- if (&getImpl () && getImpl().mxListBox.is ())
- getImpl().SetClickHdl( link );
-}
-
-Link& ListBox::GetDoubleClickHdl ()
-{
- return getImpl ().GetSelectHdl ();
-}
-
-void ListBox::SetDoubleClickHdl( Link const& link )
-{
- getImpl().SetDoubleClickHdl( link );
-}
-
-void ListBox::SetEntryData( sal_uInt16 pos, void* data)
-{
- GetListBox ()->SetEntryData (pos, data);
-}
-
-void* ListBox::GetEntryData( sal_uInt16 pos) const
-{
- return GetListBox ()->GetEntryData (pos);
-}
-
void ListBox::SetNoSelection ()
{
GetListBox ()->SetNoSelection ();
}
-IMPL_CONSTRUCTORS (ListBox, Control, "listbox");
IMPL_GET_IMPL (ListBox);
IMPL_GET_WINDOW (ListBox);
-IMPL_IMPL (MultiListBox, ListBox)
-IMPL_CONSTRUCTORS_BODY( MultiListBox, ListBox, "multilistbox", GetMultiListBox()->EnableMultiSelection( true ); );
-IMPL_GET_IMPL( MultiListBox );
-IMPL_GET_WINDOW( MultiListBox );
} // namespace layout
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx
index 9713e04..b175ea2 100644
--- a/toolkit/source/layout/vcl/wrapper.cxx
+++ b/toolkit/source/layout/vcl/wrapper.cxx
@@ -115,10 +115,6 @@ public:
{
mxTopLevel = xToplevel;
}
- PeerHandle getRoot()
- {
- return mxRoot;
- }
};
Context::Context( const char *pPath )
@@ -131,20 +127,6 @@ Context::~Context()
pImpl = NULL;
}
-void Context::setToplevel( PeerHandle xToplevel )
-{
- pImpl->setTopLevel( xToplevel );
-}
-
-PeerHandle Context::getToplevel()
-{
- return pImpl->getTopLevel();
-}
-PeerHandle Context::getRoot()
-{
- return pImpl->getRoot();
-}
-
PeerHandle Context::GetPeerHandle( const char *id, sal_uInt32 nId ) const
{
PeerHandle xHandle;
@@ -558,22 +540,12 @@ void SAL_CALL ControlImpl::focusLost (awt::FocusEvent const&)
mLoseFocusHdl.Call (mpWindow);
}
-Link& Control::GetGetFocusHdl ()
-{
- return getImpl ().GetGetFocusHdl ();
-}
-
void Control::SetGetFocusHdl (Link const& link)
{
if (&getImpl () && getImpl().mxWindow.is ())
getImpl ().SetGetFocusHdl (link);
}
-Link& Control::GetLoseFocusHdl ()
-{
- return getImpl ().GetLoseFocusHdl ();
-}
-
void Control::SetLoseFocusHdl (Link const& link)
{
if (&getImpl () && getImpl().mxWindow.is ())
@@ -593,15 +565,6 @@ DialogImpl::DialogImpl( Context *context, const PeerHandle &peer, Window *window
{
}
-Dialog::Dialog( Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
- : Context( xml_file )
- , Window( new DialogImpl( this, Context::GetPeerHandle( id, nId ), this ) )
- , bConstruct (true)
-{
- if ( parent )
- SetParent( parent );
-}
-
Dialog::Dialog( ::Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
: Context( xml_file )
, Window( new DialogImpl( this, Context::GetPeerHandle( id, nId ), this ) )
@@ -631,31 +594,11 @@ void Dialog::EndDialog( long result )
MX_DIALOG->endDialog (result);
}
-void Dialog::SetText( OUString const& str )
-{
- SetTitle (str);
-}
-
void Dialog::SetTitle( OUString const& str )
{
MX_DIALOG->setTitle (str);
}
-bool Dialog::Close ()
-{
- EndDialog (false);
- return true;
-}
-
-long Dialog::Notify (NotifyEvent& event)
-{
- return GetDialog ()->Notify (event);
-}
-
-void Dialog::Initialize (SfxChildWinInfo*)
-{
-}
-
#define MESSAGE_BOX_MEMBER_INIT\
Dialog (parent, xml_file, id)\
, imageError (this, "FI_ERROR")\
@@ -809,8 +752,6 @@ void MessageBox::init (OUString const& message, OUString const& yes, OUString co
MESSAGE_BOX_IMPL (Error);
MESSAGE_BOX_IMPL (Info);
-MESSAGE_BOX_IMPL (Query);
-MESSAGE_BOX_IMPL (Warning);
class TabControlImpl
: public ControlImpl
@@ -834,11 +775,6 @@ public:
mxTabControl.clear ();
}
- Link& GetActivatePageHdl ()
- {
- return mActivatePageHdl;
- }
-
void SetActivatePageHdl (Link const& link)
{
if (!mDeactivatePageHdl || !link)
@@ -846,11 +782,6 @@ public:
mActivatePageHdl = link;
}
- Link& GetDeactivatePageHdl ()
- {
- return mDeactivatePageHdl;
- }
-
void SetDeactivatePageHdl (Link const& link)
{
if (!mActivatePageHdl || !link)
@@ -895,7 +826,6 @@ public:
};
IMPL_GET_WINDOW (TabControl);
-IMPL_GET_LAYOUT_VCLXWINDOW (TabControl);
#define MX_TABCONTROL if (getImpl ().mxTabControl.is ()) getImpl ().mxTabControl
#define RETURN_MX_TABCONTROL if (getImpl ().mxTabControl.is ()) return getImpl ().mxTabControl
@@ -906,92 +836,22 @@ TabControl::~TabControl ()
SetDeactivatePageHdl (Link ());
}
-void TabControl::InsertPage (sal_uInt16 id, OUString const& title, sal_uInt16 pos)
-{
- (void) pos;
-
- MX_TABCONTROL->insertTab ();
- SetCurPageId (id);
-
-#if 1 // colour me loc productive -- NOT
-#define ADD_PROP( seq, i, name, val )\
- { \
- beans::NamedValue value; \
- value.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( name ) ); \
- value.Value = uno::makeAny( val ); \
- seq[i] = value; \
- }
-
- uno::Sequence< beans::NamedValue > seq (1);
- ADD_PROP ( seq, 0, "Title", OUString (title) );
- MX_TABCONTROL->setTabProps (id, seq);
-#else
- GetTabPage (id)->SetText (title);
-#endif
-}
-void TabControl::RemovePage (sal_uInt16 id)
-{
- GetTabControl ()->RemovePage (id);
-}
-sal_uInt16 TabControl::GetPageCount () const
-{
- return GetTabControl ()->GetPageCount ();
-}
-sal_uInt16 TabControl::GetPageId (sal_uInt16 pos) const
-{
- return GetTabControl ()->GetPageId (pos);
-}
-sal_uInt16 TabControl::GetPagePos (sal_uInt16 id) const
-{
- getImpl ().redraw ();
- return GetTabControl ()->GetPagePos (id);
-}
void TabControl::SetCurPageId (sal_uInt16 id)
{
getImpl ().redraw ();
GetTabControl ()->SetCurPageId (id);
}
-sal_uInt16 TabControl::GetCurPageId () const
-{
- return GetTabControl ()->GetCurPageId ();
-}
-void TabControl::SetTabPage (sal_uInt16 id, ::TabPage* page)
-{
- GetTabControl ()->SetTabPage (id, page);
- getImpl ().redraw ();
-}
-::TabPage* TabControl::GetTabPage (sal_uInt16 id) const
-{
- return GetTabControl ()->GetTabPage (id);
-}
void TabControl::SetActivatePageHdl (Link const& link)
{
if (&getImpl () && getImpl().mxTabControl.is ())
getImpl ().SetActivatePageHdl (link);
}
-Link& TabControl::GetActivatePageHdl () const
-{
- return getImpl ().GetActivatePageHdl ();
-}
void TabControl::SetDeactivatePageHdl (Link const& link)
{
if (&getImpl () && getImpl().mxTabControl.is ())
getImpl ().SetDeactivatePageHdl (link);
}
-Link& TabControl::GetDeactivatePageHdl () const
-{
- return getImpl ().GetDeactivatePageHdl ();
-}
-void TabControl::SetTabPageSizePixel (Size const& size)
-{
- GetTabControl ()->SetTabPageSizePixel (size);
-}
-Size TabControl::GetTabPageSizePixel () const
-{
- return GetTabControl ()->GetTabPageSizePixel ();
-}
-IMPL_CONSTRUCTORS (TabControl, Control, "tabcontrol");
IMPL_GET_IMPL (TabControl);
class TabPageImpl : public WindowImpl
@@ -1010,22 +870,6 @@ TabControl* TabPage::global_tabcontrol = 0;
IMPL_GET_IMPL( TabPage );
-TabPage::TabPage( Window *parent, const char *xml_file, const char *id, sal_uInt32 nId)
- : Context( xml_file )
- , Window( new TabPageImpl( this, Context::GetPeerHandle( id, nId ), this ) )
-{
- if ( parent )
- SetParent( parent );
-}
-
-TabPage::TabPage( ::Window *parent, const char *xml_file, const char *id, sal_uInt32 nId)
- : Context( xml_file )
- , Window( new TabPageImpl( this, Context::GetPeerHandle( id, nId ), this ) )
-{
- if ( parent )
- SetParent( parent );
-}
-
TabPage::~TabPage()
{
delete GetTabPage();
@@ -1041,24 +885,6 @@ void TabPage::DeactivatePage()
{
}
-class FixedLineImpl : public ControlImpl
-{
-public:
- FixedLineImpl( Context *context, const PeerHandle &peer, Window *window )
- : ControlImpl( context, peer, window )
- {
- }
-};
-
-IMPL_CONSTRUCTORS( FixedLine, Control, "hfixedline" );
-IMPL_GET_IMPL( FixedLine );
-
-bool FixedLine::IsEnabled() const
-{
- //FIXME
- return true;
-}
-
class FixedTextImpl : public ControlImpl
{
public:
@@ -1086,11 +912,18 @@ void SAL_CALL FixedTextImpl::disposing( lang::EventObject const& e )
mxFixedText.clear ();
}
+FixedText::FixedText ( Context *context, char const* pId, sal_uInt32 nId )
+ : Control( new FixedTextImpl( context, context->GetPeerHandle( pId, nId ), this ) )
+{
+ Window *parent = dynamic_cast<Window*> (context);
+ if (parent)
+ SetParent (parent);
+}
+
FixedText::~FixedText ()
{
}
-IMPL_CONSTRUCTORS( FixedText, Control, "fixedtext" );
IMPL_GET_IMPL( FixedText );
void FixedText::SetText( OUString const& rStr )
@@ -1100,18 +933,6 @@ void FixedText::SetText( OUString const& rStr )
getImpl().mxFixedText->setText( rStr );
}
-class FixedInfoImpl : public FixedTextImpl
-{
-public:
- FixedInfoImpl( Context *context, const PeerHandle &peer, Window *window )
- : FixedTextImpl( context, peer, window )
- {
- }
-};
-
-IMPL_CONSTRUCTORS( FixedInfo, FixedText, "fixedinfo" );
-IMPL_GET_IMPL( FixedInfo );
-
class ProgressBarImpl : public ControlImpl
{
public:
@@ -1146,217 +967,15 @@ public:
}
};
-IMPL_CONSTRUCTORS( FixedImage, Control, "fixedimage" );
-IMPL_GET_IMPL( FixedImage )
-
-void FixedImage::setImage( ::Image const& i )
-{
- (void) i;
- if ( !getImpl().mxGraphic.is() )
- return;
- //FIXME: hack moved to proplist
- //getImpl().mxGraphic =
-}
-
-
-IMPL_CONSTRUCTORS( ProgressBar, Control, "ProgressBar" );
-IMPL_GET_IMPL( ProgressBar );
-
-void ProgressBar::SetForegroundColor( util::Color color )
-{
- if ( !getImpl().mxProgressBar.is() )
- return;
- getImpl().mxProgressBar->setForegroundColor( color );
-}
-
-void ProgressBar::SetBackgroundColor( util::Color color )
-{
- if ( !getImpl().mxProgressBar.is() )
- return;
- getImpl().mxProgressBar->setBackgroundColor( color );
-}
-
-void ProgressBar::SetValue( sal_Int32 i )
-{
- if ( !getImpl().mxProgressBar.is() )
- return;
- getImpl().mxProgressBar->setValue( i );
-}
-
-void ProgressBar::SetRange( sal_Int32 min, sal_Int32 max )
-{
- if ( !getImpl().mxProgressBar.is() )
- return;
- getImpl().mxProgressBar->setRange( min, max );
-}
-
-sal_Int32 ProgressBar::GetValue()
-{
- if ( !getImpl().mxProgressBar.is() )
- return 0;
- return getImpl().mxProgressBar->getValue();
-}
-
-class PluginImpl: public ControlImpl
-{
-public:
- ::Control *mpPlugin;
-
- PluginImpl( Context *context, const PeerHandle &peer, Window *window, :: Control *plugin )
- : ControlImpl( context, peer, window )
- , mpPlugin( plugin )
- {
- uno::Reference <awt::XWindow> ref( mxWindow, uno::UNO_QUERY );
- layoutimpl::VCLXPlugin *vcl
- = static_cast<layoutimpl::VCLXPlugin*>( VCLXWindow::GetImplementation( ref ) );
- ::Window *parent = vcl->mpWindow->GetParent();
- vcl->SetWindow( plugin );
- vcl->SetPlugin( mpPlugin );
- plugin->SetParent( parent );
- plugin->SetStyle( vcl->mStyle );
- plugin->SetCreatedWithToolkit( true );
- plugin->SetComponentInterface( vcl );
- plugin->Show();
- }
-};
-
-Plugin::Plugin( Context *context, char const *id, ::Control *plugin )
- : Control( new PluginImpl( context, context->GetPeerHandle( id, 0 ), this, plugin ) )
- , mpPlugin( plugin )
-{
-}
-
-IMPL_GET_IMPL( Plugin );
-
-class LocalizedStringImpl : public WindowImpl
-{
-public:
- layoutimpl::LocalizedString *mpString;
- OUString maString;
- LocalizedStringImpl( Context *context, const PeerHandle &peer, Window *window )
- : WindowImpl( context, peer, window )
- , mpString( static_cast<layoutimpl::LocalizedString*>( VCLXWindow::GetImplementation( uno::Reference <awt::XWindow> ( mxWindow, uno::UNO_QUERY ) ) ) )
- , maString ()
- {
- }
- OUString getText()
- {
- if (mpString)
- maString = mpString->getText ();
- return maString;
- }
- void setText( OUString const& s )
- {
- if (mpString)
- mpString->setText( s );
- }
-};
-
-IMPL_GET_IMPL( LocalizedString );
-
-LocalizedString::LocalizedString( Context *context, char const* id )
- : Window( new LocalizedStringImpl( context, context->GetPeerHandle( id, 0 ), this ) )
-{
-}
-
-String LocalizedString::getString ()
-{
- return getImpl ().getText ();
-}
-
-OUString LocalizedString::getOUString ()
-{
- return getImpl ().getText ();
-}
-
-LocalizedString::operator OUString ()
-{
- return getOUString ();
-}
-
-LocalizedString::operator OUString const& ()
-{
- getOUString ();
- return getImpl ().maString;
-}
-
-LocalizedString::operator String()
-{
- getOUString ();
- return getImpl ().maString;
-}
-
-String LocalizedString::GetToken (sal_uInt16 i, sal_Char c)
-{
- return getString ().GetToken (i, c);
-}
-
-OUString LocalizedString::operator= (OUString const& s)
-{
- getImpl().setText( s );
- return getImpl().getText();
-}
-
-OUString LocalizedString::operator+= (OUString const& b)
-{
- OUString a = getImpl ().getText ();
- a += b;
- getImpl ().setText (a);
- return getImpl ().getText ();
-}
-
-OUString LocalizedString::operator+= (sal_Unicode const b)
-{
- String a = getImpl ().getText ();
- a += b;
- getImpl ().setText (a);
- return getImpl ().getText ();
-}
-
-class InPlugImpl : public WindowImpl
-{
-public:
- InPlugImpl (Context *context, const PeerHandle &peer, Window *window)
- : WindowImpl (context, peer, window)
- {
- }
-};
-
-IMPL_GET_IMPL (InPlug);
-
-static char const *FIXME_set_parent (::Window *parent, char const *xml_file)
-{
- layout::TabPage::global_parent = parent;
- return xml_file;
-}
-
-InPlug::InPlug (Window *parent, char const* xml_file, char const* id, sal_uInt32 nId)
- : Context (FIXME_set_parent (parent ? parent->GetWindow () : 0, xml_file))
- , layout::Window (new InPlugImpl (this, Context::GetPeerHandle (id, nId), this))
+FixedImage::FixedImage ( Context *context, char const* pId, sal_uInt32 nId )
+ : Control( new FixedImageImpl( context, context->GetPeerHandle( pId, nId ), this ) )
{
+ Window *parent = dynamic_cast<Window*> (context);
if (parent)
SetParent (parent);
- if (::Window *w = dynamic_cast< ::Window* > (this))
- w->SetComponentInterface (GetVCLXWindow ());
-}
-
-InPlug::InPlug (::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId)
- : Context (FIXME_set_parent (parent, xml_file))
- , layout::Window (new InPlugImpl (this, Context::GetPeerHandle (id, nId), this))
-{
- if (parent)
- layout::Window::SetParent (parent);
- if (::Window *w = dynamic_cast< ::Window* > (this))
- w->SetComponentInterface (GetVCLXWindow ());
}
-void InPlug::ParentSet (Window *window)
-{
- window->SetParent (dynamic_cast< ::Window* > (this));
-
- /// FIXME: for standalone run of layout::SfxTabDialog
- SetParent (window->GetParent ());
-}
+IMPL_GET_IMPL( FixedImage )
} // namespace layout
diff --git a/toolkit/workben/controls.cxx b/toolkit/workben/controls.cxx
deleted file mode 100644
index 93b6864..0000000
--- a/toolkit/workben/controls.cxx
+++ /dev/null
@@ -1,272 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_toolkit.hxx"
-#include <tools/debug.hxx>
-
-#include <vcl/window.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
-
-
-#include <stardiv/uno/awt/window.hxx>
-#include <stardiv/uno/awt/vclwin.hxx>
-#include <stardiv/uno/awt/printer.hxx>
-#include <stardiv/uno/repos/serinfo.hxx>
-#include <stardiv/uno/lang/factory.hxx>
-
-
-#include <unoctrl.hxx>
-
-#include <svtools/unoiface.hxx> // InitExtToolkit
-
-UsrAny UsrAny_UINT16( UINT16 n )
-{
- UsrAny aVal;
- aVal.setUINT16( n );
- return aVal;
-}
-
-// -----------------------------------------------------------------------
-
-class MyApp : public Application
-{
-public:
- void Main();
-};
-
-MyApp aMyApp;
-
-// -----------------------------------------------------------------------
-
-class MyWin : public WorkWindow
-{
- XControlRef xCtrl;
- XPropertySetRef xCtrlModel;
- XControlContainerRef xCont;
- XPropertySetRef xContModel;
- XControlRef xDrawCtrl;
- XGraphicsRef xG;
-
-public:
- MyWin( Window* pParent, WinBits nWinStyle );
- ~MyWin();
-
- void MouseButtonDown( const MouseEvent& rMEvt );
- void Resize();
- void Paint( const Rectangle& r );
-};
-
-// -----------------------------------------------------------------------
-
-void MyApp::Main()
-{
- createAndSetDefaultServiceManager();
-
- MyWin aMainWin( NULL, WB_APP | WB_STDWORK );
- aMainWin.SetText( "Uno-Controls - Workbench" );
- aMainWin.Show();
- Execute();
-}
-
-// -----------------------------------------------------------------------
-
-MyWin::MyWin( Window* pParent, WinBits nWinStyle ) :
- WorkWindow( pParent, nWinStyle )
-{
-}
-
-// -----------------------------------------------------------------------
-MyWin::~MyWin()
-{
- XComponentRef xC1( xCont, USR_QUERY );
- xC1->dispose();
- XComponentRef xC2( xContModel, USR_QUERY );
- xC2->dispose();
-}
-
-// -----------------------------------------------------------------------
-
-void MyWin::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if( rMEvt.GetClicks() == 2 )
- {
- XViewRef xV( xDrawCtrl, USR_QUERY );
- XWindowRef xC( xDrawCtrl, USR_QUERY );
- xV->draw( xC->getPosSize().Left(), xC->getPosSize().Top() );
- }
- else if( rMEvt.GetClicks() == 1 )
- {
- if( xContModel )
- {
- static INT32 nColor = 0x001788ab;
- xContModel->setPropertyValue( L"BackgroundColor", UsrAny( nColor ) );
- nColor += 0x00111111;
- nColor &= 0xFFFFFF;
- }
- else
- {
- XServiceManagerRef xProv = getGlobalServiceManager();
-
- XMultiServiceFactoryRef xMSF = NAMESPACE_USR( getProcessServiceManager )();
-
- XServiceProviderRef xSSI = xProv->queryServiceProvider( L"stardiv.vcl.VclToolkit" );
- XToolkitRef xToolkit( xMSF->createInstance( L"stardiv.vcl.VclToolkit" ), USR_QUERY );
- DBG_ASSERT( xToolkit, "No Toolkit!" );
-
- // Uno Container + Model erzeugen
- XServiceProviderRef xModelProv; // = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.ControlContainer" );
- XInterfaceRef xCMRef( xMSF->createInstance(L"stardiv.vcl.controlmodel.ControlContainer") );
- xCMRef->queryInterface( XPropertySet::getSmartUik(), xContModel );
- xContModel->setPropertyValue( L"Border", UsrAny_UINT16( 1 ) );
- xContModel->setPropertyValue( L"BackgroundColor", UsrAny( (UINT32)0x00CCCCCC) );
-
- xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.control.ControlContainer" );
- XInterfaceRef xCCRef( xModelProv->createInstance(), USR_QUERY );
- xCCRef->queryInterface( XControlContainer::getSmartUik(), xCont );
-
- XControlModelRef xCM( xContModel, USR_QUERY );
- XControlRef xContControl( xCont, USR_QUERY );
- xContControl->setModel( xCM );
- XWindowRef xContComp( xCont, USR_QUERY );
- xContComp->setPosSize( 0, 0, 500, 600, PosSize_POSSIZE );
-
- // Zwei EditControls auf einem Model...
-// xModelProv = xProv->queryServiceProvider( L"stardiv.uno.awt.UnoControlEditModel" );
- XInterfaceRef xModel( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEditModel") );
- DBG_ASSERT( xModel, "No Model!" );
-
- XPropertySetRef xPSet( xModel, USR_QUERY );
- xPSet->setPropertyValue( L"Text", UsrAny( UString( L"Hallo!" ) ) );
- xPSet->setPropertyValue( L"FontName", UsrAny( UString( L"Times New Roman" ) ) );
-// xPSet->setPropertyValue( L"FontWeight", UsrAny( 200 ) );
-
- XServiceProviderRef xEditCtrlProv = xProv->queryServiceProvider( L"stardiv.uno.awt.UnoControlEdit" );
- // Edit1
- XControlRef xEdit1( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEdit"), USR_QUERY );
- xModel->queryInterface( XControlModel::getSmartUik(), xCM );
- xEdit1->setModel( xCM );
- XWindowRef xEditCmp1( xEdit1, USR_QUERY );
- xEditCmp1->setPosSize( 50, 50, 100, 60, PosSize_POSSIZE );
- xCont->addControl( L"", xEdit1 );
- // Edit2
- XControlRef xEdit2( xMSF->createInstance(L"stardiv.uno.awt.UnoControlEdit"), USR_QUERY );
- xModel->queryInterface( XControlModel::getSmartUik(), xCM );
- xEdit2->setModel( xCM );
- XWindowRef xEditCmp2( xEdit2, USR_QUERY );
- XLayoutConstrainsRef xL( xEdit2, USR_QUERY );
- if ( xL.is() )
- {
- Size aSz = xL->getPreferredSize();
- xEditCmp2->setPosSize( 100, 180, aSz.Width(), aSz.Height(), PosSize_POSSIZE );
- }
- else
- xEditCmp2->setPosSize( 100, 180, 100, 40, PosSize_POSSIZE );
- xCont->addControl( L"", xEdit2 );
-
- xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.NumericField" );
- XInterfaceRef xNumModel( xModelProv->createInstance(), USR_QUERY );
- DBG_ASSERT( xNumModel, "No Model!" );
-
-
- XServiceProviderRef xNumFieldProv = xProv->queryServiceProvider( L"stardiv.vcl.control.NumericField" );
- XControlRef xNumField( xNumFieldProv->createInstance(), USR_QUERY );
- xNumModel->queryInterface( XControlModel::getSmartUik(), xCM );
- xNumField->setModel( xCM );
- XWindowRef xNumFieldWin( xNumField, USR_QUERY );
- xNumFieldWin->setPosSize( 50, 250, 100, 60, PosSize_POSSIZE );
- xCont->addControl( L"", xNumField );
-
- XMultiPropertySetRef xPSet2( xNumModel, USR_QUERY );
- Sequence<UString> Names( 2 );
- Names.getArray()[0] = L"Value";
- Names.getArray()[1] = L"ValueMin";
- Sequence<UsrAny> Values( 2 );
- Values.getArray()[0] = UsrAny( -2000000.0 );
- Values.getArray()[1] = UsrAny( -2000000.0 );
- xPSet2->setPropertyValues( Names, Values );
-
-
- // Button...
- xModelProv = xProv->queryServiceProvider( L"stardiv.vcl.controlmodel.Button" );
- xModelProv->createInstance()->queryInterface( XInterface::getSmartUik(), xModel );
- DBG_ASSERT( xModel, "No Model!" );
-
- xModel->queryInterface( XPropertySet::getSmartUik(), xPSet );
- xPSet->setPropertyValue( L"Label", UsrAny( L"Press!" ) );
-
- XServiceProviderRef xButtonCtrlProv = xProv->queryServiceProvider( L"stardiv.vcl.control.Button" );
- XControlRef xButton1( xButtonCtrlProv->createInstance(), USR_QUERY );
- xModel->queryInterface( XControlModel::getSmartUik(), xCM );
- xButton1->setModel( xCM );
- XWindowRef xButtonCmp1( xButton1, USR_QUERY );
- xButtonCmp1->setPosSize( 170, 80, 80, 80, PosSize_POSSIZE );
- // Unsichtbar, nur im MBDown mit DrawRoutine bei Doppel-Klick...
- xButtonCmp1->setVisible( FALSE );
- xDrawCtrl = xButton1;
-
- xCont->addControl( L"", xButton1 );
-
- // Container anzeigen...
- // Als Child zu diesem Fenster
- xContControl->createPeer( XToolkitRef(), GetComponentInterface( TRUE ) );
-
- XDeviceRef xD( xContControl->getPeer(), USR_QUERY );
- xG = xD->createGraphics();
- XViewRef xV ( xDrawCtrl, USR_QUERY );
- xV->setGraphics( xG );
-
- }
- return;
- }
- WorkWindow::MouseButtonDown( rMEvt );
-}
-
-
-// -----------------------------------------------------------------------
-
-void MyWin::Resize()
-{
- WorkWindow::Resize();
-}
-
-void MyWin::Paint( const Rectangle& r )
-{
- // Muss ueber PaintListener geschehen...
- if ( xDrawCtrl.is() )
- {
- XViewRef xV( xDrawCtrl, USR_QUERY );
- XWindowRef xC( xDrawCtrl, USR_QUERY );
- xV->draw( xC->getPosSize().Left(), xC->getPosSize().Top() );
- }
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/workben/layout/.gitignore b/toolkit/workben/layout/.gitignore
deleted file mode 100644
index 142ba57..0000000
--- a/toolkit/workben/layout/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/de
-/en-US
-/nl
-/ja
\ No newline at end of file
diff --git a/toolkit/workben/layout/README b/toolkit/workben/layout/README
deleted file mode 100644
index 3ab112e..0000000
--- a/toolkit/workben/layout/README
+++ /dev/null
@@ -1,43 +0,0 @@
-Testing workbench and editor for Layout engine.
-
-* Configure using --enable-layout.
-
-* [d]make all
-
-* export OOO_INSTALL_PREFIX=$(pwd)/ooo-layout
-
-* [d]make install DESTDIR=$OOO_INSTALL_PREFIX
-
-* Compile test program in toolkit/workben/layout
-
- cd toolkit/workben/layout && dmake all
-
-* FIXME: New three layer install/rpath feature needs these workarounds
-|
-| test -d $OOO_INSTALL_PREFIX/openoffice.org3 && export OOO_PREFIX_BRAND=$OOO_INSTALL_PREFIX/openoffice.org3 || export OOO_PREFIX_BRAND=$OOO_INSTALL_PREFIX
-| cp -f ../..$INPATH/lib/libtkx.so $OOO_PREFIX/openoffice.org/program
-| export LD_LIBRARY_PATH=$OOO_PREFIX_BRAND/program:$OOO_PREFIX_BRAND/ure-link/lib
-|
-| (see source/layout/helper.cxx)
-
-* Run it on any .xml file
-
- ../../$INPATH/bin/test [--inst $OOO_INSTALL_PREFIX] zoom.xml
-
-* Run it for specific dialogs, see test.cxx
-
- ../../$INPATH/bin/test [--inst $OOO_INSTALL_PREFIX] --test zoom
- ../../$INPATH/bin/test [--inst $OOO_INSTALL_PREFIX] --test wordcount
-
-* Or source refresh in workben/layout, do something like
-
- cd toolkit/workben/layout && . ./refresh [--inst $OOO_INSTALL_PREFIX]
-
-Integration into OOo:
-
-* After instaling, run
-
- cd ooo-cvs/program
- ./soffice.bin
-
- Start a [Writer] document and choose View/Zoom or Extra/Word count.
diff --git a/toolkit/workben/layout/TEST b/toolkit/workben/layout/TEST
deleted file mode 100755
index e1376e1..0000000
--- a/toolkit/workben/layout/TEST
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-for d in $(cd ../../../../.. && pwd)/ooo-svn /usr/lib/ooo3/; do
- if test -d $d; then
- export OOO_INSTALL_PREFIX=$d
- break
- fi
-done
-export SAL_ALLOW_LINKOO_SYMLINKS=1
-test -d $OOO_INSTALL_PREFIX/openoffice.org3 && export OOO_PREFIX_BRAND=$OOO_INSTALL_PREFIX/openoffice.org3 || export OOO_PREFIX_BRAND=$OOO_INSTALL_PREFIX
-export LD_LIBRARY_PATH="$OOO_PREFIX_BRAND/program:$OOO_PREFIX_BRAND/ure-link/lib"
-../../unx*.pro/bin/test "$@"
diff --git a/toolkit/workben/layout/adjust.xml b/toolkit/workben/layout/adjust.xml
deleted file mode 100644
index 186a94b..0000000
--- a/toolkit/workben/layout/adjust.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<dialog xmlns="http://openoffice.org/2007/layout"
- id="window1" title="Text Editor" optimumsize="true"
- has_border="true" sizeable="true" moveable="true">
- <vbox>
- <!-- Ver Top -->
- <hbox>
- <align v-align="0" h-align="0" v-fill="0" h-fill="0">
- <pushbutton label="Top Left" />
- </align>
- <align>
- <pushbutton label="Top Middle" v-align="0" h-align="0.5" v-fill="0" h-fill="0" />
- </align>
- <align>
- <pushbutton label="Top Right" v-align="0" h-align="1" v-fill="0" h-fill="0" />
- </align>
- </hbox>
- <!-- Ver Middle -->
- <hbox>
- <align>
- <pushbutton label="Middle Left" v-align="0.5" h-align="0" v-fill="0" h-fill="0" />
- </align>
- <align>
- <pushbutton label="Middle Middle" v-align="0.5" h-align="0.5" v-fill="0" h-fill="0" />
- </align>
- <align>
- <pushbutton label="Middle Right" v-align="0.5" h-align="1" v-fill="0" h-fill="0" />
- </align>
- </hbox>
- <!-- Ver Bottom -->
- <hbox>
- <align>
- <pushbutton label="Bottom Left" v-align="1" h-align="0" v-fill="0" h-fill="0" />
- </align>
- <align>
- <pushbutton label="Bottom Middle" v-align="1" h-align="0.5" v-fill="0" h-fill="0" />
- </align>
- <align>
- <pushbutton label="Bottom Right" v-align="1" h-align="1" v-fill="0" h-fill="0" />
- </align>
- </hbox>
- </vbox>
-</dialog>
diff --git a/toolkit/workben/layout/align-test.xml b/toolkit/workben/layout/align-test.xml
deleted file mode 100644
index 60c34b4..0000000
--- a/toolkit/workben/layout/align-test.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- This is a template. i18n translation is not performed in-place;
- i18n translated xml files are generated from this template by
- transex3/layout/tralay. !-->
-
-<dialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- title="Align Test" optimumsize="true" has_border="true" sizeable="true" moveable="true">
- <vbox spacing="5" border="5">
- <fixedline/>
- <hbox spacing="0" border="0">
- <vbox spacing="5" border="5">
- <fixedline _text="X" cnt:expand="false"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- <pushbutton label="foo"/>
- </vbox>
- <vbox spacing="5" border="5">
- <fixedline _text="X" cnt:expand="false"/>
- <pushbutton label="bar"/>
- </vbox>
- </hbox>
- <fixedline/>
- <min-size cnt:spacing="0" min-width="200"/>
- </vbox>
-</dialog>
diff --git a/toolkit/workben/layout/align.xml b/toolkit/workben/layout/align.xml
deleted file mode 100644
index 85aee22..0000000
--- a/toolkit/workben/layout/align.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<dialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- title="Align Test" optimumsize="true" has_border="true" sizeable="true" moveable="true">
- <vbox>
- <!-- Ver Top -->
- <hbox>
- <align halign="0" valign="0">
- <pushbutton label="Top Left" />
- </align>
- <align halign="0.5" valign="0">
- <pushbutton label="Top Middle" />
- </align>
- <align halign="1" valign="0">
- <pushbutton label="Top Right" />
- </align>
- </hbox>
- <!-- Ver Middle -->
- <hbox>
- <align halign="0" valign="0.5">
- <pushbutton label="Middle Left" />
- </align>
- <align halign="0.5" valign="0.5">
- <pushbutton label="Middle Middle" />
- </align>
- <align halign="1" valign="0.5">
- <pushbutton label="Middle Right" />
- </align>
- </hbox>
- <!-- Ver Bottom -->
- <hbox>
- <align halign="0" valign="1">
- <pushbutton label="Bottom Left" />
- </align>
- <align halign="0.5" valign="1">
- <pushbutton label="Bottom Middle" />
- </align>
- <align halign="1" valign="1">
- <pushbutton label="Bottom Right" />
- </align>
- </hbox>
- </vbox>
-</dialog>
diff --git a/toolkit/workben/layout/boxtest.xml b/toolkit/workben/layout/boxtest.xml
deleted file mode 100644
index 24ead83..0000000
--- a/toolkit/workben/layout/boxtest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<dialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- title="Box Test" optimumsize="true" has_border="true" sizeable="true" moveable="true">
- <vbox>
- <table>
- <vbox>
- <hbox cnt:expand="false" cnt:fill="false">
- <pushbutton label="XML Left"
- cnt:expand="false" cnt:fill="false"/>
- <pushbutton label="XML Middle"
- cnt:expand="true" cnt:fill="false"/>
- <pushbutton label="XML Right"
- cnt:expand="true" cnt:fill="true"/>
- </hbox>
- <hbox cnt:expand="true" cnt:fill="false">
- <pushbutton label="XML Left"
- cnt:expand="false" cnt:fill="false"/>
- <pushbutton label="XML Middle"
- cnt:expand="true" cnt:fill="false"/>
- <pushbutton label="XML Right"
- cnt:expand="true" cnt:fill="true"/>
- </hbox>
- <hbox cnt:expand="true" cnt:fill="true">
- <pushbutton label="XML Left"
- cnt:expand="false" cnt:fill="false"/>
- <pushbutton label="XML Middle"
- cnt:expand="true" cnt:fill="false"/>
- <pushbutton label="XML Right"
- cnt:expand="true" cnt:fill="true"/>
- </hbox>
- </vbox>
- </table>
- </vbox>
-</dialog>
diff --git a/toolkit/workben/layout/dialogbuttons-ok.xml b/toolkit/workben/layout/dialogbuttons-ok.xml
deleted file mode 100644
index 86c7a1b..0000000
--- a/toolkit/workben/layout/dialogbuttons-ok.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<modaldialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- id="dialog" title="Dialog Button Ordering" optimumsize="true"
- has_border="true" sizeable="true" moveable="true">
- <vbox border="5" spacing="5">
- <fixedline text="Platform default"/>
- <dialogbuttonhbox border="5" spacing="5">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="GNOME"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="gnome">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="KDE"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="kde">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="MacOS"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="macos">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="Windows"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="windows">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- </dialogbuttonhbox>
- </vbox>
-</modaldialog>
diff --git a/toolkit/workben/layout/dialogbuttons-reset.xml b/toolkit/workben/layout/dialogbuttons-reset.xml
deleted file mode 100644
index 6c1c613..0000000
--- a/toolkit/workben/layout/dialogbuttons-reset.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<modaldialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- id="dialog" title="Dialog Button Ordering" optimumsize="true"
- has_border="true" sizeable="true" moveable="true">
- <vbox border="5" spacing="5">
- <fixedline text="Platform default"/>
- <dialogbuttonhbox border="5" spacing="5">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- <resetbutton/>
- </dialogbuttonhbox>
- <fixedline text="GNOME"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="gnome">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- <resetbutton/>
- </dialogbuttonhbox>
- <fixedline text="KDE"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="kde">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- <resetbutton/>
- </dialogbuttonhbox>
- <fixedline text="MacOS"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="macos">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- <resetbutton/>
- </dialogbuttonhbox>
- <fixedline text="Windows"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="windows">
- <flow/>
- <okbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Alternate"/>
- <resetbutton/>
- </dialogbuttonhbox>
- </vbox>
-</modaldialog>
diff --git a/toolkit/workben/layout/dialogbuttons-save.xml b/toolkit/workben/layout/dialogbuttons-save.xml
deleted file mode 100644
index 38bd907..0000000
--- a/toolkit/workben/layout/dialogbuttons-save.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<modaldialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- id="dialog" title="Dialog Button Ordering" optimumsize="true"
- has_border="true" sizeable="true" moveable="true">
- <vbox border="5" spacing="5">
- <fixedline text="Platform default"/>
- <dialogbuttonhbox border="5" spacing="5">
- <flow/>
- <yesbutton label="~Save"/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Don't save"/>
- </dialogbuttonhbox>
- <fixedline text="GNOME"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="gnome">
- <flow/>
- <yesbutton label="~Save"/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Don't save"/>
- </dialogbuttonhbox>
- <fixedline text="KDE"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="kde">
- <flow/>
- <yesbutton label="~Save"/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Don't save"/>
- </dialogbuttonhbox>
- <fixedline text="MacOS"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="macos">
- <flow/>
- <yesbutton label="~Save"/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Don't save"/>
- </dialogbuttonhbox>
- <fixedline text="Windows"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="windows">
- <flow/>
- <yesbutton label="~Save"/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton label="~Don't save"/>
- </dialogbuttonhbox>
- </vbox>
-</modaldialog>
diff --git a/toolkit/workben/layout/dialogbuttons-yes.xml b/toolkit/workben/layout/dialogbuttons-yes.xml
deleted file mode 100644
index 7884559..0000000
--- a/toolkit/workben/layout/dialogbuttons-yes.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<modaldialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- id="dialog" title="Dialog Button Ordering" optimumsize="true"
- has_border="true" sizeable="true" moveable="true">
- <vbox border="5" spacing="5">
- <fixedline text="Platform default"/>
- <dialogbuttonhbox border="5" spacing="5">
- <flow/>
- <yesbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton xlabel="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="GNOME"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="gnome">
- <flow/>
- <yesbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton xlabel="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="KDE"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="kde">
- <flow/>
- <yesbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton xlabel="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="MacOS"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="macos">
- <flow/>
- <yesbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton xlabel="~Alternate"/>
- </dialogbuttonhbox>
- <fixedline text="Windows"/>
- <dialogbuttonhbox border="5" spacing="5" ordering="windows">
- <flow/>
- <yesbutton/>
- <cancelbutton/>
- <helpbutton/>
- <nobutton xlabel="~Alternate"/>
- </dialogbuttonhbox>
- </vbox>
-</modaldialog>
diff --git a/toolkit/workben/layout/editor-normal.xml b/toolkit/workben/layout/editor-normal.xml
deleted file mode 100644
index 7f0dc0b..0000000
--- a/toolkit/workben/layout/editor-normal.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- Would be cool to have others Editor layouts (e.g. Glade-like with
- a window for each function). -->
-
-<dialog xmlns="http://openoffice.org/2007/layout"
- xmlns:cnt="http://openoffice.org/2007/layout/container"
- id="dialog" title="Layout Editor" sizeable="true" >
- <vbox>
- <hbox>
- <min-size min-width="120" cnt:expand="false">
- <vbox>
- <fixedtext label="Layout:" cnt:expand="false" />
- <hbox>
- <listbox id="layout-tree" has_border="true" />
- <vbox cnt:expand="false">
- <pushbutton id="layout-up-button" cnt:expand="false" />
- <pushbutton id="layout-down-button" cnt:expand="false" />
- <fixedtext cnt:expand="true" />
- <pushbutton id="layout-remove-button" cnt:expand="false" />
- </vbox>
- </hbox>
- </vbox>
- </min-size>
- <min-size min-width="120">
- <vbox>
- <fixedtext label="Preview:" cnt:expand="false" />
- <vbox border="50">
- <bin id="preview-box" />
- </vbox>
- </vbox>
- </min-size>
- <min-size min-width="120" cnt:expand="false">
- <vbox>
- <fixedtext label="Properties:" cnt:expand="false" />
- <table id="properties-box" columns="3" />
- </vbox>
- </min-size>
- </hbox>
- <hfixedline cnt:expand="false" />
- <vbox cnt:expand="false">
- <fixedtext label="Create widgets:" cnt:expand="false" />
- <flow id="create-widget" homogeneous="true" spacing="2" />
- <fixedtext label="Create containers:" cnt:expand="false" />
- <flow id="create-container" homogeneous="true" spacing="2" />
- </vbox>
- <hbox cnt:expand="false">
- <vbox><fixedline /><fixedline /><fixedline /><fixedline /></vbox>
-<!-- <pushbutton id="import-button" label="Import..." cnt:expand="false"/>-->
- <pushbutton id="export-button" label="Export (stdout)" cnt:expand="false"/>
- </hbox>
- </vbox>
-</dialog>
diff --git a/toolkit/workben/layout/editor.cxx b/toolkit/workben/layout/editor.cxx
deleted file mode 100644
index f46afb6..0000000
--- a/toolkit/workben/layout/editor.cxx
+++ /dev/null
@@ -1,1856 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list