Skip to content

Commit

Permalink
Boost License Added.
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragxel committed Mar 16, 2015
1 parent f97a32b commit 44495a6
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
23 changes: 23 additions & 0 deletions LICENSE_1_0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions detail/document_exception.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _DOCUMENT_EXCEPTION_HPP
#define _DOCUMENT_EXCEPTION_HPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file ../LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

namespace boost {

class document_exception : public std::logic_error {
Expand Down
5 changes: 5 additions & 0 deletions detail/document_file_format.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _DOCUMENT_FILE_FORMAT_HPP
#define _DOCUMENT_FILE_FORMAT_HPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file ../LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

namespace boost {

struct document_file_format {
Expand Down
5 changes: 5 additions & 0 deletions detail/oo_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _OO_FUNCTIONS_CPP
#define _OO_FUNCTIONS_CPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file ../LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#ifdef _WIN32
#define OFFAPI "C:\\Program Files\\OpenOffice.org 3\\basis\\program\\offapi.rdb"
#elif _WIN64
Expand Down
5 changes: 5 additions & 0 deletions detail/oo_functions.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _OO_FUNCTIONS_HPP
#define _OO_FUNCTIONS_HPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file ../LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <string>
#include <boost/filesystem.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
Expand Down
5 changes: 5 additions & 0 deletions document.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _DOCUMENT_CPP
#define _DOCUMENT_CPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include "document.hpp"
#include "detail/oo_functions.hpp"

Expand Down
5 changes: 5 additions & 0 deletions document.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef _DOCUMENT_HPP
#define _DOCUMENT_HPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/filesystem.hpp>
#include "detail/document_exception.hpp"
#include "detail/document_file_format.hpp"
Expand Down
12 changes: 12 additions & 0 deletions test.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#ifndef _TEST_CPP
#define _TEST_CPP

// Copyright Anurag Ghosh 2015.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <iostream>
#include "document.hpp"

Expand Down Expand Up @@ -104,16 +112,20 @@ int main(int argc, char **argv) {

// Sanity Checks
negative_try_opening_null();
negative_try_exporting_null();
negative_try_closing_null();
negative_closing_unopened_document(b);
negative_absurd_path_opening();

// Permissions related checks
negative_opening_file_without_permission(d);
negative_exporting_file_without_permission(d);
negative_closing_file_without_permission(d);

// Positive Checks.
working_on_multiple_documents(b,c);

return 0;
}

#endif

0 comments on commit 44495a6

Please sign in to comment.