diff --git a/include/wx/any.h b/include/wx/any.h index 2b37bafa5e..bd61b1e7a0 100644 --- a/include/wx/any.h +++ b/include/wx/any.h @@ -317,7 +317,7 @@ public: return Ops::GetValue(buf); } #if wxUSE_EXTENDED_RTTI - virtual const wxTypeInfo* GetTypeInfo() const + virtual const wxTypeInfo* GetTypeInfo() const { return wxGetTypeInfo((T*)NULL); } @@ -377,7 +377,7 @@ public: \ const UseDataType* sptr = \ reinterpret_cast(voidPtr); \ return static_cast(*sptr); \ - } + } #if wxUSE_EXTENDED_RTTI #define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \ diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 21fb648b85..972f533475 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -94,7 +94,7 @@ public: virtual wxRect GetPaperRect() const wxOVERRIDE; virtual void* GetHandle() const wxOVERRIDE { return NULL; } - + protected: bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style = wxFLOOD_SURFACE) wxOVERRIDE; diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 26e8a0532d..8804fb44ac 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -304,7 +304,7 @@ public: const wxSize& GetSize() const { return m_size; } void SetSize(const wxSize& sz) { m_size = sz; } - + bool IsOk() const { return m_smallImageList != NULL; } protected: diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 8416c695a5..ee89a44c4c 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -65,7 +65,7 @@ class WXDLLEXPORT wxNotebookPageInfo : public wxObject public: wxNotebookPageInfo() { m_page = NULL; m_imageId = -1; m_selected = false; } virtual ~wxNotebookPageInfo() { } - + bool Create(wxNotebookPage *page, const wxString& text, bool selected, @@ -77,18 +77,18 @@ public: m_imageId = imageId; return true; } - + wxNotebookPage* GetPage() const { return m_page; } wxString GetText() const { return m_text; } bool GetSelected() const { return m_selected; } int GetImageId() const { return m_imageId; } - + private: wxNotebookPage *m_page; wxString m_text; bool m_selected; int m_imageId; - + wxDECLARE_DYNAMIC_CLASS(wxNotebookPageInfo); }; @@ -139,16 +139,16 @@ public: // new is wxNOT_FOUND) void SendPageChangedEvent(int nPageOld, int nPageNew = wxNOT_FOUND); -#if wxUSE_EXTENDED_RTTI +#if wxUSE_EXTENDED_RTTI // XTI accessors virtual void AddPageInfo( wxNotebookPageInfo* info ); virtual const wxNotebookPageInfoList& GetPageInfos() const; #endif - + protected: -#if wxUSE_EXTENDED_RTTI +#if wxUSE_EXTENDED_RTTI wxNotebookPageInfoList m_pageInfos; -#endif +#endif wxDECLARE_NO_COPY_CLASS(wxNotebookBase); }; diff --git a/include/wx/qt/tglbtn.h b/include/wx/qt/tglbtn.h index 3eaa69e044..de7f16e926 100644 --- a/include/wx/qt/tglbtn.h +++ b/include/wx/qt/tglbtn.h @@ -57,7 +57,7 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxCheckBoxNameStr); - + bool Create(wxWindow *parent, wxWindowID id, const wxString& label, diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index d14ad5511f..9348a023a8 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -5542,7 +5542,7 @@ public: int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; } int GetUpdated() const { return m_updated; } int GetListCompletionMethod() const { return m_listCompletionMethod; } - + #ifdef STC_USE_DND // Kept for backwards compatibility, use GetString(). wxString GetDragText() { return GetString(); } @@ -5583,8 +5583,8 @@ private: int m_x; int m_y; - int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER - int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION + int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER + int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION int m_updated; // wxEVT_STC_UPDATEUI int m_listCompletionMethod; diff --git a/include/wx/tbarbase.h b/include/wx/tbarbase.h index 2a643ae047..35d1700841 100644 --- a/include/wx/tbarbase.h +++ b/include/wx/tbarbase.h @@ -593,7 +593,7 @@ public: wxEmptyString, wxEmptyString); } - + // implementation only from now on // ------------------------------- diff --git a/include/wx/xrc/xmlreshandler.h b/include/wx/xrc/xmlreshandler.h index cdf7f0ab17..475a9d57af 100644 --- a/include/wx/xrc/xmlreshandler.h +++ b/include/wx/xrc/xmlreshandler.h @@ -407,7 +407,7 @@ protected: wxObject* GetInstance() const { return m_instance; } wxWindow* GetParentAsWindow() const { return m_parentAsWindow; } - + wxArrayString m_styleNames; wxArrayInt m_styleValues; diff --git a/interface/wx/cmdline.h b/interface/wx/cmdline.h index e5457e0ba8..0a35e1630f 100644 --- a/interface/wx/cmdline.h +++ b/interface/wx/cmdline.h @@ -13,7 +13,7 @@ parameter - this may be changed by giving non-default flags to it, i.e. use @c wxCMD_LINE_OPTION_MANDATORY to require that the option is given and @c wxCMD_LINE_PARAM_OPTIONAL to make a parameter optional. - + Also, @c wxCMD_LINE_PARAM_MULTIPLE may be specified if the programs accepts a variable number of parameters - but it only can be given for the last parameter in the command line description. If you use this flag, you will @@ -67,17 +67,17 @@ enum wxCmdLineEntryType { /// A boolean argument of the program; e.g. @c -v to enable verbose mode. wxCMD_LINE_SWITCH, - + /// An argument with an associated value; e.g. @c "-o filename" to specify /// an optional output filename. wxCMD_LINE_OPTION, - + /// A parameter: a required program argument. wxCMD_LINE_PARAM, - + /// Additional usage text. See wxCmdLineParser::AddUsageText. wxCMD_LINE_USAGE_TEXT, - + wxCMD_LINE_NONE ///< Use this to terminate the list. }; @@ -126,7 +126,7 @@ struct wxCmdLineEntryDesc /** The usual, short, name of the switch or the option. - + It may contain only letters, digits and the underscores. This field is unused if kind == wxCMD_LINE_PARAM. */ @@ -135,7 +135,7 @@ struct wxCmdLineEntryDesc /** The long name for this program argument (may be empty if the option has no long name). - + It may contain only letters, digits and the underscores. This field is unused if kind == wxCMD_LINE_PARAM. */ @@ -152,7 +152,7 @@ struct wxCmdLineEntryDesc See ::wxCmdLineParamType for more info. */ wxCmdLineParamType type; - + /** A combination of one or more ::wxCmdLineEntryFlags enum values. */ @@ -348,12 +348,12 @@ public: In the documentation below the following terminology is used: - - @b switch: a boolean option which can be given or not, but which doesn't have + - @b switch: a boolean option which can be given or not, but which doesn't have any value. We use the word @e switch to distinguish such boolean options from more generic options like those described below. For example, @c "-v" might be a switch meaning "enable verbose mode". - - @b option: a switch with a value associated to it. + - @b option: a switch with a value associated to it. For example, @c "-o filename" might be an option for specifying the name of the output file. - @b parameter: a required program argument. diff --git a/interface/wx/xrc/xmlres.h b/interface/wx/xrc/xmlres.h index 363081bcd3..d420678bdb 100644 --- a/interface/wx/xrc/xmlres.h +++ b/interface/wx/xrc/xmlres.h @@ -93,7 +93,7 @@ public: */ void InsertHandler(wxXmlResourceHandler *handler); - + /** Attaches an unknown control to the given panel/window/dialog. Unknown controls are used in conjunction with \. @@ -115,7 +115,7 @@ public: */ static void AddSubclassFactory(wxXmlSubclassFactory *factory); - + /** Compares the XRC version to the argument. @@ -785,7 +785,7 @@ protected: /** After CreateResource has been called this will return the current wxXmlResource object. - + @since 2.9.5 */ wxXmlResource* GetResource() const; @@ -829,6 +829,6 @@ protected: @since 2.9.5 */ - wxWindow* GetParentAsWindow() const; + wxWindow* GetParentAsWindow() const; }; diff --git a/src/common/accelcmn.cpp b/src/common/accelcmn.cpp index 132c7edb0c..f15681541e 100644 --- a/src/common/accelcmn.cpp +++ b/src/common/accelcmn.cpp @@ -337,7 +337,7 @@ wxString wxAcceleratorEntry::AsPossiblyLocalizedString(bool localized) const if ( flags & wxACCEL_RAW_CTRL ) text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized); #endif - + const int code = GetKeyCode(); if ( code >= WXK_F1 && code <= WXK_F12 ) diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 49cbd36114..d40861f7dd 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -302,7 +302,7 @@ int wxAppConsoleBase::OnRun() } void wxAppConsoleBase::OnLaunched() -{ +{ } int wxAppConsoleBase::OnExit() @@ -376,7 +376,7 @@ int wxAppConsoleBase::MainLoop() if (wxTheApp) wxTheApp->OnLaunched(); - + return m_mainLoop ? m_mainLoop->Run() : -1; } diff --git a/src/common/cairo.cpp b/src/common/cairo.cpp index 171f7dbeec..940299dad0 100644 --- a/src/common/cairo.cpp +++ b/src/common/cairo.cpp @@ -19,7 +19,7 @@ // keep cairo.h from defining dllimport as we're defining the symbols inside // the wx dll in order to load them dynamically. -#define cairo_public +#define cairo_public #include #include "wx/dynlib.h" @@ -40,7 +40,7 @@ #define wxCAIRO_METHOD_TYPE(name) \ wxCairo##name##_t - + #define wxCAIRO_STATIC_METHOD_DEFINE(rettype, name, args, argnames, defret) \ static wxCAIRO_METHOD_TYPE(name) name; @@ -192,7 +192,7 @@ m( HDC, cairo_win32_surface_get_dc, \ (cairo_surface_t *surface), (surface), NULL ) #else -#define wxCAIRO_PLATFORM_METHODS(m) +#define wxCAIRO_PLATFORM_METHODS(m) #endif #define wxFOR_ALL_CAIRO_METHODS(m) \ @@ -252,7 +252,7 @@ #define wxCAIRO_DECLARE_VOIDTYPE(name, args, argnames) \ wxCAIRO_DECLARE_TYPE(void, name, args, argnames, NULL) - + wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_DECLARE_VOIDTYPE) wxFOR_ALL_CAIRO_METHODS(wxCAIRO_DECLARE_TYPE) @@ -334,7 +334,7 @@ wxCairo::wxCairo() } #endif - + #define wxDO_LOAD_FUNC(name, nameStr) \ name = (wxCAIRO_METHOD_TYPE(name))m_libCairo.RawGetSymbol(nameStr); \ if ( !name ) \ diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 318527fb5c..01bc3661bc 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -850,11 +850,11 @@ int wxCmdLineParser::Parse(bool showUsage) { maybeOption = false; n++; - + continue; } #endif - + // empty argument or just '-' is not an option but a parameter if ( maybeOption && arg.length() > 1 && // FIXME-UTF8: use wc_str() after removing ANSI build diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 283b0f687c..e3bab06d47 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -2078,7 +2078,7 @@ void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event ) { // On Mac, setting focus here led to infinite recursion so // m_resetFocus is used as a guard - + if ( event.GetEventType() == wxEVT_SET_FOCUS ) { if ( !m_resetFocus && GetTextCtrl() && !GetTextCtrl()->HasFocus() ) @@ -2088,7 +2088,7 @@ void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event ) m_resetFocus = false; } } - + Refresh(); } diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index 1489fd129b..3b0627b903 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -275,7 +275,7 @@ struct EllipsizeCalculator { EllipsizeCalculator(const wxString& s, const wxDC& dc, int maxFinalWidthPx, int replacementWidthPx) - : + : m_initialCharToRemove(0), m_nCharsToRemove(0), m_outputNeedsUpdate(true), @@ -522,7 +522,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, { if (mode == wxELLIPSIZE_NONE) return label; - + wxString ret; // these cannot be cached between different Ellipsize() calls as they can diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index ff894392ed..d2b88ca7c6 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -806,7 +806,7 @@ wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathCompon fullURLRef = CFURLCreateFromFSRef(NULL, fsRef); if ( fullURLRef == NULL) return wxEmptyString; - + if ( additionalPathComponent ) { CFURLRef parentURLRef = fullURLRef ; diff --git a/src/common/filename.cpp b/src/common/filename.cpp index a1460b5d94..d7f1e1ce43 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -634,7 +634,7 @@ void RemoveTrailingSeparatorsFromPath(wxString& strPath) } } -#endif // __WINDOWS_ +#endif // __WINDOWS_ bool wxFileSystemObjectExists(const wxString& path, int flags) diff --git a/src/common/listctrlcmn.cpp b/src/common/listctrlcmn.cpp index 518718e94f..70f2bf7e48 100644 --- a/src/common/listctrlcmn.cpp +++ b/src/common/listctrlcmn.cpp @@ -125,7 +125,7 @@ wxCONSTRUCTOR_5( wxListCtrl, wxWindow*, Parent, wxWindowID, Id, \ wxPoint, Position, wxSize, Size, long, WindowStyle ) /* - TODO : Expose more information of a list's layout etc. via appropriate objects + TODO : Expose more information of a list's layout etc. via appropriate objects (see NotebookPageInfo) */ diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index cf33f259dd..497c075bce 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -137,13 +137,13 @@ wxEND_EVENT_TABLE() #if wxUSE_EXTENDED_RTTI -// windows that are created from a parent window during its Create method, -// eg. spin controls in a calendar controls must never been streamed out -// separately otherwise chaos occurs. Right now easiest is to test for negative ids, +// windows that are created from a parent window during its Create method, +// eg. spin controls in a calendar controls must never been streamed out +// separately otherwise chaos occurs. Right now easiest is to test for negative ids, // as windows with negative ids never can be recreated anyway -bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *, +bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *, wxObjectWriterCallback *, const wxStringToAnyHashMap & ) { const wxWindow * win = wx_dynamic_cast(const wxWindow*, object); @@ -159,7 +159,7 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxWindow, wxWindowBase, "wx/window.h", \ wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList ); -template<> void wxCollectionToVariantArray( wxWindowList const &theList, +template<> void wxCollectionToVariantArray( wxWindowList const &theList, wxAnyList &value) { wxListCollectionToAnyList( theList, value ); diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index f0c84581cc..2080009ac1 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -426,7 +426,7 @@ bool wxGenericDirCtrl::Create(wxWindow *parent, // instead of scaling. // if (!wxTheFileIconsTable->IsOk()) // wxTheFileIconsTable->SetSize(scaledSize); - + // Meanwhile, in your application initialisation, where you have better knowledge of what // icons are available and whether to scale, you can do this: // @@ -1608,7 +1608,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime) { // Double, using normal quality scaling. img.Rescale(2*img.GetWidth(), 2*img.GetHeight()); - + // Then scale to the desired size. This gives the best quality, // and better than CreateAntialiasedBitmap. if ((img.GetWidth() != size) || (img.GetHeight() != size)) diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index fa7cea6226..e228db9e1c 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -22,7 +22,7 @@ // keep cairo.h from defining dllimport as we're defining the symbols inside // the wx dll in order to load them dynamically. -#define cairo_public +#define cairo_public #include #include @@ -440,7 +440,7 @@ public: { if ( !m_enableOffset ) return false; - + int penwidth = 0 ; if ( !m_pen.IsNull() ) { @@ -478,7 +478,7 @@ public: virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxWINDING_RULE ) wxOVERRIDE; virtual void ClearRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE; virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE; - + virtual void Translate( wxDouble dx , wxDouble dy ) wxOVERRIDE; virtual void Scale( wxDouble xScale , wxDouble yScale ) wxOVERRIDE; virtual void Rotate( wxDouble angle ) wxOVERRIDE; @@ -1544,7 +1544,7 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm } #if defined(__WXMSW__) || defined(__WXGTK3__) || defined(__WXOSX__) - // if there is a mask, set the alpha bytes in the target buffer to + // if there is a mask, set the alpha bytes in the target buffer to // fully transparent or fully opaque #if defined(__WXMSW__) if (bmp.GetMask() != NULL && !bmp.HasAlpha()) @@ -1782,7 +1782,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC& : wxGraphicsContext(renderer) { #ifdef __WXMSW__ - // wxMSW contexts always use MM_ANISOTROPIC, which messes up + // wxMSW contexts always use MM_ANISOTROPIC, which messes up // text rendering when printing using Cairo. Switch it to MM_TEXT // map mode to avoid this problem. HDC hdc = (HDC)dc.GetHDC(); @@ -2045,7 +2045,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& if ( adjustTransformFromDC ) ApplyTransformFromDC(dc); #endif // __WXMSW__ - + #ifdef __WXGTK3__ cairo_t* cr = static_cast(dc.GetImpl()->GetCairoContext()); Init(cr ? cairo_reference(cr) : NULL); diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 16f624b3bc..083d1e0d34 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -151,7 +151,7 @@ wxDEFINE_EVENT( wxEVT_GRID_TABBING, wxGridEvent ); namespace { - + // ensure that first is less or equal to second, swapping the values if // necessary void EnsureFirstLessThanSecond(int& first, int& second) @@ -159,7 +159,7 @@ namespace if ( first > second ) wxSwap(first, second); } - + } // anonymous namespace // ============================================================================ @@ -3941,7 +3941,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event, bool isFirstDrag) { bool performDefault = true ; - + if ( coords == wxGridNoCellCoords ) return performDefault; // we're outside any valid cell @@ -3973,7 +3973,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event, // if event is handled by user code, no further processing if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 ) performDefault = false; - + return performDefault; } } @@ -3985,7 +3985,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event, // we don't handle the other key modifiers event.Skip(); } - + return performDefault; } @@ -4700,7 +4700,7 @@ wxGrid::SendEvent(wxEventType type, // explicitly allow the event for it to take place gridEvt.Veto(); } - + claimed = GetEventHandler()->ProcessEvent(gridEvt); vetoed = !gridEvt.IsAllowed(); } diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 6ed97b47b7..2877a9996c 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -5219,11 +5219,11 @@ void wxDataViewCtrl::HitTest(const wxPoint& point, GtkTreeViewDropPosition pos = GTK_TREE_VIEW_DROP_INTO_OR_AFTER; gint cell_x = 0; gint cell_y = 0; - + // cannot directly call GtkGetTreeView(), HitTest is const and so is this pointer wxDataViewCtrl* self = const_cast(this); // ugly workaround, self is NOT const GtkTreeView* treeView = GTK_TREE_VIEW(self->GtkGetTreeView()); - + // is there possibly a better suited function to get the column? gtk_tree_view_get_path_at_pos( // and this is the wrong call but it delivers the column treeView, @@ -5232,13 +5232,13 @@ void wxDataViewCtrl::HitTest(const wxPoint& point, &GtkColumn, // here we get the GtkColumn &cell_x, &cell_y ); - + if ( GtkColumn != NULL ) - { + { // we got GTK column // the right call now which takes the header into account gtk_tree_view_get_dest_row_at_pos( treeView, (int) point.x, (int) point.y, path.ByRef(), &pos); - + if (path) item = wxDataViewItem(GTKPathToItem(path)); // else we got a GTK column but the position is not over an item, e.g. below last item diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index af41437237..e18b39c433 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -463,7 +463,7 @@ int wxRichTextFloatCollector::HitTestFloat(const wxRichTextFloatRectMapArray& ar return result; } } - + textPosition = array[i]->anchor->GetRange().GetStart(); * obj = array[i]->anchor; * contextObj = array[i]->anchor->GetParentContainer(); @@ -1679,31 +1679,31 @@ bool wxRichTextCompositeObject::Defragment(wxRichTextDrawingContext& context, co if (child->CanSplit(context)) { childAfterSplit = child->Split(context); - node = m_children.Find(childAfterSplit); + node = m_children.Find(childAfterSplit); } if (node->GetNext()) { wxRichTextObject* nextChild = node->GetNext()->GetData(); - + // First split child and nextChild so we have smaller fragments to merge. // Then Merge only has to test per-object virtual attributes // because for an object with all the same sub-object attributes, // then any general virtual attributes should be merged with sub-objects by // the implementation. - + wxRichTextObject* nextChildAfterSplit = nextChild; if (nextChildAfterSplit->CanSplit(context)) nextChildAfterSplit = nextChild->Split(context); bool splitNextChild = nextChild != nextChildAfterSplit; - + // See if we can merge this new fragment with (perhaps the first part of) the next object. // Note that we use nextChild because if we had split nextChild, the first object always // remains (and further parts are appended). However we must use childAfterSplit since // it's the last part of a possibly split child. - + if (childAfterSplit->CanMerge(nextChild, context) && childAfterSplit->Merge(nextChild, context)) { nextChild->Dereference(); @@ -2107,7 +2107,7 @@ bool wxRichTextParagraphLayoutBox::Draw(wxDC& dc, wxRichTextDrawingContext& cont if (wxRichTextBuffer::GetFloatingLayoutMode()) DrawFloats(dc, context, range, selection, rect, descent, style); - + wxRichTextObjectList::compatibility_iterator node = m_children.GetFirst(); while (node) { @@ -2324,7 +2324,7 @@ bool wxRichTextParagraphLayoutBox::Layout(wxDC& dc, wxRichTextDrawingContext& co child->LayoutToBestSize(dc, context, GetBuffer(), attr, child->GetAttributes(), availableSpace, rect, style&~wxRICHTEXT_LAYOUT_SPECIFIED_RECT); - + availableSpace.y += child->GetCachedSize().y; maxWidth = wxMax(maxWidth, child->GetCachedSize().x); maxMinWidth = wxMax(maxMinWidth, child->GetMinSize().x); @@ -5431,7 +5431,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co int startOffset = (lineCount == 0 ? startPositionFirstLine : startPositionSubsequentLines); availableRect = wxRect(rect.x + startOffset, rect.y + currentPosition.y, rect.width - startOffset - rightIndent, rect.height); - + // Take into account floating objects for the last line if (wxRichTextBuffer::GetFloatingLayoutMode() && collector) { @@ -5460,7 +5460,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co wxCheckSetFont(dc, font); lineHeight = dc.GetCharHeight(); } - + if (maxDescent == 0) { int w, h; @@ -7446,13 +7446,13 @@ bool wxRichTextPlainText::CanMerge(wxRichTextObject* object, wxRichTextDrawingCo wxRichTextPlainText* otherObj = wxDynamicCast(object, wxRichTextPlainText); if (!otherObj || m_text.empty()) return false; - + if (!wxTextAttrEq(GetAttributes(), object->GetAttributes()) || !(m_properties == object->GetProperties())) return false; - + // Check if differing virtual attributes makes it impossible to merge // these strings. - + bool hasVirtualAttr1 = context.HasVirtualAttributes((wxRichTextObject*) this); bool hasVirtualAttr2 = context.HasVirtualAttributes((wxRichTextObject*) object); if (!hasVirtualAttr1 && !hasVirtualAttr2) @@ -7504,18 +7504,18 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) { const wxRichTextAttr emptyAttr; wxRichTextObjectList::compatibility_iterator next = node->GetNext(); - + wxArrayInt positions; wxRichTextAttrArray attributes; if (context.GetVirtualSubobjectAttributes(this, positions, attributes) && positions.GetCount() > 0) { wxASSERT(positions.GetCount() == attributes.GetCount()); - + // We will gather up runs of text with the same virtual attributes - + int len = m_text.Length(); int i = 0; - + // runStart and runEnd represent the accumulated run with a consistent attribute // that hasn't yet been appended int runStart = -1; @@ -7523,7 +7523,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) wxRichTextAttr currentAttr; wxString text = m_text; wxRichTextPlainText* lastPlainText = this; - + for (i = 0; i < (int) positions.GetCount(); i++) { int pos = positions[i]; @@ -7531,7 +7531,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) if (pos >= 0 && pos < len) { const wxRichTextAttr& attr = attributes[i]; - + if (pos == 0) { runStart = 0; @@ -7578,7 +7578,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) else parent->GetChildren().Append(obj); } - + runStart = runEnd+1; runEnd = pos-1; @@ -7586,7 +7586,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) } } } - + wxASSERT(runEnd == pos-1); // Now we only have to deal with the previous run @@ -7629,7 +7629,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) } } } - + // We may still have a run to add, and possibly a no-attribute text fragment after that. // If the whole string was already a single attribute (the run covers the whole string), don't split. if ((runStart != -1) && !(runStart == 0 && runEnd == (len-1))) @@ -7654,14 +7654,14 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) obj->SetAttributes(GetAttributes()); obj->SetProperties(GetProperties()); obj->SetParent(parent); - + obj->SetText(text.Mid(runStart, runEnd - runStart + 1)); if (next) parent->GetChildren().Insert(next, obj); else - parent->GetChildren().Append(obj); + parent->GetChildren().Append(obj); } - + runStart = runEnd+1; runEnd = (len-1); } @@ -7675,17 +7675,17 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context) obj->SetAttributes(GetAttributes()); obj->SetProperties(GetProperties()); obj->SetParent(parent); - + obj->SetText(text.Mid(runStart, runEnd - runStart + 1)); if (next) parent->GetChildren().Insert(next, obj); else parent->GetChildren().Append(obj); - + lastPlainText = obj; } } - + return lastPlainText; } } @@ -8892,7 +8892,7 @@ bool wxRichTextBuffer::PasteFromClipboard(long position) if (richTextBuffer->GetStyleSheet()) { delete richTextBuffer->GetStyleSheet(); - richTextBuffer->SetStyleSheet(NULL); + richTextBuffer->SetStyleSheet(NULL); } delete richTextBuffer; } @@ -9934,7 +9934,7 @@ bool wxRichTextCell::EditProperties(wxWindow* parent, wxRichTextBuffer* buffer) wxRichTextSelection sel; if (buffer && buffer->GetRichTextCtrl()) sel = buffer->GetRichTextCtrl()->GetSelection(); - + if (table && buffer && buffer->GetRichTextCtrl() && sel.IsValid() && sel.GetContainer() == GetParent()) { @@ -10112,7 +10112,7 @@ int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int p // will have been hidden and have width 0. As a result they are ignored by the layout algorithm, // and all cells to their right are effectively shifted left. As a result there's no hole for // the spanning cell to fill. - // So search back along the current row for hidden cells. However there's also the annoying issue of a + // So search back along the current row for hidden cells. However there's also the annoying issue of a // rowspanning cell that also has colspam. So we can't rely on the rowspanning cell being directly above // the first hidden one we come to. We also can't rely on a cell being hidden only by one type of span; // there's nothing to stop a cell being hidden by colspan, and then again hidden from above by rowspan. @@ -10133,7 +10133,7 @@ int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int p if (rowSpan > 1 && rowSpan > (row-prevrow)) { // There is a rowspanning cell above above the hidden one, so we need - // to right-shift the index cell by this column's width. Furthermore, + // to right-shift the index cell by this column's width. Furthermore, // if the cell also colspans, we need to shift by all affected columns for (int colSpan = 0; colSpan < cell->GetColSpan(); ++colSpan) deltaX += (colWidths[prevcol+colSpan] + paddingX); @@ -10152,7 +10152,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot { // This is called when the table's cell layout is otherwise complete. // For any cell with rowspan > 1, expand downwards into the row(s) below. - + // Start by finding the current 'y' of the top of each row, plus the bottom of the available area for cells. // Deduce this from the top of a visible cell in the row below. (If none are visible, the row will be invisible anyway and can be ignored.) const int rowCount = table->GetRowCount(); @@ -10173,7 +10173,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot } } rowTops[rowCount] = bottomY + paddingY; // The table bottom, which was passed to us - + bool needsRelay = false; for (row = 0; row < rowCount-1; ++row) // -1 as the bottom row can't rowspan @@ -10189,7 +10189,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot span = wxMin(span, rowCount-row); // Don't try to span below the table! if (span < 2) continue; - + int availableHeight = rowTops[row+span] - rowTops[row] - paddingY; wxSize newSize = wxSize(cell->GetCachedSize().GetWidth(), availableHeight); wxRect availableCellSpace = wxRect(cell->GetPosition(), newSize); @@ -10207,19 +10207,19 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot // 3) The cell with the rowspan shouldn't be touched in 2); its height will be set to the whole span later. int deltaY = overhang / span; int spare = overhang % span; - + // Each row in the span needs to by deepened by its share of the overhang (give the first row any spare). // This is achieved by increasing the value stored in the following row's rowTops for (int spannedRows = 0; spannedRows < span; ++spannedRows) { rowTops[row+spannedRows+1] += ((deltaY * (spannedRows+1)) + (spannedRows == 0 ? spare:0)); } - + // Any rows below the span need shifting down for (int rowsBelow = row + span+1; rowsBelow <= rowCount; ++rowsBelow) { rowTops[rowsBelow] += overhang; - } + } needsRelay = true; } @@ -10227,7 +10227,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot } } } - + if (!needsRelay) return; @@ -10249,7 +10249,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot cell->Layout(dc, context, availableCellSpace, availableSpace, style|wxRICHTEXT_FIXED_WIDTH|wxRICHTEXT_FIXED_HEIGHT); } } - + bottomY = rowTops[rowCount] - paddingY; } } @@ -10460,7 +10460,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const } } - // Cell width percentages are for the overall cell width, so ignore margins and + // Cell width percentages are for the overall cell width, so ignore margins and // only take into account table margins and inter-cell padding. int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX); wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0)); @@ -10558,7 +10558,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const } } - // Cell width percentages are for the overall cell width, so ignore margins and + // Cell width percentages are for the overall cell width, so ignore margins and // only take into account table margins and inter-cell padding. int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX); wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0)); @@ -10585,7 +10585,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const else { cellWidth = cell->GetMinSize().x; - + if (cell->GetMaxSize().x > cellWidth) cellWidth = cell->GetMaxSize().x; } @@ -10900,7 +10900,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const if (j < (m_rowCount-1)) y += paddingY; } - + // Finally we need to expand any cell with rowspan > 1. We couldn't earlier; lower rows' heights weren't known ExpandCellsWithRowspan(this, paddingY, y, dc, context, availableSpace, style); @@ -11351,7 +11351,7 @@ bool wxRichTextTable::DeleteColumns(int startCol, int noCols) for (i = 0; i < m_rowCount; i++) { wxRichTextObjectPtrArray& colArray = m_cells[deleteRows ? 0 : i]; - for (j = 0; j < noCols; j++) + for (j = 0; j < noCols; j++) { wxRichTextObject* cell = colArray[startCol]; RemoveChild(cell, true); @@ -11385,7 +11385,7 @@ bool wxRichTextTable::AddRows(int startRow, int noRows, const wxRichTextAttr& at wxRichTextBuffer* buffer = GetBuffer(); wxRichTextAction* action = NULL; wxRichTextTable* clone = NULL; - + if (!buffer->GetRichTextCtrl()->SuppressingUndo()) { // Create a clone containing the current state of the table. It will be used to Undo the action @@ -11817,7 +11817,7 @@ void wxRichTextAction::CalculateRefreshOptimizations(wxArrayInt& optimizationLin if (node) node = node->GetNext(); } - + if (wxRichTextBuffer::GetFloatingLayoutMode() && container->GetFloatingObjectCount() > 0) { // We will use a simple criterion - if any of the paragraphs following the @@ -12051,7 +12051,7 @@ bool wxRichTextAction::Do() // before deciding to Undo() or Redo(). So play safe and set focus to the buffer. if (m_ctrl) m_ctrl->SetFocusObject(m_buffer, false); - + // InvalidateHierarchy goes up the hierarchy as well as down, otherwise with a nested object, // Layout() would stop prematurely at the top level. // Invalidate the whole buffer if there were floating objects @@ -12706,7 +12706,7 @@ bool wxRichTextImage::LoadAndScaleImageCache(wxImage& image, const wxSize& sz, w } else img = image.Scale(width*scaleFactor, height*scaleFactor, wxIMAGE_QUALITY_HIGH); - + // On Mac, this will create a bitmap that is twice as big as the required dimensions, // with a scale factor that indicates that the extra detail should be used on HiDPI displays. m_imageCache = wxBitmap(img, wxBITMAP_SCREEN_DEPTH, scaleFactor); @@ -15754,7 +15754,7 @@ bool wxTextAttrShadow::RemoveStyle(const wxTextAttrShadow& attr) GetOpacity().Reset(); if (attr.HasColour() && HasColour()) RemoveFlag(wxTEXT_BOX_ATTR_BORDER_COLOUR); - + return true; } diff --git a/src/richtext/richtextindentspage.cpp b/src/richtext/richtextindentspage.cpp index b694c6b04b..ae0d6576c1 100644 --- a/src/richtext/richtextindentspage.cpp +++ b/src/richtext/richtextindentspage.cpp @@ -319,7 +319,7 @@ void wxRichTextIndentsSpacingPage::CreateControls() outlineLevelCtrlStrings.Add("8"); outlineLevelCtrlStrings.Add("9"); outlineLevelCtrlStrings.Add("10"); - + m_outlineLevelCtrl->Freeze(); m_outlineLevelCtrl->Append(outlineLevelCtrlStrings); m_outlineLevelCtrl->Thaw(); diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index ba6b2641e5..b7e33cda26 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -782,7 +782,7 @@ sptr_t ScintillaWX::DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, spt sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { switch (iMessage) { #if 0 // TODO: check this - + case SCI_CALLTIPSHOW: { // NOTE: This is copied here from scintilla/src/ScintillaBase.cxx // because of the little tweak that needs done below for wxGTK. @@ -896,7 +896,7 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) { // highlight positions. So trigger a new paint event that will // repaint the whole window. stc->Refresh(false); - + #if defined(__WXOSX__) // On Mac we also need to finish the current paint to make sure that // everything is on the screen that needs to be there between now and diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 620e0b9197..98bb61cdd8 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -675,7 +675,7 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp) buff[len] = 0; SendMsg(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)buff); delete [] buff; - + } // Add a set of markers to a line. @@ -1478,7 +1478,7 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) { buff[len] = 0; SendMsg(SCI_REGISTERIMAGE, type, (sptr_t)buff); delete [] buff; - + } // Clear all the registered images. @@ -4491,7 +4491,7 @@ int wxStyledTextCtrl::GetTechnology() const // Create an ILoader*. void* wxStyledTextCtrl::CreateLoader(int bytes) const { - return (void*)(sptr_t)SendMsg(SCI_CREATELOADER, bytes); + return (void*)(sptr_t)SendMsg(SCI_CREATELOADER, bytes); } // Move caret to before first visible character on display line. @@ -4665,7 +4665,7 @@ wxString wxStyledTextCtrl::GetLexerLanguage() const { // For private communication between an application and a known lexer. void* wxStyledTextCtrl::PrivateLexerCall(int operation, void* pointer) { - return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer); + return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer); } // Retrieve a '\\n' separated list of properties understood by the current lexer. diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 7baf51ada4..9b71452c8d 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -659,7 +659,7 @@ public: int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; } int GetUpdated() const { return m_updated; } int GetListCompletionMethod() const { return m_listCompletionMethod; } - + #ifdef STC_USE_DND // Kept for backwards compatibility, use GetString(). wxString GetDragText() { return GetString(); } @@ -700,8 +700,8 @@ private: int m_x; int m_y; - int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER - int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION + int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER + int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION int m_updated; // wxEVT_STC_UPDATEUI int m_listCompletionMethod; diff --git a/src/xrc/xh_tglbtn.cpp b/src/xrc/xh_tglbtn.cpp index 983b0f8f11..5af2de5581 100644 --- a/src/xrc/xh_tglbtn.cpp +++ b/src/xrc/xh_tglbtn.cpp @@ -89,7 +89,7 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control) GetDirection("bitmapposition")); } #endif - + button->SetValue(GetBool( wxT("checked"))); }