diff options
Diffstat (limited to 'svtools')
164 files changed, 1101 insertions, 993 deletions
diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx index 5b473b0289c2..fd8db3290e89 100644 --- a/svtools/bmpmaker/bmp.cxx +++ b/svtools/bmpmaker/bmp.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef INCLUDED_RTL_MATH_HXX #include <rtl/math.hxx> -#endif #include <math.h> #include <stdio.h> @@ -161,7 +159,7 @@ void BmpApp::Message( const String& rText, BYTE cExit ) ByteString aText( rText, RTL_TEXTENCODING_UTF8 ); aText.Append( "\r\n" ); - fprintf( stderr, aText.GetBuffer() ); + fprintf( stderr, "%s", aText.GetBuffer() ); } // ----------------------------------------------------------------------------- diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx index 7c264e694a12..3c8a5f6d8414 100644 --- a/svtools/bmpmaker/bmpsum.cxx +++ b/svtools/bmpmaker/bmpsum.cxx @@ -167,7 +167,7 @@ void BmpSum::Message( const String& rText, BYTE nExitCode ) ByteString aText( rText, RTL_TEXTENCODING_UTF8 ); aText.Append( "\r\n" ); - fprintf( stderr, aText.GetBuffer() ); + fprintf( stderr, "%s", aText.GetBuffer() ); } // ----------------------------------------------------------------------------- diff --git a/svtools/bmpmaker/g2g.cxx b/svtools/bmpmaker/g2g.cxx index 6f4ee0f86279..0bd126b2812d 100644 --- a/svtools/bmpmaker/g2g.cxx +++ b/svtools/bmpmaker/g2g.cxx @@ -125,7 +125,7 @@ void G2GApp::Message( const String& rText, BYTE nExitCode ) ByteString aText( rText, RTL_TEXTENCODING_UTF8 ); aText.Append( "\r\n" ); - fprintf( stderr, aText.GetBuffer() ); + fprintf( stderr, "%s", aText.GetBuffer() ); } // ----------------------------------------------------------------------------- diff --git a/svtools/inc/QueryFolderName.hxx b/svtools/inc/QueryFolderName.hxx index 971b4b26e13e..31d08e31c7ed 100644 --- a/svtools/inc/QueryFolderName.hxx +++ b/svtools/inc/QueryFolderName.hxx @@ -28,9 +28,7 @@ #define SVT_QUERYFOLDER_HXX #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/edit.hxx> #include <vcl/dialog.hxx> diff --git a/svtools/inc/acceleratorexecute.hxx b/svtools/inc/acceleratorexecute.hxx index 3ee79e1fca0c..818f4c40b3f7 100644 --- a/svtools/inc/acceleratorexecute.hxx +++ b/svtools/inc/acceleratorexecute.hxx @@ -38,30 +38,18 @@ #define INCLUDED_VECTOR #endif -#ifndef __COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif -#ifndef __COM_SUN_STAR_FRAME_XFRAME_HPP_ #include <com/sun/star/frame/XFrame.hpp> -#endif -#ifndef __COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_ #include <com/sun/star/frame/XDispatchProvider.hpp> -#endif -#ifndef __com_SUN_STAR_UI_XACCELERATORCONFIGURATION_HPP_ #include <com/sun/star/ui/XAcceleratorConfiguration.hpp> -#endif -#ifndef __COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ #include <com/sun/star/util/XURLTransformer.hpp> -#endif #include <com/sun/star/util/URL.hpp> -#ifndef __COM_SUN_STAR_AWT_KEYEVENT_HPP_ #include <com/sun/star/awt/KeyEvent.hpp> -#endif #include <vcl/keycod.hxx> #include <vcl/evntpost.hxx> #include <osl/mutex.h> diff --git a/svtools/inc/addresstemplate.hxx b/svtools/inc/addresstemplate.hxx index f29ea2478b4e..812bee1997ed 100644 --- a/svtools/inc/addresstemplate.hxx +++ b/svtools/inc/addresstemplate.hxx @@ -37,9 +37,7 @@ #include <vcl/lstbox.hxx> #include <vcl/scrbar.hxx> #include <com/sun/star/container/XNameAccess.hpp> -#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#endif #include <com/sun/star/util/AliasProgrammaticPair.hpp> #include <com/sun/star/sdbc/XDataSource.hpp> #include <unotools/configitem.hxx> diff --git a/svtools/inc/calendar.hxx b/svtools/inc/calendar.hxx index f85887873bb0..b98d7e46f3f2 100644 --- a/svtools/inc/calendar.hxx +++ b/svtools/inc/calendar.hxx @@ -30,17 +30,11 @@ #include "svtools/svtdllapi.h" #include <unotools/calendarwrapper.hxx> -#ifndef _COM_SUN_STAR_I18N_WEEKDAYS_HPP #include <com/sun/star/i18n/Weekdays.hpp> -#endif -#ifndef _CTRL_HXX #include <vcl/ctrl.hxx> -#endif #include <vcl/timer.hxx> -#ifndef _FIELD_HXX #include <vcl/field.hxx> -#endif class Table; class MouseEvent; diff --git a/svtools/inc/ctrlbox.hxx b/svtools/inc/ctrlbox.hxx index 9e6e942daf1e..27745478cb3c 100644 --- a/svtools/inc/ctrlbox.hxx +++ b/svtools/inc/ctrlbox.hxx @@ -30,24 +30,12 @@ #include "svtools/svtdllapi.h" -#ifndef _LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _COMBOBOX_HXX #include <vcl/combobox.hxx> -#endif -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif -#ifndef _VIRDEV_HXX #include <vcl/virdev.hxx> -#endif -#ifndef _METRIC_HXX #include <vcl/metric.hxx> -#endif -#ifndef _FIELD_HXX #include <vcl/field.hxx> -#endif class ImplFontList; class ImpColorList; diff --git a/svtools/inc/ctrltool.hxx b/svtools/inc/ctrltool.hxx index a0eb5db2b955..fca5f9795f1f 100644 --- a/svtools/inc/ctrltool.hxx +++ b/svtools/inc/ctrltool.hxx @@ -30,13 +30,9 @@ #include "svtools/svtdllapi.h" -#ifndef _SAL_TYPES_H #include <sal/types.h> -#endif #include <tools/list.hxx> -#ifndef _METRIC_HXX #include <vcl/metric.hxx> -#endif class ImplFontListNameInfo; class OutputDevice; diff --git a/svtools/inc/filectrl.hxx b/svtools/inc/filectrl.hxx index dd314bb23ca1..101090f80b6f 100644 --- a/svtools/inc/filectrl.hxx +++ b/svtools/inc/filectrl.hxx @@ -31,9 +31,7 @@ #include "svtools/svtdllapi.h" #include <vcl/window.hxx> #include <vcl/edit.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?! diff --git a/svtools/inc/filedlg.hxx b/svtools/inc/filedlg.hxx index c04e48fc7658..e9ecd9a3d65c 100644 --- a/svtools/inc/filedlg.hxx +++ b/svtools/inc/filedlg.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" -#ifndef _DIALOG_HXX #include <vcl/dialog.hxx> -#endif class Edit; class ImpSvFileDlg; diff --git a/svtools/inc/fileview.hxx b/svtools/inc/fileview.hxx index 74476541dcd8..bd52e0824003 100644 --- a/svtools/inc/fileview.hxx +++ b/svtools/inc/fileview.hxx @@ -33,9 +33,7 @@ #include <vcl/ctrl.hxx> #include <vcl/image.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/dialog.hxx> #include <rtl/ustring.hxx> diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index ff94cc966f4d..738a1b49ea8f 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -31,9 +31,7 @@ #include <vcl/ctrl.hxx> #include <vcl/imgctrl.hxx> -#ifndef _SVTOOLS_HYPERLABEL_HXX #include "svtools/hyperlabel.hxx" -#endif diff --git a/svtools/inc/rtfkeywd.hxx b/svtools/inc/rtfkeywd.hxx index 5ccd9149bd68..60963c58abbc 100644 --- a/svtools/inc/rtfkeywd.hxx +++ b/svtools/inc/rtfkeywd.hxx @@ -39,6 +39,7 @@ #define OOO_STRING_SVTOOLS_RTF_ALT "\\alt" #define OOO_STRING_SVTOOLS_RTF_ANNOTATION "\\annotation" #define OOO_STRING_SVTOOLS_RTF_ANSI "\\ansi" +#define OOO_STRING_SVTOOLS_RTF_ATNDATE "\\atndate" #define OOO_STRING_SVTOOLS_RTF_ATNID "\\atnid" #define OOO_STRING_SVTOOLS_RTF_AUTHOR "\\author" #define OOO_STRING_SVTOOLS_RTF_B "\\b" @@ -976,12 +977,15 @@ #define OOO_STRING_SVTOOLS_RTF_SHPBXCOLUMN "\\shpbxcolumn" #define OOO_STRING_SVTOOLS_RTF_SHPBXMARGIN "\\shpbxmargin" #define OOO_STRING_SVTOOLS_RTF_SHPBXPAGE "\\shpbxpage" +#define OOO_STRING_SVTOOLS_RTF_SHPBXIGNORE "\\shpbxignore" #define OOO_STRING_SVTOOLS_RTF_SHPBYMARGIN "\\shpbymargin" #define OOO_STRING_SVTOOLS_RTF_SHPBYPAGE "\\shpbypage" #define OOO_STRING_SVTOOLS_RTF_SHPBYPARA "\\shpbypara" +#define OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE "\\shpbyignore" #define OOO_STRING_SVTOOLS_RTF_SHPFBLWTXT "\\shpfblwtxt" #define OOO_STRING_SVTOOLS_RTF_SHPFHDR "\\shpfhdr" #define OOO_STRING_SVTOOLS_RTF_SHPGRP "\\shpgrp" +#define OOO_STRING_SVTOOLS_RTF_SHPINST "\\shpinst" #define OOO_STRING_SVTOOLS_RTF_SHPLEFT "\\shpleft" #define OOO_STRING_SVTOOLS_RTF_SHPLID "\\shplid" #define OOO_STRING_SVTOOLS_RTF_SHPLOCKANCHOR "\\shplockanchor" @@ -993,6 +997,7 @@ #define OOO_STRING_SVTOOLS_RTF_SHPWRK "\\shpwrk" #define OOO_STRING_SVTOOLS_RTF_SHPWR "\\shpwr" #define OOO_STRING_SVTOOLS_RTF_SHPZ "\\shpz" +#define OOO_STRING_SVTOOLS_RTF_SP "\\sp" #define OOO_STRING_SVTOOLS_RTF_SPRSBSP "\\sprsbsp" #define OOO_STRING_SVTOOLS_RTF_SPRSLNSP "\\sprslnsp" #define OOO_STRING_SVTOOLS_RTF_SPRSTSM "\\sprstsm" @@ -1138,4 +1143,11 @@ #define OOO_STRING_SVTOOLS_RTF_OLHWAVE "\\olhwave" #define OOO_STRING_SVTOOLS_RTF_OLOLDBWAVE "\\ololdbwave" +// Support for nested tables +#define OOO_STRING_SVTOOLS_RTF_ITAP "\\itap" +#define OOO_STRING_SVTOOLS_RTF_NESTCELL "\\nestcell" +#define OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS "\\nesttableprops" +#define OOO_STRING_SVTOOLS_RTF_NESTROW "\\nestrow" +#define OOO_STRING_SVTOOLS_RTF_NONESTTABLES "\\nonesttables" + #endif // _RTFKEYWD_HXX diff --git a/svtools/inc/rtfout.hxx b/svtools/inc/rtfout.hxx index 12a125635132..54559e9030bb 100644 --- a/svtools/inc/rtfout.hxx +++ b/svtools/inc/rtfout.hxx @@ -31,9 +31,7 @@ #include "svtools/svtdllapi.h" #include <tools/solar.h> -#ifndef _RTL_TEXTENC_H_ #include <rtl/textenc.h> -#endif class String; class SvStream; diff --git a/svtools/inc/ruler.hxx b/svtools/inc/ruler.hxx index c2649b298ba6..71564e0974dc 100644 --- a/svtools/inc/ruler.hxx +++ b/svtools/inc/ruler.hxx @@ -31,9 +31,7 @@ #include "svtools/svtdllapi.h" #include <tools/link.hxx> #include <vcl/window.hxx> -#ifndef _VIRDEV_HXX #include <vcl/virdev.hxx> -#endif #include <vcl/field.hxx> class MouseEvent; @@ -690,6 +688,10 @@ private: USHORT mnExtraStyle; USHORT mnExtraClicks; USHORT mnExtraModifier; +// Amelia + long mnCharWidth; + long mnLineHeight; + RulerExtra meExtraType; RulerType meDragType; MapUnit meSourceUnit; @@ -869,6 +871,11 @@ public: //set text direction right-to-left void SetTextRTL(BOOL bRTL); + + void SetCharWidth( long nWidth ) { mnCharWidth = nWidth ; } + void SetLineHeight( long nHeight ) { mnLineHeight = nHeight ; } + + void DrawTicks(); }; #endif // _RULER_HXX diff --git a/svtools/inc/scrwin.hxx b/svtools/inc/scrwin.hxx index 1542ed667133..98dc8f783ed6 100644 --- a/svtools/inc/scrwin.hxx +++ b/svtools/inc/scrwin.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" -#ifndef _SCRBAR_HXX //autogen #include <vcl/scrbar.hxx> -#endif class DataChangedEvent; diff --git a/svtools/inc/stdmenu.hxx b/svtools/inc/stdmenu.hxx index 1b7e9816a103..613f5aaded2a 100644 --- a/svtools/inc/stdmenu.hxx +++ b/svtools/inc/stdmenu.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" #include <tools/link.hxx> -#ifndef _MENU_HXX #include <vcl/menu.hxx> -#endif class FontList; class FontInfo; diff --git a/svtools/inc/svtools/accessiblefactory.hxx b/svtools/inc/svtools/accessiblefactory.hxx index 9606e93a2fa0..c80e5bd9cee6 100755..100644 --- a/svtools/inc/svtools/accessiblefactory.hxx +++ b/svtools/inc/svtools/accessiblefactory.hxx @@ -28,13 +28,9 @@ #ifndef SVTOOLS_ACCESSIBLE_FACTORY_HXX #define SVTOOLS_ACCESSIBLE_FACTORY_HXX -#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX #include <com/sun/star/uno/Reference.hxx> -#endif -#ifndef _RTL_REF_HXX #include <rtl/ref.hxx> -#endif #include "AccessibleBrowseBoxObjType.hxx" #include "accessibletableprovider.hxx" #include "accessibletable.hxx" diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx index 8ff17a2b71c7..8ff17a2b71c7 100755..100644 --- a/svtools/inc/svtools/accessibletable.hxx +++ b/svtools/inc/svtools/accessibletable.hxx diff --git a/svtools/inc/svtools/accessibletableprovider.hxx b/svtools/inc/svtools/accessibletableprovider.hxx index d14aecce9f58..3905ff3f9898 100644 --- a/svtools/inc/svtools/accessibletableprovider.hxx +++ b/svtools/inc/svtools/accessibletableprovider.hxx @@ -87,7 +87,7 @@ public: virtual sal_Bool HasRowHeader() const = 0; //GetColumnId /** @return <TRUE/>, if the object can focus a cell. */ virtual sal_Bool IsCellFocusable() const = 0; - virtual sal_Bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0; + virtual BOOL GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0; virtual void SetNoSelection() = 0; virtual void SelectAll() = 0; diff --git a/svtools/inc/svtools/brwbox.hxx b/svtools/inc/svtools/brwbox.hxx index 42fb4b4d36ac..e19d27c18226 100644 --- a/svtools/inc/svtools/brwbox.hxx +++ b/svtools/inc/svtools/brwbox.hxx @@ -369,7 +369,7 @@ protected: @param nRow nRow starts at 0 */ - virtual BOOL SeekRow( long nRow ) = 0; + virtual sal_Bool SeekRow( long nRow ) = 0; virtual void DrawCursor(); virtual void PaintRow( OutputDevice &rDev, const Rectangle &rRect ); virtual void PaintData( Window& rWin, const Rectangle& rRect ); @@ -470,7 +470,7 @@ public: virtual void EndScroll(); virtual void Select(); virtual void DoubleClick( const BrowserMouseEvent& rEvt ); - virtual BOOL IsCursorMoveAllowed( long nNewRow, USHORT nNewColId ) const; + virtual sal_Bool IsCursorMoveAllowed( long nNewRow, USHORT nNewColId ) const; virtual void CursorMoved(); virtual void ColumnMoved( USHORT nColId ); virtual void ColumnResized( USHORT nColId ); diff --git a/svtools/inc/svtools/chartprettypainter.hxx b/svtools/inc/svtools/chartprettypainter.hxx index 200951d5c5e8..c885bdb83de1 100644 --- a/svtools/inc/svtools/chartprettypainter.hxx +++ b/svtools/inc/svtools/chartprettypainter.hxx @@ -28,9 +28,7 @@ #ifndef CHARTPRETTYPAINTER_HXX #define CHARTPRETTYPAINTER_HXX -#ifndef INCLUDED_SVTDLLAPI_H #include "svtools/svtdllapi.h" -#endif //#include <svtools/embedhlp.hxx> #include <vcl/outdev.hxx> diff --git a/svtools/inc/svtools/colrdlg.hxx b/svtools/inc/svtools/colrdlg.hxx index 00ec9647aa7a..e5e6ff5c6ec3 100644 --- a/svtools/inc/svtools/colrdlg.hxx +++ b/svtools/inc/svtools/colrdlg.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" #include <vcl/dialog.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/field.hxx> #include <svtools/colctrl.hxx> diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx index f97449e1880c..0eafc79c69e4 100644 --- a/svtools/inc/svtools/editbrowsebox.hxx +++ b/svtools/inc/svtools/editbrowsebox.hxx @@ -36,9 +36,7 @@ #include <vcl/combobox.hxx> #include <vcl/lstbox.hxx> -#ifndef _IMAGEBTN_HXX #include <vcl/imagebtn.hxx> -#endif #include <svtools/brwbox.hxx> #include <vcl/timer.hxx> #include <svtools/brwhead.hxx> diff --git a/svtools/inc/svtools/ehdl.hxx b/svtools/inc/svtools/ehdl.hxx index 967c41636ea3..827b781ac004 100644 --- a/svtools/inc/svtools/ehdl.hxx +++ b/svtools/inc/svtools/ehdl.hxx @@ -32,9 +32,7 @@ #include "svtools/svtdllapi.h" -#ifndef _EINF_HXX #include <tools/errinf.hxx> -#endif class Window; class ResMgr; diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 098b565385ec..812e79dfcd43 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -34,9 +34,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <vcl/graph.hxx> -#ifndef _SV_MAPUNIT_HXX #include <vcl/mapunit.hxx> -#endif #include <rtl/ustring.hxx> #define NS_UNO ::com::sun::star::uno diff --git a/svtools/inc/svtools/inettbc.hxx b/svtools/inc/svtools/inettbc.hxx index 9394f1ba5ccd..9fff33ac2ca5 100644 --- a/svtools/inc/svtools/inettbc.hxx +++ b/svtools/inc/svtools/inettbc.hxx @@ -34,9 +34,7 @@ #include <tools/string.hxx> #include <tools/urlobj.hxx> -#ifndef _COMBOBOX_HXX //autogen #include <vcl/combobox.hxx> -#endif class IUrlFilter; class SvtMatchContext_Impl; diff --git a/svtools/inc/svtools/insdlg.hxx b/svtools/inc/svtools/insdlg.hxx index afbbc2509011..d98d723bca2c 100644 --- a/svtools/inc/svtools/insdlg.hxx +++ b/svtools/inc/svtools/insdlg.hxx @@ -34,9 +34,7 @@ #include <tools/globname.hxx> #include <sot/formats.hxx> -#ifndef _OWNCONT_HXX #include <svl/ownlist.hxx> -#endif #include <svtools/transfer.hxx> class SvObjectServer diff --git a/svtools/inc/svtools/miscopt.hxx b/svtools/inc/svtools/miscopt.hxx index ecd2574c1943..5d642021ec48 100644 --- a/svtools/inc/svtools/miscopt.hxx +++ b/svtools/inc/svtools/miscopt.hxx @@ -110,6 +110,12 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options void SetUseSystemFileDialog( sal_Bool bSet ); sal_Bool IsUseSystemFileDialogReadOnly() const; + sal_Bool TryODMADialog() const; + void SetTryODMADialog( sal_Bool bSet ); + sal_Bool IsTryUseODMADialogReadOnly() const; + + sal_Bool DisableUICustomization() const; + sal_Bool IsPluginsEnabled() const; void SetPluginsEnabled( sal_Bool bEnable ); sal_Bool IsPluginsEnabledReadOnly() const; @@ -136,6 +142,13 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options sal_Bool UseSystemPrintDialog() const; void SetUseSystemPrintDialog( sal_Bool bSet ); + sal_Bool ShowLinkWarningDialog() const; + void SetShowLinkWarningDialog( sal_Bool bSet ); + sal_Bool IsShowLinkWarningDialogReadOnly() const; + + void SetSaveAlwaysAllowed( sal_Bool bSet ); + sal_Bool IsSaveAlwaysAllowed() const; + //------------------------------------------------------------------------------------------------------------- // private methods //------------------------------------------------------------------------------------------------------------- diff --git a/svtools/inc/svtools/printdlg.hxx b/svtools/inc/svtools/printdlg.hxx index 8c455b910b41..090cb12f44ed 100644 --- a/svtools/inc/svtools/printdlg.hxx +++ b/svtools/inc/svtools/printdlg.hxx @@ -30,27 +30,13 @@ #include "svtools/svtdllapi.h" -#ifndef _VCL_DIALOG_HXX #include <vcl/dialog.hxx> -#endif -#ifndef _VCL_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _VCL_GROUP_HXX #include <vcl/group.hxx> -#endif -#ifndef _VCL_FIELD_HXX #include <vcl/field.hxx> -#endif -#ifndef _VCL_EDIT_HXX #include <vcl/edit.hxx> -#endif -#ifndef _VCL_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif #include <svtools/stdctrl.hxx> class Printer; diff --git a/svtools/inc/svtools/prnsetup.hxx b/svtools/inc/svtools/prnsetup.hxx index 8e1ced9ed1a0..963d28ab2dda 100644 --- a/svtools/inc/svtools/prnsetup.hxx +++ b/svtools/inc/svtools/prnsetup.hxx @@ -30,24 +30,12 @@ #include "svtools/svtdllapi.h" -#ifndef _VCL_DIALOG_HXX #include <vcl/dialog.hxx> -#endif -#ifndef _VCL_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _VCL_GROUP_HXX #include <vcl/group.hxx> -#endif -#ifndef _VCL_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef _VCL_TIMER_HXX #include <vcl/timer.hxx> -#endif #include <svtools/stdctrl.hxx> class Printer; diff --git a/svtools/inc/svtools/stdctrl.hxx b/svtools/inc/svtools/stdctrl.hxx index 4c0b794f78e3..cef065ae8f80 100644 --- a/svtools/inc/svtools/stdctrl.hxx +++ b/svtools/inc/svtools/stdctrl.hxx @@ -30,12 +30,8 @@ #include "svtools/svtdllapi.h" -#ifndef _EDIT_HXX #include <vcl/edit.hxx> -#endif -#ifndef _FIXED_HXX #include <vcl/fixed.hxx> -#endif // ------------- // - FixedInfo - diff --git a/svtools/inc/svtools/svicnvw.hxx b/svtools/inc/svtools/svicnvw.hxx index ac15f0b55be6..b8385e85ed42 100644 --- a/svtools/inc/svtools/svicnvw.hxx +++ b/svtools/inc/svtools/svicnvw.hxx @@ -28,9 +28,7 @@ #ifndef _SVICNVW_HXX #define _SVICNVW_HXX -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif #include <svtools/svlbox.hxx> class SvImpIconView; diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx index c28b8d5db10c..0e58f02f1ce8 100644 --- a/svtools/inc/svtools/svlbitm.hxx +++ b/svtools/inc/svtools/svlbitm.hxx @@ -31,13 +31,9 @@ #include "svtools/svtdllapi.h" -#ifndef LINK_HXX #include <tools/link.hxx> -#endif -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif #include <svtools/svlbox.hxx> class SvLBoxEntry; diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx index f33784f45397..3c1371586a74 100644 --- a/svtools/inc/svtools/svlbox.hxx +++ b/svtools/inc/svtools/svlbox.hxx @@ -35,17 +35,11 @@ #define INCLUDED_DEQUE #endif -#ifndef _CTRL_HXX #include <vcl/ctrl.hxx> -#endif #include <vcl/seleng.hxx> -#ifndef _EDIT_HXX #include <vcl/edit.hxx> -#endif #include <vcl/timer.hxx> -#ifndef _ACCEL_HXX #include <vcl/accel.hxx> -#endif #include <vcl/mnemonicengine.hxx> #include <tools/gen.hxx> #include <svtools/treelist.hxx> diff --git a/svtools/inc/svtools/svtabbx.hxx b/svtools/inc/svtools/svtabbx.hxx index 89fd92a4fc09..c5aae3f47479 100644 --- a/svtools/inc/svtools/svtabbx.hxx +++ b/svtools/inc/svtools/svtabbx.hxx @@ -202,7 +202,7 @@ public: virtual sal_Bool HasRowHeader() const; //GetColumnId /** @return <TRUE/>, if the object can focus a cell. */ virtual sal_Bool IsCellFocusable() const; - virtual sal_Bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ); + virtual BOOL GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ); virtual void SetNoSelection(); using SvListView::SelectAll; diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index a57a0f5bb0fe..feea22cf383e 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -307,6 +307,7 @@ #define BMP_HELP_AGENT_IMAGE (RID_SVTOOLS_BITMAP_START + 1) #define BMP_HELP_AGENT_CLOSER (RID_SVTOOLS_BITMAP_START + 2) #define BMP_PLUGIN (RID_SVTOOLS_BITMAP_START + 3) +#define BMP_LIST_ADD (RID_SVTOOLS_BITMAP_START + 4) //............................................................................. // image lists diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx index 829feecd5836..76628d33e463 100644 --- a/svtools/inc/svtools/table/tabledatawindow.hxx +++ b/svtools/inc/svtools/table/tabledatawindow.hxx @@ -27,9 +27,7 @@ #ifndef SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX #define SVTOOLS_SOURCE_TABLE_TABLEDATAWINDOW_HXX -#ifndef _SV_WINDOW_HXX #include <vcl/window.hxx> -#endif #include <vcl/seleng.hxx> //........................................................................ diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx index ef27edee2efe..83f21b9647c2 100644 --- a/svtools/inc/svtools/texteng.hxx +++ b/svtools/inc/svtools/texteng.hxx @@ -57,9 +57,7 @@ class TETextPortion; #include <tools/string.hxx> #include <tools/gen.hxx> -#ifndef _COM_SUN_STAR_LOCALE_LOCALE_HPP_ #include <com/sun/star/lang/Locale.hpp> -#endif #include <com/sun/star/uno/Reference.hxx> struct TEIMEInfos; diff --git a/svtools/inc/svtools/textview.hxx b/svtools/inc/svtools/textview.hxx index c17084a1d693..50a87110dcbe 100644 --- a/svtools/inc/svtools/textview.hxx +++ b/svtools/inc/svtools/textview.hxx @@ -76,7 +76,7 @@ protected: void ImpShowHideSelection( BOOL bShow, const TextSelection* pRange = NULL ); TextSelection ImpMoveCursor( const KeyEvent& rKeyEvent ); - TextPaM ImpDelete( BOOL bForward, BYTE nMode ); + TextPaM ImpDelete( BYTE nMode, BYTE nDelMode ); void ImpSetSelection( const TextSelection& rNewSel, BOOL bUI ); BOOL IsInSelection( const TextPaM& rPaM ); diff --git a/svtools/inc/svtools/toolpanel/decklayouter.hxx b/svtools/inc/svtools/toolpanel/decklayouter.hxx index da03d7c6c3aa..da03d7c6c3aa 100755..100644 --- a/svtools/inc/svtools/toolpanel/decklayouter.hxx +++ b/svtools/inc/svtools/toolpanel/decklayouter.hxx diff --git a/svtools/inc/svtools/toolpanel/tablayouter.hxx b/svtools/inc/svtools/toolpanel/tablayouter.hxx index 92b36acf9114..92b36acf9114 100755..100644 --- a/svtools/inc/svtools/toolpanel/tablayouter.hxx +++ b/svtools/inc/svtools/toolpanel/tablayouter.hxx diff --git a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx index a1009591ffba..a1009591ffba 100755..100644 --- a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx +++ b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx index 5eac1484fff9..168f2fbb99a4 100644 --- a/svtools/inc/svtools/transfer.hxx +++ b/svtools/inc/svtools/transfer.hxx @@ -44,9 +44,7 @@ #include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> #include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> #include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_XDROPTARGETELISTENER_HPP_ #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> -#endif #include <com/sun/star/io/XInputStream.hpp> // ------------------------ diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index 3ba013d90830..e648023b9bbe 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -32,9 +32,7 @@ #include <tools/solar.h> #include <tools/list.hxx> -#ifndef _TABLE_HXX #include <tools/table.hxx> -#endif #include <tools/link.hxx> #include <tools/string.hxx> #include <tools/debug.hxx> diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx index 0937d824daf0..b4dac5cc196c 100644 --- a/svtools/inc/svtools/valueset.hxx +++ b/svtools/inc/svtools/valueset.hxx @@ -30,12 +30,8 @@ #include "svtools/svtdllapi.h" -#ifndef _CTRL_HXX #include <vcl/ctrl.hxx> -#endif -#ifndef _VIRDEV_HXX #include <vcl/virdev.hxx> -#endif #include <vcl/timer.hxx> class MouseEvent; diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx index 02562ac4bb63..3fcfd4c20aa4 100644 --- a/svtools/inc/svtools/wizardmachine.hxx +++ b/svtools/inc/svtools/wizardmachine.hxx @@ -29,9 +29,7 @@ #include "svtools/svtdllapi.h" #include <svtools/wizdlg.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/tabpage.hxx> #include <comphelper/stl_types.hxx> diff --git a/svtools/inc/svtools/wizdlg.hxx b/svtools/inc/svtools/wizdlg.hxx index 5bd2db5672ed..17fccaeea3ec 100644 --- a/svtools/inc/svtools/wizdlg.hxx +++ b/svtools/inc/svtools/wizdlg.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" -#ifndef _VCL_DIALOG_HXX #include <vcl/dialog.hxx> -#endif class TabPage; class Button; diff --git a/svtools/inc/svtools/xwindowitem.hxx b/svtools/inc/svtools/xwindowitem.hxx index eca425cf1369..eca425cf1369 100755..100644 --- a/svtools/inc/svtools/xwindowitem.hxx +++ b/svtools/inc/svtools/xwindowitem.hxx diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/tabbar.hxx index e036f4c2f045..442e605fc67f 100644 --- a/svtools/inc/tabbar.hxx +++ b/svtools/inc/tabbar.hxx @@ -302,6 +302,7 @@ ueber einem bzw. ueber welchem Item durchgefuehrt wurde. #define WB_TOPBORDER ((WinBits)0x04000000) #define WB_3DTAB ((WinBits)0x08000000) #define WB_MINSCROLL ((WinBits)0x20000000) +#define WB_INSERTTAB ((WinBits)0x40000000) #define WB_STDTABBAR WB_BORDER // ------------------ @@ -328,6 +329,7 @@ typedef USHORT TabBarPageBits; // - TabBar - // ---------- struct TabBar_Impl; +struct ImplTabBarItem; class SVT_DLLPUBLIC TabBar : public Window { @@ -371,6 +373,7 @@ private: BOOL mbSelColor; BOOL mbSelTextColor; BOOL mbMirrored; + bool mbHasInsertTab; // if true, the tab bar has an extra tab at the end. Link maSelectHdl; Link maDoubleClickHdl; Link maSplitHdl; @@ -394,11 +397,15 @@ private: SVT_DLLPRIVATE void ImplSelect(); SVT_DLLPRIVATE void ImplActivatePage(); SVT_DLLPRIVATE long ImplDeactivatePage(); + SVT_DLLPRIVATE void ImplPrePaint(); + SVT_DLLPRIVATE ImplTabBarItem* ImplGetLastTabBarItem( USHORT nItemCount ) const; + SVT_DLLPRIVATE Rectangle ImplGetInsertTabRect(ImplTabBarItem* pItem) const; DECL_DLLPRIVATE_LINK( ImplClickHdl, ImplTabButton* ); public: static const sal_uInt16 APPEND; static const sal_uInt16 PAGE_NOT_FOUND; + static const sal_uInt16 INSERT_TAB_POS; TabBar( Window* pParent, WinBits nWinStyle = WB_STDTABBAR ); virtual ~TabBar(); @@ -443,7 +450,7 @@ public: USHORT GetPageCount() const; USHORT GetPageId( USHORT nPos ) const; USHORT GetPagePos( USHORT nPageId ) const; - USHORT GetPageId( const Point& rPos ) const; + USHORT GetPageId( const Point& rPos, bool bCheckInsTab = false ) const; Rectangle GetPageRect( USHORT nPageId ) const; // returns the rectangle in which page tabs are drawn Rectangle GetPageArea() const; diff --git a/svtools/inc/taskbar.hxx b/svtools/inc/taskbar.hxx index 46853fa07c03..32f0396cde8e 100644 --- a/svtools/inc/taskbar.hxx +++ b/svtools/inc/taskbar.hxx @@ -30,9 +30,7 @@ #include "svtools/svtdllapi.h" #include <tools/time.hxx> -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <vcl/timer.hxx> #include <vcl/toolbox.hxx> #include <vcl/status.hxx> diff --git a/svtools/inc/wallitem.hxx b/svtools/inc/wallitem.hxx index 533d5ae3f6d3..468d68e82d3d 100644 --- a/svtools/inc/wallitem.hxx +++ b/svtools/inc/wallitem.hxx @@ -27,9 +27,7 @@ #ifndef _WALLITEM_HXX #define _WALLITEM_HXX -#ifndef SHL_HXX #include <tools/shl.hxx> -#endif // ----------------------------------------------------------------------------------------- // Hilfsklasse, um die Download-Funktionalitaet des SvxBrushItems unterhalb diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 3a29c4ae63fa..3ca6e5ce77d5 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2594,7 +2594,7 @@ void BrowseBox::VisibleRowsChanged( long, USHORT ) //------------------------------------------------------------------- -BOOL BrowseBox::IsCursorMoveAllowed( long, USHORT ) const +sal_Bool BrowseBox::IsCursorMoveAllowed( long, USHORT ) const /* [Beschreibung] diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 102af1b6e1a1..9668f3221bd9 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -459,7 +459,7 @@ sal_Bool BrowseBox::IsCellFocusable() const return sal_True; } // ----------------------------------------------------------------------------- -sal_Bool BrowseBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) +BOOL BrowseBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) { return GoToRowColumnId( _nRow, GetColumnId( _nColumn ) ); } diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index cb43e4989355..305a03f2d266 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -33,16 +33,10 @@ #ifndef GCC #endif -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif #include <tools/debug.hxx> diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 1deb8aeb5b56..86157c991cd5 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -28,14 +28,10 @@ #ifndef _SFXDATWIN_HXX #define _SFXDATWIN_HXX -#ifndef _BRWBOX_HXX #include <svtools/brwbox.hxx> -#endif #include <svtools/brwhead.hxx> #include <vcl/timer.hxx> -#ifndef _IMAGE_HXX //autogen #include <vcl/image.hxx> -#endif #include <tools/list.hxx> #include <svtools/transfer.hxx> diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 4f0afbaf5d2d..31d0813ba7ee 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -29,26 +29,18 @@ #include "precompiled_svtools.hxx" #include <svtools/editbrowsebox.hxx> -#ifndef _SVTOOLS_EDITBROWSEBOX_HRC_ #include "editbrowsebox.hrc" -#endif -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif #include <tools/debug.hxx> #include <vcl/window.hxx> -#ifndef _EDIT_HXX //autogen #include <vcl/edit.hxx> -#endif #include <tools/resid.hxx> #include <vcl/spinfld.hxx> #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif #include <algorithm> #include <tools/multisel.hxx> diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index b2d2c54232b0..b635fbac13cd 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -36,21 +36,11 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_ #include <comphelper/configurationhelper.hxx> -#endif -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ #include <unotools/processfactory.hxx> -#endif -#ifndef _SVT_LOGHELPER_HXX_ #include <unotools/loghelper.hxx> -#endif #include <svl/smplhint.hxx> diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 1551361f252f..6d18130462ba 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -190,9 +190,9 @@ class SvtMenuOptions_Impl : public ConfigItem Commit(); } - void SetMenuIconsState ( sal_Int16 bState ) + void SetMenuIconsState ( sal_Int16 nState ) { - m_nMenuIcons = bState; + m_nMenuIcons = nState; SetModified(); for ( USHORT n=0; n<aList.Count(); n++ ) aList.GetObject(n)->Call( this ); @@ -245,8 +245,15 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl() // Follow assignment use order of values in relation to our list of key names! DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nI miss some values of configuration keys!\n" ); - sal_Bool bMenuIcons = true; - sal_Bool bSystemMenuIcons = true; + sal_Bool bMenuIcons = sal_True; + sal_Bool bSystemMenuIcons = sal_True; + if (m_nMenuIcons == 2) + bMenuIcons = (sal_Bool)(Application::GetSettings().GetStyleSettings().GetPreferredUseImagesInMenus()); + else + { + bSystemMenuIcons = sal_False; + bMenuIcons = m_nMenuIcons ? sal_True : sal_False; + } // Copy values from list in right order to ouer internal member. sal_Int32 nPropertyCount = seqValues.getLength() ; @@ -335,12 +342,12 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) else if( seqPropertyNames[nProperty] == PROPERTYNAME_SHOWICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\ShowIconsInMenues\"?" ); - bMenuSettingsChanged = seqValues[nProperty] >>= bMenuIcons; + bMenuSettingsChanged |= seqValues[nProperty] >>= bMenuIcons; } else if( seqPropertyNames[nProperty] == PROPERTYNAME_SYSTEMICONSINMENUES ) { DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" ); - bMenuSettingsChanged = seqValues[nProperty] >>= bSystemMenuIcons; + bMenuSettingsChanged |= seqValues[nProperty] >>= bSystemMenuIcons; } #if OSL_DEBUG_LEVEL > 1 diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 7b04b56104e0..45fcc187b741 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -78,8 +78,16 @@ using namespace ::com::sun::star; #define PROPERTYHANDLE_SYMBOLSTYLE 4 #define PROPERTYNAME_USESYSTEMPRINTDIALOG ASCII_STR("UseSystemPrintDialog") #define PROPERTYHANDLE_USESYSTEMPRINTDIALOG 5 +#define PROPERTYNAME_TRYODMADIALOG ASCII_STR("TryODMADialog") +#define PROPERTYHANDLE_TRYODMADIALOG 6 +#define PROPERTYNAME_SHOWLINKWARNINGDIALOG ASCII_STR("ShowLinkWarningDialog") +#define PROPERTYHANDLE_SHOWLINKWARNINGDIALOG 7 +#define PROPERTYNAME_DISABLEUICUSTOMIZATION ASCII_STR("DisableUICustomization") +#define PROPERTYHANDLE_DISABLEUICUSTOMIZATION 8 +#define PROPERTYNAME_ALWAYSALLOWSAVE ASCII_STR("AlwaysAllowSave") +#define PROPERTYHANDLE_ALWAYSALLOWSAVE 9 -#define PROPERTYCOUNT 6 +#define PROPERTYCOUNT 10 #define VCL_TOOLBOX_STYLE_FLAT ((USHORT)0x0004) // from <vcl/toolbox.hxx> @@ -99,6 +107,8 @@ class SvtMiscOptions_Impl : public ConfigItem LinkList aList; sal_Bool m_bUseSystemFileDialog; sal_Bool m_bIsUseSystemFileDialogRO; + sal_Bool m_bTryODMADialog; + sal_Bool m_bIsTryODMADialogRO; sal_Bool m_bPluginsEnabled; sal_Bool m_bIsPluginsEnabledRO; sal_Int16 m_nSymbolsSize; @@ -108,6 +118,10 @@ class SvtMiscOptions_Impl : public ConfigItem sal_Bool m_bIsToolboxStyleRO; sal_Bool m_bUseSystemPrintDialog; sal_Bool m_bIsUseSystemPrintDialogRO; + sal_Bool m_bShowLinkWarningDialog; + sal_Bool m_bIsShowLinkWarningDialogRO; + sal_Bool m_bDisableUICustomization; + sal_Bool m_bAlwaysAllowSave; //------------------------------------------------------------------------------------------------------------- // public methods @@ -176,6 +190,24 @@ class SvtMiscOptions_Impl : public ConfigItem inline sal_Bool IsUseSystemFileDialogReadOnly() const { return m_bIsUseSystemFileDialogRO; } + inline sal_Bool TryODMADialog() const + { return m_bTryODMADialog; } + + inline void SetTryODMADialog( sal_Bool bSet ) + { m_bTryODMADialog = bSet; SetModified(); } + + inline sal_Bool IsTryUseODMADialogReadOnly() const + { return m_bIsTryODMADialogRO; } + + inline sal_Bool DisableUICustomization() const + { return m_bDisableUICustomization; } + + inline void SetSaveAlwaysAllowed( sal_Bool bSet ) + { m_bAlwaysAllowSave = bSet; SetModified(); } + + inline sal_Bool IsSaveAlwaysAllowed() const + { return m_bAlwaysAllowSave; } + inline sal_Bool IsPluginsEnabled() const { return m_bPluginsEnabled; } @@ -224,6 +256,15 @@ class SvtMiscOptions_Impl : public ConfigItem inline sal_Bool IsUseSystemPrintDialogReadOnly() const { return m_bIsUseSystemPrintDialogRO; } + inline sal_Bool ShowLinkWarningDialog() const + { return m_bShowLinkWarningDialog; } + + void SetShowLinkWarningDialog( sal_Bool bSet ) + { m_bShowLinkWarningDialog = bSet; SetModified(); } + + sal_Bool IsShowLinkWarningDialogReadOnly() const + { return m_bIsShowLinkWarningDialogRO; } + void AddListenerLink( const Link& rLink ); void RemoveListenerLink( const Link& rLink ); void CallListeners(); @@ -262,6 +303,8 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() , m_bUseSystemFileDialog( sal_False ) , m_bIsUseSystemFileDialogRO( sal_False ) + , m_bTryODMADialog( sal_False ) + , m_bIsTryODMADialogRO( sal_False ) , m_bPluginsEnabled( sal_False ) , m_bIsPluginsEnabledRO( sal_False ) , m_nSymbolsSize( 0 ) @@ -271,6 +314,9 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() , m_bIsToolboxStyleRO( sal_False ) , m_bUseSystemPrintDialog( sal_False ) , m_bIsUseSystemPrintDialogRO( sal_False ) + , m_bShowLinkWarningDialog( sal_True ) + , m_bIsShowLinkWarningDialogRO( sal_False ) + , m_bAlwaysAllowSave( sal_False ) { // Use our static list of configuration keys to get his values. @@ -343,6 +389,26 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() break; } + case PROPERTYHANDLE_TRYODMADIALOG : + { + if( !(seqValues[nProperty] >>= m_bTryODMADialog) ) + { + DBG_ERROR("Wrong type of \"Misc\\TryODMADialog\"!" ); + } + m_bIsTryODMADialogRO = seqRO[nProperty]; + break; + } + + case PROPERTYHANDLE_SHOWLINKWARNINGDIALOG : + { + if( !(seqValues[nProperty] >>= m_bShowLinkWarningDialog) ) + { + DBG_ERROR("Wrong type of \"Misc\\ShowLinkWarningDialog\"!" ); + } + m_bIsShowLinkWarningDialogRO = seqRO[nProperty]; + break; + } + case PROPERTYHANDLE_SYMBOLSTYLE : { ::rtl::OUString aSymbolsStyle; @@ -355,6 +421,19 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() m_bIsSymbolsStyleRO = seqRO[nProperty]; break; } + + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION : + { + if( !(seqValues[nProperty] >>= m_bDisableUICustomization) ) + DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" ); + break; + } + case PROPERTYHANDLE_ALWAYSALLOWSAVE : + { + if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) ) + DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" ); + break; + } } } @@ -446,6 +525,20 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) } } break; + case PROPERTYHANDLE_TRYODMADIALOG : { + if( !(seqValues[nProperty] >>= m_bTryODMADialog) ) + { + DBG_ERROR("Wrong type of \"Misc\\TryODMADialog\"!" ); + } + } + break; + case PROPERTYHANDLE_SHOWLINKWARNINGDIALOG : { + if( !(seqValues[nProperty] >>= m_bShowLinkWarningDialog) ) + { + DBG_ERROR("Wrong type of \"Misc\\ShowLinkWarningDialog\"!" ); + } + } + break; case PROPERTYHANDLE_SYMBOLSTYLE : { ::rtl::OUString aSymbolsStyle; if( seqValues[nProperty] >>= aSymbolsStyle ) @@ -456,6 +549,17 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) } } break; + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION : { + if( !(seqValues[nProperty] >>= m_bDisableUICustomization) ) + DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" ); + } + break; + case PROPERTYHANDLE_ALWAYSALLOWSAVE: + { + if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) ) + DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" ); + } + break; } } } @@ -592,6 +696,13 @@ void SvtMiscOptions_Impl::Commit() break; } + case PROPERTYHANDLE_TRYODMADIALOG : + { + if ( !m_bIsTryODMADialogRO ) + seqValues[nProperty] <<= m_bTryODMADialog; + break; + } + case PROPERTYHANDLE_SYMBOLSTYLE : { if ( !m_bIsSymbolsStyleRO ) @@ -605,6 +716,24 @@ void SvtMiscOptions_Impl::Commit() seqValues[nProperty] <<= m_bUseSystemPrintDialog; break; } + + case PROPERTYHANDLE_SHOWLINKWARNINGDIALOG : + { + if ( !m_bIsShowLinkWarningDialogRO ) + seqValues[nProperty] <<= m_bShowLinkWarningDialog; + break; + } + + case PROPERTYHANDLE_DISABLEUICUSTOMIZATION : + { + seqValues[nProperty] <<= m_bDisableUICustomization; + break; + } + case PROPERTYHANDLE_ALWAYSALLOWSAVE : + { + seqValues[nProperty] <<= m_bAlwaysAllowSave; + break; + } } } // Set properties in configuration. @@ -624,7 +753,11 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() PROPERTYNAME_TOOLBOXSTYLE, PROPERTYNAME_USESYSTEMFILEDIALOG, PROPERTYNAME_SYMBOLSTYLE, - PROPERTYNAME_USESYSTEMPRINTDIALOG + PROPERTYNAME_USESYSTEMPRINTDIALOG, + PROPERTYNAME_TRYODMADIALOG, + PROPERTYNAME_SHOWLINKWARNINGDIALOG, + PROPERTYNAME_DISABLEUICUSTOMIZATION, + PROPERTYNAME_ALWAYSALLOWSAVE }; // Initialize return sequence with these list ... @@ -692,6 +825,21 @@ sal_Bool SvtMiscOptions::IsUseSystemFileDialogReadOnly() const return m_pDataContainer->IsUseSystemFileDialogReadOnly(); } +sal_Bool SvtMiscOptions::TryODMADialog() const +{ + return m_pDataContainer->TryODMADialog(); +} + +void SvtMiscOptions::SetTryODMADialog( sal_Bool bEnable ) +{ + m_pDataContainer->SetTryODMADialog( bEnable ); +} + +sal_Bool SvtMiscOptions::IsTryUseODMADialogReadOnly() const +{ + return m_pDataContainer->IsTryUseODMADialogReadOnly(); +} + sal_Bool SvtMiscOptions::IsPluginsEnabled() const { return m_pDataContainer->IsPluginsEnabled(); @@ -770,6 +918,11 @@ sal_Bool SvtMiscOptions::IsGetSymbolsStyleReadOnly() const return m_pDataContainer->IsGetSymbolsStyleReadOnly(); } +sal_Bool SvtMiscOptions::DisableUICustomization() const +{ + return m_pDataContainer->DisableUICustomization(); +} + sal_Int16 SvtMiscOptions::GetToolboxStyle() const { return m_pDataContainer->GetToolboxStyle(); @@ -795,6 +948,31 @@ void SvtMiscOptions::SetUseSystemPrintDialog( sal_Bool bEnable ) m_pDataContainer->SetUseSystemPrintDialog( bEnable ); } +sal_Bool SvtMiscOptions::ShowLinkWarningDialog() const +{ + return m_pDataContainer->ShowLinkWarningDialog(); +} + +void SvtMiscOptions::SetShowLinkWarningDialog( sal_Bool bSet ) +{ + m_pDataContainer->SetShowLinkWarningDialog( bSet ); +} + +sal_Bool SvtMiscOptions::IsShowLinkWarningDialogReadOnly() const +{ + return m_pDataContainer->IsShowLinkWarningDialogReadOnly(); +} + +void SvtMiscOptions::SetSaveAlwaysAllowed( sal_Bool bSet ) +{ + m_pDataContainer->SetSaveAlwaysAllowed( bSet ); +} + +sal_Bool SvtMiscOptions::IsSaveAlwaysAllowed() const +{ + return m_pDataContainer->IsSaveAlwaysAllowed(); +} + //***************************************************************************************************************** // private method //***************************************************************************************************************** diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index 46e1f737d347..2259079e3fca 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -40,33 +40,19 @@ #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ #include <com/sun/star/container/XNameContainer.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#endif -#ifndef _COMPHELPER_CONFIGURATIONHELPER_HXX_ #include <comphelper/configurationhelper.hxx> -#endif -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_ #include <unotools/processfactory.hxx> -#endif -#ifndef _SVT_LOGHELPER_HXX #include <unotools/loghelper.hxx> -#endif #include <itemholder2.hxx> diff --git a/svtools/source/config/test/test.cxx b/svtools/source/config/test/test.cxx index ea4e0c0ec942..4efadef2e213 100644 --- a/svtools/source/config/test/test.cxx +++ b/svtools/source/config/test/test.cxx @@ -53,9 +53,7 @@ // other includes //_________________________________________________________________________________________________________________ -#ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include <comphelper/regpathhelper.hxx> -#endif #include <cppuhelper/servicefactory.hxx> #include <cppuhelper/bootstrap.hxx> #include <comphelper/processfactory.hxx> diff --git a/svtools/source/contnr/ctrdll.cxx b/svtools/source/contnr/ctrdll.cxx index 463c6ccc8b35..5f93f3dc264f 100644 --- a/svtools/source/contnr/ctrdll.cxx +++ b/svtools/source/contnr/ctrdll.cxx @@ -31,9 +31,7 @@ #ifdef WIN #include <svwin.h> -#ifndef _SYSDEP_HXX #include <sysdep.hxx> -#endif // Statische DLL-Verwaltungs-Variablen static HINSTANCE hDLLInst = 0; // HANDLE der DLL diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index af19379d8b8f..802103c5904d 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -67,9 +67,7 @@ #include <ucbhelper/content.hxx> #include <ucbhelper/commandenvironment.hxx> #include <vcl/msgbox.hxx> -#ifndef INCLUDED_RTL_MATH_H #include <rtl/math.hxx> -#endif #include <tools/config.hxx> #include <osl/mutex.hxx> #include <osl/conditn.hxx> @@ -109,25 +107,6 @@ DECLARE_LIST( StringList_Impl, OUString* ) namespace { //==================================================================== - //= ReleaseSolarMutex - //==================================================================== - struct ReleaseSolarMutex - { - private: - ULONG m_nCount; - - public: - inline ReleaseSolarMutex() - { - m_nCount = Application::ReleaseSolarMutex(); - } - inline ~ReleaseSolarMutex() - { - Application::AcquireSolarMutex( m_nCount ); - } - }; - - //==================================================================== //= ITimeoutHandler //==================================================================== class CallbackTimer; @@ -2022,7 +2001,7 @@ FileViewResult SvtFileView_Impl::GetFolderContent_Impl( // also release the SolarMutex. Not all code which is needed during the enumeration // is Solar-Thread-Safe, in particular there is some code which needs to access // string resources (and our resource system relies on the SolarMutex :() - ReleaseSolarMutex aSolarRelease; + SolarMutexReleaser aSolarRelease; // now wait. Note that if we didn't get an pAsyncDescriptor, then this is an infinite wait. eResult = m_aAsyncActionFinished.wait( pTimeout.get() ); diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index cc7aa4e05ee1..b1a1f1b8547a 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -28,12 +28,8 @@ #ifndef _IMPICNVW_HXX #define _IMPICNVW_HXX -#ifndef _VIRDEV_HXX #include <vcl/virdev.hxx> -#endif -#ifndef _SCRBAR_HXX #include <vcl/scrbar.hxx> -#endif #include <vcl/timer.hxx> #include <vcl/seleng.hxx> #include <tools/debug.hxx> diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index dd2ed992536e..52dcbcd855b9 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -70,8 +70,6 @@ struct SvxIconChoiceCtrlEntry_Impl static BOOL bEndScrollInvalidate = TRUE; -// ---------------------------------------------------------------------------------------------- - class IcnViewEdit_Impl : public MultiLineEdit { Link aCallBackHdl; @@ -104,10 +102,6 @@ public: BOOL IsGrabFocus() const { return bGrabFocus; } }; -// ---------------------------------------------------------------------------------------------- - -// ---------------------------------------------------------------------------------------------- - SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView, WinBits nWinStyle ) : aEntries( this ), @@ -535,15 +529,13 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL } if( pEntry == pCursor ) ShowCursor( TRUE ); - } // if( bUpdateMode ) + } - // --> OD 2009-05-27 #i101012# - // emit vcl event LISTBOX_SELECT only in case that the given entry is selected. + // #i101012# emit vcl event LISTBOX_SELECT only in case that the given entry is selected. if ( bSelect ) { CallEventListeners( VCLEVENT_LISTBOX_SELECT, pEntry ); } - // <-- } void SvxIconChoiceCtrl_Impl::ResetVirtSize() @@ -3644,7 +3636,7 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut ) pOut->DrawPolyLine ( aPolygon, aLineInfo ); } -sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const +BOOL SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const { sal_Bool bRet = sal_False; const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); @@ -4671,8 +4663,6 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt ) return bRet; } -// ----------------------------------------------------------------------- - void SvxIconChoiceCtrl_Impl::CallEventListeners( ULONG nEvent, void* pData ) { pView->CallImplEventListeners( nEvent, pData ); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 35324d551858..9ed58383dd3f 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -30,9 +30,7 @@ #include <vcl/svapp.hxx> #include <vcl/salnativewidgets.hxx> -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif #include <tabbar.hxx> #ifndef _STACK_ @@ -46,14 +44,10 @@ #include <rtl/instance.hxx> #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif // #102891# -------------------- -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define NODE_BMP_TABDIST_NOTVALID -2000000 #define FIRST_ENTRY_TAB 1 diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx index 2d4c9cf2df0e..6de504c668dc 100644 --- a/svtools/source/contnr/svimpicn.cxx +++ b/svtools/source/contnr/svimpicn.cxx @@ -29,9 +29,7 @@ #include "precompiled_svtools.hxx" #include <limits.h> -#ifndef _METRIC_HXX #include <vcl/metric.hxx> -#endif #include <vcl/svapp.hxx> #ifdef DBG_UTIL #include <vcl/sound.hxx> @@ -40,9 +38,7 @@ #include <svtools/svlbox.hxx> #include <svtools/svicnvw.hxx> #include <svimpicn.hxx> -#ifndef _SVLBITM_HXX #include <svtools/svlbitm.hxx> -#endif #include <svl/svarray.hxx> @@ -3562,7 +3558,7 @@ void ImpIcnCursor::ExpandGrid() if( pGridMap ) { long nNewGridRows = nGridRows + 20; - unsigned char* pTempMap = new unsigned char[ nNewGridRows * nGridCols ]; + BOOL* pTempMap = new BOOL[ nNewGridRows * nGridCols ]; memcpy( pTempMap, pGridMap, nGridRows * nGridCols ); delete pGridMap; pGridMap = pTempMap; diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index edb0a65cb39f..e393d5118b96 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -32,9 +32,7 @@ #include <svtools/svlbox.hxx> #include <svtools/svlbitm.hxx> #include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/decoview.hxx> #include <vcl/sound.hxx> #include <vcl/salnativewidgets.hxx> diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx index a69253c69629..47fcfd0bc3bc 100644 --- a/svtools/source/contnr/svlbox.cxx +++ b/svtools/source/contnr/svlbox.cxx @@ -47,9 +47,7 @@ #define _SVSTDARR_ULONGSSORT #include <svl/svstdarr.hxx> -#ifndef _SVEDI_HXX #include <svtools/svmedit.hxx> -#endif #include <svtools/svlbitm.hxx> using namespace ::com::sun::star::accessibility; diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 53fbded59f11..e659f9010a60 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -30,14 +30,10 @@ #include <svtools/svtabbx.hxx> #include <svtools/headbar.hxx> #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#ifndef SVTOOLS_ACCESSIBLE_FACTORY_HXX #include "svtaccessiblefactory.hxx" -#endif using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; @@ -841,7 +837,7 @@ sal_Bool SvHeaderTabListBox::IsCellFocusable() const return IsCellFocusEnabled(); } // ----------------------------------------------------------------------- -sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) +BOOL SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn ) { sal_Bool bRet = ( IsCellFocusEnabled() == TRUE ); if ( bRet ) diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index a8635c99d127..034b23fec05d 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -35,8 +35,6 @@ class TabBar; -// #102891# ----------------------- - #include <svtools/svlbox.hxx> #include <svtools/svlbitm.hxx> #include <svtools/svtreebx.hxx> @@ -487,7 +485,6 @@ void SvTreeListBox::SetExpandedEntryBmp( SvLBoxEntry* pEntry, const Image& aBmp, GetModel()->InvalidateEntry( pEntry ); SetEntryHeight( pEntry ); Size aSize = aBmp.GetSizePixel(); - // #97680# --------------- short nWidth = pImp->UpdateContextBmpWidthVector( pEntry, (short)aSize.Width() ); if( nWidth > nContextBmpWidthMax ) { @@ -507,7 +504,6 @@ void SvTreeListBox::SetCollapsedEntryBmp(SvLBoxEntry* pEntry,const Image& aBmp, GetModel()->InvalidateEntry( pEntry ); SetEntryHeight( pEntry ); Size aSize = aBmp.GetSizePixel(); - // #97680# ----------- short nWidth = pImp->UpdateContextBmpWidthVector( pEntry, (short)aSize.Width() ); if( nWidth > nContextBmpWidthMax ) { @@ -599,9 +595,6 @@ void SvTreeListBox::CheckButtonHdl() pImp->CallEventListeners( VCLEVENT_CHECKBOX_TOGGLE, (void*)pCheckButtonData->GetActEntry() ); } -// ********************************************************************* -// ********************************************************************* - // // TODO: Momentan werden die Daten so geklont, dass sie dem // Standard-TreeView-Format entsprechen. Hier sollte eigentlich @@ -649,10 +642,6 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource ) return pClone; } -// ********************************************************************* -// ********************************************************************* - - void SvTreeListBox::ShowExpandBitmapOnCursor( BOOL bYes ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -845,8 +834,6 @@ void SvTreeListBox::ModelHasCleared() AdjustEntryHeight( GetDefaultCollapsedEntryBmp() ); SvLBox::ModelHasCleared(); -// if( IsUpdateMode() ) -// Invalidate(); } void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL /* bShow */ ) @@ -1017,12 +1004,11 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent ) GetModel()->InvalidateEntry( pParent ); // neu zeichnen } - // --> OD 2009-04-01 #i92103# + // #i92103# if ( bExpanded ) { pImp->CallEventListeners( VCLEVENT_ITEM_EXPANDED, pParent ); } - // <-- return bExpanded; } @@ -1044,12 +1030,11 @@ BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent ) ExpandedHdl(); } - // --> OD 2009-04-01 #i92103# + // #i92103# if ( bCollapsed ) { pImp->CallEventListeners( VCLEVENT_ITEM_COLLAPSED, pParent ); } - // <-- return bCollapsed; } @@ -1413,13 +1398,10 @@ void SvTreeListBox::EditedText( const XubString& rStr ) ((SvLBoxString*)pEdItem)->SetText( pEdEntry, rStr ); pModel->InvalidateEntry( pEdEntry ); } - //if( GetSelectionMode() == SINGLE_SELECTION ) - //{ if( GetSelectionCount() == 0 ) Select( pEdEntry ); if( GetSelectionMode() == MULTIPLE_SELECTION && !GetCurEntry() ) SetCurEntry( pEdEntry ); - //} } } @@ -1552,7 +1534,6 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags, BOOL bHorSBar = pImp->HasHorScrollBar(); PreparePaint( pEntry ); - // #97680# ------------------ pImp->UpdateContextBmpWidthMax( pEntry ); if( nTreeFlags & TREEFLAG_RECALCTABS ) @@ -2312,7 +2293,6 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData ) SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight ); String aLeft( ((SvLBoxString*)(pLeft->GetFirstItem(SV_ITEM_ID_LBOXSTRING)))->GetText()); String aRight( ((SvLBoxString*)(pRight->GetFirstItem(SV_ITEM_ID_LBOXSTRING)))->GetText()); - // #102891# ---------------- pImp->UpdateIntlWrapper(); return pImp->pIntlWrapper->getCaseCollator()->compareString( aLeft, aRight ); } diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 61112f6669ca..ef9c6d5cc9e5 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -40,15 +40,9 @@ #include "templatefoldercache.hxx" #include "imgdef.hxx" #include "txtattr.hxx" -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVTOOLS_TEMPLWIN_HRC #include "templwin.hrc" -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <unotools/pathoptions.hxx> #include <unotools/viewoptions.hxx> #include <unotools/ucbhelper.hxx> diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index f7b49ac57eeb..d3fabc4b7d4c 100755..100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -28,30 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _TABLE_HXX #include <tools/table.hxx> -#endif -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#ifndef _MENU_HXX #include <vcl/menu.hxx> -#endif -#ifndef _DECOVIEW_HXX #include <vcl/decoview.hxx> -#endif -#ifndef _FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif -#ifndef _BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _FIXED_HXX #include <vcl/fixed.hxx> -#endif #include <unotools/calendarwrapper.hxx> #include <unotools/localedatawrapper.hxx> #include <com/sun/star/i18n/Weekdays.hpp> diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 9988bfdadbb9..9988bfdadbb9 100755..100644 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d44b18a29ae1..b051ae4fcce4 100755..100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -30,12 +30,8 @@ #define _CTRLBOX_CXX #include <tools/debug.hxx> -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _FIELD_HXX #include <vcl/field.hxx> -#endif #include <comphelper/processfactory.hxx> #include <unotools/charclass.hxx> diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx index 2f3ff037be31..a0789aec3adc 100644 --- a/svtools/source/control/ctrldll.cxx +++ b/svtools/source/control/ctrldll.cxx @@ -31,9 +31,7 @@ #ifdef WIN #include <svwin.h> -#ifndef _SYSDEP_HXX #include <sysdep.hxx> -#endif // Statische DLL-Verwaltungs-Variablen static HINSTANCE hDLLInst = 0; // HANDLE der DLL diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index bd965aca66a6..ba9d044ce59d 100755..100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -32,13 +32,9 @@ #include <string.h> -#ifndef TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif #include <i18npool/mslangid.hxx> -#ifndef _VCL_WINDOW_HXX #include <vcl/window.hxx> -#endif #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 14c0478f5327..5dd130bb62f2 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -32,9 +32,7 @@ #include <tools/urlobj.hxx> #include <svtools/svtdata.hxx> #include <filectrl.hxx> -#ifndef _SV_FILECTRL_HRC #include <filectrl.hrc> -#endif #ifndef GCC #endif diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 1ae223bebf06..4a24a3deaef1 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -31,19 +31,11 @@ #define _SV_HEADBAR_CXX #include <svtools/headbar.hxx> #include <tools/debug.hxx> -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif -#ifndef _VCL_APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _VCL_HELP_HXX #include <vcl/help.hxx> -#endif -#ifndef _VCL_IMAGE_HXX #include <vcl/image.hxx> -#endif #include <com/sun/star/accessibility/XAccessible.hpp> // ======================================================================= diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index 10ef8cdcfadf..79ea667032ac 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -27,15 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef SVTOOLS_ROADMAP_HXX #include <svtools/hyperlabel.hxx> -#endif #include <vcl/bitmap.hxx> #include <tools/color.hxx> -#ifndef _VCL_TABPAGE_HXX #include <vcl/tabpage.hxx> -#endif //......................................................................... diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 5a79edab5b77..5a79edab5b77 100755..100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 02a578629039..b538449a7839 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -42,26 +42,18 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> -#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HDL_ #include <com/sun/star/task/XInteractionHandler.hdl> -#endif #include <com/sun/star/ucb/NumberedSortingInfo.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <vcl/toolbox.hxx> -#ifndef _VOS_THREAD_HXX //autogen #include <vos/thread.hxx> -#endif -#ifndef _VOS_MUTEX_HXX //autogen #include <vos/mutex.hxx> -#endif #include <vcl/svapp.hxx> #include <unotools/historyoptions.hxx> #include <svl/eitem.hxx> diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx index b67202e9c1fc..427e91d5e13e 100644 --- a/svtools/source/control/prgsbar.cxx +++ b/svtools/source/control/prgsbar.cxx @@ -30,12 +30,8 @@ #define _SV_PRGSBAR_CXX -#ifndef _TOOLS_DEBUGS_HXX #include <tools/debug.hxx> -#endif -#ifndef _VCL_STATUS_HXX #include <vcl/status.hxx> -#endif #include <prgsbar.hxx> // ======================================================================= diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 7cf88816199f..89f02e173ef2 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -40,10 +40,7 @@ #include <algorithm> #include <vcl/bitmap.hxx> #include <tools/color.hxx> - -#ifndef _RTL_USTRING_HXX_ -#include <rtl/OUString.hxx> -#endif +#include <rtl/ustring.hxx> #include <memory> #define ROADMAP_INDENT_X 4 diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6fcbd92597ba..f78fac53284e 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -81,7 +81,9 @@ #define RULER_UNIT_MILE 6 #define RULER_UNIT_POINT 7 #define RULER_UNIT_PICA 8 -#define RULER_UNIT_COUNT 9 +#define RULER_UNIT_CHAR 9 +#define RULER_UNIT_LINE 10 +#define RULER_UNIT_COUNT 11 // ----------------- // - ImplRulerData - @@ -145,7 +147,9 @@ static ImplRulerUnitData aImplRulerUnitTab[RULER_UNIT_COUNT] = { MAP_100TH_INCH, 1200, 120, 600, 1200, 30480, 3, "'" }, // FOOT { MAP_10TH_INCH, 633600, 63360, 316800, 633600, 1609344, 4, " miles" }, // MILE { MAP_POINT, 1, 12, 12, 36, 353, 2, " pt" }, // POINT -{ MAP_100TH_MM, 423, 423, 423, 846, 423, 3, " pi" } // PICA +{ MAP_100TH_MM, 423, 423, 423, 846, 423, 3, " pi" }, // PICA +{ MAP_100TH_MM, 371, 371, 371, 743, 371, 3, " ch" }, // CHAR +{ MAP_100TH_MM, 551, 551, 551, 1102, 551, 3, " li" } // LINE }; // ======================================================================= @@ -264,6 +268,8 @@ void Ruler::ImplInit( WinBits nWinBits ) mnExtraStyle = 0; // Style des Extra-Feldes mnExtraClicks = 0; // Click-Anzahl fuer Extra-Feld mnExtraModifier = 0; // Modifier-Tasten beim Click im Extrafeld + mnCharWidth = 371; + mnLineHeight = 551; mbCalc = TRUE; // Muessen Pagebreiten neu berechnet werden mbFormat = TRUE; // Muss neu ausgegeben werden mbDrag = FALSE; // Sind wir im Drag-Modus @@ -467,6 +473,29 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) long nY; BOOL bNoTicks = FALSE; + //Amelia + long nTickUnit ; + long nTick2 ; + if ( mnUnitIndex == RULER_UNIT_CHAR ) + { + if ( mnCharWidth == 0 ) + mnCharWidth = 371; + nTick3 = mnCharWidth*2; + nTickCount = mnCharWidth; + nTickUnit = mnCharWidth; + nTick2 = mnCharWidth; + } + else if ( mnUnitIndex == RULER_UNIT_LINE ) + { + if ( mnLineHeight == 0 ) + mnLineHeight = 551; + nTick3 = mnLineHeight*2; + nTickCount = mnLineHeight; + nTickUnit = mnLineHeight; + nTick2 = mnLineHeight; + } + aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); + // Groessenvorberechnung BOOL bVertRight = FALSE; if ( mnWinStyle & WB_HORZ ) @@ -487,14 +516,19 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) long nMaxWidth = maVirDev.PixelToLogic( Size( mpData->nPageWidth, 0 ), maMapMode ).Width(); if ( nMaxWidth < 0 ) nMaxWidth *= -1; - nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit; + // Amelia + if (( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE )) + nMaxWidth /= nTickUnit; + else + nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit; UniString aNumStr( UniString::CreateFromInt32( nMaxWidth ) ); long nTxtWidth = GetTextWidth( aNumStr ); - if ( (nTxtWidth*2) > nTickWidth ) + const long nTextOff = 4; + if ( nTickWidth < nTxtWidth+nTextOff ) { + // Calculate the scale of the ruler long nMulti = 1; long nOrgTick3 = nTick3; - long nTextOff = 2; while ( nTickWidth < nTxtWidth+nTextOff ) { long nOldMulti = nMulti; @@ -516,8 +550,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) bNoTicks = TRUE; break; } - if ( nMulti >= 100 ) - nTextOff = 4; + nTick3 = nOrgTick3 * nMulti; aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); if ( mnWinStyle & WB_HORZ ) @@ -541,7 +574,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) { if ( nStart > nMin ) { - // Nur 0 malen, wenn Margin1 nicht gleich dem NullPunkt ist + // 0 is only painted when Margin1 is not equal to zero if ( (mpData->nMargin1Style & RULER_STYLE_INVISIBLE) || (mpData->nMargin1 != 0) ) { aNumStr = (sal_Unicode)'0'; @@ -564,16 +597,22 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) else n = aPixSize.Height(); - // Tick3 - Ausgabe (Text) + // Tick3 - Output (Text) if ( !(nTick % nTick3) ) { - aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); + //aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); + if ( ( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ) ) + aNumStr = UniString::CreateFromInt32( nTick / nTickUnit ); + else + aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit ); nTxtWidth2 = GetTextWidth( aNumStr )/2; nX = nStart+n; //different orientation needs a different starting position nY = bVertRight ? nCenter+nTxtHeight2 : nCenter-nTxtHeight2; - if ( nX < nMax ) + + // Check if we can display full number + if ( nX < (nMax-nTxtWidth2) ) { if ( mnWinStyle & WB_HORZ ) nX -= nTxtWidth2; @@ -582,7 +621,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ImplVDrawText( nX, nY, aNumStr ); } nX = nStart-n; - if ( nX > nMin ) + if ( nX > (nMin+nTxtWidth2) ) { if ( mnWinStyle & WB_HORZ ) nX -= nTxtWidth2; @@ -591,10 +630,13 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ImplVDrawText( nX, nY, aNumStr ); } } - // Tick/Tick2 - Ausgabe (Striche) + // Tick/Tick2 - Output (Strokes) else { - if ( !(nTick % aImplRulerUnitTab[mnUnitIndex].nTick2) ) + /// Amelia + if ( ( mnUnitIndex != RULER_UNIT_CHAR ) && ( mnUnitIndex != RULER_UNIT_LINE ) ) + nTick2 = aImplRulerUnitTab[mnUnitIndex].nTick2; + if ( !(nTick % nTick2 ) ) nTickWidth = RULER_TICK2_WIDTH; else nTickWidth = RULER_TICK1_WIDTH; @@ -1258,7 +1300,7 @@ void Ruler::ImplFormat() Size aVirDevSize; BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO); - // VirtualDevice initialisieren + // initialize VirtualDevice if ( mnWinStyle & WB_HORZ ) { aVirDevSize.Width() = mnVirWidth; @@ -1387,15 +1429,15 @@ void Ruler::ImplFormat() if ( nP2 < nVirRight ) nMax--; - // Beschriftung ausgeben + // Draw captions ImplDrawTicks( nMin, nMax, nStart, nCenter ); } - // Spalten ausgeben + // Draw borders if ( mpData->pBorders ) ImplDrawBorders( nVirLeft, nP2, nVirTop, nVirBottom ); - // Einzuege ausgeben + // Draw indents if ( mpData->pIndents ) ImplDrawIndents( nVirLeft, nP2, nVirTop-1, nVirBottom+1 ); @@ -2804,6 +2846,12 @@ void Ruler::SetUnit( FieldUnit eNewUnit ) case FUNIT_PICA: mnUnitIndex = RULER_UNIT_PICA; break; + case FUNIT_CHAR: + mnUnitIndex = RULER_UNIT_CHAR; + break; + case FUNIT_LINE: + mnUnitIndex = RULER_UNIT_LINE; + break; default: #ifdef DBG_UTIL DBG_ERRORFILE( "Ruler::SetUnit() - Wrong Unit" ); @@ -2888,7 +2936,7 @@ void Ruler::SetMargin2( long nPos, USHORT nMarginStyle ) void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) { - // Testen, ob sich was geaendert hat + // To determine if what has changed if ( mpData->nLines == n ) { USHORT i = n; @@ -2907,18 +2955,18 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry ) return; } - // Neue Werte setzen und neu ausgeben + // New values and new share issue BOOL bMustUpdate; if ( IsReallyVisible() && IsUpdateMode() ) bMustUpdate = TRUE; else bMustUpdate = FALSE; - // Alte Linien loeschen + // Delete old lines if ( bMustUpdate ) ImplInvertLines(); - // Neue Daten setzen + // New data set if ( !n || !pLineAry ) { if ( !mpData->pLines ) @@ -3179,3 +3227,11 @@ const RulerBorder* Ruler::GetBorders() const { return mpData->pBorders; } USHORT Ruler::GetIndentCount() const { return mpData->nIndents; } const RulerIndent* Ruler::GetIndents() const { return mpData->pIndents; } +/* --------------------------------------------------- + * + * ---------------------------------------------------*/ +void Ruler::DrawTicks() +{ + mbFormat = TRUE; + ImplDraw(); +} diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 95b6d3fbd5c6..9ab711b4f8f3 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -30,9 +30,7 @@ #include <string.h> -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif #include <vcl/i18nhelp.hxx> diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 2ad81da40716..a902b02f6028 100755..100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -39,6 +39,9 @@ #include <vcl/edit.hxx> #include "svtaccessiblefactory.hxx" +#include "svtools/svtools.hrc" +#include "svtools/svtdata.hxx" + #include <limits> // ======================================================================= @@ -65,9 +68,7 @@ struct ImplTabBarItem BOOL mbSelect; BOOL mbEnable; Color maTabBgColor; - bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; }; Color maTabTextColor; - bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? TRUE : FALSE; }; ImplTabBarItem( USHORT nItemId, const XubString& rText, TabBarPageBits nPageBits ) : @@ -83,6 +84,21 @@ struct ImplTabBarItem maTabBgColor = Color( COL_AUTO ); maTabTextColor = Color( COL_AUTO ); } + + bool IsDefaultTabBgColor() const + { + return maTabBgColor == Color(COL_AUTO); + } + + bool IsDefaultTabTextColor() const + { + return maTabTextColor == Color(COL_AUTO); + } + + bool IsSelected(ImplTabBarItem* pCurItem) const + { + return mbSelect || (pCurItem == this); + } }; DECLARE_LIST( ImplTabBarList, ImplTabBarItem* ) @@ -358,6 +374,7 @@ struct TabBar_Impl const sal_uInt16 TabBar::APPEND = ::std::numeric_limits<sal_uInt16>::max(); const sal_uInt16 TabBar::PAGE_NOT_FOUND = ::std::numeric_limits<sal_uInt16>::max(); +const sal_uInt16 TabBar::INSERT_TAB_POS = ::std::numeric_limits<USHORT>::max() - 1; void TabBar::ImplInit( WinBits nWinStyle ) { @@ -393,6 +410,7 @@ void TabBar::ImplInit( WinBits nWinStyle ) mbSelColor = FALSE; mbSelTextColor = FALSE; mbMirrored = FALSE; + mbHasInsertTab = (nWinStyle & WB_INSERTTAB); if ( nWinStyle & WB_3DTAB ) mnOffY++; @@ -1009,288 +1027,396 @@ void TabBar::MouseButtonUp( const MouseEvent& rMEvt ) Window::MouseButtonUp( rMEvt ); } + // ----------------------------------------------------------------------- -void TabBar::Paint( const Rectangle& ) +namespace { + +class TabBarPaintGuard { - // Items berechnen und ausgeben - USHORT nItemCount = (USHORT)mpItemList->Count(); - ImplTabBarItem* pItem; +public: + explicit TabBarPaintGuard(TabBar& rParent) : + mrParent(rParent), + maFont(rParent.GetFont()) + { + // #i36013# exclude push buttons from painting area + mrParent.SetClipRegion( Region(mrParent.GetPageArea()) ); + } - // kein Item, dann auch nichts zu tun - if ( nItemCount ) + ~TabBarPaintGuard() { - // TabBar muss formatiert sein - ImplFormat(); + // Restore original font. + mrParent.SetFont(maFont); + // remove clip region + mrParent.SetClipRegion(); + } +private: + TabBar& mrParent; + Font maFont; +}; + +class TabDrawer +{ +public: + + explicit TabDrawer(TabBar& rParent) : + mrParent(rParent), + mpStyleSettings(&mrParent.GetSettings().GetStyleSettings()), + maPoly(4), + mbSelected(false), + mbCustomColored(false), + mbSpecialTab(false), + mbEnabled(false) + { + } - // Beim ersten Format auch dafuer sorgen, das aktuelle TabPage - // sichtbar wird - if ( mbFirstFormat ) + void drawOutputAreaBorder() + { + WinBits nWinStyle = mrParent.GetStyle(); + + // Bei Border oben und unten einen Strich extra malen + if ( (nWinStyle & WB_BORDER) || (nWinStyle & WB_TOPBORDER) ) { - mbFirstFormat = FALSE; + Size aOutputSize = mrParent.GetOutputSizePixel(); + Rectangle aOutRect = mrParent.GetPageArea(); - if ( mnCurPageId && (mnFirstPos == 0) && !mbDropPos ) + // Bei 3D-Tabs wird auch der Border in 3D gemalt + if ( nWinStyle & WB_3DTAB ) { - pItem = mpItemList->GetObject( GetPagePos( mnCurPageId ) ); - if ( pItem->maRect.IsEmpty() ) - { - // mbDropPos setzen (bzw. misbrauchen) um Invalidate() - // zu unterbinden - mbDropPos = TRUE; - SetFirstPageId( mnCurPageId ); - mbDropPos = FALSE; - if ( mnFirstPos != 0 ) - ImplFormat(); - } + mrParent.SetLineColor( mpStyleSettings->GetShadowColor() ); + mrParent.DrawLine( Point( aOutRect.Left(), 0 ), Point( aOutputSize.Width(), 0 ) ); } + + // Border malen (Strich oben und Strich unten) + mrParent.SetLineColor( mpStyleSettings->GetDarkShadowColor() ); + mrParent.DrawLine( aOutRect.TopLeft(), Point( aOutputSize.Width()-1, aOutRect.Top() ) ); } } - // Farben ermitteln - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Color aFaceColor; - Color aSelectColor; - Color aFaceTextColor; - Color aSelectTextColor; - ImplGetColors( aFaceColor, aFaceTextColor, aSelectColor, aSelectTextColor ); + void drawOuterFrame() + { + mrParent.DrawPolygon(maPoly); + } - // Font selektieren - Font aFont = GetFont(); - Font aLightFont = aFont; - //aLightFont.SetWeight( WEIGHT_LIGHT ); //TODO Make font weight light on custom color only? - aLightFont.SetWeight( WEIGHT_NORMAL ); + void drawLeftShadow() + { + Point p1 = maPoly[0], p2 = maPoly[1]; + p1.X()++; + p2.X()++; + p2.Y()--; + mrParent.DrawLine(p1, p2); + } - // #i36013# exclude push buttons from painting area - Rectangle aClipRect( Point( mnOffX, 0 ), Point( mnLastOffX, GetOutputHeightPixel() - 1 ) ); - SetClipRegion( Region( aClipRect ) ); + void drawRightShadow() + { + Point p1 = maPoly[2]; + Point p2 = maPoly[3]; + p1.X()--; + p2.X()--; + mrParent.DrawLine(p1, p2); + } - // Bei Border oben und unten einen Strich extra malen - if ( (mnWinStyle & WB_BORDER) || (mnWinStyle & WB_TOPBORDER) ) + void drawTopInnerShadow() { - Size aOutputSize = GetOutputSizePixel(); + Point p1 = maPoly[0], p2 = maPoly[3]; + p1.Y()++; + p2.Y()++; + mrParent.DrawLine(p1, p2); + } - // Bei 3D-Tabs wird auch der Border in 3D gemalt - if ( mnWinStyle & WB_3DTAB ) + void drawBottomShadow(bool bColored) + { + Point p1 = maPoly[1], p2 = maPoly[2]; + p1.X() += 1; + p1.Y() -= 1; + p2.X() -= 1; + p2.Y() -= 1; + mrParent.DrawLine(p1, p2); + if (bColored) { - SetLineColor( rStyleSettings.GetShadowColor() ); - DrawLine( Point( mnOffX, 0 ), Point( aOutputSize.Width(), 0 ) ); + p1 += Point(-1, -1); + p2 += Point(1, -1); + mrParent.DrawLine(p1, p2); } + } - // Border malen (Strich oben und Strich unten) - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - DrawLine( Point( mnOffX, mnOffY ), Point( aOutputSize.Width()-1, mnOffY ) ); + void drawText(const String& aText) + { + Rectangle aRect = maRect; + long nTextWidth = mrParent.GetTextWidth(aText); + long nTextHeight = mrParent.GetTextHeight(); + Point aPos = aRect.TopLeft(); + aPos.X() += (aRect.getWidth() - nTextWidth) / 2; + aPos.Y() += (aRect.getHeight() - nTextHeight) / 2; + + if (mbEnabled) + mrParent.DrawText(aPos, aText); + else + mrParent.DrawCtrlText( + aPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC)); } - else - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - // Items ausgeben - if ( nItemCount ) + void drawOverTopBorder(bool b3DTab) { - // letzten sichtbaren Eintrag suchen - USHORT n = mnFirstPos+1; - if ( n >= nItemCount ) - n = nItemCount-1; - pItem = mpItemList->Seek( n ); - while ( pItem ) + Point p1 = maPoly[0], p2 = maPoly[3]; + p1.X() += 1; + p2.X() -= 1; + Rectangle aDelRect(p1, p2); + mrParent.DrawRect(aDelRect); + if (b3DTab) { - if ( !pItem->maRect.IsEmpty() ) - { - n++; - pItem = mpItemList->Next(); - } - else - break; + aDelRect.Top()--; + mrParent.DrawRect(aDelRect); } + } - // Alle Tabs ausgeben (von hinten nach vorn und aktuellen zuletzt) - if ( pItem ) - n--; - else if ( n >= nItemCount ) - n = nItemCount-1; - pItem = mpItemList->Seek( n ); - ImplTabBarItem* pCurItem = NULL; - while ( pItem ) + void drawTab() + { + mrParent.SetLineColor(mpStyleSettings->GetDarkShadowColor()); + + // Je nach Status die richtige FillInBrush setzen + // Set the correct FillInBrush depending upon status + if ( mbSelected ) { - // CurrentItem als letztes ausgeben, da es alle anderen ueberdeckt - if ( !pCurItem && (pItem->mnId == mnCurPageId) ) - { - pCurItem = pItem; - pItem = mpItemList->Prev(); - if ( !pItem ) - pItem = pCurItem; - continue; - } + // Currently selected Tab + mrParent.SetFillColor( maSelectedColor ); + } + else if ( mbCustomColored ) + { + mrParent.SetFillColor( maCustomColor ); + } + else + { + mrParent.SetFillColor( maUnselectedColor ); + } - if ( !pItem->maRect.IsEmpty() ) - { - Rectangle aRect = pItem->maRect; + drawOuterFrame(); - // Aktuelle Page wird mit einem fetten Font ausgegeben - if ( pItem->mnId == mnCurPageId ) - SetFont( aFont ); - else - SetFont( aLightFont ); + // If this is the current tab, draw the left inner shadow the default color, + // otherwise make it the same as the custom background color + Color aColor = mpStyleSettings->GetLightColor(); + if (mbCustomColored && !mbSelected) + aColor = maCustomColor; - // Je nach Status die richtige FillInBrush setzen - // Set the correct FillInBrush depending upon status - if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) - { - // Currently selected Tab - SetFillColor( aSelectColor ); - SetTextColor( aSelectTextColor ); - } - else - { - if ( !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode() ) - { - SetFillColor( pItem->maTabBgColor ); - SetTextColor( pItem->maTabTextColor ); - } else { - SetFillColor( aFaceColor ); - SetTextColor( aFaceTextColor ); - } - } + mrParent.SetLineColor(aColor); + drawLeftShadow(); - // Muss Font Kursiv geschaltet werden - if ( pItem->mnBits & TPB_SPECIAL ) - { - SetTextColor( Color( COL_LIGHTBLUE ) ); - } + if ( !mbSelected ) + drawTopInnerShadow(); - // Position der Page berechnen - Point aPos0 = Point( aRect.Left(), mnOffY ); - Point aPos1 = Point( aRect.Left()+TABBAR_OFFSET_X, aRect.Bottom() ); - Point aPos2 = Point( aRect.Right()-TABBAR_OFFSET_X, aRect.Bottom() ); - Point aPos3 = Point( aRect.Right(), mnOffY ); - - // Zuerst geben wir das Polygon gefuellt aus - Polygon aPoly( 4 ); - aPoly[0] = aPos0; - aPoly[1] = aPos1; - aPoly[2] = aPos2; - aPoly[3] = aPos3; - DrawPolygon( aPoly ); - - // Danach den Text zentiert ausgeben - XubString aText = pItem->maText; - if ( pItem->mbShort ) - aText = GetEllipsisString( aText, mnCurMaxWidth, TEXT_DRAW_ENDELLIPSIS ); - Size aRectSize = aRect.GetSize(); - long nTextWidth = GetTextWidth( aText ); - long nTextHeight = GetTextHeight(); - Point aTxtPos( aRect.Left()+(aRectSize.Width()-nTextWidth)/2, - (aRectSize.Height()-nTextHeight)/2 ); - if ( pItem->IsDefaultTabBgColor() || (!pItem->mbSelect) ) - { - if ( !pItem->mbEnable ) - DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC) ); - else - DrawText( aTxtPos, aText ); - } - // Jetzt im Inhalt den 3D-Effekt ausgeben - aPos0.X()++; - aPos1.X()++; - aPos2.X()--; - aPos3.X()--; - - // If this is the current tab, draw the left inner shadow the default color, - // otherwise make it the same as the custom background color - if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) { - SetLineColor( rStyleSettings.GetLightColor() ); - } else { - if ( !pItem->IsDefaultTabBgColor() && ! rStyleSettings.GetHighContrastMode() ) - { - SetLineColor( pItem->maTabBgColor ); - } else { - SetLineColor( rStyleSettings.GetLightColor() ); - } - } - // Draw the left side of the tab - DrawLine( aPos0, aPos1 ); + mrParent.SetLineColor( mpStyleSettings->GetShadowColor() ); + drawRightShadow(); + if ( mbCustomColored && mbSelected ) + { + mrParent.SetLineColor(maCustomColor); + drawBottomShadow(true); + } + else + drawBottomShadow(false); - if ( !pItem->mbSelect && (pItem->mnId != mnCurPageId) ) - { - // Draw the top inner shadow - // ToDo: Change from this static color to tab custom bg color - DrawLine( Point( aPos0.X(), aPos0.Y()+1 ), - Point( aPos3.X(), aPos3.Y()+1 ) ); - } + // Draw the outer frame once more. In some environments, the outer frame + // gets overpainted. + mrParent.SetLineColor( mpStyleSettings->GetDarkShadowColor() ); + mrParent.SetFillColor(); + drawOuterFrame(); + } - SetLineColor( rStyleSettings.GetShadowColor() ); - DrawLine( aPos2, aPos3 ); - aPos1.X()--; - aPos1.Y()--; - aPos2.Y()--; - if ( !pItem->IsDefaultTabBgColor() && ( pItem->mbSelect || (pItem->mnId == mnCurPageId) ) ) - { - SetLineColor( pItem->maTabBgColor ); - DrawLine( Point(aPos1.X()-1, aPos1.Y()-1), Point(aPos2.X(), aPos2.Y()-1) ); - } - DrawLine( aPos1, aPos2 ); + void drawPlusImage() + { + Image aPlusImg( SvtResId(BMP_LIST_ADD) ); + // Center the image within the bounding rectangle. + Size aSize = aPlusImg.GetSizePixel(); + Point pt = maRect.TopLeft(); + long nXOffSet = (maRect.GetWidth() - aSize.Width()) / 2; + long nYOffset = (maRect.GetHeight() - aSize.Height()) / 2; + pt += Point(nXOffSet, nYOffset); + pt.X() += 1; + mrParent.DrawImage(pt, aPlusImg); + } - // draw a small 2px sliver of the original background color at the bottom of the selected tab + void setRect(const Rectangle& rRect) + { + maRect = rRect; - if ( !pItem->IsDefaultTabBgColor() ) - { - if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) || rStyleSettings.GetHighContrastMode() ) { - SetLineColor( pItem->maTabBgColor ); - DrawLine( Point(aPos1.X()-1, aPos1.Y()-1), Point(aPos2.X(), aPos2.Y()-1) ); - if ( !pItem->mbEnable ) - DrawCtrlText( aTxtPos, aText, 0, STRING_LEN, (TEXT_DRAW_DISABLE | TEXT_DRAW_MNEMONIC) ); - else - DrawText( aTxtPos, aText ); - } - } + long nOffY = mrParent.GetPageArea().getY(); - // Da etwas uebermalt werden konnte, muessen wir die Polygon- - // umrandung nocheinmal ausgeben - SetLineColor( rStyleSettings.GetDarkShadowColor() ); - SetFillColor(); - DrawPolygon( aPoly ); + // Zuerst geben wir das Polygon gefuellt aus + maPoly[0] = Point( rRect.Left(), nOffY ); + maPoly[1] = Point( rRect.Left()+TABBAR_OFFSET_X, rRect.Bottom() ); + maPoly[2] = Point( rRect.Right()-TABBAR_OFFSET_X, rRect.Bottom() ); + maPoly[3] = Point( rRect.Right(), nOffY ); + } - // Beim dem aktuellen Tab die restlichten Ausgaben vornehmen und - // die Schleife abbrechen, da die aktuelle Tab als letztes - // ausgegeben wird - if ( pItem == pCurItem ) - { - // Beim aktuellen Item muss der oberstes Strich geloescht - // werden - SetLineColor(); - SetFillColor( aSelectColor ); - Rectangle aDelRect( aPos0, aPos3 ); - DrawRect( aDelRect ); - if ( mnWinStyle & WB_3DTAB ) - { - aDelRect.Top()--; - DrawRect( aDelRect ); - } + void setSelected(bool b) + { + mbSelected = b; + } - break; - } + void setCustomColored(bool b) + { + mbCustomColored = b; + } - pItem = mpItemList->Prev(); - } - else - { - if ( pItem == pCurItem ) - break; + void setSpecialTab(bool b) + { + mbSpecialTab = b; + } - pItem = NULL; - } + void setEnabled(bool b) + { + mbEnabled = b; + } + + void setSelectedFillColor(const Color& rColor) + { + maSelectedColor = rColor; + } + + void setUnselectedFillColor(const Color& rColor) + { + maUnselectedColor = rColor; + } + + void setCustomColor(const Color& rColor) + { + maCustomColor = rColor; + } + +private: + TabBar& mrParent; + const StyleSettings* mpStyleSettings; + + Rectangle maRect; + Polygon maPoly; + + Color maSelectedColor; + Color maCustomColor; + Color maUnselectedColor; + + bool mbSelected:1; + bool mbCustomColored:1; + bool mbSpecialTab:1; + bool mbEnabled:1; +}; + +} + +void TabBar::Paint( const Rectangle& ) +{ + // Items berechnen und ausgeben + USHORT nItemCount = (USHORT)mpItemList->Count(); + if (!nItemCount) + return; + + ImplPrePaint(); + + Color aFaceColor, aSelectColor, aFaceTextColor, aSelectTextColor; + ImplGetColors( aFaceColor, aFaceTextColor, aSelectColor, aSelectTextColor ); + + // Font selektieren + Font aFont = GetFont(); + Font aLightFont = aFont; + aLightFont.SetWeight( WEIGHT_NORMAL ); + TabBarPaintGuard aGuard(*this); + TabDrawer aDrawer(*this); + aDrawer.setSelectedFillColor(aSelectColor); + aDrawer.setUnselectedFillColor(aFaceColor); + aDrawer.drawOutputAreaBorder(); + + // Now, start drawing the tabs. + + ImplTabBarItem* pItem = ImplGetLastTabBarItem(nItemCount); + + if (pItem && mbHasInsertTab) + { + // Draw the insert tab at the right end. + Rectangle aRect = ImplGetInsertTabRect(pItem); + aDrawer.setRect(aRect); + aDrawer.drawTab(); + aDrawer.drawPlusImage(); + } + + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + ImplTabBarItem* pCurItem = NULL; + while ( pItem ) + { + // CurrentItem als letztes ausgeben, da es alle anderen ueberdeckt + if ( !pCurItem && (pItem->mnId == mnCurPageId) ) + { + pCurItem = pItem; + pItem = mpItemList->Prev(); if ( !pItem ) pItem = pCurItem; + continue; } - } - // Font wieder herstellen - SetFont( aFont ); - // remove clip region - SetClipRegion(); + bool bCurrent = pItem == pCurItem; + + if ( !pItem->maRect.IsEmpty() ) + { + Rectangle aRect = pItem->maRect; + bool bSelected = pItem->IsSelected(pCurItem); + // We disable custom background color in high contrast mode. + bool bCustomBgColor = !pItem->IsDefaultTabBgColor() && !rStyleSettings.GetHighContrastMode(); + bool bSpecialTab = (pItem->mnBits & TPB_SPECIAL); + bool bEnabled = pItem->mbEnable; + String aText = pItem->mbShort ? + GetEllipsisString(pItem->maText, mnCurMaxWidth, TEXT_DRAW_ENDELLIPSIS) : pItem->maText; + + aDrawer.setRect(aRect); + aDrawer.setSelected(bSelected); + aDrawer.setCustomColored(bCustomBgColor); + aDrawer.setSpecialTab(bSpecialTab); + aDrawer.setEnabled(bEnabled); + aDrawer.setCustomColor(pItem->maTabBgColor); + aDrawer.drawTab(); + + // Aktuelle Page wird mit einem fetten Font ausgegeben + if ( bCurrent ) + SetFont( aFont ); + else + SetFont( aLightFont ); + + // Je nach Status die richtige FillInBrush setzen + // Set the correct FillInBrush depending upon status + if ( bSelected ) + SetTextColor( aSelectTextColor ); + else if ( bCustomBgColor ) + SetTextColor( pItem->maTabTextColor ); + else + SetTextColor( aFaceTextColor ); + + // This tab is "special", and a special tab needs a blue text. + if (bSpecialTab) + SetTextColor(Color(COL_LIGHTBLUE)); + + aDrawer.drawText(aText); + + if ( bCurrent ) + { + SetLineColor(); + SetFillColor(aSelectColor); + aDrawer.drawOverTopBorder(mnWinStyle & WB_3DTAB); + return; + } + + pItem = mpItemList->Prev(); + } + else + { + if ( bCurrent ) + return; + + pItem = NULL; + } + + if ( !pItem ) + pItem = pCurItem; + } } // ----------------------------------------------------------------------- - void TabBar::Resize() { Size aNewSize = GetOutputSizePixel(); @@ -1546,6 +1672,80 @@ long TabBar::ImplDeactivatePage() return nRet; } +void TabBar::ImplPrePaint() +{ + USHORT nItemCount = (USHORT)mpItemList->Count(); + if (!nItemCount) + return; + + ImplTabBarItem* pItem; + + // TabBar muss formatiert sein + ImplFormat(); + + // Beim ersten Format auch dafuer sorgen, das aktuelle TabPage + // sichtbar wird + if ( mbFirstFormat ) + { + mbFirstFormat = FALSE; + + if ( mnCurPageId && (mnFirstPos == 0) && !mbDropPos ) + { + pItem = mpItemList->GetObject( GetPagePos( mnCurPageId ) ); + if ( pItem->maRect.IsEmpty() ) + { + // mbDropPos setzen (bzw. misbrauchen) um Invalidate() + // zu unterbinden + mbDropPos = TRUE; + SetFirstPageId( mnCurPageId ); + mbDropPos = FALSE; + if ( mnFirstPos != 0 ) + ImplFormat(); + } + } + } +} + +ImplTabBarItem* TabBar::ImplGetLastTabBarItem(USHORT nItemCount) const +{ + // letzten sichtbaren Eintrag suchen + USHORT n = mnFirstPos+1; + if ( n >= nItemCount ) + n = nItemCount-1; + ImplTabBarItem* pItem = mpItemList->Seek( n ); + while ( pItem ) + { + if ( !pItem->maRect.IsEmpty() ) + { + n++; + pItem = mpItemList->Next(); + } + else + break; + } + + // Alle Tabs ausgeben (von hinten nach vorn und aktuellen zuletzt) + if ( pItem ) + n--; + else if ( n >= nItemCount ) + n = nItemCount-1; + pItem = mpItemList->Seek( n ); + return pItem; +} + +Rectangle TabBar::ImplGetInsertTabRect(ImplTabBarItem* pItem) const +{ + if (mbHasInsertTab && pItem) + { + Rectangle aInsTabRect = pItem->maRect; + aInsTabRect.setX( + aInsTabRect.getX() + aInsTabRect.getWidth() - TABBAR_OFFSET_X - TABBAR_OFFSET_X2); + aInsTabRect.setWidth(32); + return aInsTabRect; + } + return Rectangle(); +} + // ----------------------------------------------------------------------- long TabBar::DeactivatePage() @@ -1838,7 +2038,7 @@ USHORT TabBar::GetPagePos( USHORT nPageId ) const // ----------------------------------------------------------------------- -USHORT TabBar::GetPageId( const Point& rPos ) const +sal_uInt16 TabBar::GetPageId( const Point& rPos, bool bCheckInsTab ) const { ImplTabBarItem* pItem = mpItemList->First(); while ( pItem ) @@ -1849,6 +2049,16 @@ USHORT TabBar::GetPageId( const Point& rPos ) const pItem = mpItemList->Next(); } + if (bCheckInsTab && mbHasInsertTab) + { + pItem = mpItemList->Last(); + if (pItem) + { + if (ImplGetInsertTabRect(pItem).IsInside(rPos)) + return INSERT_TAB_POS; + } + } + return 0; } diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx index e84c934ef0d8..d9955cbdeb30 100644 --- a/svtools/source/control/taskbar.cxx +++ b/svtools/source/control/taskbar.cxx @@ -30,14 +30,10 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> -#ifndef _VCL_FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif #include <taskbar.hxx> diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx index 8e5ff6de8def..9148686d2608 100644 --- a/svtools/source/control/taskbox.cxx +++ b/svtools/source/control/taskbox.cxx @@ -30,9 +30,7 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx index 4c9fda217258..03ff6adb41f8 100644 --- a/svtools/source/control/taskmisc.cxx +++ b/svtools/source/control/taskmisc.cxx @@ -30,9 +30,7 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/help.hxx> diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index 2fdab63be37f..d07bc73da82c 100644 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -30,9 +30,7 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <tools/date.hxx> #include <vcl/image.hxx> diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index abde4a015ab8..d0340f2030b7 100755..100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -29,9 +29,7 @@ #include <tools/list.hxx> #include <tools/color.hxx> #include <tools/string.hxx> -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif #include <rtl/uuid.h> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/compbase6.hxx> diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 62193eadf735..09b2db7c7b5d 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -31,12 +31,8 @@ #include <tools/debug.hxx> #include <vcl/decoview.hxx> #include <vcl/svapp.hxx> -#ifndef _SCRBAR_HXX #include <vcl/scrbar.hxx> -#endif -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif #include <com/sun/star/accessibility/AccessibleEventObject.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 9a66230f012c..1064fcae6314 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -32,15 +32,9 @@ #include "addresstemplate.hxx" -#ifndef _SVT_ADDRESSTEMPLATE_HRC_ #include "addresstemplate.hrc" -#endif -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <svtools/svtdata.hxx> #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> @@ -49,9 +43,7 @@ #include <vcl/waitobj.hxx> #include <vcl/msgbox.hxx> #include <toolkit/helper/vclunohelper.hxx> -#ifndef _CPPUHELPER_EXTRACT_HXX_ #include <cppuhelper/extract.hxx> -#endif #include <comphelper/interaction.hxx> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/awt/XWindow.hpp> @@ -66,9 +58,7 @@ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include "localresaccess.hxx" -#ifndef SVTOOLS_FILENOTATION_HXX_ #include "svl/filenotation.hxx" -#endif #include <tools/urlobj.hxx> #include <algorithm> diff --git a/svtools/source/dialogs/colrdlg.src b/svtools/source/dialogs/colrdlg.src index ad9a5c1aa015..55517299c057 100644 --- a/svtools/source/dialogs/colrdlg.src +++ b/svtools/source/dialogs/colrdlg.src @@ -102,7 +102,7 @@ ModalDialog DLG_COLOR Maximum = 100 ; Last = 100 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; MetricField NUM_MAGENTA { @@ -115,7 +115,7 @@ ModalDialog DLG_COLOR Maximum = 100 ; Last = 100 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; MetricField NUM_YELLOW { @@ -128,7 +128,7 @@ ModalDialog DLG_COLOR Maximum = 100 ; Last = 100 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; MetricField NUM_KEY { @@ -141,7 +141,7 @@ ModalDialog DLG_COLOR Maximum = 100 ; Last = 100 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; FixedText FT_RED { diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index b0e77d658931..6f94158f71fb 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/edit.hxx> #include <vcl/lstbox.hxx> diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx index 4d32565a2775..8a793eac3630 100644 --- a/svtools/source/dialogs/filedlg2.hxx +++ b/svtools/source/dialogs/filedlg2.hxx @@ -30,9 +30,7 @@ #include <tools/debug.hxx> #include <tools/fsys.hxx> -#ifndef _SV_BUTTON_HXX //autogen wg. PushButton #include <vcl/button.hxx> -#endif #include <vcl/unohelp.hxx> class FixedText; diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx index 532fd3f61bb2..f39098137de6 100644 --- a/svtools/source/dialogs/printdlg.cxx +++ b/svtools/source/dialogs/printdlg.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <tools/debug.hxx> -#ifndef _SV_APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _VCL_PRINT_HXX #include <vcl/print.hxx> -#endif #include <vcl/msgbox.hxx> #include <vcl/jobset.hxx> #include <tools/urlobj.hxx> @@ -45,9 +41,7 @@ #include <svtools/svtdata.hxx> #include <filedlg.hxx> #include "svl/pickerhelper.hxx" -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/XFilePicker.hpp> diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index ceef2a88642b..6fc2f9ea39ee 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <tools/debug.hxx> -#ifndef _VCL_PRINT_HXX #include <vcl/print.hxx> -#endif #ifndef GCC #endif diff --git a/svtools/source/dialogs/propctrl.cxx b/svtools/source/dialogs/propctrl.cxx index 675a93ca728b..f6ec090c9cbb 100644 --- a/svtools/source/dialogs/propctrl.cxx +++ b/svtools/source/dialogs/propctrl.cxx @@ -29,15 +29,9 @@ #include "precompiled_svtools.hxx" -#ifndef _USR_INTROSP_HXX #include <usr/inspect.hxx> -#endif -#ifndef _USR_SERINFO_HXX #include <usr/serinfo.hxx> -#endif -#ifndef _USR_INTROSP_HXX #include <usr/introsp.hxx> -#endif #include <propctrl.hxx> #include <property.hxx> diff --git a/svtools/source/dialogs/propctrl.hxx b/svtools/source/dialogs/propctrl.hxx index 949873ceb1b7..43d50dad1761 100644 --- a/svtools/source/dialogs/propctrl.hxx +++ b/svtools/source/dialogs/propctrl.hxx @@ -35,18 +35,10 @@ */ -#ifndef __PROPED_HXX__ #include <proped.hxx> -#endif -#ifndef _UNO_HXX #include <usr/uno.hxx> -#endif -#ifndef _USR_SEQU_HXX #include <usr/sequ.hxx> -#endif -#ifndef __TOOLSIDL_HXX__ #include <usr/toolsidl.hxx> -#endif /* class XPropertyEditor diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 2053da80019d..6390c6d9b507 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -33,9 +33,7 @@ #include <tools/diagnose_ex.h> #include <vcl/msgbox.hxx> #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif //......................................................................... namespace svt diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index f06b4f53ce7c..470691b6c8a3 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -30,15 +30,9 @@ #define _SVT_WIZDLG_CXX #include <tools/debug.hxx> -#ifndef _VCL_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _VCL_TABPAGE_HXX #include <vcl/tabpage.hxx> -#endif #include <svtools/wizdlg.hxx> // ======================================================================= diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx index e0e136089d78..551c532fbabc 100644 --- a/svtools/source/edit/texteng.cxx +++ b/svtools/source/edit/texteng.cxx @@ -44,21 +44,13 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValues.hpp> -#ifndef _COM_SUN_STAR_TEXT_XBREAKITERATOR_HPP_ #include <com/sun/star/i18n/XBreakIterator.hpp> -#endif -#ifndef _COM_SUN_STAR_TEXT_CHARACTERITERATORMODE_HPP_ #include <com/sun/star/i18n/CharacterIteratorMode.hpp> -#endif -#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_ #include <com/sun/star/i18n/WordType.hpp> -#endif -#ifndef _COM_SUN_STAR_I18N_XEXTENDEDINPUTSEQUENCECHECKER_HDL_ #include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp> -#endif #include <com/sun/star/i18n/InputSequenceCheckMode.hpp> #include <com/sun/star/i18n/ScriptType.hpp> diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx index 48cd23bdcc6f..b5ba775f59bb 100644 --- a/svtools/source/edit/textview.cxx +++ b/svtools/source/edit/textview.cxx @@ -43,17 +43,11 @@ #include <sot/formats.hxx> #include <svl/urlbmk.hxx> -#ifndef _COM_SUN_STAR_TEXT_XBREAKITERATOR_HPP_ #include <com/sun/star/i18n/XBreakIterator.hpp> -#endif -#ifndef _COM_SUN_STAR_TEXT_CHARACTERITERATORMODE_HPP_ #include <com/sun/star/i18n/CharacterIteratorMode.hpp> -#endif -#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_ #include <com/sun/star/i18n/WordType.hpp> -#endif #include <cppuhelper/weak.hxx> #include <vcl/unohelp.hxx> #include <com/sun/star/datatransfer/XTransferable.hpp> @@ -61,9 +55,7 @@ #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_DNDCONSTANS_HPP_ #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> -#endif #include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp> #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp> diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index c8a79d3a35cd..88f2ec13af51 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -60,9 +60,7 @@ #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/uno/XWeak.hpp> #include <com/sun/star/uno/XAggregation.hpp> -#ifndef _COM_SUN_STAR_UNO_XTYPEPROVIDER_HPP_ #include <com/sun/star/lang/XTypeProvider.hpp> -#endif #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XOutputStream.hpp> diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter.vcl/igif/decode.hxx index 3c6a61e7508d..6a55440149be 100644 --- a/svtools/source/filter.vcl/igif/decode.hxx +++ b/svtools/source/filter.vcl/igif/decode.hxx @@ -28,9 +28,7 @@ #ifndef _DECODE_HXX #define _DECODE_HXX -#ifndef _BMPACC_HXX #include <vcl/bmpacc.hxx> -#endif struct GIFLZWTableEntry; diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter.vcl/ixpm/xpmread.cxx index 7575c94e3ed9..9c1fa3e26404 100644 --- a/svtools/source/filter.vcl/ixpm/xpmread.cxx +++ b/svtools/source/filter.vcl/ixpm/xpmread.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _BMPACC_HXX #include <vcl/bmpacc.hxx> -#endif -#ifndef _GRAPH_HXX #include <vcl/graph.hxx> -#endif #include "rgbtable.hxx" #define _XPMPRIVATE #include "xpmread.hxx" diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx index 1e49e0d61446..7f041adfae5b 100644 --- a/svtools/source/filter.vcl/wmf/enhwmf.cxx +++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx @@ -158,6 +158,8 @@ #define EMR_SETLINKEDUFIS 119 #define EMR_SETTEXTJUSTIFICATION 120 +#define EMFP_DEBUG(x) +//#define EMFP_DEBUG(x) x //----------------------------------------------------------------------------------- @@ -229,6 +231,106 @@ static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt3 return bOk; } +EMFP_DEBUG(void dumpWords( SvStream& s, int i ) +{ + sal_uInt32 pos = s.Tell(); + INT16 data; + for( ; i > 0; i -- ) { + s >> data; + EMFP_DEBUG(printf ("\t\t\tdata: %04hx\n", data)); + } + s.Seek (pos); +}); + +void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC) +{ + if (!bEMFPlus) { + pOut->PassEMFPlusHeaderInfo(); + + // debug code - write the stream to debug file /tmp/emf-stream.emf + EMFP_DEBUG(int pos = pWMF->Tell(); + pWMF->Seek(0); + SvFileStream file( UniString::CreateFromAscii( "/tmp/emf-stream.emf" ), STREAM_WRITE | STREAM_TRUNC ); + + *pWMF >> file; + file.Flush(); + file.Close(); + + pWMF->Seek( pos );) + } + bEMFPlus = true; + + void *buffer = malloc( length ); + + int pos = pWMF->Tell(); + pOut->PassEMFPlus( buffer, pWMF->Read( buffer, length ) ); + pWMF->Seek( pos ); + + bHaveDC = false; + + length -= 4; + + while (length > 0) { + UINT16 type, flags; + UINT32 size, dataSize; + sal_uInt32 next; + + *pWMF >> type >> flags >> size >> dataSize; + + EMFP_DEBUG(printf ("\t\tEMF+ record type: %d\n", type)); + + // GetDC + if( type == 16388 ) { + bHaveDC = true; + EMFP_DEBUG(printf ("\t\tEMF+ lock DC (device context)\n", type)); + } + + next = pWMF->Tell() + ( size - 12 ); + + length -= size; + + pWMF->Seek( next ); + } + + free( buffer ); +} + +void EnhWMFReader::ReadGDIComment() +{ + sal_uInt32 type; + + *pWMF >> type; + + switch( type ) { + case 2: { + sal_Int32 x, y, r, b; + + EMFP_DEBUG(printf ("\t\tBEGINGROUP\n")); + + *pWMF >> x >> y >> r >> b; + EMFP_DEBUG(printf ("\t\tbounding rectangle: %d,%d x %d,%d\n", x, y, r, b)); + + sal_uInt32 l; + + *pWMF >> l; + EMFP_DEBUG(printf ("\t\tdescription length: %d\n", l)); + + break; + } + case 3: { + EMFP_DEBUG(printf ("\t\tENDGROUP\n")); + break; + } + case 0x40000004: { + EMFP_DEBUG(printf ("\t\tMULTIFORMATS\n")); + break; + } + default: + EMFP_DEBUG(printf ("\t\tunknown GDIComment\n")); + EMFP_DEBUG(dumpWords (*pWMF, 16)); + } +} + BOOL EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStretchBltMode = 0; @@ -239,6 +341,14 @@ BOOL EnhWMFReader::ReadEnhWMF() sal_Int16 nX16, nY16; sal_Bool bFlag, bStatus = ReadHeader(); + sal_Bool bHaveDC = false; + +#ifdef UNX + static sal_Bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL ); +#else + // TODO: make it possible to disable emf+ on windows + static sal_Bool bEnableEMFPlus = sal_True; +#endif while( bStatus && nRecordCount-- ) { @@ -263,6 +373,34 @@ BOOL EnhWMFReader::ReadEnhWMF() bFlag = sal_False; + EMFP_DEBUG(printf ("0x%04x-0x%04x record type: %d size: %d\n", nNextPos - nRecSize, nNextPos, nRecType, nRecSize)); + + if( bEnableEMFPlus && nRecType == EMR_GDICOMMENT ) { + sal_uInt32 length; + + *pWMF >> length; + + EMFP_DEBUG(printf ("\tGDI comment\n\t\tlength: %d\n", length)); + + if( length >= 4 ) { + UINT32 id; + + *pWMF >> id; + + EMFP_DEBUG(printf ("\t\tbegin %c%c%c%c id: 0x%x\n", (char)(id & 0xff), (char)((id & 0xff00) >> 8), (char)((id & 0xff0000) >> 16), (char)((id & 0xff000000) >> 24), id)); + + // EMF+ comment (fixme: BE?) + if( id == 0x2B464D45 && nRecSize >= 12 ) + ReadEMFPlusComment( length, bHaveDC ); + // GDIC comment, doesn't do anything useful yet => enabled only for debug + else if( id == 0x43494447 && nRecSize >= 12 ) { + EMFP_DEBUG(ReadGDIComment()); + } else { + EMFP_DEBUG(printf ("\t\tunknown id: 0x%x\n", id)); + } + } + } else if( !bEMFPlus || bHaveDC || nRecType == EMR_EOF ) + switch( nRecType ) { case EMR_POLYBEZIERTO : @@ -867,7 +1005,10 @@ BOOL EnhWMFReader::ReadEnhWMF() Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); aBitmap.Crop( aCropRect ); } - aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); + /* Pseudocomment to add more context so that make patch.unapply + * works better. Ha! + */ + aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ), LIST_APPEND ); } } } @@ -921,7 +1062,8 @@ BOOL EnhWMFReader::ReadEnhWMF() Rectangle aCropRect( Point( xSrc, ySrc ), Size( cxSrc, cySrc ) ); aBitmap.Crop( aCropRect ); } - aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop ), LIST_APPEND ); + /* Another pseudocomment to make make patch.unapply work better */ + aBmpSaveList.Insert( new BSaveStruct( aBitmap, aRect, dwRop, pOut->GetFillStyle () ), LIST_APPEND ); } } } @@ -1192,6 +1334,53 @@ BOOL EnhWMFReader::ReadEnhWMF() } break; + case EMR_CREATEDIBPATTERNBRUSHPT : + { + UINT32 nStart = pWMF->Tell() - 8; + Bitmap aBitmap; + + *pWMF >> nIndex; + + if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) + { + UINT32 usage, offBmi, cbBmi, offBits, cbBits; + + *pWMF >> usage; + *pWMF >> offBmi; + *pWMF >> cbBmi; + *pWMF >> offBits; + *pWMF >> cbBits; + + if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) ) + bStatus = FALSE; + else if ( offBmi ) + { + UINT32 nSize = cbBmi + cbBits + 14; + if ( nSize <= ( nEndPos - nStartPos ) ) + { + char* pBuf = new char[ nSize ]; + + SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); + aTmp.ObjectOwnsMemory( TRUE ); + aTmp << (BYTE)'B' + << (BYTE)'M' + << (UINT32)cbBits + << (UINT16)0 + << (UINT16)0 + << (UINT32)cbBmi + 14; + pWMF->Seek( nStart + offBmi ); + pWMF->Read( pBuf + 14, cbBmi ); + pWMF->Seek( nStart + offBits ); + pWMF->Read( pBuf + 14 + cbBmi, cbBits ); + aTmp.Seek( 0 ); + aBitmap.Read( aTmp, TRUE ); + } + } + } + + pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( aBitmap ) ); + } + break; #ifdef WIN_MTF_ASSERT default : WinMtfAssertHandler( "Unknown Meta Action" ); break; @@ -1211,7 +1400,6 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break; case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break; case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break; - case EMR_CREATEDIBPATTERNBRUSHPT : WinMtfAssertHandler( "CreateDibPatternBrushPt" ); break; case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break; case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break; case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break; diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index 787e6522b890..a2619bc967f8 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -31,6 +31,7 @@ #include "winmtf.hxx" #include <vcl/metaact.hxx> +#include <vcl/graphictools.hxx> #include <vcl/metric.hxx> #include <rtl/tencinfo.h> @@ -38,6 +39,9 @@ #define WIN_MTF_MAX_CLIP_DEPTH 16 +#define EMFP_DEBUG(x) +//#define EMFP_DEBUG(x) x + void WinMtfClipPath::ImpUpdateType() { if ( !aPolyPoly.Count() ) @@ -1038,7 +1042,8 @@ void WinMtfOutput::UpdateFillStyle() if (!( maLatestFillStyle == maFillStyle ) ) { maLatestFillStyle = maFillStyle; - mpGDIMetaFile->AddAction( new MetaFillColorAction( maFillStyle.aFillColor, !maFillStyle.bTransparent ) ); + if (maFillStyle.aType == FillStyleSolid) + mpGDIMetaFile->AddAction( new MetaFillColorAction( maFillStyle.aFillColor, !maFillStyle.bTransparent ) ); } } @@ -1366,7 +1371,35 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) else { UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); + + if (maLatestFillStyle.aType != FillStylePattern) + mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); + else { + SvtGraphicFill aFill = SvtGraphicFill( PolyPolygon( rPolygon ), + Color(), + 0.0, + SvtGraphicFill::fillNonZero, + SvtGraphicFill::fillTexture, + SvtGraphicFill::Transform(), + true, + SvtGraphicFill::hatchSingle, + Color(), + SvtGraphicFill::gradientLinear, + Color(), + Color(), + 0, + Graphic (maLatestFillStyle.aBmp) ); + + SvMemoryStream aMemStm; + + aMemStm << aFill; + + mpGDIMetaFile->AddAction( new MetaCommentAction( "XPATHFILL_SEQ_BEGIN", 0, + static_cast<const BYTE*>(aMemStm.GetData()), + aMemStm.Seek( STREAM_SEEK_TO_END ) ) ); + mpGDIMetaFile->AddAction( new MetaCommentAction( "XPATHFILL_SEQ_END" ) ); + } + } } } @@ -1709,7 +1742,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( ( nRasterOperation & 0xaa ) != ( ( nRasterOperation & 0x55 ) << 1 ) ) nUsed |= 4; // destination is used - if ( (nUsed & 1) && (( nUsed & 2 ) == 0) ) + if ( (nUsed & 1) && (( nUsed & 2 ) == 0) && nWinRop != PATINVERT ) { // patterns aren't well supported yet sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); @@ -2201,3 +2234,37 @@ void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ) rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF ); } +void WinMtfOutput::PassEMFPlusHeaderInfo() +{ + EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS header info\n")); + + SvMemoryStream mem; + sal_Int32 nLeft, nRight, nTop, nBottom; + + nLeft = mrclFrame.Left(); + nTop = mrclFrame.Top(); + nRight = mrclFrame.Right(); + nBottom = mrclFrame.Bottom(); + + // emf header info + mem << nLeft << nTop << nRight << nBottom; + mem << mnPixX << mnPixY << mnMillX << mnMillY; + + float one, zero; + + one = 1; + zero = 0; + + // add transformation matrix to be used in vcl's metaact.cxx for + // rotate and scale operations + mem << one << zero << zero << one << zero << zero; + + mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const BYTE*) mem.GetData(), mem.GetEndOfData() ) ); + mpGDIMetaFile->UseCanvas( TRUE ); +} + +void WinMtfOutput::PassEMFPlus( void* pBuffer, UINT32 nLength ) +{ + EMFP_DEBUG(printf ("\t\t\tadd EMF_PLUS comment length %d\n", nLength)); + mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS", 0, static_cast<const BYTE*>(pBuffer), nLength ) ); +} diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx index fb4fd2fe0c57..102c8c722a05 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.hxx +++ b/svtools/source/filter.vcl/wmf/winmtf.hxx @@ -33,12 +33,8 @@ #endif #include <sot/object.hxx> -#ifndef BOOST_SHARED_PTR_HPP_INCLUDED #include <boost/shared_ptr.hpp> -#endif -#ifndef _TOOL_DEBUG_HXX #include <tools/debug.hxx> -#endif #include <tools/stack.hxx> #include <tools/table.hxx> #include <tools/dynary.hxx> @@ -364,10 +360,17 @@ struct WinMtfFontStyle // ----------------------------------------------------------------------------- +typedef enum { + FillStyleSolid, + FillStylePattern +} WinMtfFillStyleType; + struct WinMtfFillStyle { - Color aFillColor; - BOOL bTransparent; + Color aFillColor; + BOOL bTransparent; + WinMtfFillStyleType aType; + Bitmap aBmp; WinMtfFillStyle() : aFillColor ( Color( COL_BLACK ) ), @@ -377,16 +380,23 @@ struct WinMtfFillStyle WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) : aFillColor ( rColor ), - bTransparent( bTrans ) + bTransparent( bTrans ), + aType ( FillStyleSolid ) + { + }; + + WinMtfFillStyle( Bitmap& rBmp ) : + aType( FillStylePattern ), + aBmp ( rBmp ) { }; BOOL operator==( const WinMtfFillStyle& rStyle ) - { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); }; + { return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) && ( aType == rStyle.aType ) ); }; BOOL operator==( WinMtfFillStyle* pStyle ) - { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); }; - void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; }; - void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; }; + { return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) && ( aType == pStyle->aType ) ); }; + void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; aBmp = rStyle.aBmp; aType = rStyle.aType; }; + void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; aBmp = pStyle->aBmp; aType = pStyle->aType; }; }; // ----------------------------------------------------------------------------- @@ -478,12 +488,13 @@ typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; struct BSaveStruct { - Bitmap aBmp; - Rectangle aOutRect; - UINT32 nWinRop; + Bitmap aBmp; + Rectangle aOutRect; + UINT32 nWinRop; + WinMtfFillStyle aStyle; - BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) : - aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){}; + BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop, WinMtfFillStyle& rStyle ) : + aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ), aStyle ( rStyle ){}; }; // ----------------------------------------------------------------------------- @@ -638,6 +649,7 @@ class WinMtfOutput void DeleteObject( INT32 nIndex ); void SelectObject( INT32 nIndex ); CharSet GetCharSet(){ return maFont.GetCharSet(); }; + WinMtfFillStyle& GetFillStyle () { return maFillStyle; } void SetFont( const Font& rFont ); const Font& GetFont() const; void SetTextLayoutMode( const sal_uInt32 nLayoutMode ); @@ -672,6 +684,9 @@ class WinMtfOutput void UpdateClipRegion(); void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); + void PassEMFPlus( void* pBuffer, UINT32 nLength ); + void PassEMFPlusHeaderInfo(); + WinMtfOutput( GDIMetaFile& rGDIMetaFile ); virtual ~WinMtfOutput(); }; @@ -710,6 +725,8 @@ class EnhWMFReader : public WinMtf { sal_Bool bRecordPath; sal_Int32 nRecordCount; + BOOL bEMFPlus; + BOOL ReadHeader(); Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck @@ -717,10 +734,12 @@ class EnhWMFReader : public WinMtf public: EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) - : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {}; + : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ), bEMFPlus (FALSE) {}; ~EnhWMFReader(); BOOL ReadEnhWMF(); + void ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC); + void ReadGDIComment(); }; //============================ WMFReader ================================== diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx index cea1ab490b04..a8fdc86604fc 100644 --- a/svtools/source/filter.vcl/wmf/winwmf.cxx +++ b/svtools/source/filter.vcl/wmf/winwmf.cxx @@ -569,7 +569,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) aBmp.Crop( aCropRect ); } Rectangle aDestRect( aPoint, Size( nSxe, nSye ) ); - aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); + aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP, pOut->GetFillStyle () ), LIST_APPEND ); } } } @@ -619,7 +619,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) Rectangle aCropRect( Point( nSx, nSy ), Size( nSxe, nSye ) ); aBmp.Crop( aCropRect ); } - aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP ), LIST_APPEND ); + aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP, pOut->GetFillStyle () ), LIST_APPEND ); } } } diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx index 4dff9732c7d0..72a1f2264211 100644 --- a/svtools/source/filter.vcl/wmf/wmfwr.cxx +++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx @@ -36,9 +36,7 @@ #include <rtl/tencinfo.h> #include <tools/tenccvt.hxx> #include <osl/endian.h> -#ifndef INCLUDED_I18NUTIL_UNICODE_HXX #include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType -#endif #include <vcl/metric.hxx> #include <basegfx/polygon/b2dpolygon.hxx> diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 221354cc6665..1b8eab96482a 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -44,27 +44,13 @@ #include <unotools/cacheoptions.hxx> #include <svtools/grfmgr.hxx> -// --> OD 2010-01-04 #i105243# #include <vcl/pdfextoutdevdata.hxx> -// <-- - -// ----------- -// - Defines - -// ----------- #define WATERMARK_LUM_OFFSET 50 #define WATERMARK_CON_OFFSET -70 -// ----------- -// - statics - -// ----------- - GraphicManager* GraphicObject::mpGlobalMgr = NULL; -// --------------------- -// - GrfDirectCacheObj - -// --------------------- - struct GrfSimpleCacheObj { Graphic maGraphic; @@ -74,14 +60,8 @@ struct GrfSimpleCacheObj maGraphic( rGraphic ), maAttr( rAttr ) {} }; -// ----------------- -// - GraphicObject - -// ----------------- - TYPEINIT1_AUTOFACTORY( GraphicObject, SvDataCopyStream ); -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const GraphicManager* pMgr ) : mpLink ( NULL ), mpUserData ( NULL ) @@ -91,8 +71,6 @@ GraphicObject::GraphicObject( const GraphicManager* pMgr ) : ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const Graphic& rGraphic, const GraphicManager* pMgr ) : maGraphic ( rGraphic ), mpLink ( NULL ), @@ -103,8 +81,6 @@ GraphicObject::GraphicObject( const Graphic& rGraphic, const GraphicManager* pMg ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const Graphic& rGraphic, const String& rLink, const GraphicManager* pMgr ) : maGraphic ( rGraphic ), mpLink ( rLink.Len() ? ( new String( rLink ) ) : NULL ), @@ -115,8 +91,6 @@ GraphicObject::GraphicObject( const Graphic& rGraphic, const String& rLink, cons ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const GraphicObject& rGraphicObj, const GraphicManager* pMgr ) : SvDataCopyStream(), maGraphic ( rGraphicObj.GetGraphic() ), @@ -129,8 +103,6 @@ GraphicObject::GraphicObject( const GraphicObject& rGraphicObj, const GraphicMan ImplSetGraphicManager( pMgr, NULL, &rGraphicObj ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const ByteString& rUniqueID, const GraphicManager* pMgr ) : mpLink ( NULL ), mpUserData ( NULL ) @@ -146,8 +118,6 @@ GraphicObject::GraphicObject( const ByteString& rUniqueID, const GraphicManager* ImplAssignGraphicData(); } -// ----------------------------------------------------------------------------- - GraphicObject::~GraphicObject() { if( mpMgr ) @@ -165,8 +135,6 @@ GraphicObject::~GraphicObject() delete mpSimpleCache; } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplConstruct() { mpMgr = NULL; @@ -179,8 +147,6 @@ void GraphicObject::ImplConstruct() mbIsInSwapOut = FALSE; } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplAssignGraphicData() { maPrefSize = maGraphic.GetPrefSize(); @@ -201,8 +167,6 @@ void GraphicObject::ImplAssignGraphicData() mbEPS = FALSE; } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const ByteString* pID, const GraphicObject* pCopyObj ) { if( !mpMgr || ( pMgr != mpMgr ) ) @@ -240,8 +204,6 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const Byt } } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplAutoSwapIn() { if( IsSwappedOut() ) @@ -304,7 +266,6 @@ void GraphicObject::ImplAutoSwapIn() } } -// ----------------------------------------------------------------------------- BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const { @@ -315,9 +276,6 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz Polygon aClipPoly( Rectangle( rPt, rSz ) ); const USHORT nRot10 = pAttr->GetRotation() % 3600; const Point aOldOrigin( rPt ); - // --> OD 2005-09-30 #i54875# - It's not needed to get the graphic again. -// const Graphic& rGraphic = GetGraphic(); - // <-- const MapMode aMap100( MAP_100TH_MM ); Size aSize100; long nTotalWidth, nTotalHeight; @@ -334,12 +292,6 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz rClipPolyPoly = aClipPoly; - // --> OD 2005-09-30 #i54875# - directly access member <maGraphic> to - // get <PrefSize> and <PrefMapMode>. -// if( rGraphic.GetPrefMapMode() == MAP_PIXEL ) -// aSize100 = Application::GetDefaultDevice()->PixelToLogic( rGraphic.GetPrefSize(), aMap100 ); -// else -// aSize100 = pOut->LogicToLogic( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), aMap100 ); if( maGraphic.GetPrefMapMode() == MAP_PIXEL ) aSize100 = Application::GetDefaultDevice()->PixelToLogic( maGraphic.GetPrefSize(), aMap100 ); else @@ -386,8 +338,6 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz return bRet; } -// ----------------------------------------------------------------------------- - GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) { if( &rGraphicObj != this ) @@ -413,8 +363,6 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) return *this; } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::operator==( const GraphicObject& rGraphicObj ) const { return( ( rGraphicObj.maGraphic == maGraphic ) && @@ -422,29 +370,21 @@ BOOL GraphicObject::operator==( const GraphicObject& rGraphicObj ) const ( rGraphicObj.GetLink() == GetLink() ) ); } -// ------------------------------------------------------------------------ - void GraphicObject::Load( SvStream& rIStm ) { rIStm >> *this; } -// ------------------------------------------------------------------------ - void GraphicObject::Save( SvStream& rOStm ) { rOStm << *this; } -// ------------------------------------------------------------------------ - void GraphicObject::Assign( const SvDataCopyStream& rCopyStream ) { *this = (const GraphicObject& ) rCopyStream; } -// ----------------------------------------------------------------------------- - ByteString GraphicObject::GetUniqueID() const { if ( !IsInSwapIn() && IsEPS() ) @@ -458,30 +398,22 @@ ByteString GraphicObject::GetUniqueID() const return aRet; } -// ----------------------------------------------------------------------------- - ULONG GraphicObject::GetChecksum() const { return( ( maGraphic.IsSupportedGraphic() && !maGraphic.IsSwapOut() ) ? maGraphic.GetChecksum() : 0 ); } -// ----------------------------------------------------------------------------- - SvStream* GraphicObject::GetSwapStream() const { return( HasSwapStreamHdl() ? (SvStream*) mpSwapStreamHdl->Call( (void*) this ) : GRFMGR_AUTOSWAPSTREAM_NONE ); } -// ----------------------------------------------------------------------------- - // !!! to be removed ULONG GraphicObject::GetReleaseFromCache() const { return 0; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetAttr( const GraphicAttr& rAttr ) { maAttr = rAttr; @@ -490,23 +422,17 @@ void GraphicObject::SetAttr( const GraphicAttr& rAttr ) delete mpSimpleCache, mpSimpleCache = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetLink() { if( mpLink ) delete mpLink, mpLink = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetLink( const String& rLink ) { delete mpLink, mpLink = new String( rLink ); } -// ----------------------------------------------------------------------------- - String GraphicObject::GetLink() const { if( mpLink ) @@ -515,23 +441,17 @@ String GraphicObject::GetLink() const return String(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetUserData() { if( mpUserData ) delete mpUserData, mpUserData = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetUserData( const String& rUserData ) { delete mpUserData, mpUserData = new String( rUserData ); } -// ----------------------------------------------------------------------------- - String GraphicObject::GetUserData() const { if( mpUserData ) @@ -540,8 +460,6 @@ String GraphicObject::GetUserData() const return String(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapStreamHdl() { if( mpSwapStreamHdl ) @@ -551,8 +469,6 @@ void GraphicObject::SetSwapStreamHdl() } } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout ) { delete mpSwapStreamHdl, mpSwapStreamHdl = new Link( rHdl ); @@ -572,8 +488,6 @@ void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTime delete mpSwapOutTimer, mpSwapOutTimer = NULL; } -// ----------------------------------------------------------------------------- - Link GraphicObject::GetSwapStreamHdl() const { if( mpSwapStreamHdl ) @@ -582,22 +496,16 @@ Link GraphicObject::GetSwapStreamHdl() const return Link(); } -// ----------------------------------------------------------------------------- - void GraphicObject::FireSwapInRequest() { ImplAutoSwapIn(); } -// ----------------------------------------------------------------------------- - void GraphicObject::FireSwapOutRequest() { ImplAutoSwapOutHdl( NULL ); } -// ----------------------------------------------------------------------------- - void GraphicObject::GraphicManagerDestroyed() { // we're alive, but our manager doesn't live anymore ==> connect to default manager @@ -605,15 +513,11 @@ void GraphicObject::GraphicManagerDestroyed() ImplSetGraphicManager( NULL ); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphicManager( const GraphicManager& rMgr ) { ImplSetGraphicManager( &rMgr ); } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, ULONG nFlags ) const { @@ -621,10 +525,6 @@ BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& if( nFlags & GRFMGR_DRAW_CACHED ) { - // --> OD 2005-10-11 #i54875# - Consider cropped graphics. - // Note: The graphic manager caches a cropped graphic with its - // uncropped position and size. -// bRet = mpMgr->IsInCache( pOut, rPt, rSz, *this, ( pAttr ? *pAttr : GetAttr() ) ); Point aPt( rPt ); Size aSz( rSz ); if ( pAttr->IsCropped() ) @@ -641,30 +541,22 @@ BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::ReleaseFromCache() { mpMgr->ReleaseFromCache( *this ); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetAnimationNotifyHdl( const Link& rLink ) { maGraphic.SetAnimationNotifyHdl( rLink ); } -// ----------------------------------------------------------------------------- - List* GraphicObject::GetAnimationInfoList() const { return maGraphic.GetAnimationInfoList(); } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, ULONG nFlags ) { @@ -742,7 +634,7 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, return bRet; } -// --> OD 2010-01-04 #i105243# +// #i105243# BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, const Point& rPt, const Size& rSz, const GraphicAttr* pGrfAttr, @@ -802,9 +694,6 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, return bRet; } -// <-- - -// ----------------------------------------------------------------------------- BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D ) @@ -828,8 +717,6 @@ BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const return ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, pAttr, nFlags, nTileCacheSize1D ); } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData, const GraphicAttr* pAttr, ULONG /*nFlags*/, OutputDevice* pFirstFrameOutDev ) @@ -888,16 +775,12 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::StopAnimation( OutputDevice* pOut, long nExtraData ) { if( mpSimpleCache ) mpSimpleCache->maGraphic.StopAnimation( pOut, nExtraData ); } -// ----------------------------------------------------------------------------- - const Graphic& GraphicObject::GetGraphic() const { if( mbAutoSwapped ) @@ -906,8 +789,6 @@ const Graphic& GraphicObject::GetGraphic() const return maGraphic; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj ) { mpMgr->ImplUnregisterObj( *this ); @@ -927,16 +808,12 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC mpSwapOutTimer->Start(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphic( const Graphic& rGraphic, const String& rLink ) { SetGraphic( rGraphic ); mpLink = new String( rLink ); } -// ----------------------------------------------------------------------------- - Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const { // #104550# Extracted from svx/source/svdraw/svdograf.cxx @@ -1121,8 +998,6 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo return aTransGraphic; } -// ----------------------------------------------------------------------------- - Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const // TODO: Change to Impl { GetGraphic(); @@ -1173,8 +1048,6 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const / return aGraphic; } -// ----------------------------------------------------------------------------- - void GraphicObject::ResetAnimationLoopCount() { if( IsAnimated() && !IsSwappedOut() ) @@ -1186,8 +1059,6 @@ void GraphicObject::ResetAnimationLoopCount() } } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::SwapOut() { BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : FALSE ); @@ -1198,8 +1069,6 @@ BOOL GraphicObject::SwapOut() return bRet; } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::SwapOut( SvStream* pOStm ) { BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : FALSE ); @@ -1210,8 +1079,6 @@ BOOL GraphicObject::SwapOut( SvStream* pOStm ) return bRet; } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::SwapIn() { BOOL bRet; @@ -1237,8 +1104,6 @@ BOOL GraphicObject::SwapIn() return bRet; } -// ----------------------------------------------------------------------------- - BOOL GraphicObject::SwapIn( SvStream* pIStm ) { BOOL bRet; @@ -1264,8 +1129,6 @@ BOOL GraphicObject::SwapIn( SvStream* pIStm ) return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapState() { if( !IsSwappedOut() ) @@ -1277,8 +1140,6 @@ void GraphicObject::SetSwapState() } } -// ----------------------------------------------------------------------------- - IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) { if( !IsSwappedOut() ) @@ -1312,8 +1173,6 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) return 0L; } -// ------------------------------------------------------------------------ - SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) { VersionCompat aCompat( rIStm, STREAM_READ ); @@ -1340,8 +1199,6 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) return rIStm; } -// ------------------------------------------------------------------------ - SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 1 ); diff --git a/svtools/source/hatchwindow/hatchwindowfactory.hxx b/svtools/source/hatchwindow/hatchwindowfactory.hxx index 9a59c7a95f6d..a2a5b1b58d47 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.hxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.hxx @@ -32,9 +32,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _CPPUHELPER_IMPLBASE5_HXX_ #include <cppuhelper/implbase2.hxx> -#endif class OHatchWindowFactory : public ::cppu::WeakImplHelper2< diff --git a/svtools/source/inc/gifread.hxx b/svtools/source/inc/gifread.hxx index de4c6935ef67..0a78283b2914 100644 --- a/svtools/source/inc/gifread.hxx +++ b/svtools/source/inc/gifread.hxx @@ -28,12 +28,8 @@ #ifndef _GIFREAD_HXX #define _GIFREAD_HXX -#ifndef _GRAPH_HXX #include <vcl/graph.hxx> -#endif -#ifndef _BMPACC_HXX #include <vcl/bmpacc.hxx> -#endif #ifdef _GIFPRIVATE diff --git a/svtools/source/inc/gradwrap.hxx b/svtools/source/inc/gradwrap.hxx index 41887b67822a..37267818c5dc 100644 --- a/svtools/source/inc/gradwrap.hxx +++ b/svtools/source/inc/gradwrap.hxx @@ -26,9 +26,7 @@ ************************************************************************/ -#ifndef _SVGEN_HXX #include <svgen.hxx> -#endif /****************************************************************************** diff --git a/svtools/source/inc/jpeg.hxx b/svtools/source/inc/jpeg.hxx index 9923190c5e21..7bcd98036b2e 100644 --- a/svtools/source/inc/jpeg.hxx +++ b/svtools/source/inc/jpeg.hxx @@ -28,9 +28,7 @@ #ifndef _JPEG_HXX #define _JPEG_HXX -#ifndef _GRAPH_HXX #include <vcl/graph.hxx> -#endif #include <svtools/fltcall.hxx> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> diff --git a/svtools/source/inc/property.hxx b/svtools/source/inc/property.hxx index 689da1faf140..5da77a62c5e2 100644 --- a/svtools/source/inc/property.hxx +++ b/svtools/source/inc/property.hxx @@ -28,27 +28,13 @@ #ifndef SV_PROPERTY_HXX #define SV_PROPERTY_HXX -#ifndef _VIRDEV_HXX //autogen #include <vcl/virdev.hxx> -#endif -#ifndef SV_FIXED_HXX #include <vcl/fixed.hxx> -#endif -#ifndef SV_LSTBOX_HXX #include <vcl/lstbox.hxx> -#endif -#ifndef SV_GROUP_HXX #include <vcl/group.hxx> -#endif -#ifndef SV_BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef SV_MOREBTN_HXX #include <vcl/morebtn.hxx> -#endif -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif #include <vcl/combobox.hxx> #include <vcl/field.hxx> #include <svl/svarray.hxx> diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 92b9f960b65c..8bc688b4227d 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -28,12 +28,8 @@ #ifndef _SVIMPLBOX_HXX #define _SVIMPLBOX_HXX -#ifndef _SELENG_HXX #include <vcl/seleng.hxx> -#endif -#ifndef _SCRBAR_HXX #include <vcl/scrbar.hxx> -#endif #include <vcl/vclevent.hxx> // #102891# ---------------- #include <unotools/intlwrapper.hxx> diff --git a/svtools/source/inc/svimpicn.hxx b/svtools/source/inc/svimpicn.hxx index 20f98d2bcbbd..6b10938b429b 100644 --- a/svtools/source/inc/svimpicn.hxx +++ b/svtools/source/inc/svimpicn.hxx @@ -27,13 +27,9 @@ #ifndef _SVIMPICN_HXX #define _SVIMPICN_HXX -#ifndef _VIRDEV_HXX #include <vcl/virdev.hxx> -#endif -#ifndef _SCRBAR_HXX #include <vcl/scrbar.hxx> -#endif #include <limits.h> class SvLBoxEntry; diff --git a/svtools/source/inc/xbmread.hxx b/svtools/source/inc/xbmread.hxx index aab52eeffa63..9515148513bd 100644 --- a/svtools/source/inc/xbmread.hxx +++ b/svtools/source/inc/xbmread.hxx @@ -28,12 +28,8 @@ #ifndef _XBMREAD_HXX #define _XBMREAD_HXX -#ifndef _GRAPH_HXX #include <vcl/graph.hxx> -#endif -#ifndef _BMPACC_HXX #include <vcl/bmpacc.hxx> -#endif #ifdef _XBMPRIVATE diff --git a/svtools/source/inc/xpmread.hxx b/svtools/source/inc/xpmread.hxx index 29edd15a3b1c..d7355724b75c 100644 --- a/svtools/source/inc/xpmread.hxx +++ b/svtools/source/inc/xpmread.hxx @@ -28,9 +28,7 @@ #ifndef _XPMREAD_HXX #define _XPMREAD_HXX -#ifndef _BITMAP_HXX #include <vcl/bitmap.hxx> -#endif #ifdef _XPMPRIVATE diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 6458e359a49c..e8994f3c6581 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -32,45 +32,25 @@ //=============================================== // includes -#ifndef __COM_SUN_STAR_FRAME_XMODULEMANAGER_HPP_ #include <com/sun/star/frame/XModuleManager.hpp> -#endif -#ifndef __COM_SUN_STAR_FRAME_XDESKTOP_HPP_ #include <com/sun/star/frame/XDesktop.hpp> -#endif -#ifndef __COM_SUN_STAR_UI_XUICONFIGURATIONMANAGER_HPP_ #include <com/sun/star/ui/XUIConfigurationManager.hpp> -#endif -#ifndef __COM_SUN_STAR_UI_XMODULEUICONFIGURATIONMANAGERSUPPLIER_HPP_ #include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> -#endif -#ifndef __COM_SUN_STAR_UI_XUICONFIGURATIONMANAGERSUPPLIER_HPP_ #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> -#endif -#ifndef __COM_SUN_STAR_AWT_XTOPWINDOW_HPP_ #include <com/sun/star/awt/XTopWindow.hpp> -#endif -#ifndef __COM_SUN_STAR_AWT_KEYMODIFIER_HPP_ #include <com/sun/star/awt/KeyModifier.hpp> -#endif -#ifndef __COM_SUN_STAR_UNO_SEQUENCE_HXX_ #include <com/sun/star/uno/Sequence.hxx> -#endif -#ifndef __COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> -#endif -#ifndef __COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_ #include <com/sun/star/lang/DisposedException.hpp> -#endif #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 3aa0016c225e..6b9ed9ea03c4 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -42,9 +42,7 @@ #include <tools/globname.hxx> #include <sot/clsids.hxx> #include <com/sun/star/util/XModifyListener.hpp> -#ifndef _COM_SUN_STAR_UTIL_XMODIFYiBLE_HPP_ #include <com/sun/star/util/XModifiable.hpp> -#endif #include <com/sun/star/embed/EmbedStates.hpp> #include <com/sun/star/embed/EmbedMisc.hpp> #include <com/sun/star/embed/XStateChangeListener.hpp> diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx index 1d407bbdb611..2e81e6f90611 100644 --- a/svtools/source/misc/helpagentwindow.cxx +++ b/svtools/source/misc/helpagentwindow.cxx @@ -29,18 +29,12 @@ #include "precompiled_svtools.hxx" #include "helpagentwindow.hxx" #include <osl/diagnose.h> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/bitmap.hxx> #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #define WB_AGENT_STYLE 0 diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index c02ebc4477c6..cf647ce78a27 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -39,9 +39,7 @@ #include <sot/storage.hxx> #include <sot/clsids.hxx> #include <unotools/ucbhelper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/document/XTypeDetection.hpp> diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src index cdc9f8da1c87..5cd0a714aa9b 100644 --- a/svtools/source/misc/imagemgr.src +++ b/svtools/source/misc/imagemgr.src @@ -162,6 +162,15 @@ Bitmap BMP_PLUGIN File = "plugin.png" ; }; +Image BMP_LIST_ADD +{ + ImageBitmap = Bitmap + { + File = "list_add.png" ; + }; + MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }; +}; + // description strings String STR_DESCRIPTION_SOURCEFILE diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 436c3f721833..7026e9faa0c7 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef SVTOOLS_SOURCE_MISC_IMAGERESOURCEACCESS_HXX #include "imageresourceaccess.hxx" -#endif /** === begin UNO includes === **/ #include <com/sun/star/io/NotConnectedException.hpp> diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 9834fe0fcb76..bd5ab933ebc8 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -35,9 +35,7 @@ // #include <math.h> #include <vcl/svapp.hxx> #include <tools/urlobj.hxx> -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif #include <sot/formats.hxx> #include "svl/urihelper.hxx" diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx index b20863db3208..b20863db3208 100755..100644 --- a/svtools/source/misc/svtaccessiblefactory.cxx +++ b/svtools/source/misc/svtaccessiblefactory.cxx diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 268533ebb8c8..4e245ca50520 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -43,12 +43,8 @@ #include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/uri.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -65,12 +61,8 @@ #include <comphelper/seqstream.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPEFACTORY_HPP_ #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPE_HPP_ #include <com/sun/star/datatransfer/XMimeContentType.hpp> -#endif #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/lang/XInitialization.hpp> diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index dcd0f81b2758..90b352fc5303 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vos/mutex.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -43,9 +39,7 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <comphelper/processfactory.hxx> -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_DROPTARGETDRAGCONTEXT_HPP_ #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> -#endif #include "svl/urlbmk.hxx" #include "inetimg.hxx" diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index 612bcb4f0221..709ead2584a8 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -63,6 +63,9 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll ) rField.SetUnit( eUnit ); switch( eUnit ) { + // _CHAR and _LINE sets the step of "char" and "line" unit, they are same as FUNIT_MM + case FUNIT_CHAR: + case FUNIT_LINE: case FUNIT_MM: rField.SetSpinSize( 50 ); break; diff --git a/svtools/source/misc/xwindowitem.cxx b/svtools/source/misc/xwindowitem.cxx index a382d8293617..a382d8293617 100755..100644 --- a/svtools/source/misc/xwindowitem.cxx +++ b/svtools/source/misc/xwindowitem.cxx diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx index 39629f5c3f77..60ea61d255e7 100644 --- a/svtools/source/productregistration/productregistration.cxx +++ b/svtools/source/productregistration/productregistration.cxx @@ -31,9 +31,7 @@ #include "productregistration.hxx" #include "unotools/regoptions.hxx" #include "registrationdlg.hxx" -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif #include "cppuhelper/factory.hxx" #include <cppuhelper/implbase1.hxx> #include <com/sun/star/lang/XInitialization.hpp> diff --git a/svtools/source/productregistration/registrationdlg.cxx b/svtools/source/productregistration/registrationdlg.cxx index 460cedb060d1..df20dc238843 100644 --- a/svtools/source/productregistration/registrationdlg.cxx +++ b/svtools/source/productregistration/registrationdlg.cxx @@ -31,14 +31,10 @@ #if 0 /* @@@ */ #include <svtools/svtdata.hxx> -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif #endif /* @@@ */ -#ifndef SVTOOLS_REGISTRATIONDLG_HRC #include "registrationdlg.hrc" -#endif #include <vcl/msgbox.hxx> #include <tools/debug.hxx> diff --git a/svtools/source/productregistration/registrationdlg.hxx b/svtools/source/productregistration/registrationdlg.hxx index 16761aff08fc..bbedb8e3a924 100644 --- a/svtools/source/productregistration/registrationdlg.hxx +++ b/svtools/source/productregistration/registrationdlg.hxx @@ -29,9 +29,7 @@ #define SVTOOLS_REGISTRATIONDLG_HXX #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/dialog.hxx> //........................................................................ diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index ade58688dc55..d11ee4208e80 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -181,7 +181,7 @@ INT32 HTMLOption::GetSNumber() const return aTmp.ToInt32(); } -void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const +void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const { if( rLongs.Count() ) rLongs.Remove( 0, rLongs.Count() ); @@ -323,6 +323,9 @@ HTMLParser::HTMLParser( SvStream& rIn, int bReadNewDoc ) bReadComment = FALSE; bIsInHeader = TRUE; pOptions = new HTMLOptions; + + //#i76649, default to UTF-8 for HTML unless we know differently + SetSrcEncoding(RTL_TEXTENCODING_UTF8); } HTMLParser::~HTMLParser() @@ -441,9 +444,7 @@ int HTMLParser::FilterToken( int nToken ) #define HTML_ISALNUM( c ) ( HTML_ISALPHA(c) || HTML_ISDIGIT(c) ) #define HTML_ISSPACE( c ) ( ' ' == c || (c >= 0x09 && c <= 0x0d) ) #define HTML_ISPRINTABLE( c ) ( c >= 32 && c != 127) -// --> OD 2006-07-26 #138464# #define HTML_ISHEXDIGIT( c ) ( HTML_ISDIGIT(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f') ) -// <-- int HTMLParser::ScanText( const sal_Unicode cBreak ) { @@ -470,8 +471,6 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) if( '#' == (nNextCh = GetNextChar()) ) { nNextCh = GetNextChar(); - // --> OD 2006-07-26 #138464# - // consider hexadecimal digits const sal_Bool bIsHex( 'x' == nNextCh ); const sal_Bool bIsDecOrHex( bIsHex || HTML_ISDIGIT(nNextCh) ); if ( bIsDecOrHex ) @@ -517,7 +516,6 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) } } } - // <-- else nNextCh = 0U; } diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx index 27ce3643f8cf..2b9cb48c0d93 100644 --- a/svtools/source/svrtf/rtfkeywd.cxx +++ b/svtools/source/svrtf/rtfkeywd.cxx @@ -1201,13 +1201,13 @@ _Optlink nRet = ((RTF_TokenEntry*)pFirst)->pUToken->CompareTo( *((RTF_TokenEntry*)pSecond)->pUToken ); else - nRet = ((RTF_TokenEntry*)pFirst)->pUToken->CompareToAscii( + nRet = ((RTF_TokenEntry*)pFirst)->pUToken->CompareIgnoreCaseToAscii( ((RTF_TokenEntry*)pSecond)->sToken ); } else { if( -1 == ((RTF_TokenEntry*)pSecond)->nToken ) - nRet = -1 * ((RTF_TokenEntry*)pSecond)->pUToken->CompareToAscii( + nRet = -1 * ((RTF_TokenEntry*)pSecond)->pUToken->CompareIgnoreCaseToAscii( ((RTF_TokenEntry*)pFirst)->sToken ); else nRet = strcmp( ((RTF_TokenEntry*)pFirst)->sToken, diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 053766d92841..dfaf949ede53 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -27,13 +27,9 @@ #ifndef SVTOOLS_TABLECONTROL_IMPL_HXX #define SVTOOLS_TABLECONTROL_IMPL_HXX -#ifndef SVTOOLS_INC_TABLE_TABLEMODEL_HXX #include <svtools/table/tablemodel.hxx> -#endif -#ifndef SVTOOLS_INC_TABLE_ABSTRACTTABLECONTROL_HXX #include <svtools/table/abstracttablecontrol.hxx> -#endif #include <svtools/table/tablemodel.hxx> #include <vector> diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx index 3ddde0c98c64..97c7c646ceeb 100644 --- a/svtools/source/table/tablegeometry.hxx +++ b/svtools/source/table/tablegeometry.hxx @@ -27,13 +27,9 @@ #ifndef SVTOOLS_TABLEGEOMETRY_HXX #define SVTOOLS_TABLEGEOMETRY_HXX -#ifndef SVTOOLS_INC_TABLE_TABLETYPES_HXX #include <svtools/table/tabletypes.hxx> -#endif -#ifndef _SV_GEN_HXX #include <tools/gen.hxx> -#endif //........................................................................ namespace svt { namespace table diff --git a/svtools/source/toolpanel/paneldecklisteners.cxx b/svtools/source/toolpanel/paneldecklisteners.cxx index 32ba9b5c6a24..32ba9b5c6a24 100755..100644 --- a/svtools/source/toolpanel/paneldecklisteners.cxx +++ b/svtools/source/toolpanel/paneldecklisteners.cxx diff --git a/svtools/source/toolpanel/paneldecklisteners.hxx b/svtools/source/toolpanel/paneldecklisteners.hxx index bc7e2ae7db88..bc7e2ae7db88 100755..100644 --- a/svtools/source/toolpanel/paneldecklisteners.hxx +++ b/svtools/source/toolpanel/paneldecklisteners.hxx diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 23067d3ee5d0..23067d3ee5d0 100755..100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx index f68bbc1bbd0f..f68bbc1bbd0f 100755..100644 --- a/svtools/source/toolpanel/tablayouter.cxx +++ b/svtools/source/toolpanel/tablayouter.cxx diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx index e157090bbf0e..e157090bbf0e 100755..100644 --- a/svtools/source/toolpanel/toolpaneldeck.cxx +++ b/svtools/source/toolpanel/toolpaneldeck.cxx diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.cxx b/svtools/source/toolpanel/toolpaneldeckpeer.cxx index 0a84a90b4fb3..0a84a90b4fb3 100755..100644 --- a/svtools/source/toolpanel/toolpaneldeckpeer.cxx +++ b/svtools/source/toolpanel/toolpaneldeckpeer.cxx diff --git a/svtools/source/toolpanel/toolpaneldeckpeer.hxx b/svtools/source/toolpanel/toolpaneldeckpeer.hxx index 4b6607ecbd05..4b6607ecbd05 100755..100644 --- a/svtools/source/toolpanel/toolpaneldeckpeer.hxx +++ b/svtools/source/toolpanel/toolpaneldeckpeer.hxx diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 2f25a8f2f9b2..f2fdbcb59921 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "svtools/genericunodialog.hxx" -#ifndef _SVT_DOC_ADDRESSTEMPLATE_HXX_ #include "addresstemplate.hxx" -#endif -#ifndef _CPPUHELPER_EXTRACT_HXX_ #include <cppuhelper/extract.hxx> -#endif #include <cppuhelper/typeprovider.hxx> #include <comphelper/property.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index ac75a1b9a24b..b84e819668bc 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -48,9 +48,7 @@ // includes of other projects //_________________________________________________________________________________________________________________ -#ifndef _VCL_MENU_HXX_ #include <vcl/menu.hxx> -#endif #include <vcl/svapp.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/logfile.hxx> diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index 14b802a1bf90..c6bd84564a28 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -39,9 +39,7 @@ #include <vcl/status.hxx> #include <imgdef.hxx> #include <svtools/miscopt.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif using namespace ::cppu; using namespace ::com::sun::star::awt; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index f5bc837f60b0..f5bc837f60b0 100755..100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index b15507e4614f..b15507e4614f 100755..100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 92ae93f5080d..835b98da6449 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -38,9 +38,7 @@ #include <imgdef.hxx> #include <svtools/miscopt.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <vcl/toolbox.hxx> //shizhobo #include <com/sun/star/beans/PropertyAttribute.hpp> diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 526cdbb5d03a..5318af62d1fc 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <rtl/ustrbuf.hxx> diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 88f22f0c8402..7ca97040cb30 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -37,9 +37,7 @@ #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/drawing/PointSequence.hpp> -#ifndef _COMPHELPER_SERVICEHELPER_HXX_ #include <comphelper/servicehelper.hxx> -#endif #include <comphelper/propertysethelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <cppuhelper/weakagg.hxx> diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 9440c0e69f26..147b11aceb11 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -414,7 +414,7 @@ namespace svt { namespace uno ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); - ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" ); + ENSURE_OR_RETURN( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!", Reference< XWizardPage >() ); return pWizardImpl->getCurrentWizardPage(); } diff --git a/svtools/workben/browser.cxx b/svtools/workben/browser.cxx index 2f4f120a276b..513991b667cc 100644 --- a/svtools/workben/browser.cxx +++ b/svtools/workben/browser.cxx @@ -37,9 +37,7 @@ #include <svtools/brwbox.hxx> #include <vcl/group.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/dialog.hxx> #define MID_BROWSER 10 diff --git a/svtools/workben/stest.cxx b/svtools/workben/stest.cxx index 85b7013663da..d36fb4d2c043 100644 --- a/svtools/workben/stest.cxx +++ b/svtools/workben/stest.cxx @@ -30,9 +30,7 @@ #include <svtools/svmedit.hxx> #include <txtcmp.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/wrkwin.hxx> #include <vcl/fixed.hxx> #include <vcl/svapp.hxx> diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx index 6d044cee7c93..6d044cee7c93 100755..100644 --- a/svtools/workben/toolpanel/toolpaneltest.cxx +++ b/svtools/workben/toolpanel/toolpaneltest.cxx diff --git a/svtools/workben/urange.cxx b/svtools/workben/urange.cxx index aa5eba3d5543..5748e142ba45 100644 --- a/svtools/workben/urange.cxx +++ b/svtools/workben/urange.cxx @@ -30,9 +30,7 @@ /* Test the SfxUShortRanges class */ -#ifndef _SFXITEMS_HXX #include <sfxitems.hxx> -#endif USHORT nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,9222,9764,9908, 10110,11302,11748,11946,12298,12344,12642,12958,13076,13410,13496,14462, |