mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Find files - search text in *.ods
This commit is contained in:
parent
e383fb0a6e
commit
69d25ee337
3 changed files with 16 additions and 4 deletions
|
|
@ -394,7 +394,7 @@ implementation
|
|||
|
||||
uses
|
||||
LCLProc, LCLType, LConvEncoding, StrUtils, HelpIntfs, fViewer, fMain,
|
||||
uLng, uGlobs, uShowForm, uDCUtils, uFileSourceUtil,
|
||||
uLng, uGlobs, uShowForm, uDCUtils, uFileSourceUtil, uOfficeXML,
|
||||
uSearchResultFileSource, uFile, uFileProperty, uColumnsFileView,
|
||||
uFileViewNotebook, uKeyboard, uOSUtils, uArchiveFileSourceUtil,
|
||||
DCOSUtils, RegExpr, uDebug, uShowMsg, uConvEncoding, uColumns,
|
||||
|
|
@ -667,7 +667,7 @@ begin
|
|||
cmbFileSizeUnit.Items.Add(rsSizeUnitGBytes);
|
||||
cmbFileSizeUnit.Items.Add(rsSizeUnitTBytes);
|
||||
|
||||
cbOfficeXML.Hint := StripHotkey(cbOfficeXML.Caption) + ' (*.docx, *.odt)';
|
||||
cbOfficeXML.Hint := StripHotkey(cbOfficeXML.Caption) + ' ' + OFFICE_FILTER;
|
||||
|
||||
// fill search depth combobox
|
||||
cmbSearchDepth.Items.Add(rsFindDepthAll);
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ begin
|
|||
Result := False;
|
||||
if sData = '' then Exit;
|
||||
|
||||
if FSearchTemplate.OfficeXML and MatchesMaskList(sFileName, '*.docx;*.odt') then
|
||||
if FSearchTemplate.OfficeXML and OfficeMask.Matches(sFileName) then
|
||||
begin
|
||||
if LoadFromOffice(sFileName, S) then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -26,7 +26,13 @@ unit uOfficeXML;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils;
|
||||
Classes, SysUtils, uMasks;
|
||||
|
||||
var
|
||||
OfficeMask: TMaskList;
|
||||
|
||||
const
|
||||
OFFICE_FILTER = '(*.docx, *.odt, *.ods)';
|
||||
|
||||
function LoadFromOffice(const FileName: String; out AText: String): Boolean;
|
||||
|
||||
|
|
@ -233,5 +239,11 @@ begin
|
|||
Result:= LoadFromOpenOffice(FileName, AText);
|
||||
end;
|
||||
|
||||
initialization
|
||||
OfficeMask:= TMaskList.Create('*.docx;*.odt;*.ods');
|
||||
|
||||
finalization
|
||||
OfficeMask.Free;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue