Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
glom
Commits
25f131ae
Commit
25f131ae
authored
Mar 31, 2016
by
Murray Cumming
Browse files
db_utils_export: Put These in their own namespace.
parent
8f94beb0
Changes
6
Hide whitespace changes
Inline
Side-by-side
glom/appwindow.cc
View file @
25f131ae
...
...
@@ -2050,7 +2050,7 @@ void AppWindow::on_menu_file_save_as_example()
FoundSet
found_set
;
found_set
.
m_table_name
=
table_name
;
auto
const_sequence
=
Utils
::
const_list
(
sequence
);
DbUtils
::
export_data_to_vector
(
document
,
example_rows
,
found_set
,
const_sequence
);
DbUtils
Export
::
export_data_to_vector
(
document
,
example_rows
,
found_set
,
const_sequence
);
//std::cout << " debug after row_text=" << row_text << std::endl;
document
->
set_table_example_data
(
table_name
,
example_rows
);
...
...
glom/frame_glom.cc
View file @
25f131ae
...
...
@@ -587,7 +587,7 @@ void Frame_Glom::on_menu_file_export()
return
;
}
DbUtils
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
const_sequence
);
DbUtils
Export
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
const_sequence
);
}
void
Frame_Glom
::
on_menu_file_import
()
...
...
glom/libglom/db_utils_export.cc
View file @
25f131ae
...
...
@@ -29,10 +29,9 @@
namespace
Glom
{
namespace
DbUtils
namespace
DbUtils
Export
{
//TODO: Reduce copy/pasting in these export_data_to_*() methods:
void
export_data_to_vector
(
const
std
::
shared_ptr
<
Document
>&
document
,
Document
::
type_example_rows
&
the_vector
,
const
FoundSet
&
found_set
,
const
Document
::
type_list_const_layout_groups
&
sequence
)
{
...
...
@@ -183,6 +182,6 @@ void export_data_to_stream(const std::shared_ptr<Document>& document, std::ostre
}
}
}
//namespace DbUtils
}
//namespace DbUtils
Export
}
//namespace Glom
glom/libglom/db_utils_export.h
View file @
25f131ae
...
...
@@ -28,14 +28,14 @@
namespace
Glom
{
namespace
DbUtils
namespace
DbUtils
Export
{
void
export_data_to_vector
(
const
std
::
shared_ptr
<
Document
>&
document
,
Document
::
type_example_rows
&
the_vector
,
const
FoundSet
&
found_set
,
const
Document
::
type_list_const_layout_groups
&
sequence
);
void
export_data_to_stream
(
const
std
::
shared_ptr
<
Document
>&
document
,
std
::
ostream
&
the_stream
,
const
FoundSet
&
found_set
,
const
Document
::
type_list_const_layout_groups
&
sequence
);
}
//namespace DbUtils
}
//namespace DbUtils
Export
}
//namespace Glom
...
...
tests/export/test_selfhosting_new_then_export.cc
View file @
25f131ae
...
...
@@ -50,7 +50,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
group
->
add_item
(
field_year
);
std
::
stringstream
the_stream
;
Glom
::
DbUtils
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
layout_groups
);
Glom
::
DbUtils
Export
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
layout_groups
);
const
auto
text
=
the_stream
.
str
();
std
::
cout
<<
"debug: "
<<
text
<<
std
::
endl
;
...
...
tests/export/test_selfhosting_new_then_export_with_big_num.cc
View file @
25f131ae
...
...
@@ -47,7 +47,7 @@ static bool test(Glom::Document::HostingMode hosting_mode)
group
->
add_item
(
field
);
std
::
stringstream
the_stream
;
Glom
::
DbUtils
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
layout_groups
);
Glom
::
DbUtils
Export
::
export_data_to_stream
(
document
,
the_stream
,
found_set
,
layout_groups
);
const
auto
text
=
the_stream
.
str
();
if
(
text
.
empty
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment