summaryrefslogtreecommitdiff
path: root/include/vcl/edit.hxx
AgeCommit message (Collapse)Author
2015-05-07Refactor "Edit" to use RenderContext when paintingTomaž Vajngerl
Change-Id: I41f3fa14ee06339685b608d1081466d4622999da
2015-05-05Use typed Timer::SetTimeoutHdl LinkStephan Bergmann
Change-Id: Iaaf0c93e5b28c0f7dbe4f02eda8beeae30708100
2015-04-30Gradually typed LinkStephan Bergmann
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-29vcl edit: Delegate RenderContext to sub-methods, use InvalidateTomaž Vajngerl
Change-Id: Ifb1a54e852bc9011389cac758e6f0dfd6c84d464
2015-04-29mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)Tomaž Vajngerl
Change-Id: Ia1667246064d11827dbd149def15e5bf08b119b8
2015-04-09vcl:compilerplugin: new rule, no passing of vcl::Window by VclPtrNoel Grandin
to prevent problems with accidentally deleting an object by doing this: Button *pButton = new Button(NULL); ... pButton->callAMethodThatTakesARef(pButton); Since we take a ref as we construct a temporary VclReference<> - but this will dispose & delete the pButton as we return to the frame doing the callAMethod Change-Id: I60fc211b27fe7ff463aa58f1da106f430fc65529
2015-04-09vcl: plugin: check that VclPtr is passed by referenceNoel Grandin
to avoid unnecessary increment/decrement traffic Change-Id: Ice4e08df002b815105aa0b1c9430511c0cec3d28 Conflicts: compilerplugins/clang/passstuffbyref.cxx
2015-04-09vcl: rename VclReference to VclPtrNoel Grandin
and remove the typedefs. The code is more obvious this way. Change-Id: I4c8f5b5ab050dd96216302a03e760ed0e3ab3464
2015-04-09vcl: add cast operator to VclReference to convert to pointerNoel Grandin
so we don't have to call .get() everywhere Change-Id: If6ccd7dcf1a492b1e7703956ecbe8e5ac2dd0fb7
2015-04-09vcl: manage SubEdit with references - and fix leak / cleanup.Michael Meeks
Change-Id: Icbfe237a55cfbd83739b055350d5a6a54a2fa36d Conflicts: vcl/source/control/edit.cxx
2015-03-06idle includes and enum useJennifer Liebel
Change-Id: I8a280c54d81c7da74c9ab03ff3fc788e373ca4e4
2015-01-26followup code removal after changing virtual methods to non-virtualNoel Grandin
This cleanups up indentation and removes dead classes. This is a followup patch to commit 272b1dd55797aacf511fb4342b0054e3697243f6 "new loplugin: change virtual methods to non-virtual" Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2014-10-15More -Werror,-Wunused-private-fieldStephan Bergmann
...detected with a modified trunk Clang with > Index: lib/Sema/SemaDeclCXX.cpp > =================================================================== > --- lib/Sema/SemaDeclCXX.cpp (revision 219190) > +++ lib/Sema/SemaDeclCXX.cpp (working copy) > @@ -1917,9 +1917,10 @@ > const Type *T = FD.getType()->getBaseElementTypeUnsafe(); > // FIXME: Destruction of ObjC lifetime types has side-effects. > if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) > - return !RD->isCompleteDefinition() || > - !RD->hasTrivialDefaultConstructor() || > - !RD->hasTrivialDestructor(); > + return !RD->hasAttr<WarnUnusedAttr>() && > + (!RD->isCompleteDefinition() || > + !RD->hasTrivialDefaultConstructor() || > + !RD->hasTrivialDestructor()); > return false; > } > > @@ -3517,9 +3518,11 @@ > bool addFieldInitializer(CXXCtorInitializer *Init) { > AllToInit.push_back(Init); > > +#if 0 > // Check whether this initializer makes the field "used". > if (Init->getInit()->HasSideEffects(S.Context)) > S.UnusedPrivateFields.remove(Init->getAnyMember()); > +#endif > > return false; > } to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about initializations with side effects (cf. <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html> "-Wunused-private-field distracted by side effects"). Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-18fdo#82577: Handle FontNoel Grandin
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-14convert Edit autocomplete Hdl to boost signals2Luboš Luňák
Here it also keep track of the connection, as it needs to be explicitly disconnected in one place. Change-Id: Id3e2882106ae55c2d880898956a36f84d3ce70ef
2014-06-16turn the no-space edit widgets into a editwidget featureCaolán McNamara
especially because most of them don't handle intercepting text getting *pasted* into them right, so start with the one which does that right. Change-Id: If6770798872ed3c72c469656ebf0d4fd76d2171d
2014-05-08RFC: add IsValueChangedFromSaved to VCL button and listboxNoel Grandin
Add a method bool IsValueChangedFromSaved() to the various Button and Listbox classes. Use it to simplify code like if ( maBoldAppFont.GetSavedValue() != TriState(maBoldAppFont.IsChecked()) ) to if ( maBoldAppFont.IsValueChangedFromSaved() ) Change-Id: I26b291d0980237497063ee301d63a49c7d2bc227 Reviewed-on: https://gerrit.libreoffice.org/9250 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-01Remove visual noise from includeAlexander Wilms
Conflicts: include/framework/preventduplicateinteraction.hxx include/sfx2/sfxbasecontroller.hxx include/sfx2/sfxbasemodel.hxx include/toolkit/awt/vclxtabpagemodel.hxx include/vcl/field.hxx include/vcl/settings.hxx Change-Id: Ibccf9f88c68267a3d7e656012b51eaf644c418c2 Reviewed-on: https://gerrit.libreoffice.org/8272 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28sal_Bool -> bool in mostly vcl moduleChris Sherlock
Conflicts: include/vcl/settings.hxx svtools/source/table/tablecontrol_impl.cxx sw/source/core/frmedt/fecopy.cxx vcl/inc/canvasbitmap.hxx vcl/inc/headless/svpframe.hxx vcl/inc/unx/salframe.h vcl/inc/win/salframe.h vcl/inc/win/salprn.h vcl/inc/win/salvd.h vcl/osx/DragSource.cxx vcl/osx/DragSource.hxx vcl/osx/DropTarget.cxx vcl/osx/DropTarget.hxx vcl/osx/OSXTransferable.cxx vcl/osx/OSXTransferable.hxx vcl/osx/clipboard.cxx vcl/osx/clipboard.hxx vcl/osx/salprn.cxx vcl/qa/cppunit/canvasbitmaptest.cxx vcl/source/components/fontident.cxx vcl/source/control/edit.cxx vcl/source/control/spinfld.cxx vcl/source/gdi/gdimtf.cxx vcl/source/gdi/virdev.cxx vcl/source/helper/canvasbitmap.cxx vcl/source/window/dockwin.cxx vcl/unx/generic/dtrans/X11_selection.hxx vcl/unx/kde/UnxFilePicker.cxx vcl/unx/kde/UnxFilePicker.hxx vcl/unx/kde4/KDE4FilePicker.cxx vcl/unx/kde4/KDE4FilePicker.hxx vcl/unx/kde4/KDESalFrame.hxx Change-Id: I9866d985da86dea2a56feff23f91c1467a1636b0 Reviewed-on: https://gerrit.libreoffice.org/8219 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-21vcl: sal_Bool -> boolStephan Bergmann
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-11more similar handling of InputSequenceChecker as in other placesMatúš Kukan
Change-Id: Ia6efc0eda03dac87c73e720d08f320ce3fc6ce4a
2014-02-06IsUpdateDateEnabled was never calledStephan Bergmann
Change-Id: I056ed836f785191f0685dc6f1313436da33ca0ee
2014-01-26Edit::IsModified should return boolStephan Bergmann
Change-Id: I0aafdd37c73cd47b9dc68b60a32db35c8c11f455
2014-01-13drop unnecessary tools/string.hxx includesCaolán McNamara
Change-Id: I2439ed19b554381f80e882aacbac05167622df92
2014-01-13longparas: xub_StrLen to sal_Int32Caolán McNamara
Change-Id: Ib3eb5f9df112696b326bb30e4deed49d37f30c86
2014-01-12longparas: nStart and nEnd are always overwrittenCaolán McNamara
so simplify to the reality, which conveniently removes some hard-coded 0xFFFF and STRING_LEN uses Change-Id: I4fc014a972f6a157c18f8194c410b7cbff03de4a
2014-01-11longparas: lift 16bit max edit lengthCaolán McNamara
Change-Id: Ide74f0a48f06cbe9539f16ef6c6d04bba043dcf9
2014-01-11longparas: convert GetMaxVisChars from xub_StrLen to sal_Int32Caolán McNamara
Change-Id: I25fcfc3ae5a599bbd7ebef3071895ec9dbf2949e
2013-12-03convert Edit::GetCharPos from xub_StrLen to sal_Int32Noel Grandin
Change-Id: I8fe982d0c0c0a04e2a10cff0f0ae68d51bed590a
2013-11-07convert vcl/Edit::Impl* methods from xub_StrLen to sal_Int32Noel Grandin
Change-Id: I009dd167d399d817689877a5e7e22dc4ab60ec61
2013-10-23fixincludeguards.sh: include/vclThomas Arnhold
Change-Id: Iaea4396f60aeade5303bf83a4504ad62f161b83c
2013-09-25Related: fdo#38838 remove UniString::EqualsIgnoreCaseAsciiCaolán McNamara
Change-Id: Ib5c3a2daa4a48bc286b14fa2cebb3306ea0012bc
2013-07-31convert vcl/edit.hxx from XubString to OUStringNoel Grandin
Change-Id: Id0558cb6285ecd19ddc21caee3e26f44cbebf721
2013-06-24Resolves: fdo#66105 set max growth width for labels/edits which take pathsCaolán McNamara
Change-Id: I12220821f76550baacdc8ce604f2e612d260c1a1
2013-06-21Resolves: fdo#65635 don't include border gap in height for borderless editsCaolán McNamara
Change-Id: If778fdeb5bdbd5a5cac33f57ef8d598ddc1408f2
2013-04-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a