diff options
Diffstat (limited to 'svtools')
185 files changed, 886 insertions, 1081 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/bindablecontrolhelper.hxx b/svtools/inc/bindablecontrolhelper.hxx index 0c1a316b7344..d154ea4c404a 100644 --- a/svtools/inc/bindablecontrolhelper.hxx +++ b/svtools/inc/bindablecontrolhelper.hxx @@ -58,5 +58,4 @@ namespace svt } // namespace svt //........................................................................ -#endif // DBA14_SVTOOLS_INC_IMAGERESOURCEACCESS_HXX - +#endif // SVTOOLS_INC_BINDABLECONTROL_HXX diff --git a/svtools/inc/borderhelper.hxx b/svtools/inc/borderhelper.hxx new file mode 100644 index 000000000000..6e9864a0e895 --- /dev/null +++ b/svtools/inc/borderhelper.hxx @@ -0,0 +1,49 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ctrlbox.hxx,v $ + * $Revision: 1.15 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _BORDERHELPER_HXX +#define _BORDERHELPER_HXX + +#include "svtools/svtdllapi.h" + +#include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <vcl/outdev.hxx> + +namespace svtools +{ + SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, + USHORT nDashing, MapUnit eUnit ); + + SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const Point& rBeg, + const Point& rEnd, sal_uInt32 nWidth, USHORT nDashing ); +} + +#endif 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..0c3c1be8dec2 100644 --- a/svtools/inc/ctrlbox.hxx +++ b/svtools/inc/ctrlbox.hxx @@ -30,30 +30,22 @@ #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; class ImpLineList; class FontList; +#define STYLE_SOLID ( ( USHORT ) 0 ) +#define STYLE_DOTTED ( ( USHORT ) 1 ) +#define STYLE_DASHED ( ( USHORT ) 2 ) + /************************************************************************* Beschreibung @@ -255,7 +247,8 @@ class SVT_DLLPUBLIC LineListBox : public ListBox FieldUnit eUnit; FieldUnit eSourceUnit; - SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance, Bitmap& rBmp, XubString& rStr ); + SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance, + USHORT nStyle, Bitmap& rBmp, XubString& rStr ); using Window::ImplInit; SVT_DLLPRIVATE void ImplInit(); void UpdateLineColors( void ); @@ -270,24 +263,30 @@ public: using ListBox::InsertEntry; virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND ); - virtual USHORT InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, USHORT nPos = LISTBOX_APPEND ); + virtual USHORT InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, + USHORT nStyle = STYLE_SOLID, USHORT nPos = LISTBOX_APPEND ); using ListBox::RemoveEntry; virtual void RemoveEntry( USHORT nPos ); virtual void Clear(); using ListBox::GetEntryPos; - USHORT GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0 ) const; + USHORT GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0, + USHORT nStyle = STYLE_SOLID ) const; long GetEntryLine1( USHORT nPos ) const; long GetEntryLine2( USHORT nPos ) const; long GetEntryDistance( USHORT nPos ) const; + USHORT GetEntryStyle( USHORT nPos ) const; inline void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE ) { ListBox::SelectEntry( rStr, bSelect ); } - void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, BOOL bSelect = TRUE ); + void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, + USHORT nStyle = STYLE_SOLID, BOOL bSelect = TRUE ); long GetSelectEntryLine1( USHORT nSelIndex = 0 ) const; long GetSelectEntryLine2( USHORT nSelIndex = 0 ) const; long GetSelectEntryDistance( USHORT nSelIndex = 0 ) const; + USHORT GetSelectEntryStyle( USHORT nSelIndex = 0 ) const; inline BOOL IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); } - BOOL IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0 ) const; + BOOL IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0, + USHORT nStyle1 = STYLE_SOLID ) const; inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; } inline FieldUnit GetUnit() const { return eUnit; } @@ -305,9 +304,9 @@ private: void* GetEntryData( USHORT nPos ) const; }; -inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, BOOL bSelect ) +inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, USHORT nStyle, BOOL bSelect ) { - USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance ); + USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance, nStyle ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) ListBox::SelectEntryPos( nPos, bSelect ); } @@ -339,9 +338,19 @@ inline long LineListBox::GetSelectEntryDistance( USHORT nSelIndex ) const return 0; } -inline BOOL LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance ) const +inline USHORT LineListBox::GetSelectEntryStyle( USHORT nSelIndex ) const +{ + USHORT nStyle = STYLE_SOLID; + USHORT nPos = GetSelectEntryPos( nSelIndex ); + if ( nPos != LISTBOX_ENTRY_NOTFOUND ) + nStyle = GetEntryStyle( nPos ); + + return nStyle; +} + +inline BOOL LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance, USHORT nStyle ) const { - USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance ); + USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance, nStyle ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) return IsEntryPosSelected( nPos ); else 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/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx index ddedfc5a0369..ce0758765395 100644 --- a/svtools/inc/pch/precompiled_svtools.hxx +++ b/svtools/inc/pch/precompiled_svtools.hxx @@ -352,7 +352,6 @@ #include <cppuhelper/weakref.hxx> #include <osl/conditn.hxx> -#include <osl/conditn.hxx> #include <osl/diagnose.h> #include <osl/endian.h> #include <osl/file.h> @@ -428,7 +427,7 @@ #include <vos/ref.hxx> #include <vos/refernce.hxx> #include <vos/security.hxx> -#include <vos/thread.hxx> +#include <osl/thread.hxx> #include <vos/timer.hxx> //---MARKER--- 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 60963c58abbc..77af42e218e2 100644 --- a/svtools/inc/rtfkeywd.hxx +++ b/svtools/inc/rtfkeywd.hxx @@ -70,6 +70,8 @@ #define OOO_STRING_SVTOOLS_RTF_BRDRCF "\\brdrcf" #define OOO_STRING_SVTOOLS_RTF_BRDRDB "\\brdrdb" #define OOO_STRING_SVTOOLS_RTF_BRDRDOT "\\brdrdot" +#define OOO_STRING_SVTOOLS_RTF_BRDRDASH "\\brdrdash" +#define OOO_STRING_SVTOOLS_RTF_BRDRDASHSM "\\brdrdashsm" #define OOO_STRING_SVTOOLS_RTF_BRDRHAIR "\\brdrhair" #define OOO_STRING_SVTOOLS_RTF_BRDRL "\\brdrl" #define OOO_STRING_SVTOOLS_RTF_BRDRR "\\brdrr" 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 3caa9cd6bccd..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; 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..f4a816117a40 100644 --- a/svtools/inc/svtools/chartprettypainter.hxx +++ b/svtools/inc/svtools/chartprettypainter.hxx @@ -28,11 +28,8 @@ #ifndef CHARTPRETTYPAINTER_HXX #define CHARTPRETTYPAINTER_HXX -#ifndef INCLUDED_SVTDLLAPI_H #include "svtools/svtdllapi.h" -#endif -//#include <svtools/embedhlp.hxx> #include <vcl/outdev.hxx> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/uno/Sequence.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/langhelp.hxx b/svtools/inc/svtools/langhelp.hxx new file mode 100644 index 000000000000..d91c03e4c395 --- /dev/null +++ b/svtools/inc/svtools/langhelp.hxx @@ -0,0 +1,42 @@ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Thorsten Behrens <tbehrens@novell.com> + * + * Contributor(s): Thorsten Behrens <tbehrens@novell.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#ifndef _SVTOOLS_LANGHELP_HXX_ +#define _SVTOOLS_LANGHELP_HXX_ + +#include <svtools/svtdllapi.h> + +namespace rtl { class OUString; } + +/** Localize a URI to one of the foundation's webservices + + @param io_rURI + URI to localize - depending on your UI locale, a country local + part is appended to the URI (like "en", or "fr", or "es") + */ +SVT_DLLPUBLIC void localizeWebserviceURI( ::rtl::OUString& io_rURI ); + +#endif + diff --git a/svtools/inc/svtools/miscopt.hxx b/svtools/inc/svtools/miscopt.hxx index ecee18fbe6b4..5d642021ec48 100644 --- a/svtools/inc/svtools/miscopt.hxx +++ b/svtools/inc/svtools/miscopt.hxx @@ -146,6 +146,9 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options 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/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx index a302b40d9d4b..93267a2c0287 100644 --- a/svtools/inc/svtools/parhtml.hxx +++ b/svtools/inc/svtools/parhtml.hxx @@ -256,7 +256,7 @@ public: // Mit Ausnahme des Falls, dass SwitchToUCS2==FALSE und // SVPAR_CS_DONTKNOW uebergeben wird muss der String mit zwei(!) // 0-Bytes an einer geraden(!) Position terminiert sein. - static FASTBOOL IsHTMLFormat( const sal_Char* pHeader, + static bool IsHTMLFormat( const sal_Char* pHeader, BOOL bSwitchToUCS2 = FALSE, rtl_TextEncoding eEnc=RTL_TEXTENCODING_DONTKNOW ); 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..107c3655ed84 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -73,6 +73,7 @@ #define RID_FILEOPEN_INVALIDFOLDER (RID_SVTOOLS_START + 34) #define RID_FILEOPEN_NOTEXISTENTFILE (RID_SVTOOLS_START + 35) #define STR_SVT_NOREMOVABLEDEVICE (RID_SVTOOLS_START + 36) +#define STR_SVT_ALLFORMATS (RID_SVTOOLS_START + 37) // doc template dialog #define DLG_DOCTEMPLATE (RID_SVTOOLS_START+50) @@ -307,6 +308,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 9a6ece489119..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> //........................................................................ @@ -55,7 +53,6 @@ namespace svt { namespace table Link m_aMouseButtonDownHdl; Link m_aMouseButtonUpHdl; Link m_aSelectHdl; - RowPos m_nRowAlreadySelected; public: TableDataWindow( TableControl_Impl& _rTableControl ); inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } 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/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 68cf316e813b..cb3a2088c0e7 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -33,8 +33,6 @@ #include <svtools/colorcfg.hxx> #include <vcl/salgtype.hxx> -#ifndef GCC -#endif #include <tools/multisel.hxx> #include <algorithm> 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/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx index 39845b84f7e0..a942260020af 100644 --- a/svtools/source/brwbox/brwhead.cxx +++ b/svtools/source/brwbox/brwhead.cxx @@ -31,9 +31,6 @@ #include <svtools/brwhead.hxx> #include <svtools/brwbox.hxx> -#ifndef GCC -#endif - //=================================================================== BrowserHeader::BrowserHeader( BrowseBox* pParent, WinBits nWinBits ) diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index cb43e4989355..1af926164c51 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -30,19 +30,10 @@ #include "datwin.hxx" -#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..d2e79ea74ef8 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> @@ -133,21 +129,21 @@ public: String aRealRowCount; // zur Anzeige im VScrollBar RectangleList aInvalidRegion; // invalidated Rectangles during !UpdateMode - FASTBOOL bInPaint; // TRUE while in Paint - FASTBOOL bInCommand; // TRUE while in Command - FASTBOOL bNoScrollBack; // nur vorwaerts scrollen - FASTBOOL bNoHScroll; // kein horizontaler Scrollbar - FASTBOOL bNoVScroll; // no vertical scrollbar - FASTBOOL bAutoHScroll; // autohide horizontaler Scrollbar - FASTBOOL bAutoVScroll; // autohide horizontaler Scrollbar - FASTBOOL bUpdateMode; // nicht SV-UpdateMode wegen Invalidate() - FASTBOOL bAutoSizeLastCol;// last column always fills up window - FASTBOOL bResizeOnPaint; // outstanding resize-event - FASTBOOL bUpdateOnUnlock; // Update() while locked - FASTBOOL bInUpdateScrollbars; // Rekursionsschutz - FASTBOOL bHadRecursion; // Rekursion war aufgetreten - FASTBOOL bOwnDataChangedHdl; // dont change colors in DataChanged - FASTBOOL bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently + bool bInPaint; // TRUE while in Paint + bool bInCommand; // TRUE while in Command + bool bNoScrollBack; // nur vorwaerts scrollen + bool bNoHScroll; // kein horizontaler Scrollbar + bool bNoVScroll; // no vertical scrollbar + bool bAutoHScroll; // autohide horizontaler Scrollbar + bool bAutoVScroll; // autohide horizontaler Scrollbar + bool bUpdateMode; // nicht SV-UpdateMode wegen Invalidate() + bool bAutoSizeLastCol; // last column always fills up window + bool bResizeOnPaint; // outstanding resize-event + bool bUpdateOnUnlock; // Update() while locked + bool bInUpdateScrollbars; // Rekursionsschutz + bool bHadRecursion; // Rekursion war aufgetreten + bool bOwnDataChangedHdl; // dont change colors in DataChanged + bool bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently USHORT nUpdateLock; // lock count, dont call Control::Update()! short nCursorHidden; // new conuter for DoHide/ShowCursor @@ -185,7 +181,7 @@ public: const String& GetRealRowCount() const { return aRealRowCount; } void SetUpdateMode( BOOL bMode ); - FASTBOOL GetUpdateMode() const { return bUpdateMode; } + bool GetUpdateMode() const { return bUpdateMode; } void EnterUpdateLock() { ++nUpdateLock; } void LeaveUpdateLock(); void Update(); 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..1eae19a35679 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -27,12 +27,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef GCC -#endif - -//_________________________________________________________________________________________________________________ -// includes -//_________________________________________________________________________________________________________________ #include <svtools/menuoptions.hxx> #include <unotools/configmgr.hxx> @@ -190,9 +184,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 +239,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 +336,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 e036225cb5f4..45fcc187b741 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -84,8 +84,10 @@ using namespace ::com::sun::star; #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 9 +#define PROPERTYCOUNT 10 #define VCL_TOOLBOX_STYLE_FLAT ((USHORT)0x0004) // from <vcl/toolbox.hxx> @@ -119,6 +121,7 @@ class SvtMiscOptions_Impl : public ConfigItem sal_Bool m_bShowLinkWarningDialog; sal_Bool m_bIsShowLinkWarningDialogRO; sal_Bool m_bDisableUICustomization; + sal_Bool m_bAlwaysAllowSave; //------------------------------------------------------------------------------------------------------------- // public methods @@ -199,6 +202,12 @@ class SvtMiscOptions_Impl : public ConfigItem 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; } @@ -307,6 +316,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() , 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. @@ -418,6 +428,12 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl() DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" ); break; } + case PROPERTYHANDLE_ALWAYSALLOWSAVE : + { + if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) ) + DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" ); + break; + } } } @@ -538,6 +554,12 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames ) DBG_ERROR("Wrong type of \"Misc\\DisableUICustomization\"!" ); } break; + case PROPERTYHANDLE_ALWAYSALLOWSAVE: + { + if( !(seqValues[nProperty] >>= m_bAlwaysAllowSave) ) + DBG_ERROR("Wrong type of \"Misc\\AlwaysAllowSave\"!" ); + } + break; } } } @@ -707,6 +729,11 @@ void SvtMiscOptions_Impl::Commit() seqValues[nProperty] <<= m_bDisableUICustomization; break; } + case PROPERTYHANDLE_ALWAYSALLOWSAVE : + { + seqValues[nProperty] <<= m_bAlwaysAllowSave; + break; + } } } // Set properties in configuration. @@ -729,7 +756,8 @@ Sequence< OUString > SvtMiscOptions_Impl::GetPropertyNames() PROPERTYNAME_USESYSTEMPRINTDIALOG, PROPERTYNAME_TRYODMADIALOG, PROPERTYNAME_SHOWLINKWARNINGDIALOG, - PROPERTYNAME_DISABLEUICUSTOMIZATION + PROPERTYNAME_DISABLEUICUSTOMIZATION, + PROPERTYNAME_ALWAYSALLOWSAVE }; // Initialize return sequence with these list ... @@ -935,6 +963,16 @@ 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/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index dae3abbac966..3a16a875b85a 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -28,9 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef GCC -#endif - #include "ivctrl.hxx" #include "imivctl.hxx" #include <vcl/bitmapex.hxx> diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx index 20bcfe0fe33a..a8087f33cf00 100644 --- a/svtools/source/contnr/svicnvw.cxx +++ b/svtools/source/contnr/svicnvw.cxx @@ -33,9 +33,6 @@ #include <svimpicn.hxx> #include <svtools/svlbitm.hxx> -#ifndef GCC -#endif - #define ICNVW_BLOCK_ENTRYINS 0x0001 SvIcnVwDataEntry::SvIcnVwDataEntry() diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 484584828b9f..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 @@ -2172,14 +2166,6 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) SelAllDestrAnch( FALSE, TRUE ); // DeselectAll(); SetCursor( pEntry ); - DBG_ERROR( "Please report what you did to get this assertion to FS!" ); - // The entry which has been double-clicked changed - and we select it, again. - // I have situations where this behaviour does not make any sense at all - even more, it - // leads to hacks to revert it's results. - // So I'm not sure if this behaviour here is nonsense (which I believe at the moment), - // or if there are really scenarious where it dones make sense .... - // 07.12.2001 - 95727 - fs@openoffice.org - return; } if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() ) 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..d4a5dff663eb 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -30,13 +30,9 @@ #define _SVTREEBX_CXX #include <vcl/svapp.hxx> -#ifndef GCC -#endif class TabBar; -// #102891# ----------------------- - #include <svtools/svlbox.hxx> #include <svtools/svlbitm.hxx> #include <svtools/svtreebx.hxx> @@ -487,7 +483,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 +502,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 +593,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 +640,6 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource ) return pClone; } -// ********************************************************************* -// ********************************************************************* - - void SvTreeListBox::ShowExpandBitmapOnCursor( BOOL bYes ) { DBG_CHKTHIS(SvTreeListBox,0); @@ -845,8 +832,6 @@ void SvTreeListBox::ModelHasCleared() AdjustEntryHeight( GetDefaultCollapsedEntryBmp() ); SvLBox::ModelHasCleared(); -// if( IsUpdateMode() ) -// Invalidate(); } void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL /* bShow */ ) @@ -1017,12 +1002,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 +1028,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 +1396,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 +1532,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 +2291,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..1df508092d52 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -30,6 +30,7 @@ #include "templwin.hxx" #include "templdlg.hxx" #include <svtools/svtdata.hxx> +#include <svtools/langhelp.hxx> #include <unotools/pathoptions.hxx> #include <unotools/dynamicmenuoptions.hxx> #include <unotools/extendedsecurityoptions.hxx> @@ -40,15 +41,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> @@ -1745,7 +1740,7 @@ void SvtDocumentTemplateDialog::InitImpl( ) if ( !bHideLink ) { aMoreTemplatesLink.SetURL( String( - RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508" ) ) ); + RTL_CONSTASCII_STRINGPARAM( "http://templates.documentfoundation.org/" ) ) ); aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) ); } else @@ -1994,6 +1989,7 @@ IMPL_LINK ( SvtDocumentTemplateDialog, OpenLinkHdl_Impl, svt::FixedHyperlink*, E ::rtl::OUString sURL( aMoreTemplatesLink.GetURL() ); if ( sURL.getLength() > 0 ) { + localizeWebserviceURI(sURL); try { uno::Reference< lang::XMultiServiceFactory > xSMGR = diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 3395dffc28f5..446ec07e5cc8 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -30,16 +30,8 @@ #define _TREELIST_CXX -#ifndef GCC -#endif - #include <svtools/treelist.hxx> -#ifdef DBG_UTIL -// Prueft Integritaet der Liste nach jeder Operation -//#define CHECK_INTEGRITY -#endif - DBG_NAME(SvListEntry); 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..2adddf02e57f 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> @@ -43,8 +39,11 @@ #include <svtools/svtools.hrc> #include <ctrlbox.hxx> #include <ctrltool.hxx> +#include <borderhelper.hxx> #include <vcl/i18nhelp.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> #define IMGTEXTSPACE 2 #define EXTRAFONTSIZE 5 @@ -252,6 +251,7 @@ struct ImpLineListData long nLine1; long nLine2; long nDistance; + USHORT nStyle; }; DECLARE_LIST( ImpLineList, ImpLineListData* ) @@ -265,8 +265,107 @@ inline const Color& LineListBox::GetPaintColor( void ) const // ----------------------------------------------------------------------- + +inline void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, USHORT nDashing ) +{ + USHORT nOldAA = rDev.GetAntialiasing(); + rDev.SetAntialiasing( nOldAA & !ANTIALIASING_ENABLE_B2DDRAW ); + + Color aOldColor = rDev.GetFillColor( ); + rDev.SetFillColor( rDev.GetLineColor( ) ); + + basegfx::B2DPolyPolygon aPolygons = svtools::ApplyLineDashing( rPolygon, nDashing, rDev.GetMapMode().GetMapUnit() ); + for ( sal_uInt32 i = 0; i < aPolygons.count( ); i++ ) + { + basegfx::B2DPolygon aDash = aPolygons.getB2DPolygon( i ); + basegfx::B2DPoint aStart = aDash.getB2DPoint( 0 ); + basegfx::B2DPoint aEnd = aDash.getB2DPoint( aDash.count() - 1 ); + + basegfx::B2DVector aVector( aEnd - aStart ); + aVector.normalize( ); + const basegfx::B2DVector aPerpendicular(basegfx::getPerpendicular(aVector)); + + const basegfx::B2DVector aWidthOffset( nWidth / 2 * aPerpendicular); + basegfx::B2DPolygon aDashPolygon; + aDashPolygon.append( aStart + aWidthOffset ); + aDashPolygon.append( aEnd + aWidthOffset ); + aDashPolygon.append( aEnd - aWidthOffset ); + aDashPolygon.append( aStart - aWidthOffset ); + aDashPolygon.setClosed( true ); + + rDev.DrawPolygon( aDashPolygon ); + } + + rDev.SetFillColor( aOldColor ); + rDev.SetAntialiasing( nOldAA ); +} + +namespace svtools +{ + basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, USHORT nDashing, MapUnit eUnit ) + { + ::std::vector < double >aPattern; + switch ( nDashing ) + { + case STYLE_DOTTED: + if ( eUnit == MAP_TWIP ) + { + aPattern.push_back( 30.0 ); + aPattern.push_back( 110.0 ); + } + else if ( eUnit == MAP_100TH_MM ) + { + aPattern.push_back( 50 ); + aPattern.push_back( 200 ); + } + else if ( eUnit == MAP_PIXEL ) + { + aPattern.push_back( 1.0 ); + aPattern.push_back( 3.0 ); + } + break; + case STYLE_DASHED: + if ( eUnit == MAP_TWIP ) + { + aPattern.push_back( 110 ); + aPattern.push_back( 110 ); + } + else if ( eUnit == MAP_100TH_MM ) + { + aPattern.push_back( 200 ); + aPattern.push_back( 200 ); + } + else if ( eUnit == MAP_PIXEL ) + { + aPattern.push_back( 10 ); + aPattern.push_back( 20 ); + } + break; + default: + break; + } + + basegfx::B2DPolyPolygon aPolygons; + if ( ! aPattern.empty() ) + basegfx::tools::applyLineDashing( rPolygon, aPattern, &aPolygons ); + else + aPolygons.append( rPolygon ); + + return aPolygons; + } + + void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2, + sal_uInt32 nWidth, USHORT nDashing ) + { + basegfx::B2DPolygon aPolygon; + aPolygon.append( basegfx::B2DPoint( rP1.X(), rP1.Y() ) ); + aPolygon.append( basegfx::B2DPoint( rP2.X(), rP2.Y() ) ); + lclDrawPolygon( rDev, aPolygon, nWidth, nDashing ); + } +} + void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, - Bitmap& rBmp, XubString& rStr ) + USHORT nStyle, Bitmap& rBmp, XubString& rStr ) { Size aSize = GetOutputSizePixel(); aSize.Width() -= 20; @@ -293,8 +392,8 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, // Linien malen aSize = aVirDev.PixelToLogic( aSize ); long nPix = aVirDev.PixelToLogic( Size( 0, 1 ) ).Height(); - long n1 = nLine1 / 100; - long n2 = nLine2 / 100; + sal_uInt32 n1 = nLine1 / 100; + sal_uInt32 n2 = nLine2 / 100; long nDist = nDistance / 100; n1 += nPix-1; n1 -= n1%nPix; @@ -317,13 +416,18 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, aVirDev.SetFillColor( GetSettings().GetStyleSettings().GetFieldColor() ); aVirDev.DrawRect( Rectangle( Point(), aSize ) ); - aVirDev.SetFillColor( GetPaintColor() ); - aVirDev.DrawRect( Rectangle( 0, 0, aSize.Width(), n1-nPix ) ); + Color oldColor = aVirDev.GetLineColor( ); + aVirDev.SetLineColor( GetPaintColor( ) ); + + double y1 = n1 / 2; + svtools::DrawLine( aVirDev, Point( 0, y1 ), Point( aSize.Width( ), y1 ), n1, nStyle ); + if ( n2 ) { - aVirDev.DrawRect( Rectangle( 0, n1+nDist, - aSize.Width(), n1+nDist+n2-nPix ) ); + double y2 = n1 + nDist + n2 / 2; + svtools::DrawLine( aVirDev, Point( 0, y2 ), Point( aSize.Width(), y2 ), n2, STYLE_SOLID ); } + aVirDev.SetLineColor( oldColor ); rBmp = aVirDev.GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) ); } // Twips nach Unit @@ -414,11 +518,11 @@ USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos ) // ----------------------------------------------------------------------- USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance, - USHORT nPos ) + USHORT nStyle, USHORT nPos ) { XubString aStr; Bitmap aBmp; - ImpGetLine( nLine1, nLine2, nDistance, aBmp, aStr ); + ImpGetLine( nLine1, nLine2, nDistance, nStyle, aBmp, aStr ); nPos = ListBox::InsertEntry( aStr, aBmp, nPos ); if ( nPos != LISTBOX_ERROR ) { @@ -426,6 +530,7 @@ USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance, pData->nLine1 = nLine1; pData->nLine2 = nLine2; pData->nDistance = nDistance; + pData->nStyle = nStyle; pLineList->Insert( pData, nPos ); } @@ -463,7 +568,7 @@ void LineListBox::Clear() // ----------------------------------------------------------------------- USHORT LineListBox::GetEntryPos( long nLine1, long nLine2, - long nDistance ) const + long nDistance, USHORT nStyle ) const { ULONG n = 0; ULONG nCount = pLineList->Count(); @@ -474,7 +579,8 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2, { if ( (pData->nLine1 == nLine1) && (pData->nLine2 == nLine2) && - (pData->nDistance == nDistance) ) + (pData->nDistance == nDistance) && + (pData->nStyle == nStyle) ) return (USHORT)n; } @@ -519,6 +625,18 @@ long LineListBox::GetEntryDistance( USHORT nPos ) const // ----------------------------------------------------------------------- +USHORT LineListBox::GetEntryStyle( USHORT nPos ) const +{ + USHORT nStyle = STYLE_SOLID; + ImpLineListData* pData = pLineList->GetObject( nPos ); + if ( pData ) + nStyle = pData->nStyle; + + return nStyle; +} + +// ----------------------------------------------------------------------- + void LineListBox::UpdateLineColors( void ) { if( UpdatePaintLineColor() ) @@ -541,7 +659,8 @@ void LineListBox::UpdateLineColors( void ) { // exchange listbox data ListBox::RemoveEntry( USHORT( n ) ); - ImpGetLine( pData->nLine1, pData->nLine2, pData->nDistance, aBmp, aStr ); + ImpGetLine( pData->nLine1, pData->nLine2, pData->nDistance, + pData->nStyle, aBmp, aStr ); ListBox::InsertEntry( aStr, aBmp, USHORT( n ) ); } } 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..9b8a4a0ab2c4 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -32,12 +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..544b591bb0ed 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 <osl/thread.hxx> #include <vos/mutex.hxx> -#endif #include <vcl/svapp.hxx> #include <unotools/historyoptions.hxx> #include <svl/eitem.hxx> @@ -118,7 +110,7 @@ public: }; // ----------------------------------------------------------------------- -class SvtMatchContext_Impl : public ::vos::OThread +class SvtMatchContext_Impl : public ::osl::Thread { static ::vos::OMutex* pDirMutex; 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 f78fac53284e..fbfeeadc79f7 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -474,8 +474,8 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) BOOL bNoTicks = FALSE; //Amelia - long nTickUnit ; - long nTick2 ; + long nTickUnit = 0; + long nTick2 = 0; if ( mnUnitIndex == RULER_UNIT_CHAR ) { if ( mnCharWidth == 0 ) 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.cxx b/svtools/source/dialogs/colrdlg.cxx index a52cc4b0834c..7b7f8e3b1e21 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -27,8 +27,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef GCC -#endif #include <svtools/svtdata.hxx> #include "colrdlg.hrc" 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..a2557a08b2f6 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -28,12 +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 #include <svtools/svtdata.hxx> #include "prnsetup.hrc" 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/property.cxx b/svtools/source/dialogs/property.cxx index 3b081ce2f520..0d344cd1e7fb 100644 --- a/svtools/source/dialogs/property.cxx +++ b/svtools/source/dialogs/property.cxx @@ -28,19 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" - -#ifndef GCC -#endif - -//------------------------------------------------------------------ - -//#include "Svitems.hxx" - #include "property.hxx" -/* -#include "property.hrc" -#include "Scresid.hxx" -*/ + #define FRAME_OFFSET 4 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/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx index e175380244b3..faafc4a98d12 100644 --- a/svtools/source/filter.vcl/filter/sgvmain.cxx +++ b/svtools/source/filter.vcl/filter/sgvmain.cxx @@ -39,10 +39,6 @@ #include "sgvspln.hxx" #include <unotools/ucbstreamhelper.hxx> -//#if OSL_DEBUG_LEVEL > 1 -//#include "Debug.c" -//#endif - #define SWAPPOINT(p) { \ p.x=SWAPSHORT(p.x); \ p.y=SWAPSHORT(p.y); } diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx index 4a0be80b55be..ab131b4c1233 100644 --- a/svtools/source/filter.vcl/filter/sgvtext.cxx +++ b/svtools/source/filter.vcl/filter/sgvtext.cxx @@ -34,7 +34,6 @@ #include "sgffilt.hxx" #include "sgfbram.hxx" #include "sgvmain.hxx" -// #include "Debug.c" extern SgfFontLst* pSgfFonts; 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/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx index 61e737022946..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> 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/bindablecontrolhelper.cxx b/svtools/source/misc/bindablecontrolhelper.cxx index 903ec79201b6..b0726feed1eb 100644 --- a/svtools/source/misc/bindablecontrolhelper.cxx +++ b/svtools/source/misc/bindablecontrolhelper.cxx @@ -159,4 +159,3 @@ BindableControlHelper::ApplyListSourceAndBindableData( const com::sun::star::uno //........................................................................ } // namespace svt //........................................................................ - diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index bf9e87d33a74..42cd865fd10b 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -37,9 +37,6 @@ #include <vcl/sound.hxx> #endif -#ifndef GCC -#endif - #include <svtools/ehdl.hxx> #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> 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/filterutils.cxx b/svtools/source/misc/filterutils.cxx index 8f161b7e9fe8..5a31070150fb 100644 --- a/svtools/source/misc/filterutils.cxx +++ b/svtools/source/misc/filterutils.cxx @@ -53,4 +53,3 @@ namespace svt //........................................................................ } // namespace svt //........................................................................ - 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..1fa433199b2b 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -32,12 +32,9 @@ #include <sysdep.hxx> #endif #include <string.h> -// #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/langhelp.cxx b/svtools/source/misc/langhelp.cxx new file mode 100644 index 000000000000..6de51e023a26 --- /dev/null +++ b/svtools/source/misc/langhelp.cxx @@ -0,0 +1,44 @@ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Thorsten Behrens <tbehrens@novell.com> + * + * Contributor(s): Thorsten Behrens <tbehrens@novell.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svtools.hxx" + +#include <svtools/langhelp.hxx> + +#include <vcl/svapp.hxx> +#include <rtl/ustring.hxx> + +void localizeWebserviceURI( ::rtl::OUString& rURI ) +{ + ::rtl::OUString aLang = Application::GetSettings().GetUILocale().Language; + if ( aLang.equalsIgnoreAsciiCaseAscii( "pt" ) + && Application::GetSettings().GetUILocale().Country.equalsIgnoreAsciiCaseAscii("br") ) + { + aLang = ::rtl::OUString::createFromAscii("pt-br"); + } + + rURI += aLang; +} diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index d1ff94572a99..f04648bbb03a 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -28,12 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -// include --------------------------------------------------------------- - #include <tools/shl.hxx> #include <tools/debug.hxx> -//#include <com/sun/star/i18n/XCharacterClassification.hpp> #include <com/sun/star/i18n/DirectionProperty.hpp> #include <i18npool/lang.h> diff --git a/svtools/source/misc/makefile.mk b/svtools/source/misc/makefile.mk index cd14b3bf8c44..e66bba339f4a 100755 --- a/svtools/source/misc/makefile.mk +++ b/svtools/source/misc/makefile.mk @@ -68,6 +68,7 @@ SLOFILES=\ $(SLO)$/imap3.obj \ $(SLO)$/itemdel.obj \ $(SLO)$/langtab.obj \ + $(SLO)$/langhelp.obj \ $(SLO)$/stringtransfer.obj \ $(SLO)$/svtaccessiblefactory.obj \ $(SLO)$/svtdata.obj \ 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/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/plugapp/commtest.cxx b/svtools/source/plugapp/commtest.cxx index 3a235afcc61b..9e2195c02738 100644 --- a/svtools/source/plugapp/commtest.cxx +++ b/svtools/source/plugapp/commtest.cxx @@ -35,7 +35,6 @@ #include <tools/simplecm.hxx> #include "communi.hxx" #include "brooker.hxx" -//#include <tools/bcst.hxx> #include "commtest.hrc" 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 3c65997bedca..a83921c58154 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() ); @@ -444,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 ) { @@ -473,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 ) @@ -520,7 +516,6 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) } } } - // <-- else nNextCh = 0U; } @@ -1909,9 +1904,9 @@ int HTMLParser::FilterListing( int nToken ) return nToken; } -FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader, - BOOL bSwitchToUCS2, - rtl_TextEncoding eEnc ) +bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader, + BOOL bSwitchToUCS2, + rtl_TextEncoding eEnc ) { // Einer der folgenden regulaeren Ausdrucke muss sich auf den String // anwenden lassen, damit das Dok ein HTML-Dokument ist. diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx index ad8f7a7562d3..f6a58ad17efe 100644 --- a/svtools/source/table/defaultinputhandler.cxx +++ b/svtools/source/table/defaultinputhandler.cxx @@ -173,6 +173,7 @@ namespace svt { namespace table if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) ) { bHandled = _rControl.dispatchAction( pActions->eAction ); + bHandled = true; // always handled issue #i114340 break; } } 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/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index e2e1ce5353fe..bbd7f6829369 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -45,7 +45,6 @@ namespace svt { namespace table TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl ) :Window( &_rTableControl.getAntiImpl() ) ,m_rTableControl ( _rTableControl ) - ,m_nRowAlreadySelected( -1 ) { // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); @@ -110,15 +109,17 @@ namespace svt { namespace table { Point aPoint = rMEvt.GetPosPixel(); RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint); + std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows()); if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) ) Window::MouseButtonDown( rMEvt ); else { if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION) { - if( m_nRowAlreadySelected != nCurRow ) + bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end(); + + if( !found ) { - m_nRowAlreadySelected = nCurRow; m_aSelectHdl.Call( NULL ); } } 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/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx index 336830804a6f..0229374fcf49 100644 --- a/svtools/source/uno/treecontrolpeer.hxx +++ b/svtools/source/uno/treecontrolpeer.hxx @@ -37,7 +37,6 @@ #include <vcl/image.hxx> -//#include <comphelper/uno3.hxx> #include <cppuhelper/implbase2.hxx> 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/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 7e81f17209f2..202f454bb120 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -31,9 +31,6 @@ #include <sot/formats.hxx> #include <tools/stream.hxx> -#ifndef GCC -#endif - #include "inetimg.hxx" #define TOKEN_SEPARATOR '\001' diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk index f9c14a540410..1eb74c93f7f7 100644 --- a/svtools/util/makefile.mk +++ b/svtools/util/makefile.mk @@ -123,7 +123,8 @@ SHL1STDLIBS+= \ $(VOSLIB) \ $(SALLIB) \ $(ICUUCLIB) \ - $(JVMFWKLIB) + $(JVMFWKLIB) \ + $(BASEGFXLIB) .IF "$(OS)"=="MACOSX" # static libraries go at end 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, |