/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX #define INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX #include #include #include #include #include #include #include #include #include #include #include namespace svxform { class FmSearchConfigItem; } struct FmSearchProgress; class FmSearchEngine; /// Dialog for searching in Forms/Tables class FmSearchDialog : public ModalDialog { friend class FmSearchEngine; // my all Controls FixedLine m_flSearchFor; RadioButton m_rbSearchForText; RadioButton m_rbSearchForNull; RadioButton m_rbSearchForNotNull; ComboBox m_cmbSearchText; FixedLine m_flWhere; FixedText m_ftForm; ListBox m_lbForm; RadioButton m_rbAllFields; RadioButton m_rbSingleField; ListBox m_lbField; FixedLine m_flOptions; FixedText m_ftPosition; ListBox m_lbPosition; CheckBox m_cbUseFormat; CheckBox m_cbCase; CheckBox m_cbBackwards; CheckBox m_cbStartOver; CheckBox m_cbWildCard; CheckBox m_cbRegular; CheckBox m_cbApprox; PushButton m_pbApproxSettings; CheckBox m_aHalfFullFormsCJK; CheckBox m_aSoundsLikeCJK; PushButton m_aSoundsLikeCJKSettings; FixedLine m_flState; FixedText m_ftRecordLabel; FixedText m_ftRecord; FixedText m_ftHint; PushButton m_pbSearchAgain; CancelButton m_pbClose; HelpButton m_pbHelp; OUString m_sSearch; OUString m_sCancel; Window* m_pPreSearchFocus; Link m_lnkFoundHandler; ///< Handler for "found" Link m_lnkCanceledNotFoundHdl; ///< Handler for Positioning the Cursors Link m_lnkContextSupplier; ///< for search in contexts /// memorize the currently selected field for every context ::std::vector m_arrContextFields; FmSearchEngine* m_pSearchEngine; Timer m_aDelayedPaint; // see EnableSearchUI ::svxform::FmSearchConfigItem* m_pConfig; public: /** This can search in different sets of fields. There is a number of contexts; their names are in strContexts (separated by ';'), the user can choose one of them. When the user chooses a context, lnkContextSupplier is called, it gets a pointer on an FmSearchContext-structure, that has to be filled. The following counts for the search : a) in case of formatted search the iterator itself is used (like in the first constructor) b) in case of formatted search NOT the FormatKey at the fields of the iterator is used, but the respective TextComponent is asked (that's why the original iterator is used; by its move the controls behind the TextComponent-interface are updated hopefully) c) in case of not-formatted search a clone of the iterator is used (because the TextComponent-interfaces don't need to be asked) (of course needed : the string number i in strUsedFields of a context must correspond with the interface number i in the arrFields of the context) */ FmSearchDialog(Window* pParent, const OUString& strInitialText, const ::std::vector< OUString >& _rContexts, sal_Int16 nInitialContext, const Link& lnkContextSupplier); virtual ~FmSearchDialog(); /** The found-handler gets in the 'found'-case a pointer on a FmFoundRecordInformation-structure (which is only valid in the handler; so if one needs to memorize the data, don't copy the pointer but the structure). This handler MUST be set. Furthermore, it should be considered, that during the handler the search-dialog is still modal. */ void SetFoundHandler(const Link& lnk) { m_lnkFoundHandler = lnk; } /** If the search has been cancelled or has been finished without success, the current data set is always displayed in the search dialog. This handler exists to make this synchronous with the possible display of the caller (it does not necessarily need to be set). The pointer that is passed to the handler points to a FmFoundRecordInformation-structure, for which aPosition and possibly (in a search with contexts) nContext are valid. */ void SetCanceledNotFoundHdl(const Link& lnk) { m_lnkCanceledNotFoundHdl = lnk; } inline void SetActiveField(const OUString& strField); protected: virtual sal_Bool Close(); void Init(const OUString& strVisibleFields, const OUString& strInitialText); // only to be used out of the constructors void OnFound(const ::com::sun::star::uno::Any& aCursorPos, sal_Int16 nFieldPos); /** When searching in an own thread I naturally want to disable the UI for starting the search and for setting search parameters. If bEnable == sal_False, for all affected controls painting is turned off and shortly after turned on again using m_aDelayedPaint. If there is a demand with bEnable == sal_True inbetween, the timer is stopped and painting is turned on immediately. As a consequence for this intricateness there is no flickering when turning off and on quickly. */ void EnableSearchUI(sal_Bool bEnable); void EnableSearchForDependees(sal_Bool bEnable); void EnableControlPaint(sal_Bool bEnable); void InitContext(sal_Int16 nContext); void LoadParams(); void SaveParams() const; private: // Handler for the Controls DECL_LINK( OnClickedFieldRadios, Button* ); DECL_LINK(OnClickedSearchAgain, void *); DECL_LINK( OnClickedSpecialSettings, Button* ); DECL_LINK(OnSearchTextModified, void *); DECL_LINK( OnPositionSelected, ListBox* ); DECL_LINK( OnFieldSelected, ListBox* ); DECL_LINK( OnFocusGrabbed, ComboBox* ); DECL_LINK( OnCheckBoxToggled, CheckBox* ); DECL_LINK( OnContextSelection, ListBox* ); DECL_LINK( OnSearchProgress, FmSearchProgress* ); DECL_LINK( OnDelayedPaint, void* ); ///< see EnableSearchUI void implMoveControls(Control** _ppControls, sal_Int32 _nControls, sal_Int32 _nUp, Control* _pToResize); void initCommon( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _rxCursor ); }; inline void FmSearchDialog::SetActiveField(const OUString& strField) { sal_uInt16 nInitialField = m_lbField.GetEntryPos(strField); if (nInitialField == COMBOBOX_ENTRY_NOTFOUND) nInitialField = 0; m_lbField.SelectEntryPos(nInitialField); LINK(this, FmSearchDialog, OnFieldSelected).Call(&m_lbField); } #endif // INCLUDED_CUI_SOURCE_INC_CUIFMSEARCH_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ro/suse/suse-3.6 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-25Fix currency symbol selection in Calc on mobileTomaž Vajngerl
In LOK we use one language identifier for both - UI language and the locale used. This is a problem when we determine that we a language for UI is not available and fall-back to the default "en-US" langauge, which also changes the locale. This introduces a separate variable that stores the language tag for the locale independently to the language. Another problem is that in some cases we don't reset the staticly initialized data, when the new document is loaded, which is on the other hand used to define which currency symbol is used as SYSTEM locale. That can in some cases select the wrong currency symbol even when we changed the locale to something else. This fix introduces a reset function, which is triggered on every document load. Change-Id: I55c7f467600a832895f94346f8bf11a6ef6a1e49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89320 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89343 Tested-by: Jenkins
2019-06-12Missing test dependencyStephan Bergmann
> warn:vcl:5039:5039:vcl/source/image/ImplImage.cxx:63: Failed to load scaled image from res/script.png at 1 > warn:vcl:5039:5039:vcl/source/image/ImplImage.cxx:90: Failed to load stock icon res/script.png > cppunittester: vcl/source/gdi/bmpacc.cxx:38: BitmapInfoAccess::BitmapInfoAccess(Bitmap &, BitmapAccessMode): Assertion `xImpBmp && "Forbidden Access to empty bitmap!"' failed. Change-Id: I6d1d1ae80f13471e9715afe95ef6b7532b48affe Reviewed-on: https://gerrit.libreoffice.org/73845 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-12Missing test dependencyStephan Bergmann
> warn:vcl:32616:32616:vcl/source/app/salusereventlist.cxx:114: Uncaught com.sun.star.container.NoSuchElementException message: file:///home/sbergman/lo2/core/instdir/share/config/soffice.cfg/cui/ui/hyperlinkdialog.ui Change-Id: If7091708d5c6cb6370c26d27bff553f43d8044ba Reviewed-on: https://gerrit.libreoffice.org/73843 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-20missing test dependenciesStephan Bergmann
Change-Id: I6dd52a9116d7d6f692e6f1a080c7169a92b265ea Reviewed-on: https://gerrit.libreoffice.org/65463 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-29lokit: test for the new signing API functionsTomaž Vajngerl
Change-Id: I3ab2f3986955eb82451704fc2386b64f208da554 Reviewed-on: https://gerrit.libreoffice.org/61782 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-10-01Change all font-based tests to depend on ooo_fontsJan-Marek Glogowski
Instead of depending on individual font packages. Most didn't depend on fonts at all. Change-Id: I190295bbecb1b44aa34aaf0874afadd35b5daeb4 Reviewed-on: https://gerrit.libreoffice.org/61159 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl
This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2016-09-18make sure the test is not executed before the libs have been builtMarkus Mohrhard
Change-Id: Idf9e638ac559e1135182811c2bc30465efe45d3d
2016-07-27add uui component to some other placesCaolán McNamara
Change-Id: If07caacf7bc18b39820db73fe64201f9cb97bc6c
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko
This patch changes occurences in makefiles from $(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \ udkapi \ offapi \ )) to $(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config)) (corrected instead of abandon, jani) Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e Reviewed-on: https://gerrit.libreoffice.org/23426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-04-12lok context menu: unit testPranav Kant
Change-Id: I244fbf4b98368c7c0d66cdd865e1243639727026 Reviewed-on: https://gerrit.libreoffice.org/23985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.com>
2016-04-07CppunitTest_desktop_lib: avoid #include "../..." style includeMiklos Vajna
Change-Id: Ib5ce0dee00c9306f89ad4b43af4b34e604147a1c
2016-01-18basebmp now only used from vcl/headless codeCaolán McNamara
Change-Id: I068d404431d3565f6ad5741edbd3693225824a4d
2015-11-23VirtualDevices either match another device depth, or are 1 bitCaolán McNamara
cairo can therefore always render to a svp virtual device with need for a fallback Change-Id: I5d03ae541820389e26f7448444444be009fb28a4
2015-11-14CppunitTest_desktop_lib: add Writer comments textcaseMiklos Vajna
Fails without e.g. the last hunk of commit 1ba9d7fd2a7a3e2b4f52ed0f5efdf7df867b9db3 (sw lok: forward key events to annotation window if necessary, 2015-11-12). Change-Id: I7f39530881f6141fea956b751aa57eb2bdcadcb2
2015-10-22desktop: add lok::Document::paste() testcaseMiklos Vajna
Also, closeDoc() is called by tearDown(), so no need to call it manually at the end of tests. Change-Id: Ib8f61a09fa3fc0885d7ea90ce96210bff4cc9f98
2015-10-20lok::Document::saveAs: add Writer/Impress/Draw png mappingMiklos Vajna
Change-Id: I7530281302b9787a9cb9f98f0dee9d98d39cfb05
2015-10-08CppunitTest_desktop_lib: add Calc find-all testcaseMiklos Vajna
Fails without commit a31f95b180728c1c671930913b4b4ad96ebcda5f (sc tiled rendering: fix showing all search results, 2015-10-07). Change-Id: Ibc01d468168367f789b3f5046808104fa3f5ef18
2015-09-09LOK: moved the decalaration of LibLODocument_Impl to make it visibleMihai Varga
We needed a better way to test LOK methods that are not app specific, but are defined in /desktop/source/lib/init.cxx. So the decalaration needs to be visible. I also moved the `getStyles` test in the new test file Change-Id: I98d97dc17a66e72732ca7bd848c131610790f48e