* Added rational util functions used by Fraction class not
available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
1. fraction.IsValid() -- rational only allow valid values, ie
denominator() != 0
2. rational.denominator() == 0 -- always false
3. rational.denominator() < 0 -- always false but implementation
detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
boost::rational throws the exception boost::bad_rational
Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
This API seems to be simplest in the long run where we'll want to be
able to select between rendering slides/notes/both/embedded objects,
and maybe even adding the option of switching between continuous
and single page mode in writer (although I have no idea how hard
getting a single page mode out of writer would be).
Change-Id: I5bdfdb61854c37281c6992c8f3ed1c50c8aa0919
By default (i.e. for writer) we can just return an empty string,
and we only actually need to implement ITiledRenderable's
getPartName for components that actually support it (i.e. calc/impress).
Change-Id: I8b381e5d7a8000638b02f763b4bea8ef0226f8e0
Otherwise we get segfaults in cppu::idefaultConstructElements when exiting,
in addition to complaints of:
ignoring GError "Operation not supported" for <***RECURSION DETECTED***/log.txt>
Change-Id: If2f56873f50ba957288d1e5591db967d248ee7a4
This is the expected format for gtk+ pixbufs which is currently
the primary target. We could potentially allow the user to choose
the format via LibLO -- but we want to eventually allow passing
in a buffer (rather than passing out an LO owned buffer) anyway, so
should add that then.
Change-Id: I8427925a94366917fa82fb8ea28e7dbb3fa1840d
The buffer width could be larger than the desired rendering
width, hence we need to give the client access to the rowstride.
Change-Id: Ic63c1f455c89960164e076ed2528d43e64e81a40
We still need some way of managing the buffers properly rather
than just keeping a static reference to the last buffer
that was rendered.
Change-Id: I17940c758948aa9418f4e0216ecd253d128cd04f
We still need to add functions for getting dimensions of documents
etc. for this to be truly useful, this is also only usable for writer
documents for now.
Change-Id: I07812c9b72caca71dfd509705af48c1d355cb2f8
The saveAsWithOptions/saveAs split existed for reasons of historical
API compatibility. Since we're breaking the API currently we can
now get a clean start, and get rid of the redundant saveAs, and
make saveAsWithOptions the standard saveAs function.
Change-Id: Ia3e2294a8604cab08e95b07544c9d10d42dd1152
Otherwise, none of the associated SfxViewFrame, SfxBaseController,
SfxObjectShell, SfxMedium etc would get destroyed which would ultimately
lead to the .~lock.foo file not being deleted upon exit.
But for this to work, the client code has to make sure that its
LibreOfficeDocument instance gets destroyed when it finishes its thing.
Change-Id: Id45eda526c1496712e4314a947e994eba5c3fa68
To not break API compatibility of libLO, add a new saveAsWithOptions
function and revert the old saveAs to initial state.
Change-Id: If245c0261a932b6ed5d65e20cb1b6d8bd1c50ce6