<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:680622576;
mso-list-type:hybrid;
mso-list-template-ids:-397272212 1924536592 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"\(%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1
{mso-list-id:1204977458;
mso-list-type:hybrid;
mso-list-template-ids:848451790 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l1:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>The example I am using is building SimpleBootstrap_cpp.cxx as a Visual Studio Console application.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>It builds. But it complains …. It has two major complaints, which I can solve by:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo3'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>(1)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='color:#1F497D'>An apparent conclusion is that a console application in C++, Visual Studio<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Has to initialize cppuhelper::ServiceManager::Data<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Who can show me an example?<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo3'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>(2)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='color:#1F497D'>Or this application has to work with legacy format for services.rdb, types.rdb etc..<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Who can show me an example? And if I spend time working up legacy formats of services.rdb… will that work? Or will further down code sequence complain again that it needs cppuhellper::ServiceManager::Data?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> LibreOffice [mailto:libreoffice-bounces@lists.freedesktop.org] <b>On Behalf Of </b>nicholas ferguson<br><b>Sent:</b> Monday, September 22, 2014 4:28 PM<br><b>To:</b> 'libreoffice'<br><b>Subject:</b> RE: #3 can someone spot problem with simplebootstrap_cpp.cxx<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I tracked down this problem further. In processing<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>C:/cygwin64/home/lo/master/instdir/URE/misc/services.rdb<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>In cppuhelper::ServiceManager::readRdbFile()<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Try{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Parser(……,&data) BUT data is null<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> So this code falls through to<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> readLegacyRdbFile<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>And that function doesn’t handle services.rdb<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>So question: what haven’t I done? <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Is there a function to call that will set the variable ‘data’ to a good value.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>‘data’ appears to be a complicated structure.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> nicholas ferguson [<a href="mailto:nicholasferguson@wingarch.com">mailto:nicholasferguson@wingarch.com</a>] <br><b>Sent:</b> Monday, September 22, 2014 4:18 PM<br><b>To:</b> 'libreoffice'<br><b>Subject:</b> RE: #2 can someone spot problem with simplebootstrap_cpp.cxx<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>I tried the following:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I uninstalled LibreOffice in c:\Program Files (x86)<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Then added this code to SimpleBootstrap_cpp.cxx<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>putenv(“UNO_PATH=c:/cygwin64/home/lo/master/instdir”);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>But same error msg as below:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>"cannot open C:/cygwin64/home/lo/master/instdir/URE/misc/services.rdb"<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> nicholas ferguson [<a href="mailto:nicholasferguson@wingarch.com">mailto:nicholasferguson@wingarch.com</a>] <br><b>Sent:</b> Monday, September 22, 2014 3:54 PM<br><b>To:</b> 'libreoffice'<br><b>Subject:</b> can someone spot problem with simplebootstrap_cpp.cxx<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>In odk sample file, SimpleBootstrap_cpp.cxx<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Reference< XComponentContext > xContext( ::cppu::bootstrap() ); CALLS<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Reference< XComponentContext > SAL_CALL bootstrap() AND AT CODE<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> char const * p1 = cppuhelper_detail_findSofficePath(); RETURNED VALUE IS <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "C:\Program Files (x86)\LibreOffice 4\program"<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> THEN<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> // create default local component context<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Reference< XComponentContext > xLocalContext(<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> defaultBootstrap_InitialComponentContext() ); CALLS<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> css::uno::Reference< css::uno::XComponentContext ><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const & iniUri) AND AT CODE<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> smgr->init(getBootstrapVariable(bs, "UNO_SERVICES")); RETURN VALUE IS AN EXCEPTION <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> "cannot open C:/cygwin64/home/lo/master/instdir/URE/misc/services.rdb" <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> <o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l1 level1 lfo2'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='color:#1F497D'>this file does exist: C:/cygwin64/home/lo/master/instdir/URE/misc/services.rdb<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Question: Can someone tell me what needs to be corrected? Do I add an env variable? <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> nicholas ferguson [<a href="mailto:nicholasferguson@wingarch.com">mailto:nicholasferguson@wingarch.com</a>] <br><b>Sent:</b> Monday, September 22, 2014 8:51 AM<br><b>To:</b> 'libreoffice'<br><b>Subject:</b> Simple Visual Studio Project (console application) with example of opening/closing scalc doc and printing out formulas in a worksheet, to stdout?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi<o:p></o:p></p><p class=MsoNormal>Can anyone send me that kind of example? <o:p></o:p></p><p class=MsoNormal>I have libreoffice built in debug mode (--enable-dbgutil), on a windows platform.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>You copy paste it. If you email it… zip or tar has to be renamed to *.txt Otherwise Norton eats it.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>