From 28f92d74ee73176fc391fb8c3de75c76dd086319 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 27 Jul 2006 12:57:16 +0000 Subject: [PATCH] Include wx/dataobj.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/wx.h | 1 + src/cocoa/dataobj.mm | 5 +++-- src/generic/hyperlink.cpp | 2 +- src/gtk/clipbrd.cpp | 3 +-- src/gtk1/clipbrd.cpp | 3 +-- src/html/htmlwin.cpp | 2 +- src/mac/classic/dataobj.cpp | 3 ++- src/motif/clipbrd.cpp | 2 +- src/msw/clipbrd.cpp | 5 +---- src/os2/clipbrd.cpp | 6 +----- src/os2/dataobj.cpp | 3 ++- src/palmos/clipbrd.cpp | 13 +++++-------- src/richtext/richtextbuffer.cpp | 18 +++++++++--------- src/univ/textctrl.cpp | 5 +---- src/x11/clipbrd.cpp | 3 +-- 15 files changed, 31 insertions(+), 43 deletions(-) diff --git a/include/wx/wx.h b/include/wx/wx.h index bba9811acf..4ed8a6d417 100644 --- a/include/wx/wx.h +++ b/include/wx/wx.h @@ -62,6 +62,7 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/cmndata.h" +#include "wx/dataobj.h" #include "wx/control.h" #include "wx/ctrlsub.h" diff --git a/src/cocoa/dataobj.mm b/src/cocoa/dataobj.mm index e48b8fef09..adebffdf24 100644 --- a/src/cocoa/dataobj.mm +++ b/src/cocoa/dataobj.mm @@ -6,16 +6,17 @@ // Created: 2003/07/23 // RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWidgets licence +// Licence: wxWidgets licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #if wxUSE_DATAOBJ +#include "wx/dataobj.h" + #ifndef WX_PRECOMP #endif //WX_PRECOMP -#include "wx/dataobj.h" wxDataObject::wxDataObject() { diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 4288e4c303..fb245d32b2 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -37,10 +37,10 @@ #include "wx/dcclient.h" #include "wx/menu.h" #include "wx/log.h" + #include "wx/dataobj.h" #endif #include "wx/clipbrd.h" -#include "wx/dataobj.h" // ============================================================================ // implementation diff --git a/src/gtk/clipbrd.cpp b/src/gtk/clipbrd.cpp index 92cc30b090..4444320855 100644 --- a/src/gtk/clipbrd.cpp +++ b/src/gtk/clipbrd.cpp @@ -17,10 +17,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/utils.h" + #include "wx/dataobj.h" #endif -#include "wx/dataobj.h" - #include "wx/gtk/private.h" //----------------------------------------------------------------------------- diff --git a/src/gtk1/clipbrd.cpp b/src/gtk1/clipbrd.cpp index 4a09a5006f..7f02601153 100644 --- a/src/gtk1/clipbrd.cpp +++ b/src/gtk1/clipbrd.cpp @@ -17,10 +17,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/utils.h" + #include "wx/dataobj.h" #endif -#include "wx/dataobj.h" - #include #include #include diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 826db3742d..aee43219c0 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -24,12 +24,12 @@ #include "wx/dcmemory.h" #include "wx/timer.h" #include "wx/settings.h" + #include "wx/dataobj.h" #endif #include "wx/html/htmlwin.h" #include "wx/html/htmlproc.h" #include "wx/clipbrd.h" -#include "wx/dataobj.h" #include "wx/arrimpl.cpp" #include "wx/listimpl.cpp" diff --git a/src/mac/classic/dataobj.cpp b/src/mac/classic/dataobj.cpp index 3ba0b99de7..3575f7e745 100644 --- a/src/mac/classic/dataobj.cpp +++ b/src/mac/classic/dataobj.cpp @@ -23,13 +23,14 @@ // headers // ---------------------------------------------------------------------------- +#include "wx/dataobj.h" + #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" #include "wx/image.h" #endif -#include "wx/dataobj.h" #include "wx/mstream.h" #include "wx/mac/private.h" #include diff --git a/src/motif/clipbrd.cpp b/src/motif/clipbrd.cpp index 7a5763a69b..6a54882d93 100644 --- a/src/motif/clipbrd.cpp +++ b/src/motif/clipbrd.cpp @@ -29,9 +29,9 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/bitmap.h" + #include "wx/dataobj.h" #endif -#include "wx/dataobj.h" #include "wx/ptr_scpd.h" #ifdef __VMS__ diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 59d6f2fcb0..ee67b677fd 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -37,6 +37,7 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dataobj.h" #endif #if wxUSE_METAFILE @@ -57,10 +58,6 @@ // the functions using wxDataObject in wxClipboard //#define wxUSE_DATAOBJ wxUSE_DRAG_AND_DROP -#if wxUSE_DATAOBJ - #include "wx/dataobj.h" -#endif - #if wxUSE_OLE && !defined(__WXWINCE__) // use OLE clipboard #define wxUSE_OLE_CLIPBOARD 1 diff --git a/src/os2/clipbrd.cpp b/src/os2/clipbrd.cpp index 5c05cdc294..e4bd46af6f 100644 --- a/src/os2/clipbrd.cpp +++ b/src/os2/clipbrd.cpp @@ -25,6 +25,7 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dataobj.h" #endif #if wxUSE_METAFILE @@ -37,11 +38,6 @@ // wxDataObject is tied to OLE/drag and drop implementation, // therefore so is wxClipboard :-( -#if wxUSE_DRAG_AND_DROP - #include "wx/dataobj.h" - -// static bool wxSetClipboardData(wxDataObject *data); -#endif // =========================================================================== // implementation diff --git a/src/os2/dataobj.cpp b/src/os2/dataobj.cpp index c07595d156..8ec854054c 100644 --- a/src/os2/dataobj.cpp +++ b/src/os2/dataobj.cpp @@ -22,13 +22,14 @@ #if wxUSE_DATAOBJ +#include "wx/dataobj.h" + #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" #include "wx/image.h" #endif -#include "wx/dataobj.h" #include "wx/mstream.h" #include "wx/os2/private.h" diff --git a/src/palmos/clipbrd.cpp b/src/palmos/clipbrd.cpp index a60d984fd1..4987714026 100644 --- a/src/palmos/clipbrd.cpp +++ b/src/palmos/clipbrd.cpp @@ -37,6 +37,7 @@ #include "wx/utils.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dataobj.h" #endif #if wxUSE_METAFILE @@ -48,11 +49,7 @@ #include "wx/palmos/private.h" #if wxUSE_WXDIB -#include "wx/palmos/dib.h" -#endif - -#if wxUSE_DATAOBJ - #include "wx/dataobj.h" + #include "wx/palmos/dib.h" #endif #if wxUSE_OLE && !defined(__WXWINCE__) @@ -75,7 +72,7 @@ // old-style clipboard functions // --------------------------------------------------------------------------- -static bool gs_wxClipboardIsOpen = FALSE; +static bool gs_wxClipboardIsOpen = false; bool wxOpenClipboard() { @@ -142,8 +139,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard, wxObject) wxClipboard::wxClipboard() { - m_clearOnExit = FALSE; - m_isOpened = FALSE; + m_clearOnExit = false; + m_isOpened = false; } wxClipboard::~wxClipboard() diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 85725e4ee8..ee680385d7 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -24,11 +24,11 @@ #include "wx/dc.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/dataobj.h" #endif #include "wx/filename.h" #include "wx/clipbrd.h" -#include "wx/dataobj.h" #include "wx/wfstream.h" #include "wx/module.h" #include "wx/mstream.h" @@ -908,7 +908,7 @@ wxRichTextRange wxRichTextParagraphLayoutBox::AddParagraphs(const wxString& text wxRichTextRange range(-1, -1); size_t i = 0; - size_t len = text.Length(); + size_t len = text.length(); wxString line; while (i < len) { @@ -2266,7 +2266,7 @@ bool wxRichTextParagraph::InsertText(long pos, const wxString& text) text + textObject->GetText().Mid(posInString); textObject->SetText(newText); - int textLength = text.Length(); + int textLength = text.length(); textObject->SetRange(wxRichTextRange(textObject->GetRange().GetStart(), textObject->GetRange().GetEnd() + textLength)); @@ -2760,7 +2760,7 @@ bool wxRichTextParagraph::FindWrapPosition(const wxRichTextRange& range, wxDC& d int spacePos = plainText.Find(wxT(' '), true); if (spacePos != wxNOT_FOUND) { - int positionsFromEndOfString = plainText.Length() - spacePos - 1; + int positionsFromEndOfString = plainText.length() - spacePos - 1; breakPosition = breakPosition - positionsFromEndOfString; } } @@ -3198,7 +3198,7 @@ bool wxRichTextPlainText::GetRangeSize(const wxRichTextRange& range, wxSize& siz wxRichTextObject* wxRichTextPlainText::DoSplit(long pos) { int index = pos - GetRange().GetStart(); - if (index < 0 || index >= (int) m_text.Length()) + if (index < 0 || index >= (int) m_text.length()) return NULL; wxString firstPart = m_text.Mid(0, index); @@ -3218,7 +3218,7 @@ wxRichTextObject* wxRichTextPlainText::DoSplit(long pos) /// Calculate range void wxRichTextPlainText::CalculateRange(long start, long& end) { - end = start + m_text.Length() - 1; + end = start + m_text.length() - 1; m_range.SetRange(start, end); } @@ -3343,7 +3343,7 @@ bool wxRichTextBuffer::InsertTextWithUndo(long pos, const wxString& text, wxRich action->SetPosition(pos); // Set the range we'll need to delete in Undo - action->SetRange(wxRichTextRange(pos, pos + text.Length() - 1)); + action->SetRange(wxRichTextRange(pos, pos + text.length() - 1)); SubmitAction(action); @@ -5286,7 +5286,7 @@ bool wxRichTextPlainTextHandler::DoSaveFile(wxRichTextBuffer *buffer, wxOutputSt wxString text = buffer->GetText(); wxCharBuffer buf = text.ToAscii(); - stream.Write((const char*) buf, text.Length()); + stream.Write((const char*) buf, text.length()); return true; } #endif // wxUSE_STREAMS @@ -5485,7 +5485,7 @@ bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream) hex = wxDecToHex(m_data[i]); wxCharBuffer buf = hex.ToAscii(); - stream.Write((const char*) buf, hex.Length()); + stream.Write((const char*) buf, hex.length()); } return true; diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index 8de05acfcd..54c170b068 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -131,6 +131,7 @@ #include "wx/log.h" #include "wx/dcclient.h" #include "wx/validate.h" + #include "wx/dataobj.h" #endif #include @@ -148,10 +149,6 @@ #include "wx/cmdproc.h" -#if wxUSE_CLIPBOARD -#include "wx/dataobj.h" -#endif - // turn extra wxTextCtrl-specific debugging on/off #define WXDEBUG_TEXT diff --git a/src/x11/clipbrd.cpp b/src/x11/clipbrd.cpp index 731d49e668..1ae753aec7 100644 --- a/src/x11/clipbrd.cpp +++ b/src/x11/clipbrd.cpp @@ -18,10 +18,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/utils.h" + #include "wx/dataobj.h" #endif -#include "wx/dataobj.h" - #include "wx/x11/private.h" //----------------------------------------------------------------------------- -- 2.45.2