summaryrefslogtreecommitdiff
path: root/vcl/win/dtrans/Fetc.hxx
blob: e0880acd645db6c44a871ac4c6c1f741b90b6b16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* -*- 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 <sal/types.h>

#if !defined WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <objidl.h>

/**********************************************************************
 stl container elements must fulfill the following requirements:
 1. they need a copy ctor and assignment operator(?)
 2. they must be comparable
 because the FORMATETC structure has a pointer to a TARGETDEVICE
 structure we need a simple wrapper class to fulfill these needs
***********************************************************************/

class CFormatEtc
{
public:
    CFormatEtc( );
    explicit CFormatEtc( const FORMATETC& aFormatEtc );
    CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = nullptr, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
    CFormatEtc( const CFormatEtc& theOther );

    ~CFormatEtc( );

    CFormatEtc& operator=( const CFormatEtc& theOther );
    operator FORMATETC*( );
    operator FORMATETC( );

    void getFORMATETC( LPFORMATETC lpFormatEtc );

    CLIPFORMAT getClipformat( ) const;
    DWORD      getTymed( ) const;
    void       getTargetDevice( DVTARGETDEVICE** ptd ) const;
    DWORD      getDvAspect( ) const;
    LONG       getLindex( ) const;

    void setClipformat( CLIPFORMAT cf );
    void setTymed( DWORD tymed );
    void setTargetDevice( DVTARGETDEVICE* ptd );
    void setDvAspect( DWORD dwAspect );
    void setLindex( LONG lindex );

private:
    FORMATETC m_FormatEtc;

    friend bool operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
    friend bool operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );
};

bool operator==( const CFormatEtc& lhs, const CFormatEtc& rhs );
bool operator!=( const CFormatEtc& lhs, const CFormatEtc& rhs );

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Justin Luth <jluth@mail.com> 2023-10-15tdf#150466 notebookbar: hide PrintDefault on compact and standardizeJustin Luth As in the classic toolbars, do not promote direct printing since it easily leads to mistakes and wasted paper. Additionally, the printer settings is really never needed, so it should not have a prominent place, especially on COMPACT. At the same time, I standardized the File menu: - always include print (especially useful for accessibility) - always use the same order - consistently provide access to print/web preview Change-Id: I9ffbba179206274b5ed1788e496b7c5aa0503726 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157984 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2023-09-04Added horizontal line and autocorrect to tabbed and compact tabbed interfaces.Adam Eric Fallon Change-Id: I8a269052f3da09d079f0f872ef24ca23bbba4107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156348 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> 2023-07-25fix .ui indentCaolán McNamara Change-Id: Ib6ebed36b857d5ffa449f66319ef67f2f84722dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154897 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> 2023-07-20tdf#86630 sw page number wizard: add to notebookbar layout tabJustin Luth I think putting this in layout makes the most sense, since Title page is already there, and these are all page style tasks. The other possible location is Insert. Title page is here also. I'd suggest putting it under Title page, and moving Fields above Section Change-Id: I6f432af3726b44b4fb7554fc73e343959cfe2d0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151398 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins 2023-07-12tdf#141135 notebookbar: use radio buttons instead of checkboxesJustin Luth I mean of course in the places where mutually exclusive options are side by side. I mainly searched in menu.xml where menu:style="radio", and then changed the notebookbar menu items to do the same thing. It was all done by hand, unfortunately. Before testing, ensure you have no customized notebookbars: rm instdir/user/config/soffice.cfg/modules/*/ui/* git grep -B10 '.uno:NormalView\|.uno:BrowseView' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:PageMode\|.uno:MasterPage' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:.uno:PagebreakMode\|.uno:NormalViewMode' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:DefaultCellStyles' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:CommonAlign' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:StyleApply' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:TextBodyParaStyle' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:NumberListStyle' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:OutputQuality' *.ui | grep -A10 GtkMenuItem git grep -B10 '.uno:ParaRightToLeft\|.uno:ParaLeftToRight' *.ui | grep -A10 GtkMenuItem git grep -B10 .uno:SpacePara *.ui | grep -A10 GtkMenuItem git log -p -1 | grep '^+' | grep -v GtkRadioMenuItem Change-Id: Ia2e29a6541fed66f4bcb0936d715969994671e65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154337 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2023-06-30Revert "tdf#118335 notebookbar: set visible false for PrintPreview in MenuFile"Justin Luth This reverts 24.2 commit 506db23af4da2c5c8775fb0fd6fb9b8668e2fe86, because the PopupLabel has been removed, so the label showing for Print Preview is now "Print Preview" instead of "Close Preview". Because it is a toggle, it will have a checkmark as the picture when the feature is active (and thus would act as a close preview). The "close preview" instances were converted to .uno:ClosePreview to allow the PopupLabel to be removed. Change-Id: I7c38e863b39d3f3979466a8ab10f29dcda561d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153811 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2023-06-17tdf#118335 notebookbar: set visible false for PrintPreview in MenuFileJustin Luth The label for "Print Preview" comes from ContextLabel in these menus - and it displays "Close Preview" even if the print preview is not active. The PrintPreview buttons in the notebookbar ribbon itself work fine. So just hide the menu ones for now. Perhaps that is not good for accessibility, but I would imagine accessibility people would stick with the traditional menu anyway, since the notebookbar is also horrendous in many other ways for accessiblity. The user can turn this back on again if they want. Customize - Notebookbar - File Tab | File | Menu File Change-Id: I807941650295132c9e15f04094cece26246318d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153199 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2023-05-04tdf#86630 sw page number wizard: add to notebookbar insert menusJustin Luth There are two places in the notebookbar where this Insert page number could fit - in insert and in layout. Both of these have "Title Page" in the menu at the right, so this patch adds the page number wizard underneath that. (Title pages should be setup first before page numbers are added.) This is pretty non-controversial I would hope. A follow-up patch will consider placing it on the main ribbon. Change-Id: I195ee5a134a581cb6570485f84e4030b63d7895c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151396 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2023-04-26tdf#151624 Fix Insert Formula tool in the Tabbed UIRafael Lima As reported in the ticket the Insert Formula tool was misaligned in the Tabbed UI since the removal of the Emoji tool. This patch fixes that by making the tool use all the available vertical space. Change-Id: I26d36ba4fc6f38e80d8ab46bfdf88c08fbf2fd68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150701 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> 2023-04-26tdf#155006 don't show "InsertObjectFloatingFrame" by default in menus and ↵Caolán McNamara toolbars still exists, just isn't presented by default. help describes this as "Inserts a floating frame into the current document. Floating frames are used in HTML documents to display the contents of another file." and "Changes the properties of the selected floating frame. Floating frames work best when they contain an html document, and when they are inserted in another html document." This is basically support for html IFrames and is a fairly obscure thing for an ordinary document. Change-Id: Iec8ff591393e4ee4ed8791094e1f15a225808c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150707 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Caolán McNamara <caolanm@redhat.com> 2023-02-22Related tdf#129905 Add new .uno:SectionBoundaries to the NotebookbarRafael Lima This patch adds the new command .uno:SectionBoundaries to the notebookbar interfaces. Change-Id: Ib01b8221e3015c460f6b7cc0cdac3c7ddd4aab1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146785 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> 2022-12-19[API CHANGE] tdf#85592: deprecate .uno:BackColor, use .uno:CharBackColorJustin Luth EditEngine stuff uses CharBackColor, while SW used BackColor. Deprecate the SW-only SID. What does this do? It allows the toolbar "Character Highlighting Color" to work with both body text (previously BackColor) and comment text(CharBackColor). Otherwise, the toolbar item was disabled when moving into a comment. (Shapes/Textboxes got their own formatting toolbar, so those are unaffected.) AFAIK, after this commit, SID_ATTR_CHAR_COLOR_BACKGROUND should still work fine for API calls, or for customized toolbars. That's why I didn't try to remove it completely - just deprecate. Do I know what I am doing here? No, although I'm fairly confident nontheless, and I've had some good help from reviewers. Change-Id: I0afcbdb1b91c872f6d47f3c82c573f3b9fea6dfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137334 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> 2022-09-29tdf#151197: Remove EmojiControlKhaled Hosny Change-Id: I7fb423727425ec42d1161f6ac5649f5cac82f12f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140651 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com> 2022-01-21tdf#141591 Add DevTools to the Tabbed interfacerafaelhlima This patch adds the DevTools command to the Tabbed interface. It is located in the cotnext menu in the Tools tab. Change-Id: I5f323b1b5ffc6707fc4f8b3c6eca2db7b8b97adc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127973 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> 2021-10-31gtk[3 vs 4]: remove can-focus from GtkToolButtonCaolán McNamara so tab-cycling inside sidebar panel toolbars works as wanted It needs to be false for gtk3 and true for gtk4, leaving it unspecified gets a desired working default. Change-Id: I34869d5dcffc814f62ec2b717108f90c395a067b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2021-04-17tdf#140764 add ImageMode to tabbed NBandreas kainz Change-Id: I6d3e10fa945da303b1af69b1d631bd2dc8cdab43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114228 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com> 2021-04-16tdf#134373 add PopupLabel to update commands for NB see c5 option 2andreas kainz Change-Id: I2f3a6470a8b376f66f303578492b59ca0b56388a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114194 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com> 2021-03-08tdf#140796: Wrong English string for U+2060 characterJulien Nabet Rename "No-width No ~Break" to "Word ~Joiner" + replace pattern "ZWNBSP" variable names by "WJ" Change-Id: I95a874a9d2d20a30d2c4c3add6041adbe72d872c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112055 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2021-02-27NB writer remove style update and edit widget available at previewandreas kainz Change-Id: Iba9c293ddce36ef9ad1bbc147cfcad942635a455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111669 Tested-by: Jenkins Reviewed-by: Andreas Kainz <kainz.a@gmail.com>