calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / dbaccess / source / ui / tabledesign / TableDesignHelpBar.cxx
blobf81123e55d03b07f0c13b0a8ed186749816acb87
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <TableDesignHelpBar.hxx>
21 #include <helpids.h>
23 using namespace dbaui;
25 #define DETAILS_MIN_HELP_WIDTH 200
27 OTableDesignHelpBar::OTableDesignHelpBar(std::unique_ptr<weld::TextView> xTextWin)
28 : m_xTextWin(std::move(xTextWin))
30 m_xTextWin->set_size_request(DETAILS_MIN_HELP_WIDTH, -1);
31 m_xTextWin->set_help_id(HID_TAB_DESIGN_HELP_TEXT_FRAME);
34 void OTableDesignHelpBar::SetHelpText(const OUString& rText)
36 if (!m_xTextWin)
37 return;
38 m_xTextWin->set_text(rText);
41 bool OTableDesignHelpBar::isCopyAllowed()
43 int mStartPos, nEndPos;
44 return m_xTextWin && m_xTextWin->get_selection_bounds(mStartPos, nEndPos);
47 bool OTableDesignHelpBar::isCutAllowed() { return false; }
49 bool OTableDesignHelpBar::isPasteAllowed() { return false; }
51 void OTableDesignHelpBar::cut() {}
53 void OTableDesignHelpBar::copy()
55 if (!m_xTextWin)
56 return;
57 m_xTextWin->copy_clipboard();
60 void OTableDesignHelpBar::paste() {}
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */