Commit Graph

43 Commits

Author SHA1 Message Date
Richard Heck
1a7b7f6541 Fix some problems in makeAbsPath():
i.  It didn't handle a leading "~"
ii. It wrongly handled a string of ../../etc when this took us back to the root directory.
Fix for (i) borrowed from expandPath(). The other is just logic.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22687 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:41:19 +00:00
Richard Heck
5bef46157c Add some comments, and change enum terminology to reflect actual purpose.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22685 a592a061-630c-0410-9148-cb99ea01b6c8
2008-01-26 20:25:25 +00:00
Abdelrazak Younes
1447a7bf98 Now that exceptions are allowed, handle gracefully the case where a Buffer temp directory could not be created. As a bonus, the user will get an informative message.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22196 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 18:37:13 +00:00
Abdelrazak Younes
9439b6e6e0 * get rid of support::absolutePath()
* remove FileName.h inclusion from filetools.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22188 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 16:04:46 +00:00
Abdelrazak Younes
96ee270933 transfer os::is_absolute_path() to FileName::isAbsolute().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22187 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 15:15:37 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
c66e214724 Transfer getcwd() implementation to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22164 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 10:18:00 +00:00
Abdelrazak Younes
86506a80eb Simplify FileName::tempName().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22163 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 09:52:36 +00:00
Abdelrazak Younes
4020357dd2 Transfer tempName() implementation to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22161 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 07:52:38 +00:00
Abdelrazak Younes
2ce8ad5e05 Inverse logic wrongly set in rev 22151.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22153 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-14 22:33:15 +00:00
Abdelrazak Younes
d81b5c2994 Use FileName::createDirectory() instead of support::mkdir().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22151 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-14 21:13:38 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Abdelrazak Younes
e017570aa8 Introducing FileNameList, cleanup some headers and put back dirList() into FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21965 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-05 10:32:49 +00:00
Peter Kümmel
aa8b513c39 compile also without pch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21907 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 09:59:26 +00:00
Peter Kümmel
aef7e129e7 move funtion with std::vector to filetools
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21903 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-02 09:19:43 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
Abdelrazak Younes
89435b2857 * makeLatexName(): port to FileName.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21848 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 18:07:09 +00:00
Abdelrazak Younes
c886bc68c2 * FileName:
- introduce changeExtension(): the goal is to replace progressively the one in filetools.cpp
- get rid of internal_path() checking for Win32 as the path is always normalized with slashes with QFileInfo.

* BufferParams: get rid of filepath member. This was used only once and was fixing a path in BufferParam was wrong anyway.

* Buffer::filePath(): always regenerate instead of caching it in BufferParams.

 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21847 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 15:25:07 +00:00
Abdelrazak Younes
f07105d0e5 * FileName:
- removeFile(): replace unlink
- copyTo(): add 'overwrite' parameter.

* getcwd.cpp: simplify.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 09:01:49 +00:00
Abdelrazak Younes
c23db901ec Getting rid of normalizePath() which is unneeded for FileName purpose (the path is always normalized internally). This commit frees up src/ from boost::filesystem. Some remaining references stays in src/client and src/tex2lyx.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21817 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-27 10:01:34 +00:00
Abdelrazak Younes
3df451b6d0 Introducing FileName::dirList() to replace the one in filetools.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21816 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-27 09:43:30 +00:00
André Pönitz
d95451ae5c s/isFileReadable/isReadableFile;
introduce isReadableDirectory
replace isReadable by either isReadableFile or isReadableDirectory
remove isReadable


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21769 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 11:18:16 +00:00
Enrico Forestieri
6820b61afa Fix some other thinkos in r21048
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21757 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 01:34:46 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
André Pönitz
cf7b238479 more use of support::FileName.
Would be nice if people tested read/write, and Bo perhaps the 'embedded'
feature?



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21492 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 19:52:11 +00:00
Bo Peng
6e35955ea3 make trunk compile
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21086 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 19:48:53 +00:00
André Pönitz
fbb3abfeac cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21085 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 17:35:27 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
André Pönitz
a02653e4dd isome more FileName shuffling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21048 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 23:03:51 +00:00
André Pönitz
988f372843 use FileName::isDirectory()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21047 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 21:10:35 +00:00
Bo Peng
22ce34e5d5 Move two minizip functions from filetools.cpp to its own file minizip/zipunzip.cpp, covered by minizip's original license
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20025 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-03 21:09:11 +00:00
André Pönitz
f82c3e8e65 xpm -> png
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19922 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 20:09:12 +00:00
André Pönitz
212f6d10df "proper" fix for utime use in filetools.cpp
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19711 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 23:16:49 +00:00
André Pönitz
61e6445f2e compile fix for ubuntu, probably not generic enough
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19710 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 23:05:48 +00:00
Bo Peng
bb045a4fba Fix file inclusion in src/support/filetools.cpp under mac
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19707 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 22:10:58 +00:00
Peter Kümmel
281f44e295 minizip fixes for msvc and cmake
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19700 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 21:09:45 +00:00
Bo Peng
52fa9e584e Embedding feature patch 1: add zipFiles and unzipToDir to support
* src/support/lyxlib.h: add makedir(), used by unzipToDir
	* src/support/filetools.[h|cpp]: add zipFiles() and unzipToDir()
	* src/support/mkdir.cpp: add makedir() and mymkdir(char*).
	* src/support/minizip: add zlib-1.2.3/contrib/minizip files to lyx svn
	* src/support/minizip/iowin32.h
	* src/support/minizip/ioapi.c
	* src/support/minizip/zip.c
	* src/support/minizip/unzip.c
	* src/support/minizip/crypt.h
	* src/support/minizip/ioapi.h
	* src/support/minizip/zip.h
	* src/support/minizip/unzip.h
	* src/support/minizip/iowin32.c
	* development/scons/scons_manifest.py: adjust scons
	* development/scons/SConstruct


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19692 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 14:48:47 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Jean-Marc Lasgouttes
9b3aa538fc [the "translation" patch series] Part 3: improving the loading of localized files
* src/support/filetools.cpp (i18nLibFileSearch): use a trick to find
	out the name of the current translation. 

	* po/*.po: add the entry necessary for the above trick.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19350 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-07 20:39:55 +00:00
Jürgen Spitzmüller
8b9972cbba Fix bug 2753: LyX doesn't support paths and filenames with parentheses
* src/frontends/qt4/QBibtex.cpp:
* src/frontends/qt4/QExternal.cpp:
* src/frontends/qt4/QGraphics.cpp:
* src/frontends/qt4/QInclude.cpp:
	- remove path validator

* src/support/filetools.{cpp,h}:
	- new validator for exporting LaTeX files

* src/insets/ExternalSupport.cpp:
* src/insets/InsetBibtex.cpp:
* src/insets/InsetGraphics.cpp:
* src/insets/InsetInclude.cpp:
	- use validator when exporting a LaTeX file

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18897 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-26 16:55:42 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
Bo Peng
f212b48335 Rename .C ==> .cpp for files in src/support, part two
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18025 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 05:13:44 +00:00