|
Albert Thuswaldner |
|
|
Hi,
This patch removes the duplicate Get/Set methods in appoptio.hxx which the vba api uses. There was a long discussion back in the day about this: http://lists.freedesktop.org/archives/libreoffice/2011-June/013114.html I CC:ing Noel Power if he as some opinion regarding this. Now to the problem with this patch: This patch makes the build fail in when linking vbaobj.uno.so: /home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o: In function `ScVbaApplication::getSheetsInNewWorkbook()': /home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:942: undefined reference to `ScModule::GetDefaultsOptions()' /home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o: In function `ScVbaApplication::setSheetsInNewWorkbook(long)': /home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:955: undefined reference to `ScModule::GetDefaultsOptions()' collect2: ld returned 1 exit status make[1]: *** [/home/thuswa/work/libo2/workdir/unxlngi6.pro/LinkTarget/Library/vbaobj.uno.so] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [sc] Error 2 I cant find a logical reason why this fails. The "scmod.hxx" which defines the symbol is included as before, also considering the minimal changes that I have made to the file: diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index d0201a4..478e8f4 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -79,7 +79,7 @@ #include "global.hxx" #include "scmod.hxx" #include "docoptio.hxx" -#include "appoptio.hxx" +#include "defaultsoptions.hxx" #include <osl/file.hxx> #include <rtl/instance.hxx> @@ -939,8 +939,8 @@ ScVbaApplication::setEnableCancelKey(sal_Int32 /*lEnableCancelKey*/) throw (uno: sal_Int32 SAL_CALL ScVbaApplication::getSheetsInNewWorkbook() throw (uno::RuntimeException) { - const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions(); - return rAppOpt.GetTabCountInNewSpreadsheet(); + const ScDefaultsOptions& rOpt = SC_MOD()->GetDefaultsOptions(); + return rOpt.GetInitTabCount(); } void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWorkbook ) throw (script::BasicErrorException, uno::RuntimeException) @@ -952,8 +952,8 @@ void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWor } else { - ScAppOptions& rAppOpt = const_cast< ScAppOptions& >(SC_MOD()->GetAppOptions()); - rAppOpt.SetTabCountInNewSpreadsheet( SheetsInNewWorkbook ); + ScDefaultsOptions& rOpt = const_cast< ScDefaultsOptions& >(SC_MOD()->GetDefaultsOptions()); + rOpt.SetInitTabCount( SheetsInNewWorkbook ); } } Is the vba part of the code treated in some special way? Wild guess: all symbols are not automatically exported to here (don't know if that is even possible)? Or what might be the problem? Thanks for your help. /Albert _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Markus Mohrhard |
|
|
Hello Albert,
2012/4/17 Albert Thuswaldner <[hidden email]>: > Hi, > This patch removes the duplicate Get/Set methods in appoptio.hxx which > the vba api uses. There was a long discussion back in the day about > this: > > http://lists.freedesktop.org/archives/libreoffice/2011-June/013114.html > > I CC:ing Noel Power if he as some opinion regarding this. > > Now to the problem with this patch: > > This patch makes the build fail in when linking vbaobj.uno.so: > > /home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o: > In function `ScVbaApplication::getSheetsInNewWorkbook()': > /home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:942: > undefined reference to `ScModule::GetDefaultsOptions()' > /home/thuswa/work/libo2/workdir/unxlngi6.pro/CxxObject/sc/source/ui/vba/vbaapplication.o: > In function `ScVbaApplication::setSheetsInNewWorkbook(long)': > /home/thuswa/work/libo2/sc/source/ui/vba/vbaapplication.cxx:955: > undefined reference to `ScModule::GetDefaultsOptions()' > collect2: ld returned 1 exit status > make[1]: *** [/home/thuswa/work/libo2/workdir/unxlngi6.pro/LinkTarget/Library/vbaobj.uno.so] > Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [sc] Error 2 > > I cant find a logical reason why this fails. The "scmod.hxx" which > defines the symbol is included as before, also considering the minimal > changes that I have made to the file: > You need to export GetDefaultsOptions with SC_DLLPUBLIC in scmod.hxx. Regards, Markus _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Albert Thuswaldner |
|
|
Hi Markus,
On Tue, Apr 17, 2012 at 21:10, Markus Mohrhard <[hidden email]> wrote: > > You need to export GetDefaultsOptions with SC_DLLPUBLIC in scmod.hxx. > Ok, that was simple enough. I have of course seen this SC_DLLPUBLIC thing before, but never really understood the need for that. Now I do, thanks Markus! Please find the updated patch attached. /Albert _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Kohei Yoshida |
|
|
Hi Albert,
On Tue, 2012-04-17 at 21:44 +0200, Albert Thuswaldner wrote: > On Tue, Apr 17, 2012 at 21:10, Markus Mohrhard > <[hidden email]> wrote: > > > > You need to export GetDefaultsOptions with SC_DLLPUBLIC in scmod.hxx. > > > > Ok, that was simple enough. I have of course seen this SC_DLLPUBLIC > thing before, but never really understood the need for that. Now I do, > thanks Markus! > > Please find the updated patch attached. I would be okay to just push this patch as-is, but let's wait for Noel's blessing just in case. ;-) Kohei -- Kohei Yoshida, LibreOffice hacker, Calc _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Noel Power-3 |
|
|
On 17/04/12 20:59, Kohei Yoshida wrote:
> Hi Albert, > > On Tue, 2012-04-17 at 21:44 +0200, Albert Thuswaldner wrote: > > I would be okay to just push this patch as-is, but let's wait for Noel's > blessing just in case. ;-) bless you my son, yeah it looks ok :-) thanks, Noel _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
|
Michael Meeks-2 |
|
|
On Wed, 2012-04-18 at 09:31 +0100, Noel Power wrote: > On 17/04/12 20:59, Kohei Yoshida wrote: > > On Tue, 2012-04-17 at 21:44 +0200, Albert Thuswaldner wrote: > > I would be okay to just push this patch as-is, but let's wait for Noel's > > blessing just in case. ;-) > > bless you my son, yeah it looks ok :-) With Kohei & Noel's blessing I pushed it :-) HTH, Michael. -- [hidden email] <><, Pseudo Engineer, itinerant idiot _______________________________________________ LibreOffice mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/libreoffice |
| Powered by Nabble | Edit this page |