diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-01 16:19:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-01 16:22:47 +0100 |
commit | 519f4b75a5f089b6ef98260ff6265f5000fe4659 (patch) | |
tree | 16f037face20255ef6806b76fc8fde34319e6d88 /starmath/source | |
parent | 26fdfce823c5100a0950681683a55cec95affa87 (diff) |
teach SmShowChar how to resize
and other cleanups
Change-Id: I1f6a57a6cb7c06a37e9c845fa93815d31008e6e1
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/dialog.cxx | 27 | ||||
-rw-r--r-- | starmath/source/dialog.hrc | 29 |
2 files changed, 10 insertions, 46 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 4c87f5981bcc..cc22063da05d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -269,7 +269,6 @@ void SmShowFont::SetFont(const Font& rFont) SetTextColor( aTxtColor ); } - IMPL_LINK_INLINE_START( SmFontDialog, FontSelectHdl, ComboBox *, pComboBox ) { Face.SetName(pComboBox->GetText()); @@ -1615,8 +1614,16 @@ void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont ) Invalidate(); } - - +void SmShowChar::Resize() +{ + Control::Resize(); + const OUString &rText = GetText(); + if (rText.isEmpty()) + return; + sal_Int32 nStrIndex = 0; + sal_UCS4 cChar = rText.iterateCodePoints(&nStrIndex); + SetSymbol(cChar, GetFont()); //force recalculation of size +} void SmSymDefineDialog::FillSymbols(ComboBox &rComboBox, bool bDeleteText) { @@ -1963,17 +1970,6 @@ void SmSymDefineDialog::UpdateButtons() pDeleteBtn->Enable(bDelete); } -IMPL_LINK( SmSymDefineDialog, HelpButtonClickHdl, Button *, EMPTYARG /*pButton*/ ) -{ - // start help system - Help* pHelp = Application::GetHelp(); - if( pHelp ) - { - pHelp->Start( OUString( "HID_SMA_SYMDEFINEDIALOG" ), pHelpBtn ); - } - return 0; -} - SmSymDefineDialog::SmSymDefineDialog(Window * pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr) : ModalDialog (pParent, "EditSymbols", "modules/smath/ui/symdefinedialog.ui"), @@ -1995,13 +1991,10 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, get(pSymbolName, "symbolName"); get(pSymbolDisplay, "symbolDisplay"); get(pSymbolSetName, "symbolSetName"); - get(pHelpBtn, "help"); get(pAddBtn, "add"); get(pChangeBtn, "modify"); get(pDeleteBtn, "delete"); - pHelpBtn->SetClickHdl(LINK(this, SmSymDefineDialog, HelpButtonClickHdl)); - pFontList = new FontList( pFntListDevice ); pOrigSymbol = 0; diff --git a/starmath/source/dialog.hrc b/starmath/source/dialog.hrc deleted file mode 100644 index a726226a2e08..000000000000 --- a/starmath/source/dialog.hrc +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- 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 _DIALOG_HRC_ -#define _DIALOG_HRC_ - -#define FT_FONTS_SUBSET 110 -#define LB_FONTS_SUBSET 111 - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |