[Libreoffice] Cannot save .ods and .odt files
Kevin Hunter
hunteke at earlham.edu
Mon Mar 7 04:02:30 PST 2011
At 3:11am -0500 Mon, 07 Mar 2011, Francois Tigeot wrote:
> Something has been bothering me for a while: ever since I succeeded
> in building a LibreOffice binary for DragonFly BSD, I haven't been
> able to save OpenDocument format files.
>
> The dialog box just closes itself and reopens half a second later.
> No file is written to disk.
>
> Saving .fods and .fodt files works fine.
>
> How can I know what exactly is going wrong ?
Are you asking about inserting debugging statements? If so, then you
may appreciate the OSL_TRACE macro, which has a signature exactly like
printf. (And if not, please allow me to hijack this thread to explain
what I recently figured out for anyone else who may find this useful.)
OSL_TRACE( "%d: %s = %s\n", __LINE__, "myvar", myvar );
To enable that in a module output (for example sc), build with the debug
flags:
$ . LinuxX86-64Env.Set.sh
$ cd sc
$ build debug=true dbglevel=2
I haven't yet messed with other dbglevels, but you could start from 1
and see if any other levels better fit your needs. And clearly update
the LinuxX... bit to whatever's pertinent for you.
Then, the code-build cycle could be as simple as adding an OSL_TRACE and
executing that build command again.
*Note that for debugging like this, after you've run "make dev-install"
in the root directory, you don't need to execute it again after building
a follow-up. So, a build, code, and debug run on my machine might look
like:
$ make clean
$ make # wait for 2+ hours on my machine
$ make dev-install
$ LODEV_PROG="$(pwd)/install/program/soffice"
$ . LinuxX86-64Env.Set.sh
$ cd sc
$ $LODEV_PROG # run the program
# make a code change
$ build debug=true dbglevel=2
$ $LODEV_PROG # run the program
# make a code change
$ build debug=true dbglevel=2
$ $LODEV_PROG # run the program
# etc ...
Hope this helps,
Kevin
More information about the LibreOffice
mailing list