/* RCS $Id: struct.h,v 1.2 2006-06-29 11:24:50 ihi Exp $ -- -- SYNOPSIS -- Structure definitions -- -- DESCRIPTION -- dmake main data structure definitions. See each of the individual -- struct declarations for more detailed information on the defined -- fields and their use. -- -- AUTHOR -- Dennis Vadura, dvadura@dmake.wticorp.com -- -- WWW -- http://dmake.wticorp.com/ -- -- COPYRIGHT -- Copyright (c) 1996,1997 by WTI Corp. All rights reserved. -- -- This program is NOT free software; you can redistribute it and/or -- modify it under the terms of the Software License Agreement Provided -- in the file /readme/license.txt. -- -- LOG -- Use cvs log to obtain detailed change logs. */ #ifndef _STRUCT_INCLUDED_ #define _STRUCT_INCLUDED_ typedef uint32 t_attr; /* The following struct is the cell used in the hash table. * NOTE: It contains the actual hash value. This allows the hash table * insertion to compare hash values and to do a string compare only * for entries that have matching hash_key values. This elliminates * 99.9999% of all extraneous string compare operations when searching * a hash table chain for matching entries. */ typedef struct hcell { struct hcell *ht_next; /* next entry in the hash table */ struct hcell *ht_link; /* for temporary lists */ char *ht_name; /* name of this cell */ char *ht_value; /* cell value if any */ uint32 ht_hash; /* actual hash_key of cell */ int ht_flag; /* flags belonging to hash entry */ /* NOTE: some macros have corresponding variables defined * that control program behaviour. For these macros a * bit of ht_flag indicates the variable value will be set, and the * type of the value that will be set. * * The struct below contains a mask for bit variables, and a * pointer to the global STATIC location for that variable. * String and char variables point to the same place as ht_value * and must be updated when ht_value changes, bit variables must * have their value recomputed. See Def_macro code for more * details. * * NOTE: Macro variables and Targets are always distinct. Thus * the value union contains pointers back at cells that own * a particular name entry. A conflict in this can never * arise, ie pointers at cells will never be used as * values for a macro variable, since the cell and macro * name spaces are completely distinct. */ struct { int mv_mask; /* bit mask for bit variable */ union { char** mv_svar;/* ptr to string valued glob var */ char* mv_cvar;/* ptr to char valued glob var */ t_attr* mv_bvar;/* ptr to bit valued glob var */ int* mv_ivar;/* ptr to int valued glob var */ struct { struct tcell* ht_owner;/* ptr to CELL owning name */ struct tcell* ht_root; /* root ptr for explode */ } ht; } val; } var; /* variable's static equivalent */ } HASH, *HASHPTR; #define MV_MASK var.mv_mask #define MV_SVAR var.val.mv_svar #define MV_CVAR var.val.mv_cvar #define MV_BVAR var.val.mv_bvar #define MV_IVAR var.val.mv_ivar #define CP_OWNR var.val.ht.ht_owner #define CP_ROOT var.val.ht.ht_root /* This struct holds the list of temporary files that have been created. * It gets unlinked when Quit is called due to an execution error */ typedef struct flst { char *fl_name; /* file name */ FILE *fl_file; /* the open file */ struct flst *fl_next; /* pointer to next file */ } FILELIST, *FILELISTPTR; /* The next struct is used to link together prerequisite lists. It * is also used to link multiple targets together. */ typedef struct lcell { struct tcell *cl_prq; /* link to a prerequisite */ struct lcell *cl_next; /* next cell on dependency list */ int cl_flag; /* flags for link cell */ } LINK, *LINKPTR; /* This is the structure of a target cell in the dag which represents the * graph of dependencies. Each possible target is represented as a cell. * * Each cell contains a pointer to the hash table entry for this cell. * The hash table entry records the name of the cell. */ typedef struct tcell { struct hcell *ce_name; /* name of this cell */ struct hcell *ce_pushed; /* local pushed macro definitions */ /* Def_cell sets ce_all.cl_prq to point back to itself. .UPDATEALL * uses ce_all.cl_next to link the cells together. */ struct lcell ce_all; /* If set it points to first element of the list linked by ce_all. */ struct tcell *ce_set; struct tcell *ce_setdir; /* SETDIR ROOT pointer for this cell*/ struct tcell *ce_link; /* link for temporary list making */ struct tcell *ce_parent; /* used by inner loop, not a static */ struct lcell *ce_prq; /* list of prerequisites for cell */ struct lcell *ce_prqorg; /* list of original prerequisites */ struct lcell *ce_indprq; /* indirect prerequisites for % cell*/ struct str *ce_recipe; /* recipe for making this cell */ FILELISTPTR ce_files; /* list of temporary files for cell */ struct str *ce_cond; /* conditional macro assignments */ char *ce_per; /* value of % in %-meta expansion */ char *ce_fname; /* file name associated with target */ char *ce_lib; /* archive name, if A_LIBRARYM */ char *ce_dir; /* value for .SETDIR attribute */ int ce_count; /* value for :: recipe set */ int ce_index; /* value of count for next :: child */ int ce_flag; /* all kinds of goodies */ t_attr ce_attr; /* attributes for this target */ time_t ce_time; /* time stamp value of target if any*/ } CELL, *CELLPTR; #define CE_NAME ce_name->ht_name #define CE_RECIPE ce_recipe #define CE_PRQ ce_prq #define CeMeToo(C) &((C)->ce_all) #define CeNotMe(C) (C)->ce_all.cl_next /* This struct represents that used by Get_token to return and control * access to a token list inside a particular string. This gives the * ability to access non overlapping tokens simultaneously from * multiple strings. */ typedef struct { char *tk_str; /* the string to search for tokens */ char tk_cchar; /* current char under *str */ int tk_quote; /* if we are scanning a quoted str */ } TKSTR, *TKSTRPTR; /* Below is the struct used to represent a string. It points at possibly * another string, since the set of rules for making a target is a collection * of strings. */ typedef struct str { char *st_string; /* the string value */ struct str *st_next; /* pointer to the next string */ t_attr st_attr; /* attr for rule operations */ } STRING, *STRINGPTR; /* These structs are used in processing of the % rules, and in building * the NFA machine that is used to match an arbitrary target string to * one of the % rules that is represented by each DFA */ typedef int16 statecnt; /* limits the max number of dfa states */ /* Each state of the DFA contains four pieces of information. */ typedef struct st { struct st *no_match; /* state to go to if no match */ struct st *match; /* state to go to if we do match */ char symbol; /* symbol on which we transit */ char action; /* action to perform if match */ } STATE, *STATEPTR; /* Each DFA machine looks like this. It must have two pointers that represent * the value of % in the matched string, and it contains a pointer into the * current state, as well as the array of all states. */ typedef struct { char *pstart; /* start of % string match */ char *pend; /* end of % string match */ STATEPTR c_state; /* current DFA state */ CELLPTR node; /* % target represented by this DFA */ STATEPTR states; /* table of states for the DFA */ } DFA, *DFAPTR; /* An NFA is a collection of DFA's. For each DFA we must know it's current * state and where the next NFA is. */ typedef struct nfa_machine { DFAPTR dfa; /* The DFA for this eps transition */ char status; /* DFA state */ struct nfa_machine *next; /* the next DFA in NFA */ } NFA, *NFAPTR; /* The next struct is used to link together DFA nodes for inference. */ typedef struct dfal { struct tcell *dl_meta; /* link to %-meta cell */ struct dfal *dl_next; /* next cell on matched DFA list*/ struct dfal *dl_prev; /* prev cell on matched DFA list*/ struct dfal *dl_member; /* used during subset calc */ char dl_delete; /* used during subset calc */ char *dl_per; /* value of % for matched DFA */ statecnt dl_state; /* matched state of the DFA */ int dl_prep; /* repetion count for the cell */ } DFALINK, *DFALINKPTR; /* This struct is used to store the stack of DFA sets during inference */ typedef struct dfst { DFALINKPTR df_set; /* pointer to the set */ struct dfst *df_next; /* next element in the stack */ } DFASET, *DFASETPTR; /* We need sets of items during inference, here is the item, we form sets * by linking them together. */ typedef struct ic { CELLPTR ic_meta; /* Edge we used to make this cell*/ DFALINKPTR ic_dfa; /* Dfa that we matched against */ CELLPTR ic_setdirroot; /* setdir root pointer for cell */ DFASET ic_dfastack; /* set of dfas we're working with*/ int ic_dmax; /* max depth of cycles in graph */ char *ic_name; /* name of the cell to insert */ char *ic_dir; /* dir to CD to prior to recurse */ struct ic *ic_next; /* next pointer to link */ struct ic *ic_link; /* link all ICELL'S together */ struct ic *ic_parent; /* pointer to post-requisite */ char ic_flag; /* flag, used for NOINFER only */ char ic_exists; /* TRUE if prerequisite exists */ } ICELL, *ICELLPTR; #endif LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
AgeCommit message (Collapse)Author
2019-10-25tdf#42949 Fix IWYU warnings in vcl/unx/gtk3 and gtk3_kde5/Gabor Kelemen
Also recheck vcl/source after recent reworks and f-u-i updates. Some new blacklist entries were needed for keeping existing fw declarations in headers. Add blacklist entries for removals causing no-pch build failures that were reverted in: a3b03ba1316b1ec0a9b0a3b45b96dc0a49aa9f1f 75d924db95559cff5f699bad8fe34bb0aeac0ff6 b57052ec2bbe548ca495a32b4bfce1d1c71caf33 Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I71227806288b68ef2a2cd56244899fd56bd0db8d Reviewed-on: https://gerrit.libreoffice.org/81163 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-18tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in vcl Change-Id: Ibd66e5ed9064612b73d08fac179ee46dc5b0a4b6 Reviewed-on: https://gerrit.libreoffice.org/77656 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): vclStephan Bergmann
Change-Id: I0bd1d26f6fc4052b812fde33ebd1d63111426942 Reviewed-on: https://gerrit.libreoffice.org/76627 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-26tdf#124598 gtk3_kde5: Link gtk3 side against kf5 libsMichael Weghorn
The separate filepicker executable 'lo_kde5filepicker' used by the gtk3_kde5 VCL plugin needs the KF5 libraries (in particular the 'KFileWidget' class) in order to provide custom controls in the Plasma-native QFileDialog. The gtk3 side ('lo_kde5filepicker') itself doesn't use any functionality from KF5 libraries itself and therefore didn't link against those. When determining which VCL plugin to use on LibreOffice start, a 'dlopen()' is used on the libraries of the potential VCL plugins, which fails if linked libraries are not available, so unsuitable VCL plugin are skipped. This mechanism didn't work for the gtk3_kde5 VCL plugin if KF5 libraries were not installed, since the 'dlopen()' on 'libvclplug_gtk3_kde5lo.so' would succeed, but starting the 'lo_kde5filepicker' process would later fail at runtime due to the missing libraries. To avoid this, make 'libvclplug_gtk3_kde5lo.so' link against KF5 libraries as well to prevent gtk3_kde5 from being used unless all required libraries are actually present. Add a dummy KFileWidget use in Gtk3KDE5FilePicker to prevent smart linkers from not linking unused libraries despite linker flags. While this is a hack, it seems to be acceptable, in particular since gtk3_kde5 is more meant as a temporary solution supposed to be dropped at a later point in time in favor of the pure kde5 VCL plugin. Change-Id: I3a37daaeb1307b4f24f6fd75d7b6ec5ffaade0fd Reviewed-on: https://gerrit.libreoffice.org/71237 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins
2019-04-18tdf#43157 Clean up OSL_TRACE (replace with SAL_INFO)Jens Carl
Change-Id: Ifa196dec38d1b84ef14e9bb3a6b45d5ead72064a Reviewed-on: https://gerrit.libreoffice.org/70904 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2018-12-05tdf#121892 Guard Gtk3KDE5FilePicker::execute with SolarMutexGuardMichael Weghorn
Adhere to what gtk3's file picker does as well. Threading is involved in Gtk3KDE5FilePickerIpc::execute(). Change-Id: I4fa0a12f46ed13ef04211cb8577e77d1db5e8eae Reviewed-on: https://gerrit.libreoffice.org/64502 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-02-08tdf#86739 Option to set image anchor type in image insert dialogSamuel Mehrbrodt
This adds the selectbox to (hopefully) all filepickers: - LO native - GTK/GTK3 - KDE4 - KDE5 - Windows - macOS Change-Id: I01bd42b1ca18e0f691b879647a6cb1b62177d3ce Reviewed-on: https://gerrit.libreoffice.org/49311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-25gtk3_kde5: port away from boost::processMilian Wolff
While this uglifies the code, it removes a dependency on newer boost 1.64+ which ships boost::process. This helps on systems where LO is linked against system boost and an older version of boost is used. Additionally, and this is the main motivation, this makes it easier to backport these changes to 5.2, where the bundled boost is also only at 1.60. To keep the required changes at a minimum, the osl_* API for reading from/writing to the stdout/stdin of the helper process, we buffer the responses on a line-by-line basis. Note that one cannot simply reuse osl_readLine on the non-seekable oslFileHandle. Instead, we have to roll our own simplistic readLine implementation... Change-Id: I1197e38cb2416e926d8ba985accd6c10d78bcc52 Reviewed-on: https://gerrit.libreoffice.org/48490 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann
Change-Id: Ic12464f01950a5037bb6819a2722aba5a7e3e2e6
2018-01-23Introduce gtk3_kde5 vcl pluginMilian Wolff
This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only the file and folder picker are replaced by KDE dialogs. This gives us a well-maintained GTK LO base with basic KDE integration with minimum effort. To prevent issues with nested event loops, the KDE dialogs are launched from a separate process, the new lo_kde5filepicker helper executable. A trivial stdin/stdout IPC mechanism transfers the data between LO and the Qt/KDE helper. The usage of an external process also allows us to copy'n'paste between LO and the KDE file dialog without freezing the UI, as would happen when one would do this in-process. This is in general also the architecture applied by the kmozillahelper, which is used to integrate KDE file dialogs into Firefox. While the KDE dialog is shown, the GTK3 main window is disabled and close requests are ignored. The KDE dialog in turn also sets the LO window as transient parent. Together, this makes the illusion perfect and the KDE dialog behaves like a modal dialog. This works properly also with multiple LO main windows, and only individual windows will get blocked as one would expect. Functionality wise, most of the features of the KDE4 dialog are supported. You can pick files and folders, and save files under a new name. Some custom checkbox widgets are supported, but lists, buttons and preview widgets are not yet implemented. Also, loading remote files via KIO is not possible yet. Change-Id: I1a97cf7c272307a19ace4222d5f12253bc722829 Reviewed-on: https://gerrit.libreoffice.org/47718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>