/* -*- 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 . */ #pragma once #include #include #include class AbstractSpellDialog; namespace svx { /** The child window wrapper of the actual spelling dialog. To use the spelling dialog in an application you have to do the usual things:
  1. Call this class' RegisterChildWindow() method with the module as second argument that you want the dialog included in.
  2. In the SFX_IMPL_INTERFACE implementation of the view shell that wants to use the dialog call RegisterChildWindow() with the id returned by this class' GetChildWindowId() method.
  3. Include the item associated with this child window to the SDI description of the view shell.
*/ class SVX_DLLPUBLIC SpellDialogChildWindow : public SfxChildWindow { friend class SpellDialog; VclPtr m_xAbstractSpellDialog; public: SpellDialogChildWindow(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings); virtual ~SpellDialogChildWindow() override; protected: /** This abstract method has to be defined by a derived class. It returns the next wrong sentence. @return returns an empty vector if no error could be found */ virtual SpellPortions GetNextWrongSentence(bool bRecheck) = 0; /** This abstract method applies the changes made in the spelling dialog to the document. The dialog always updates its settings when it gets the focus. The document can rely on the fact that the methods ApplyChangedSentence() is called for the position that the last GetNextWrongSentence() returned. If 'bRecheck' is set to true then the same sentence should be rechecked once from the start. This should be used to find errors that the user has introduced by manual changes in the edit field, and in order to not miss the still following errors in that sentence. */ virtual void ApplyChangedSentence(const SpellPortions& rChanged, bool bRecheck) = 0; /** This methods determines whether the application supports AutoCorrection */ virtual bool HasAutoCorrection(); /** This method adds a word pair to the AutoCorrection - if available */ virtual void AddAutoCorrection(const OUString& rOld, const OUString& rNew, LanguageType eLanguage); /** Return the sfx bindings for this child window. They are retrieved from the dialog so they do not have to be stored in this class as well. The bindings may be necessary to be used by the abstract methods. */ /** This method determines if grammar checking is supported */ virtual bool HasGrammarChecking(); /** determines if grammar checking is switched on */ virtual bool IsGrammarChecking(); /** switches grammar checking on/off */ virtual void SetGrammarChecking(bool bOn); SfxBindings& GetBindings() const; /** Set the spell dialog into the 'resume' state. This method should be called to notify the SpellDialog about changes in the document that invalidate the current state which results in disabling most of the dialog controls and presenting a "Resume" button that initiates a reinitialization. */ void InvalidateSpellDialog(); /** Notifies the ChildWindow about the get focus event. The ChildWindow should no check if the spelling dialog should be set to the 'Resume' state by calling InvalidateSpellDialog() */ virtual void GetFocus() = 0; /** Notifies the ChildWindow about the lose focus event. The ChildWindow should use it to save the current selection/state. */ virtual void LoseFocus() = 0; }; } // end of namespace ::svx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ t.jp 2017-05-29T10:47:34+00:00 dc36d07d9e5e1c70c0e7bdc9adede5a10e4413f1 Change-Id: I9893e8bed254dcac91fbc7abb5ab4817a28ba339 Reviewed-on: https://gerrit.libreoffice.org/38133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Change-Id: I9893e8bed254dcac91fbc7abb5ab4817a28ba339
Reviewed-on: https://gerrit.libreoffice.org/38133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
basic: Fix broken logic in VBA's unit tests 2017-05-15T02:59:04+00:00 Takeshi Abe tabe@fixedpoint.jp 2017-05-12T14:03:27+00:00 b9d75dea30adaa53be58c112f255c9fcd3eea400 It should not be "OK" when no assertion passes. Change-Id: Ib6bab2d597a138468e96b4acf8c3be7abd112cca Reviewed-on: https://gerrit.libreoffice.org/37540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
It should not be "OK" when no assertion passes.

Change-Id: Ib6bab2d597a138468e96b4acf8c3be7abd112cca
Reviewed-on: https://gerrit.libreoffice.org/37540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
add VBA CHR() test case 2017-02-27T20:37:36+00:00 Zdeněk Crhonek zcrhonek@gmail.com 2017-02-10T20:07:11+00:00 b5c83cf676541d367ea4d0ce0c5531160f2b215b Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01 Reviewed-on: https://gerrit.libreoffice.org/34133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01
Reviewed-on: https://gerrit.libreoffice.org/34133
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>