You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC
svn commit: r1374979 [14/29] - in /incubator/ooo/branches/writer001: ./
ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/
ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/
ext_libraries/serf/prj/ ext_sources/ extras...
Modified: incubator/ooo/branches/writer001/extras/l10n/source/zh-CN/localize.sdf
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/extras/l10n/source/zh-CN/localize.sdf?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/extras/l10n/source/zh-CN/localize.sdf (original)
+++ incubator/ooo/branches/writer001/extras/l10n/source/zh-CN/localize.sdf Mon Aug 20 11:46:19 2012
@@ -4645,17 +4645,17 @@ basic source\app\basic.src 0 querybox ID
basic source\app\basic.src 0 querybox IDS_ASKRELOAD 0 zh-CN æä»¶å¨æ°æ®åªä»ä¸è¢«æ¹å¨ãéè½½ï¼ æµè¯å·¥å
· 20120314 15:13:33
basic source\app\basic.src 0 querybox IDS_ASKDIRTYRELOAD 0 zh-CN æä»¶å¨æ°æ®åªä»ä¸è¢«ä¿®æ¹\nåç¼è¾å¨ä¸ãéè½½ï¼ æµè¯å·¥å
· 20120314 15:13:33
basic source\app\basic.src 0 querybox IDS_RUNNING 0 zh-CN BASICè¿å¨è¿è¡ï¼éåºä¹ï¼ æµè¯å·¥å
· 20120314 15:13:33
-basic source\app\basic.src 0 querybox IDS_LOSS_OF_INFORMATION 0 zh-CN Saving in an external format causes information loss. æµè¯å·¥å
· 20120314 15:13:33
+basic source\app\basic.src 0 querybox IDS_LOSS_OF_INFORMATION 0 zh-CN åå¨ä¸ºå¤é¨ææ¡£æ ¼å¼é æäºä¿¡æ¯ä¸¢å¤± æµè¯å·¥å
· 20120314 15:13:33
basic source\app\basic.src 0 infobox IDS_NOT_YET_IMPLEMENTED 0 zh-CN å°æªæ§è¡ 20120314 15:13:33
basic source\app\basic.src 0 string IDS_WARNING1 0 zh-CN è¦å 20120314 15:13:33
basic source\app\basic.src 0 string IDS_ERROR1 0 zh-CN é误 20120314 15:13:33
basic source\app\basic.src 0 string IDS_ERROR2 0 zh-CN å¨è¡ä¸ 20120314 15:13:33
basic source\app\basic.src 0 string IDS_NO_LONGNAME 0 zh-CN Hid.Lst䏿²¡æè®°å½ 20120314 15:13:33
basic source\app\basic.src 0 string IDS_WARNING_PREFIX 0 zh-CN è¦å 20120314 15:13:33
-basic source\app\basic.src 0 string IDS_OBJECT 0 zh-CN Object 20120314 15:13:33
+basic source\app\basic.src 0 string IDS_OBJECT 0 zh-CN 对象 20120314 15:13:33
basic source\app\basic.src 0 string IDS_EDIT_VAR 0 zh-CN Edit ($Arg1) 20120314 15:13:33
basic source\app\basic.src 0 string IDS_APPNAME 0 zh-CN æµè¯å·¥å
· 20120314 15:13:33
-basic source\app\basic.src 0 string IDS_APPNAME2 0 zh-CN VCLTestTool 20120314 15:13:33
+basic source\app\basic.src 0 string IDS_APPNAME2 0 zh-CN VCL æµè¯å·¥å
· 20120314 15:13:33
basic source\app\basic.src 0 string IDS_APPMODE_BREAK 0 zh-CN Break 20120314 15:13:33
basic source\app\basic.src 0 string IDS_APPMODE_RUN 0 zh-CN è¿è¡ 20120314 15:13:33
basic source\app\basic.src 0 string IDS_NONAME 0 zh-CN æªå½åç 20120314 15:13:33
@@ -4776,7 +4776,7 @@ basic source\app\basic.src 0 fixedtext L
basic source\app\basic.src 0 floatingwindow LOAD_CONF 156 zh-CN Reading Configuration Files 20120314 15:13:33
basic source\app\basmsg.src 0 string S_PROG_START 0 zh-CN Program start: ($Arg1); ($Arg2) 20120314 15:13:33
basic source\app\basmsg.src 0 string S_ERROR_OUTSIDE_TESTCASE 0 zh-CN Error outside of test case 20120314 15:13:33
-basic source\app\basmsg.src 0 string S_WARNING_PREFIX 0 zh-CN Warning: 20120314 15:13:33
+basic source\app\basmsg.src 0 string S_WARNING_PREFIX 0 zh-CN è¦å 20120314 15:13:33
basic source\app\svtmsg.src 0 string S_GPF_ABORT 0 zh-CN Program aborted with GPF 20120314 15:13:33
basic source\app\svtmsg.src 0 string S_APP_SHUTDOWN 0 zh-CN Application has been shut down 20120314 15:13:33
basic source\app\svtmsg.src 0 string S_SID_EXECUTE_FAILED_NO_DISPATCHER 0 zh-CN Slot ID cannot be executed. No ActiveDispatcher 20120314 15:13:33
@@ -34299,7 +34299,7 @@ helpcontent2 source\text\schart\01\05040
helpcontent2 source\text\schart\01\05040201.xhp 0 help hd_id922204 0 zh-CN ç±»å 20120314 15:13:33
helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id59225 0 zh-CN \<ahelp hid=\".\"\>å¯¹äºæäºç±»åçè½´ï¼ä½ å¯ä»¥éæ©æ ¼å¼åä¸ºææ¬ææ¥æç±»åè½´æç±»åèªå¨æ£æµã\</ahelp\> 对äºâæ¥æâç±»ååæ è½´ï¼ä½ å¯ä»¥è®¾ç½®ä¸é¢çé项ã 20120314 15:13:33
helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id1159225 0 zh-CN æ¾ç¤ºå¨å»åº¦æ«å°¾çæå°åæå¤§å¼ã 20120314 15:13:33
-helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id2259225 0 zh-CN å¯ä»¥è®¾ç½®å¤©ï¼ææå¹´åå度å¼ã 20120314 15:13:33
+helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id2259225 0 zh-CN \<ahelp hid=\".\"\>å¯ä»¥è®¾ç½®å¤©ï¼ææå¹´åå度å¼ã\</ahelp\> 20120314 15:13:33
helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id3359225 0 zh-CN \<ahelp hid=\".\"\>æå¤§é´éå¯ä»¥è®¾ä¸ºå¤å°å¤©ï¼å¤å°ææå¤å°å¹´ã\</ahelp\> 20120314 15:13:33
helpcontent2 source\text\schart\01\05040201.xhp 0 help par_id4459225 0 zh-CN \<ahelp hid=\".\"\>æå°é´éå¯ä»¥è®¾ä¸ºå¤å°å¤©ï¼å¤å°ææå¤å°å¹´ã\</ahelp\> 20120314 15:13:33
helpcontent2 source\text\schart\01\05040202.xhp 0 help tit 0 zh-CN å®ä½ 20120314 15:13:33
@@ -50296,7 +50296,7 @@ helpcontent2 source\text\shared\guide\in
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3153345 9 0 zh-CN éæ©\<emph\>æ¥ç - å·¥å
·æ - ç»å¾\</emph\>æå¼\<emph\>ç»å¾\</emph\>å·¥å
·æ ï¼å¦æå®å°æªæå¼çè¯ï¼ã 20120314 15:13:33
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3166460 2 0 zh-CN éåå¯ä»¥ç¼è¾åä¿®æ¹ç»å¾å¯¹è±¡ãç¨è¿ç§æ¹å¼å建çç»å¾å¯¹è±¡æ¯ç¢éå¾å½¢ï¼å¯ä»¥èªç±ç¼©æ¾èä¸ä¼æä»»ä½çè´¨éæå¤±ã 20120314 15:13:33
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3148491 3 0 zh-CN è¦å建ç©å½¢ï¼è¯·åå»ç©å½¢å¾æ ï¼ç¶åå°å
æ ç§»å°ææ¡£ä¸è¦æ¾ç½®ç©å½¢ä¸è§çä½ç½®ãæä¸é¼ æ é®ï¼åæ¶æå¨å°ç©å½¢ç对è§ãéæ¾é¼ æ é®åï¼ç©å½¢å³è¢«æå
¥å°ææ¡£ä¸ãè¿æ¶ç©å½¢å·²éå®ï¼å¯ä»¥éè¿ä¸ä¸æèåç¼è¾å
¶å±æ§ã 20120314 15:13:33
-helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3149164 13 0 zh-CN \<switchinline select=\"appl\"\>\<caseinline select=\"DRAW\"\>è¦ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ï¼è¯·å廿¤å¾æ ã\</caseinline\>\<caseinline select=\"IMPRESS\"\>è¦ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ï¼è¯·å廿¤å¾æ ã\</caseinline\>\<defaultinline\>ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ãåæ¢ç§»å¨é¼ æ å¹¶ç¹å»ææ¡£ï¼ä»èç»æç»å¶å¯¹è±¡ã\</defaultinline\>\</switchinline\> 20120314 15:13:33
+helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3149164 13 0 zh-CN \<switchinline select=\"appl\"\>\<caseinline select=\"DRAW\"\>è¦ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ï¼è¯·å廿¤å¾æ ã\</caseinline\>\<caseinline select=\"IMPRESS\"\>è¦ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ï¼è¯·å廿¤å¾æ ã\</caseinline\>\<defaultinline\>ç»å¶å
·æç¸åç±»åçå¤ä¸ªå¯¹è±¡ã\</defaultinline\>\</switchinline\> 20120314 15:13:33
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3148473 4 0 zh-CN å¦ææ¨æ³è¦ä»ä¸å¿å¤æå¼ç»å¾å¯¹è±¡ï¼è䏿¯ä»ä¸ä¸ªè§è½æå°å¦ä¸ä¸ªï¼è¯·å¨æå¨æ¶æä½ \<switchinline select=\"sys\"\>\<caseinline select=\"MAC\"\>Option \</caseinline\>\<defaultinline\>Alt\</defaultinline\>\</switchinline\> é®ã\<switchinline select=\"sys\"\>\<caseinline select=\"UNIX\"\>å¯¹äºæäºçªå£ç®¡çå¨ï¼æ¨å¯è½éè¦åæ¶æä½ meta é®ã\</caseinline\>\</switchinline\> 20120314 15:13:33
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id9448225 0 zh-CN æå¨æ¶æä½ Shift é®ï¼å°éå¶å建ç对象ãä¾å¦ï¼æ¨å°å¾å°ä¸ä¸ªæ£æ¹å½¢è䏿¯ç©å½¢ï¼å¾å°ä¸ä¸ªåå½¢è䏿¯æ¤åã彿¨æä½ Shift 鮿å¨ç°æå¯¹è±¡çä¸ä¸ªæ§ç¹æ¶ï¼å¯¹è±¡ç纵横æ¯ä¿æä¸åã 20120314 15:13:33
helpcontent2 source\text\shared\guide\insert_graphic_drawit.xhp 0 help par_id3153626 5 0 zh-CN è¦è®¾ç½®å¯¹è±¡çæ¾ç¤ºæ¯ä¾ï¼è¯·é¦å
ç¨éæ©å·¥å
·åå»å¯¹è±¡ä»¥éä¸å®ä»¬ã对象å¨å´å°æ¾ç¤ºå
«ä¸ªæ§ç¹ã彿å¨åä¸ªè§æ§ç¹ä¸çæä¸ªæ§ç¹æ¶ï¼å
¶å¯¹è§åºå®ä¸å¨ï¼å
¶ä½ä¸ä¸ªè§å°ç¸åºå°ç§»å¨ã彿卿æ¡è¾¹ä¸çæ§ç¹æ¶ï¼å
¶å¯¹è¾¹ä¼åºå®ä¸å¨ã 20120314 15:13:33
@@ -72307,6 +72307,7 @@ desktop source\app\desktop.src 0 string
desktop source\app\desktop.src 0 string STR_BOOTSTRAP_ERR_LANGUAGE_MISSING 0 zh-CN æ æ³ç¡®å®ç¨æ·çé¢è¯è¨ã 20120314 15:13:33
desktop source\app\desktop.src 0 string STR_BOOTSTRAP_ERR_NO_SERVICE 0 zh-CN ç»ä»¶ç®¡çå¨ä¸å¯ç¨ã 20120314 15:13:33
desktop source\app\desktop.src 0 string STR_BOOTSTRAP_ERR_NO_CFG_SERVICE 0 zh-CN é
ç½®æå¡ä¸å¯ç¨ã 20120314 15:13:33
+desktop source\app\desktop.src 0 string STR_BOOTSTRAP_ERR_MULTISESSION 0 zh-CN æ¨æå¦ä¸ä¸ªå®ä¾æ£å¨å
¶å®ç»ç«¯ä¼è¯ä¸è¿è¡ï¼è¯·å
³é该å®ä¾åéè¯ã 20120702 11:48:29
desktop source\app\desktop.src 0 string STR_ASK_START_SETUP_MANUALLY 0 zh-CN è¦ä¿®å¤æ¨çç¨åºï¼è¯·æ¨ä»å
çå¯å¨å®è£
ç¨åºæä»åæå®è£
æ°æ®çç®å½ç´æ¥å¯å¨å®è£
ç¨åºã 20120314 15:13:33
desktop source\app\desktop.src 0 string STR_CONFIG_ERR_SETTINGS_INCOMPLETE 0 zh-CN ç¨äºè®¿é®ä¸å¿é
ç½®çå¯å¨è®¾ç½®ä¸å®æ´ã 20120314 15:13:33
desktop source\app\desktop.src 0 string STR_CONFIG_ERR_CANNOT_CONNECT 0 zh-CN æ æ³åä¸å¿é
置建ç«è¿æ¥ã 20120314 15:13:33
Modified: incubator/ooo/branches/writer001/main/README
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/README?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/README (original)
+++ incubator/ooo/branches/writer001/main/README Mon Aug 20 11:46:19 2012
@@ -8,11 +8,11 @@ Apache OpenOffice (AOO)
http://incubator.apache.org/openofficeorg/
Apache OpenOffice is a very large project with many components and mainly
- implemented in C++ but also in Java, Python and other languages.
+ implemented in C++ but also in Java, Perl, Python and other languages.
Currently supported platforms include:
- UNIX variants
+ Linux variants
Windows
Mac OS X
OS/2
@@ -38,22 +38,7 @@ Building Apache OpenOffice
A comprehensive and complete building guide can be found in the project wiki under
- http://wiki.services.openoffice.org/wiki/Documentation/Building_Guide
-
- The complete list of prerequisites is documented at
-
- http://wiki.services.openoffice.org/wiki/Documentation/Building_Guide/Build_Requirements
-
- and platform specific guides for
-
- Windows:
- http://wiki.services.openoffice.org/wiki/Documentation/Building_Guide/Building_on_Windows
- Linux:
- http://wiki.services.openoffice.org/wiki/Documentation/Building_Guide/Building_on_Linux
- Mac OS X:
- http://wiki.services.openoffice.org/wiki/MacOSXBuildInstructions
- Solaris:
- http://wiki.services.openoffice.org/wiki/Documentation/Building_Guide/Building_on_Solaris
+ http://wiki.openoffice.org/wiki/Documentation/Building_Guide_AOO
With having all prerequisites in place you can simply run
@@ -61,9 +46,12 @@ Building Apache OpenOffice
autoconf
./configure <configure_switches>
./bootstrap
- cd instsetoo_native/util
+ source *.set.sh
+ cd instsetoo_native
build --all
+ Note that building OpenOffice can take several hours.
+
The default build will produce a setup version (e.g. setup program on windows, dmg on Mac OS,
rpm and deb packages on Linux, pkg packages on Solaris) and an archived version. The output
can be found in the <output> directory in instsetoo_native/<output_dir>/OpenOffice/...
Modified: incubator/ooo/branches/writer001/main/apache-commons/java/httpclient/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/apache-commons/java/httpclient/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/apache-commons/java/httpclient/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/apache-commons/java/httpclient/makefile.mk Mon Aug 20 11:46:19 2012
@@ -45,10 +45,12 @@ TARFILE_MD5=2c9b0f83ed5890af02c0df1c1776
TARFILE_ROOTDIR=commons-httpclient-3.1
-PATCH_FILES=$(PRJ)$/patches$/httpclient.patch
+PATCH_FILES= \
+ $(PRJ)$/patches$/httpclient.patch \
+ $(PRJ)$/patches$/httpclient_no_javadoc.patch
#CONVERTFILES=build.xml
-
+
OUT2CLASS=dist$/commons-httpclient.jar
COMMONS_LOGGING_JAR=..$/..$/..$/..$/$(INPATH)$/class$/commons-logging-1.1.1-SNAPSHOT.jar
Modified: incubator/ooo/branches/writer001/main/autodoc/source/parser_i/idoc/docu_pe2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/autodoc/source/parser_i/idoc/docu_pe2.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/autodoc/source/parser_i/idoc/docu_pe2.cxx (original)
+++ incubator/ooo/branches/writer001/main/autodoc/source/parser_i/idoc/docu_pe2.cxx Mon Aug 20 11:46:19 2012
@@ -491,7 +491,7 @@ SapiDocu_PE::SetCurSeeAlsoAtTagLinkText_
}
const String
- C_sSinceFormat("Correct version format: \"OOo <major>.<minor>[.<micro> if micro is not 0]\".");
+ C_sSinceFormat("Correct version format: \"AOO <major>.<minor>[.<micro> if micro is not 0]\".");
void
SapiDocu_PE::SetCurSinceAtTagVersion_OOo( DYN ary::inf::DocuToken & let_drNewToken )
@@ -521,6 +521,48 @@ SapiDocu_PE::SetCurSinceAtTagVersion_OOo
if (NOT rCommandLine.DoesTransform_SinceTag())
pCurAtTag->AddToken(let_drNewToken);
+ if (sVersion=="Apache")
+ {
+ fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_AOO;
+ }
+ else
+ fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
+}
+
+void
+SapiDocu_PE::SetCurSinceAtTagVersion_AOO( DYN ary::inf::DocuToken & let_drNewToken )
+{
+ csv_assert(pCurAtTag);
+
+ DT_TextToken * pToken = dynamic_cast< DT_TextToken* >(&let_drNewToken);
+ if (pToken == 0)
+ {
+ delete &let_drNewToken;
+ return;
+ }
+
+ const String
+ sVersion(pToken->GetText());
+ if (sVersion != "OpenOffice")
+ {
+ Cerr() << "Version information in @since tag has incorrect format.\n"
+ << "Found: Apache \"" << sVersion << "\"\n"
+ << "Correct version format: \"Apache OpenOffice <major>.<minor>[.<micro> if micro is not 0]\"."
+ << Endl();
+ exit(1);
+ }
+
+ const autodoc::CommandLine &
+ rCommandLine = autodoc::CommandLine::Get_();
+ if (NOT rCommandLine.DoesTransform_SinceTag())
+ {
+ String &
+ sValue = pCurAtTag->Access_Text().Access_TextOfFirstToken();
+ StreamLock
+ sHelp(1000);
+ sValue = sHelp() << sValue << " " << sVersion << " " << c_str;
+ }
+
fCurTokenAddFunction = &SapiDocu_PE::SetCurSinceAtTagVersion_Number;
}
@@ -609,6 +651,8 @@ bool
SapiDocu_PE::CheckVersionSyntax_OOo(const String & i_versionPart1)
{
return i_versionPart1 == "OOo"
+ OR i_versionPart1 == "Apache"
+ OR i_versionPart1 == "AOO"
OR i_versionPart1 == "OpenOffice.org";
}
Modified: incubator/ooo/branches/writer001/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx (original)
+++ incubator/ooo/branches/writer001/main/autodoc/source/parser_i/inc/s2_dsapi/docu_pe2.hxx Mon Aug 20 11:46:19 2012
@@ -143,6 +143,9 @@ class SapiDocu_PE : public TokenInterpre
void SetCurSinceAtTagVersion_OOo(
DYN ary::inf::DocuToken &
let_drNewToken );
+ void SetCurSinceAtTagVersion_AOO(
+ DYN ary::inf::DocuToken &
+ let_drNewToken );
void SetCurSinceAtTagVersion_Number(
DYN ary::inf::DocuToken &
let_drNewToken );
Modified: incubator/ooo/branches/writer001/main/automation/source/inc/rcontrol.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/automation/source/inc/rcontrol.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/automation/source/inc/rcontrol.hxx (original)
+++ incubator/ooo/branches/writer001/main/automation/source/inc/rcontrol.hxx Mon Aug 20 11:46:19 2012
@@ -285,6 +285,10 @@
#define M_IsItemEnabled ( M_WITH_RETURN | 59 )
+// TreeListBox
+#define M_Collapse ( M_WITH_RETURN | 60 )
+#define M_Expand ( M_WITH_RETURN | 61 )
+
//#define M_SOFFICE 0x0800 // Command valid for Star/Open Office
//#define M_MOZILLA 0x1000 // Command valid for Mozilla
Modified: incubator/ooo/branches/writer001/main/automation/source/server/statemnt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/automation/source/server/statemnt.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/automation/source/server/statemnt.cxx (original)
+++ incubator/ooo/branches/writer001/main/automation/source/server/statemnt.cxx Mon Aug 20 11:46:19 2012
@@ -5611,6 +5611,34 @@ sal_Bool StatementControl::Execute()
}
}
break;
+ case M_Collapse :
+ if( nParams & PARAM_STR_1 )
+ {
+ ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
+ }
+ else
+ {
+ if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
+ {
+ SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
+ ((SvTreeListBox*)pControl)->Collapse ( pEntry );
+ }
+ }
+ break;
+ case M_Expand :
+ if( nParams & PARAM_STR_1 )
+ {
+ ReportError( aUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
+ }
+ else
+ {
+ if ( ValueOK(aUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
+ {
+ SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
+ ((SvTreeListBox*)pControl)->Expand ( pEntry );
+ }
+ }
+ break;
case M_GetSelText :
if ( ! (nParams & PARAM_USHORT_1) )
nNr1 = 1;
Modified: incubator/ooo/branches/writer001/main/basctl/source/basicide/baside3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/basctl/source/basicide/baside3.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/basctl/source/basicide/baside3.cxx (original)
+++ incubator/ooo/branches/writer001/main/basctl/source/basicide/baside3.cxx Mon Aug 20 11:46:19 2012
@@ -265,7 +265,10 @@ void DialogWindow::Command( const Comman
IMPL_LINK( DialogWindow, NotifyUndoActionHdl, SfxUndoAction *, pUndoAction )
{
- (void)pUndoAction;
+ // #120515# pUndoAction needs to be deleted, this hand over is an ownership
+ // change. As long as it does not get added to the undo manager, it needs at
+ // least to be deleted.
+ delete pUndoAction;
// not working yet for unocontrols
/*
Modified: incubator/ooo/branches/writer001/main/basegfx/source/tools/gradienttools.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/basegfx/source/tools/gradienttools.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/basegfx/source/tools/gradienttools.cxx (original)
+++ incubator/ooo/branches/writer001/main/basegfx/source/tools/gradienttools.cxx Mon Aug 20 11:46:19 2012
@@ -183,7 +183,8 @@ namespace basegfx
const B2DVector& rOffset,
sal_uInt32 nSteps,
double fBorder,
- double fAngle)
+ double fAngle,
+ bool bSquare)
{
o_rGradientInfo.maTextureTransform.identity();
o_rGradientInfo.maBackTextureTransform.identity();
@@ -197,6 +198,16 @@ namespace basegfx
double fTargetOffsetY(rTargetRange.getMinY());
// add object expansion
+ if(bSquare)
+ {
+ const double fOriginalDiag(sqrt((fTargetSizeX * fTargetSizeX) + (fTargetSizeY * fTargetSizeY)));
+ fTargetOffsetX -= (fOriginalDiag - fTargetSizeX) / 2.0;
+ fTargetOffsetY -= (fOriginalDiag - fTargetSizeY) / 2.0;
+ fTargetSizeX = fOriginalDiag;
+ fTargetSizeY = fOriginalDiag;
+ }
+
+ // add object expansion
if(0.0 != fAngle)
{
const double fAbsCos(fabs(cos(fAngle)));
@@ -320,7 +331,8 @@ namespace basegfx
rOffset,
nSteps,
fBorder,
- fAngle);
+ fAngle,
+ true);
return o_rGradientInfo;
}
@@ -336,7 +348,8 @@ namespace basegfx
rOffset,
nSteps,
fBorder,
- fAngle);
+ fAngle,
+ false);
return o_rGradientInfo;
}
Modified: incubator/ooo/branches/writer001/main/basic/source/runtime/runtime.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/basic/source/runtime/runtime.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/basic/source/runtime/runtime.cxx (original)
+++ incubator/ooo/branches/writer001/main/basic/source/runtime/runtime.cxx Mon Aug 20 11:46:19 2012
@@ -731,17 +731,17 @@ sal_Bool SbiRuntime::Step()
SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
sal_uInt32 nOp1, nOp2;
- if( eOp <= SbOP0_END )
+ if (eOp < SbOP0_END)
{
(this->*( aStep0[ eOp ] ) )();
}
- else if( eOp >= SbOP1_START && eOp <= SbOP1_END )
+ else if (eOp >= SbOP1_START && eOp < SbOP1_END)
{
nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
(this->*( aStep1[ eOp - SbOP1_START ] ) )( nOp1 );
}
- else if( eOp >= SbOP2_START && eOp <= SbOP2_END )
+ else if (eOp >= SbOP2_START && eOp < SbOP2_END)
{
nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
nOp2 = *pCode++; nOp2 |= *pCode++ << 8; nOp2 |= *pCode++ << 16; nOp2 |= *pCode++ << 24;
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sc/source/core/data/sc_pivot.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sc/source/core/data/sc_pivot.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sc/source/core/data/sc_pivot.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sc/source/core/data/sc_pivot.cxx Mon Aug 20 11:46:19 2012
@@ -761,7 +761,7 @@ static const USHORT nFuncMaskArr[PIVOT_M
/*?*/ DBG_ASSERT(nIndex < PIVOT_MAXFIELD, "no data field (GPF in old versions!)");
/*?*/ if ( nIndex < PIVOT_MAXFIELD )
/*?*/ {
-/*?*/ memcpy(&aColArr[nIndex], &aColArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
+/*?*/ memmove(&aColArr[nIndex], &aColArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
/*?*/ aColArr[nColCount-1] = aField;
/*?*/ pDataList = pColList[nColCount-1];
/*?*/ }
@@ -781,7 +781,7 @@ static const USHORT nFuncMaskArr[PIVOT_M
/*?*/ DBG_ASSERT(nIndex < PIVOT_MAXFIELD, "no data field (GPF in old versions!)");
/*?*/ if ( nIndex < PIVOT_MAXFIELD )
/*?*/ {
-/*?*/ memcpy(&aRowArr[nIndex], &aRowArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
+/*?*/ memmove(&aRowArr[nIndex], &aRowArr[nIndex+1], (PIVOT_MAXFIELD - nIndex - 1) * sizeof(PivotField));
/*?*/ aRowArr[nRowCount-1] = aField;
/*?*/ pDataList = pRowList[nRowCount-1];
/*?*/ }
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sc/util/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sc/util/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sc/util/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sc/util/makefile.mk Mon Aug 20 11:46:19 2012
@@ -164,7 +164,6 @@ $(MISC)$/$(SHL1TARGET).def: makefile.mk
@echo ------------------------------
@echo Making: $@
@echo LIBRARY $(SHL1TARGET8) INITINSTANCE TERMINSTANCE >$@
- @echo DESCRIPTION 'SCALC3 DLL' >>$@
@echo DATA MULTIPLE >>$@
@echo EXPORTS >>$@
@echo _CreateScDocShellDll >>$@
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_calculat.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_calculat.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_calculat.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_calculat.cxx Mon Aug 20 11:46:19 2012
@@ -37,13 +37,6 @@
#include <rtl/logfile.hxx>
#endif
-// Note: Enable the following to skip points in the resulting spline
-// poly-polygon, if they have equal x-values rather than identical points.
-// Unitl now, I think there are situations where the output might differ, if you
-// do so, so it's not enabled by default.
-
-// #define SPLINE_OPTIMIZE_POINTS
-
#include "calculat.hxx"
#include <algorithm>
@@ -197,9 +190,4 @@ using namespace ::std;
// --------------------------------------------------------------------------------
-// Calculation of Splines
-
-
-// ----------------------------------------
-
}
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chartdoc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chartdoc.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chartdoc.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chartdoc.cxx Mon Aug 20 11:46:19 2012
@@ -271,6 +271,11 @@ namespace binfilter {
/*N*/
/*N*/ rDoc.LoadAttributes(rIn);
/*N*/ }
+ if( rIn.GetError() != 0 ) //read error
+ {
+ return rIn;//handle error occured maybe in rDoc.LoadAttributes e.g. if memchart could not be read correctly
+ }
+
/*N*/ // <- Basisaufruf
/*N*/
/*N*/ rDoc.GetItemPool().LoadCompleted();
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chaxis.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chaxis.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chaxis.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chaxis.cxx Mon Aug 20 11:46:19 2012
@@ -72,6 +72,7 @@
#include <bf_svx/svxids.hrc>
#endif
+#include "arrayhelper.hxx"
#include "float.h"
#include "chaxis.hxx"
#include "pairs.hxx"
@@ -147,17 +148,12 @@ namespace binfilter {
/*N*/ };
/*N*/ ChartAxis::~ChartAxis()
/*N*/ {
-/*N*/ if(mpTotal)
-/*N*/ delete [] mpTotal;
-/*N*/
-/*N*/ if(mpColStack)
-/*N*/ delete [] mpColStack;
-/*N*/
+/*N*/ delete [] mpTotal;
+/*N*/ delete [] mpColStack;
/*N*/ delete mpAxisAttr;
/*N*/ mpAxisAttr=NULL;
/*N*/ mpModel=NULL;
-/*N*/ if(mpTextAttr)
-/*N*/ delete mpTextAttr;
+/*N*/ delete mpTextAttr;
/*N*/ }
/*N*/ ChartAxis::ChartAxis(ChartModel* pModel,long nId,long nUId) :
@@ -293,14 +289,18 @@ namespace binfilter {
/*N*/ {
/*N*/ if(nSize!=mnTotalSize)
/*N*/ {
-/*N*/ if(mpTotal)
-/*N*/ delete [] mpTotal;
+/*N*/ delete [] mpTotal;
/*N*/ mnTotalSize = nSize;
-/*N*/ mpTotal = new double[mnTotalSize];
+/*N*/ mpTotal = ArrayHelper<double>::create_long_size(mnTotalSize);
+ if(!mpTotal)
+ mnTotalSize=0;
/*N*/ }
/*N*/
-/*N*/ while(nSize--)
-/*N*/ mpTotal[nSize]=0.0;
+ if(mpTotal)
+ {
+/*N*/ while(nSize--)
+/*N*/ mpTotal[nSize]=0.0;
+ }
/*N*/ }
/*N*/ mbTotalAlloc=TRUE;
/*N*/ };
@@ -315,7 +315,9 @@ namespace binfilter {
/*N*/ if(!mbTotalActual)
/*N*/ CreateTotal();
/*N*/
-/*N*/ return mpTotal[n];
+ if( mpTotal && n>=0 && n<mnTotalSize )
+/*N*/ return mpTotal[n];
+ return 10.0;
/*N*/ }
/*N*/ void ChartAxis::CreateTotal()
/*N*/ {
@@ -342,7 +344,7 @@ namespace binfilter {
/*N*/ for(long nRow=0;nRow<nRowCnt;nRow++)
/*N*/ {
/*N*/ nId=((const SfxInt32Item &)(mpModel->GetDataRowAttr(nRow).Get(SCHATTR_AXIS))).GetValue();
-/*N*/ if(nId==mnUId)
+/*N*/ if(nId==mnUId && mpTotal)
/*N*/ {
/*N*/ for(nCol=0;nCol<nColCnt;nCol++)
/*N*/ {
@@ -362,13 +364,13 @@ namespace binfilter {
// Stapeln der Werte je Col (für Liniencharts)
/*N*/ void ChartAxis::InitColStacking(long nColCnt)
/*N*/ {
-/*N*/
-/*N*/
-/*N*/ if(mpColStack)
-/*N*/ delete [] mpColStack;
-/*N*/ mpColStack=new double[nColCnt];
-/*N*/ while(nColCnt--)
-/*N*/ mpColStack[nColCnt]=0.0;//mfOrigin ????;
+/*N*/ delete [] mpColStack;
+/*N*/ mpColStack = ArrayHelper<double>::create_long_size(nColCnt);
+ if(mpColStack)
+ {
+/*N*/ while(nColCnt--)
+/*N*/ mpColStack[nColCnt]=0.0;//mfOrigin ????;
+ }
/*N*/ }
//Stapeln der Werte je Column (Stapeln bei LinienCharts)
/*N*/ double ChartAxis::StackColData(double fData,long nCol,long nColCnt)
@@ -377,8 +379,12 @@ namespace binfilter {
/*N*/ InitColStacking(nColCnt);//falls noch nicht geschehen
/*N*/ mbColStackOK=TRUE;//wird bei Initialise auf FALSE gesetzt
/*N*/
-/*N*/ mpColStack[nCol]+=fData;
-/*N*/ return mpColStack[nCol];
+ if(mpColStack)
+ {
+/*N*/ mpColStack[nCol]+=fData;
+/*N*/ return mpColStack[nCol];
+ }
+ return fData;
/*N*/ }
//Dies Funktion wird u.A. von Initialise gerufen (sehr früh im Buildvorgang)
//Attribute innerer Schleifen (CretaeMarks, etc.) können hier in Variablen
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod2a.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod2a.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod2a.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod2a.cxx Mon Aug 20 11:46:19 2012
@@ -62,6 +62,7 @@
#include "pairs.hxx"
#include "globfunc.hxx"
+#include "arrayhelper.hxx"
#ifndef _SVX_XLINIIT_HXX //autogen
@@ -320,9 +321,9 @@ namespace binfilter {
/*N*/ long nColCnt = GetColCount() ;
/*N*/ long nRowCnt = GetRowCount() ;
/*N*/
-/*N*/ double *pTotal = new double [nColCnt];
-/*N*/ SdrObjList **pRowLists = new SdrObjList* [nRowCnt];
-/*N*/ SdrObjList **pDescrLists = new SdrObjList* [nRowCnt];
+/*N*/ double *pTotal = ArrayHelper<double>::create_long_size(nColCnt);
+/*N*/ SdrObjList **pRowLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+/*N*/ SdrObjList **pDescrLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
/*N*/ DataDescription* pDescription = NULL;
/*N*/ Size aDescrOfs;
/*N*/
@@ -331,7 +332,15 @@ namespace binfilter {
/*N*/ bShowYAxisTitle = FALSE;
/*N*/ bShowZAxisTitle = FALSE;
/*N*/
-/*N*/ SchObjGroup** pDescrGroups=new SchObjGroup*[nRowCnt];
+/*N*/ SchObjGroup** pDescrGroups = ArrayHelper<SchObjGroup*>::create_long_size(nRowCnt);
+ if( !pTotal || !pRowLists || !pDescrLists || !pDescrGroups )
+ {
+ delete[] pTotal;
+ delete[] pRowLists;
+ delete[] pDescrLists;
+ delete[] pDescrGroups;
+ return pGroup;
+ }
/*N*/ for(nRow=0;nRow<nRowCnt;nRow++)
/*N*/ pDescrGroups[nRow]=NULL;
/*N*/
@@ -597,8 +606,14 @@ namespace binfilter {
/*N*/
/*N*/ Create2DBackplane(aRect, *pList, TRUE,CHSTACK_NONE);
/*N*/
-/*N*/ SdrObjList ** pRowLists = new SdrObjList*[nRowCnt];
-/*N*/ SdrObjList ** pStatLists = new SdrObjList*[nRowCnt];
+/*N*/ SdrObjList ** pRowLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+/*N*/ SdrObjList ** pStatLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+ if( !pRowLists || !pStatLists )
+ {
+ delete[] pRowLists;
+ delete[] pStatLists;
+ return pGroup;
+ }
/*N*/ Size aLegendSize (((SvxFontWidthItem &) pLegendAttr->Get (EE_CHAR_FONTWIDTH)).GetWidth (),
/*N*/ ((SvxFontHeightItem &) pLegendAttr->Get (EE_CHAR_FONTHEIGHT)).GetHeight ());
/*N*/
@@ -618,8 +633,6 @@ namespace binfilter {
/*N*/ pStatLists [0] = 0;
/*N*/
/*N*/ XPolygon aPolygon ((unsigned short)nColCnt);
-/*N*/ ::std::vector< ::std::pair< double, double > > aSplinePoints;
-/*N*/ bool bIsSplineChart = ( IsSplineChart() != FALSE );
/*N*/
/*N*/ SfxItemSet aLineAttr(*pItemPool, XATTR_LINE_FIRST, XATTR_LINE_LAST, 0);
/*N*/
@@ -660,7 +673,6 @@ namespace binfilter {
// pStatLists[ nRow ]->NbcInsertObject( AverageValueY( nRow, FALSE, aRect,
{DBG_BF_ASSERT(0, "STRIP"); }//STRIP001 pList->NbcInsertObject( AverageValueY( nRow, FALSE, aRect,
-/*N*/ aSplinePoints.clear();
/*N*/
/*N*/ for (nCol = 0; nCol < nColCnt; nCol++)
/*N*/ {
@@ -688,13 +700,6 @@ namespace binfilter {
/*N*/ }
/*N*/ aPolygon [(USHORT) nPoints].X () = nXPos;
/*N*/ aPolygon [(USHORT) nPoints].Y () = nYPos;
-/*N*/ if( bIsSplineChart )
-/*N*/ {
-/*N*/ aSplinePoints.push_back(
-/*N*/ ::std::pair< double, double >(
-/*N*/ static_cast< double >( nXPos ),
-/*N*/ static_cast< double >( nYPos )));
-/*N*/ }
/*N*/ nPoints ++;
/*N*/
/*N*/ aPoint.X () = nXPos;
@@ -740,28 +745,7 @@ namespace binfilter {
/*N*/ {
/*N*/ XPolyPolygon aSeriesPoly;
/*N*/
-/*N*/ if( bIsSplineChart )
-/*N*/ {
-/*?*/ if ((eChartStyle == CHSTYLE_2D_CUBIC_SPLINE_XY) || (eChartStyle == CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY))
-/*?*/ {DBG_BF_ASSERT(0, "STRIP");
-/*?*/ }
-/*?*/ else
-/*?*/ {
-/*?*/ XPolygon aMeshPoly;
-/*?*/ approxMesh( nGranularity, aMeshPoly, aPolygon, nPoints - 1, nSplineDepth );
-/*?*/ SchCalculationHelper::IntersectPolygonWithRectangle(
-/*?*/ aMeshPoly, aClipRect, aSeriesPoly );
-/*?*/ }
-/*?*/
-/*?*/ if( pLineObject )
-/*?*/ pLineObject->NbcSetPathPoly( aSeriesPoly );
-/*?*/ else
-/*?*/ {
-/*?*/ pLineObject = new SdrPathObj( OBJ_PLIN, aSeriesPoly );
-/*?*/ pRowLists[ nRow ]->NbcInsertObject( pLineObject);
-/*?*/ }
-/*?*/ }
-/*N*/ else // series consits of lines
+ // line (or stripped spline)
/*N*/ {
/*N*/ SchCalculationHelper::IntersectPolygonWithRectangle( aPolygon, aClipRect, aSeriesPoly );
/*N*/
@@ -834,8 +818,14 @@ namespace binfilter {
/*N*/ USHORT eStackMode = bStacked ? CHSTACK_MINMAX : CHSTACK_NONE;
/*N*/
/*N*/ Size aYDescrSize;
-/*N*/ SdrObjList ** pRowLists = new SdrObjList*[nRowCnt];
-/*N*/ SdrObjList ** pDescrLists = new SdrObjList*[nRowCnt];
+/*N*/ SdrObjList ** pRowLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+/*N*/ SdrObjList ** pDescrLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+ if( !pRowLists || !pDescrLists )
+ {
+ delete[] pRowLists;
+ delete[] pDescrLists;
+ return pGroup;
+ }
/*N*/ DataDescription* pDescription = NULL;
/*N*/ SdrObjList *pYAxisList = pChartYAxis->IsVisible()
/*N*/ ? CreateGroup (*pList, CHOBJID_DIAGRAM_Y_AXIS, 0)
@@ -888,7 +878,7 @@ namespace binfilter {
/*N*/
/*N*/ XPolygon aLine (2);
/*N*/ double fSteps = pChartYAxis->GetMax();
-/*N*/ double* fOldData = new double[nColCnt];
+/*N*/ double* fOldData = ArrayHelper<double>::create_long_size(nColCnt);
/*N*/ double fAngle = F_PI / 2;
/*N*/
/*N*/ Size aLegendSize (((SvxFontWidthItem &) pLegendAttr->Get (EE_CHAR_FONTWIDTH)).GetWidth (),
@@ -1120,11 +1110,13 @@ namespace binfilter {
/*?*/ }
/*N*/ }
/*N*/
-/*N*/ if (bStacked && !nRow) fOldData[nCol] = pChartYAxis->GetOrigin();
+/*N*/ if (bStacked && !nRow && fOldData)
+ fOldData[nCol] = pChartYAxis->GetOrigin();
/*N*/
/*N*/ if (fData != DBL_MIN)
/*N*/ {
-/*N*/ if (bStacked && nRow) fData += fOldData[nCol];
+/*N*/ if (bStacked && nRow && fOldData)
+ fData += fOldData[nCol];
/*N*/
/*N*/ double fLength = nLength * pChartYAxis->CalcFact(fData);
/*N*/
@@ -1150,7 +1142,8 @@ namespace binfilter {
/*N*/ }
/*N*/ }
/*N*/
-/*N*/ fOldData [nCol] = fData;
+ if( fOldData )
+/*N*/ fOldData [nCol] = fData;
/*N*/
/*N*/ ChartAdjust eAdjust;
/*N*/
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod3d.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod3d.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmod3d.cxx Mon Aug 20 11:46:19 2012
@@ -73,6 +73,7 @@
#include <bf_svx/xlnwtit.hxx>
#endif
+#include "arrayhelper.hxx"
#include "pairs.hxx"
#include "chmod3d.hxx"
#include "chaxis.hxx"
@@ -785,6 +786,8 @@ namespace binfilter {
/*N*/ long nRowCnt = GetRowCount();
/*N*/ short nCol, nRow;
/*N*/
+ if( nColCnt<0 || (static_cast< unsigned long>(nColCnt) > (std::numeric_limits<sal_uInt16>::max()-1)/2) )
+ return (SdrObjGroup*) pScene;
/*N*/ Polygon aFrontExtrude(1+nColCnt*2);
/*N*/
/*N*/ long nGapX = nW * nGapWidth / 1000;
@@ -1300,7 +1303,9 @@ namespace binfilter {
/*N*/ {
/*N*/ DataDescription* pDescription = NULL;
/*N*/
-/*N*/ double* fOldData = new double[nColCnt];
+/*N*/ double* fOldData = ArrayHelper<double>::create_long_size(nColCnt);
+ if( !fOldData )
+ return (SdrObjGroup*) pScene;
/*N*/ a3DPos.Z() += nBarWidthZ;
/*N*/
/*N*/ for (nRow = 0; nRow < nRowCnt; nRow++)
@@ -1433,7 +1438,9 @@ namespace binfilter {
/*N*/
/*N*/ // #100288# same structure as all other charts (no stacked and special groups)
/*N*/ // create groups for all series
-/*N*/ E3dScene ** pDataGroup = new E3dScene * [ nRowCnt ];
+/*N*/ E3dScene ** pDataGroup = ArrayHelper<E3dScene*>::create_long_size( nRowCnt );
+ if(!pDataGroup)
+ return (SdrObjGroup*) pScene;
/*N*/
/*N*/ // create 3d sub-scenes for each data series. Insertion into the
/*N*/ // main scene is done at the end of the for loop (#109628#)
@@ -2024,10 +2031,7 @@ namespace binfilter {
/*N*/ {
/*N*/ // FG: Das ist eine Variable die in BuildChart gesetzt wird, kutz bevor
/*N*/ // das Objekt zerstoert wird.
-/*?*/ double fRelativeXPosition = ((double) aTitleXAxisPosition.X()) / aInitialSizefor3d.Width();
-/*?*/ double fRelativeYPosition = ((double) aTitleXAxisPosition.Y()) / aInitialSizefor3d.Height();
-/*?*/ aXAxesTitlePosition.X() = (long)(aPageSize.Width() * fRelativeXPosition);
-/*?*/ aXAxesTitlePosition.Y() = (long)(aPageSize.Height() * fRelativeYPosition);
+/*?*/ aXAxesTitlePosition = calcRelativePosition( aTitleXAxisPosition, aInitialSizefor3d, aPageSize );
/*N*/ }
/*N*/ else
/*N*/ {
@@ -2056,10 +2060,7 @@ namespace binfilter {
/*N*/ {
/*N*/ // FG: Das ist eine Variable die in BuildChart gesetzt wird, kutz bevor
/*N*/ // das Objekt zerstoert wird.
-/*N*/ double fRelativeXPosition = ((double) aTitleYAxisPosition.X()) / aInitialSizefor3d.Width();
-/*N*/ double fRelativeYPosition = ((double) aTitleYAxisPosition.Y()) / aInitialSizefor3d.Height();
-/*N*/ aYAxesTitlePosition.X() = (long)(aPageSize.Width() * fRelativeXPosition);
-/*N*/ aYAxesTitlePosition.Y() = (long)(aPageSize.Height() * fRelativeYPosition);
+/*N*/ aYAxesTitlePosition = calcRelativePosition( aTitleYAxisPosition, aInitialSizefor3d, aPageSize );
/*N*/ }
/*N*/ else
/*N*/ {
@@ -2093,10 +2094,7 @@ namespace binfilter {
/*N*/ {
/*N*/ // FG: Das ist eine Variable die in BuildChart gesetzt wird, kutz bevor
/*N*/ // das Objekt zerstoert wird.
-/*N*/ double fRelativeXPosition = ((double) aTitleZAxisPosition.X()) / aInitialSizefor3d.Width();
-/*N*/ double fRelativeYPosition = ((double) aTitleZAxisPosition.Y()) / aInitialSizefor3d.Height();
-/*N*/ aZAxesTitlePosition.X() = (long)(aPageSize.Width() * fRelativeXPosition);
-/*N*/ aZAxesTitlePosition.Y() = (long)(aPageSize.Height() * fRelativeYPosition);
+/*N*/ aZAxesTitlePosition = calcRelativePosition( aTitleZAxisPosition, aInitialSizefor3d, aPageSize );
/*N*/ }
/*N*/ else if(aZAxesTitlePosition.Y()<aZAxisOutRect.GetHeight()/2)
/*N*/ {
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode1.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode1.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode1.cxx Mon Aug 20 11:46:19 2012
@@ -110,6 +110,7 @@
#include <bf_svx/xlnwtit.hxx>
#endif
+#include "arrayhelper.hxx"
#include "pairs.hxx"
#include "datalog.hxx"
@@ -544,22 +545,24 @@ namespace binfilter {
/*N*/
/*N*/ if (nCnt != nPieSegCount)
/*N*/ {
-/*N*/ long *pOfs = new long[nCnt];
-/*N*/
-/*N*/ if (nPieSegCount > nCnt)
-/*N*/ for (i = 0; i < nCnt; i++)
-/*N*/ pOfs[i] = pPieSegOfs[i];
-/*N*/ else
-/*N*/ {
-/*N*/ for (i = 0; i < nPieSegCount; i++)
-/*N*/ pOfs[i] = pPieSegOfs[i];
-/*N*/ for (; i < nCnt; i++)
-/*N*/ pOfs[i] = 0;
-/*N*/ }
-/*N*/
-/*N*/ delete[] pPieSegOfs;
-/*N*/ pPieSegOfs = pOfs;
-/*N*/ nPieSegCount = nCnt;
+/*N*/ long *pOfs = ArrayHelper<long>::create_short_size(nCnt);
+ if( pOfs )
+ {
+/*N*/ if (nPieSegCount > nCnt)
+/*N*/ for (i = 0; i < nCnt; i++)
+/*N*/ pOfs[i] = pPieSegOfs[i];
+/*N*/ else
+/*N*/ {
+/*N*/ for (i = 0; i < nPieSegCount; i++)
+/*N*/ pOfs[i] = pPieSegOfs[i];
+/*N*/ for (; i < nCnt; i++)
+/*N*/ pOfs[i] = 0;
+/*N*/ }
+/*N*/
+/*N*/ delete[] pPieSegOfs;
+/*N*/ pPieSegOfs = pOfs;
+/*N*/ nPieSegCount = nCnt;
+ }
/*N*/ }
/*N*/
/*N*/
@@ -854,13 +857,16 @@ namespace binfilter {
/*N*/ {
/*N*/ const SchColorTable& aDefCols = pOptions->GetDefaultColors();
/*N*/ nCount = aDefCols.Count();
-/*N*/ pDefaultCol = new ColorData[ nCount ];
+/*N*/ pDefaultCol = ArrayHelper<ColorData>::create_long_size( nCount );
/*N*/ DBG_ASSERT( nCount == ROW_COLOR_COUNT, "Chart: dynamic default color array size not supported yet" );
/*N*/
-/*N*/ for( int i=0; i<nCount; i++ )
-/*N*/ {
-/*N*/ pDefaultCol[ i ] = aDefCols.GetColorData( i );
-/*N*/ }
+ if(pDefaultCol)
+ {
+/*N*/ for( int i=0; i<nCount; i++ )
+/*N*/ {
+/*N*/ pDefaultCol[ i ] = aDefCols.GetColorData( i );
+/*N*/ }
+ }
/*N*/ }
/*N*/ else
/*N*/ {
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode2.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode2.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode2.cxx Mon Aug 20 11:46:19 2012
@@ -106,6 +106,7 @@
#include "pairs.hxx"
#include "chaxis.hxx"
+#include "arrayhelper.hxx"
#ifndef _LEGACYBINFILTERMGR_HXX
@@ -231,14 +232,17 @@ enum ChartStyleV0
/*N*/
/*N*/ long nLineMaxY = 0; //#50082#
/*N*/
-/*N*/ long* pHeightOfEntry = new long[nCnt*2]; // FG: Wirkliche Hoehe der Zeilen
-/*N*/ long* pWidthOfEntry = new long[nCnt*2]; // FG: Wirkliche Breite der Zeilen
+/*N*/ long* pHeightOfEntry = ArrayHelper<long>::create_long_size(nCnt,long(2)); // FG: Wirkliche Hoehe der Zeilen
+/*N*/ long* pWidthOfEntry = ArrayHelper<long>::create_long_size(nCnt,long(2)); // FG: Wirkliche Breite der Zeilen
+ if( !pHeightOfEntry || !pWidthOfEntry )
+ {
+ delete[] pHeightOfEntry;
+ delete[] pWidthOfEntry;
+ return 0;
+ }
/*N*/ long nLines = 0; // Anzahl Zeilen
/*N*/ long nActualColumn = 1; // FG: Zaehlt die Anzahl Spalten
/*N*/
-/*N*/ long* pRegressNr = new long [nCnt];
-/*N*/ memset (pRegressNr, 0, sizeof (long) * nCnt);
-/*N*/
/*N*/ SfxItemSet aTextAttr(*pItemPool, nTextWhichPairs);
/*N*/
/*N*/ aTextAttr.Put(*pLegendAttr);
@@ -301,7 +305,6 @@ enum ChartStyleV0
/*?*/ // nMaxX = Max (nMaxX, pText->GetLogicRect().GetWidth());
/*?*/ // nMaxY = Max (nMaxY, pText->GetLogicRect().GetHeight());
/*?*/
-/*?*/ pRegressNr [nLines] = i;
/*?*/ nLines ++;
/*N*/ }
/*N*/ }
@@ -475,10 +478,6 @@ enum ChartStyleV0
/*N*/
/*N*/ delete pSymbolAttr;
/*N*/ }
-/*N*/ else //i >= nCnt
-/*N*/ {
-/*?*/ DBG_BF_ASSERT(0, "STRIP"); //STRIP001 if (pRegressNr [i - nCnt])
-/*N*/ }
/*N*/
/*N*/ // FG: Jetzt wird aTextPos fuer den naechsten Legendeneintrag gesetzt
/*N*/ if (bWide)
@@ -532,7 +531,6 @@ enum ChartStyleV0
/*N*/ TRUE, TRUE, pLegendAttr), 0);
/*N*/ }
/*N*/
-/*N*/ delete[] pRegressNr;
/*N*/ delete[] pHeightOfEntry;
/*N*/ delete[] pWidthOfEntry;
/*N*/ }
@@ -1323,16 +1321,18 @@ enum ChartStyleV0
/*N*/ switch ((ChartDataId)nInt16)
/*N*/ {
/*N*/ case CHDATAID_MEMCHART_PLUS :
-/*?*/ pChartData = new SchMemChart (CHDATAID_MEMCHART_PLUS);
-/*?*/ rIn >> *(SchMemChart*)pChartData;
-/*?*/ pChartData->IncreaseRefCount();
-/*?*/ break;
-/*?*/
/*?*/ case CHDATAID_DYNCHART:
/*N*/ case CHDATAID_MEMCHART:
-/*N*/ pChartData = new SchMemChart (CHDATAID_MEMCHART);
+ if( CHDATAID_MEMCHART_PLUS==(ChartDataId)nInt16)
+/*?*/ pChartData = new SchMemChart (CHDATAID_MEMCHART_PLUS);
+ else
+/*N*/ pChartData = new SchMemChart (CHDATAID_MEMCHART);
/*N*/ rIn >> *(SchMemChart*)pChartData;
/*N*/ pChartData->IncreaseRefCount();
+ if( rIn.GetError() != 0 ) //read error
+ {
+ return;
+ }
/*N*/ break;
/*N*/
/*N*/ default :
@@ -1344,8 +1344,8 @@ enum ChartStyleV0
/*N*/ if (nVersion >= 8) rIn >> fMinData;
/*N*/ else if (pChartData)
/*N*/ {
-/*?*/ long nColCnt = GetColCount();
-/*?*/ long nRowCnt = GetRowCount();
+/*?*/ short nColCnt = GetColCount();
+/*?*/ short nRowCnt = GetRowCount();
/*?*/
/*?*/ for (short nCol = 0; nCol < nColCnt; nCol++)
/*?*/ for (short nRow = 0; nRow < nRowCnt; nRow++)
@@ -1471,16 +1471,26 @@ enum ChartStyleV0
/*N*/
/*N*/ if (nVersion >= 6)
/*N*/ {
-/*N*/ rIn >> nInt16; nPieSegCount = (short)nInt16;
-/*N*/ pPieSegOfs = new long[nPieSegCount];
-/*N*/
-/*N*/ BOOL bNullify = (nVersion < 17) && eChartStyle == CHSTYLE_2D_PIE;
-/*N*/
-/*N*/ for( i = 0; i < nPieSegCount; i++ )
-/*N*/ {
-/*N*/ rIn >> nInt32;
-/*N*/ pPieSegOfs[ i ] = bNullify? 0: (long)nInt32;
-/*N*/ }
+ nInt16=0;
+/*N*/ rIn >> nInt16;
+ nPieSegCount = static_cast<short>(nInt16);
+ delete[] pPieSegOfs; pPieSegOfs=0;
+ if( nPieSegCount!=0 )
+ {
+ pPieSegOfs = ArrayHelper< long >::create_short_size( nPieSegCount );
+ if(!pPieSegOfs)
+ {
+ nPieSegCount=0;
+ rIn.SetError( ERRCODE_IO_GENERAL );
+ return;
+ }
+/*N*/ BOOL bNullify = (nVersion < 17) && eChartStyle == CHSTYLE_2D_PIE;
+/*N*/ for( i = 0; i < nPieSegCount; i++ )
+/*N*/ {
+/*N*/ rIn >> nInt32;
+/*N*/ pPieSegOfs[ i ] = bNullify? 0: (long)nInt32;
+/*N*/ }
+ }
/*N*/ }
/*N*/
/*N*/ rIn >> nInt16; nXAngle = (short)nInt16;
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode3.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode3.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode3.cxx Mon Aug 20 11:46:19 2012
@@ -115,6 +115,9 @@
#include "chaxis.hxx"
+#include <limits>
+#include <algorithm>
+
namespace binfilter {
/*************************************************************************
@@ -365,20 +368,17 @@ namespace binfilter {
/*N*/ const SfxItemSet& ChartModel::GetDataRowAttr( long nRow ) const
/*N*/ {
-/*N*/ if( nRow < (long)aDataRowAttrList.Count() )
+/*N*/ if( nRow>=0 && nRow < aDataRowAttrList.Count() )
/*N*/ {
/*N*/ SfxItemSet* pSet = aDataRowAttrList.GetObject( nRow );
/*N*/ DBG_ASSERT( pSet, "Invalid ItemSet" );
-/*N*/ return *pSet;
-/*N*/ }
-/*N*/ else
-/*N*/ {
-/*N*/ DBG_ERROR( "Requested data row attribute is unavailable" );
-/*N*/
-/*N*/ // return something
-/*?*/ DBG_ASSERT( pChartAttr, "Invalid Chart-ItemSet" );
-/*?*/ return *pChartAttr;
+ if( pSet )
+/*N*/ return *pSet;
/*N*/ }
+/*N*/ DBG_ERROR( "Requested data row attribute is unavailable" );
+/*N*/ // return something
+/*?*/ DBG_ASSERT( pChartAttr, "Invalid Chart-ItemSet" );
+/*?*/ return *pChartAttr;
/*N*/ }
/*************************************************************************
@@ -789,11 +789,25 @@ namespace binfilter {
/*N*/ ? &aSwitchDataPointAttrList
/*N*/ : &aDataPointAttrList;
/*N*/
-/*N*/ SfxItemSet* pItemSet = pAttrList->GetObject(nCol * GetRowCount() + nRow);
+ if( nCol < 0 || nRow < 0 )
+ return;
+ const long nRowCount = GetRowCount();
+ const long nColCount = GetColCount();
+ if( nColCount <= 0 || nRowCount <= 0 )
+ return;
+ if( nCol >= nColCount || nRow >= nRowCount )
+ return;
+ if( nCol > ::std::numeric_limits<sal_uIntPtr>::max()/nRowCount ) //sal_uIntPtr is the type of the index parameter for method pAttrList->GetObject
+ return;
+ if( nRowCount*nCol > ::std::numeric_limits<sal_uIntPtr>::max() - nRow )
+ return;
+ sal_uIntPtr nIndex = static_cast<sal_uIntPtr>(nCol) * nRowCount + nRow;
+
+/*N*/ SfxItemSet* pItemSet = pAttrList->GetObject(nIndex);
/*N*/ if (pItemSet == NULL)
/*N*/ {
/*N*/ pItemSet = new SfxItemSet(*pItemPool, nRowWhichPairs);
-/*N*/ pAttrList->Replace (pItemSet, nCol * GetRowCount() + nRow);
+/*N*/ pAttrList->Replace (pItemSet, nIndex);
/*N*/ }
/*N*/ if(!bMerge)
/*?*/ pItemSet->ClearItem();
@@ -888,10 +902,11 @@ namespace binfilter {
/*N*/ SfxItemSet aAttr( GetDataRowAttr( nCol % nPieCount ));
/*N*/
/*N*/ if( ( nCol >= nPieCount ) &&
-/*N*/ pDefaultColors )
+/*N*/ pDefaultColors && pDefaultColors->Count()>0 )
/*N*/ {
/*?*/ XColorEntry* pColEntry = SAL_STATIC_CAST( XColorEntry*, pDefaultColors->GetObject( nCol % pDefaultColors->Count()));
-/*?*/ aAttr.Put( XFillColorItem( pColEntry->GetName(), pColEntry->GetColor()));
+ if( pColEntry )
+/*?*/ aAttr.Put( XFillColorItem( pColEntry->GetName(), pColEntry->GetColor()));
/*N*/ }
/*N*/
/*N*/ // add description attributes of series
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode4.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode4.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode4.cxx Mon Aug 20 11:46:19 2012
@@ -208,11 +208,19 @@ namespace binfilter {
/*N*/ void ChartModel::ResizeText (SfxItemSet *pTextAttr, Size aPageSize, BOOL bResizePage )
/*N*/ {
-/*N*/ double fRatio;
+/*N*/ double fRatio = 1.0;
/*N*/ if( bResizePage )
-/*N*/ fRatio = (double)aPageSize.Height() / (double)aInitialSize.Height();
+ {
+ double fDenominator = aInitialSize.Height();
+ if( fDenominator != 0 )
+/*N*/ fRatio = (double)aPageSize.Height() / fDenominator;
+ }
/*N*/ else
-/*?*/ fRatio = (double)aDiagramRectangle.GetHeight() / (double)aLastDiagramRectangle.GetHeight();
+ {
+ double fDenominator = aLastDiagramRectangle.GetHeight();
+ if( fDenominator != 0 )
+/*?*/ fRatio = (double)aDiagramRectangle.GetHeight() / fDenominator;
+ }
/*N*/
/*N*/ // resize all three fonts
/*N*/ static const USHORT nWhichIds[ 3 ] = {
@@ -721,6 +729,21 @@ namespace binfilter {
/*N*/ }
/*N*/ }
+Point ChartModel::calcRelativePosition( const Point& rStartPoint, const Size& rInitialSize, const Size& rNewSize )
+{
+ Point aRet( rStartPoint );
+ double fX_Denominator = rInitialSize.Width();
+ double fY_Denominator = rInitialSize.Height();
+ if( fX_Denominator != 0.0 && fY_Denominator != 0.0 )
+ {
+ double fRelativXPosition = rStartPoint.X() / fX_Denominator;
+ double fRelativYPosition = rStartPoint.Y() / fY_Denominator;
+ aRet.X() = static_cast<long>( rNewSize.Width() * fRelativXPosition );
+ aRet.Y() = static_cast<long>( rNewSize.Height() * fRelativYPosition );
+ }
+ return aRet;
+}
+
/*************************************************************************
|*
|* Sub-Methode von BuildChart(), Anzeige des Haupttitels
@@ -735,10 +758,7 @@ namespace binfilter {
/*N*/ if (bUseRelativePositionsForChartGroups && (aTitleTopCenter.X() >= 0) &&
/*N*/ (aTitleTopCenter.Y() >= 0) && GetMainTitleHasBeenMoved())
/*N*/ {
-/*N*/ double fRelativXPosition = ((double) aTitleTopCenter.X()) / aInitialSize.Width();
-/*N*/ double fRelativYPosition = ((double) aTitleTopCenter.Y()) / aInitialSize.Height();
-/*N*/ aTitlePosition.X() = (long)((double)rPageSize.Width() * fRelativXPosition );
-/*N*/ aTitlePosition.Y() = (long)((double)rPageSize.Height() * fRelativYPosition );
+/*N*/ aTitlePosition = calcRelativePosition( aTitleTopCenter, aInitialSize, rPageSize );
/*N*/ }
/*N*/ else
/*N*/ {
@@ -754,7 +774,6 @@ namespace binfilter {
/*N*/ pObj->SetResizeProtect(TRUE);
/*N*/ pPage->NbcInsertObject(pObj, rIndex++);
/*N*/ }
-
/*************************************************************************
|*
|* Sub-Methode von BuildChart(), man koennte vermutlich DoShowMainTitle und
@@ -770,10 +789,7 @@ namespace binfilter {
/*N*/ if (bUseRelativePositionsForChartGroups && (aSubTitleTopCenter.X() >= 0) &&
/*N*/ (aSubTitleTopCenter.Y() >= 0) && GetSubTitleHasBeenMoved())
/*N*/ {
-/*N*/ double fRelativeXPosition = ((double) aSubTitleTopCenter.X()) / aInitialSize.Width();
-/*N*/ double fRelativeYPosition = ((double) aSubTitleTopCenter.Y()) / aInitialSize.Height();
-/*N*/ aSubTitlePosition.X() = (long)((double)rPageSize.Width() * fRelativeXPosition );
-/*N*/ aSubTitlePosition.Y() = (long)((double)rPageSize.Height() * fRelativeYPosition );
+/*N*/ aSubTitlePosition = calcRelativePosition( aSubTitleTopCenter, aInitialSize, rPageSize );
/*N*/ }
/*N*/ else
/*N*/ {
@@ -816,17 +832,7 @@ namespace binfilter {
/*N*/ if (bUseRelativePositionsForChartGroups && (aLegendTopLeft.X() >= 0) &&
/*N*/ (aLegendTopLeft.Y() >= 0) && GetLegendHasBeenMoved())
/*N*/ {
-/*N*/ double fRatioX =
-/*N*/ static_cast< double >( rPageSize.Width() ) /
-/*N*/ static_cast< double >( aInitialSize.Width() );
-/*N*/ double fRatioY =
-/*N*/ static_cast< double >( rPageSize.Height() ) /
-/*N*/ static_cast< double >( aInitialSize.Height() );
-/*N*/
-/*N*/ aLegendPosition.X() = static_cast< long >(
-/*N*/ static_cast< double >( aLegendTopLeft.X() ) * fRatioX );
-/*N*/ aLegendPosition.Y() = static_cast< long >(
-/*N*/ static_cast< double >( aLegendTopLeft.Y() ) * fRatioY );
+/*N*/ aLegendPosition = calcRelativePosition( aLegendTopLeft, aInitialSize, rPageSize );
/*N*/
/*N*/ if( bAdjustMarginsForLegend )
/*N*/ {
@@ -959,7 +965,9 @@ namespace binfilter {
/*N*/ aSet.Put(pObj->GetItemSet());
/*N*/
/*N*/ aSet.ClearInvalidItems();
-/*N*/ aDataRowAttrList.GetObject( nRow )->Put( aSet );
+ SfxItemSet* pItemSet = aDataRowAttrList.GetObject( nRow );
+ if(pItemSet)
+/*N*/ pItemSet->Put( aSet );
/*N*/ aSet.ClearItem();
/*N*/ }
/*N*/ else if( pDataPoint )
@@ -1172,25 +1180,23 @@ namespace binfilter {
// All four border lines had to lie inside the chart rectangle.
// If the new solution, that solves error #88404# proves to work, then remove this
// paragraph and the commented code below.
+ double fFactorX = 1.0;
+ double fFactorY = 1.0;
+ double fX_Denominator = aInitialSize.Width();
+ double fY_Denominator = aInitialSize.Height();
+ if( fX_Denominator != 0.0 && fY_Denominator != 0.0 )
+ {
+ fFactorX = rPageSize.Width() / fX_Denominator;
+ fFactorY = rPageSize.Height() / fY_Denominator;
+ }
+
/*N*/ if ( (aDiagramRectangle.nLeft < aDiagramRectangle.nRight)
/*N*/ && (aDiagramRectangle.nTop < aDiagramRectangle.nBottom) )
-// if ((aDiagramRectangle.nLeft >= 0) && (aDiagramRectangle.nTop >= 0) &&
-// (aDiagramRectangle.nRight >= 0) && (aDiagramRectangle.nBottom >= 0))
/*N*/ {
-/*?*/ double fRelativeXPosition = ((double) aDiagramRectangle.Left()) / aInitialSize.Width();
-/*?*/ double fRelativeYPosition = ((double) aDiagramRectangle.Top()) / aInitialSize.Height();
-// if ((fRelativeXPosition <= 1.0) && (fRelativeYPosition <= 1.0))
-// {
-/*?*/ aChartRect.nLeft = (long)((double)rPageSize.Width() * fRelativeXPosition );
-/*?*/ aChartRect.nTop = (long)((double)rPageSize.Height() * fRelativeYPosition );
-// }
-/*?*/ fRelativeXPosition = ((double) aDiagramRectangle.Right()) / aInitialSize.Width();
-/*?*/ fRelativeYPosition = ((double) aDiagramRectangle.Bottom()) / aInitialSize.Height();
-// if ((fRelativeXPosition <= 1.0) && (fRelativeYPosition <= 1.0))
-// {
-/*?*/ aChartRect.nRight = (long)((double)rPageSize.Width() * fRelativeXPosition );
-/*?*/ aChartRect.nBottom = (long)((double)rPageSize.Height() * fRelativeYPosition );
-// }
+/*?*/ aChartRect.nLeft = static_cast<long>( aDiagramRectangle.Left() * fFactorX );
+/*?*/ aChartRect.nTop = static_cast<long>( aDiagramRectangle.Top() * fFactorY );
+/*?*/ aChartRect.nRight = static_cast<long>( aDiagramRectangle.Right() * fFactorX );
+/*?*/ aChartRect.nBottom = static_cast<long>( aDiagramRectangle.Bottom() * fFactorY );
/*?*/ }
/*N*/ }
/*N*/ }
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode7.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode7.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode7.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode7.cxx Mon Aug 20 11:46:19 2012
@@ -120,7 +120,7 @@ namespace binfilter {
/*N*/ DBG_ASSERT( nCol < nPieSegCount, "pie segment requested is out of bounds" );
/*N*/
/*N*/ if( IsPieChart() &&
-/*N*/ nCol < nPieSegCount )
+/*N*/ nCol >= 0 && nCol < nPieSegCount )
/*N*/ {
/*N*/ return pPieSegOfs[ nCol ];
/*N*/ }
@@ -554,7 +554,7 @@ UINT32& ChartModel::Percent DescrF ormat
/*N*/ DBG_ASSERT( pPieSegOfs, "Invalid Array" );
/*N*/ DBG_ASSERT( nCol < nPieSegCount, "trying to set pie offset out of bounds" );
/*N*/
-/*N*/ if( nCol < nPieSegCount )
+/*N*/ if( nCol >= 0 && nCol < nPieSegCount )
/*N*/ pPieSegOfs[ nCol ] = nOfs;
/*N*/ }
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode9.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode9.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode9.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_chtmode9.cxx Mon Aug 20 11:46:19 2012
@@ -86,6 +86,7 @@
#include <float.h>
#include "glob.hrc"
+#include "arrayhelper.hxx"
#include "chaxis.hxx"
#include "chdescr.hxx"
#include "calculat.hxx"
@@ -407,6 +408,16 @@ namespace binfilter {
/*N*/ SdrPage *pPage = GetPage(0);
/*N*/ Size aPageSize = pPage->GetSize();
/*N*/
+ double fFactorX = 1.0;
+ double fFactorY = 1.0;
+ double fX_Denominator = aInitialSize.Width();
+ double fY_Denominator = aInitialSize.Height();
+ if( fX_Denominator != 0.0 && fY_Denominator != 0.0 )
+ {
+ fFactorX = aPageSize.Width() / fX_Denominator;
+ fFactorY = aPageSize.Height() / fY_Denominator;
+ }
+
/*N*/ if(bShowXAxisTitle)
/*N*/ {
/*N*/ SdrObject *pXAxisTitleObj = GetObjWithId(CHOBJID_DIAGRAM_TITLE_X_AXIS,*pPage);
@@ -422,10 +433,8 @@ namespace binfilter {
/*N*/ {
/*N*/ // FG: Das ist eine Variable die in BuildChart gesetzt wird, kurz bevor
/*N*/ // das Objekt zerstoert wird.
-/*N*/ double fRelativeXPosition = ((double) aTitleXAxisPosition.X()) / aInitialSize.Width();
-/*N*/ double fRelativeYPosition = ((double) aTitleXAxisPosition.Y()) / aInitialSize.Height();
-/*N*/ aXAxesTitlePosition.X() = (int) (aPageSize.Width() * fRelativeXPosition + 0.5);
-/*N*/ aXAxesTitlePosition.Y() = (int) (aPageSize.Height() * fRelativeYPosition + 0.5);
+/*N*/ aXAxesTitlePosition.X() = static_cast<int>( aTitleXAxisPosition.X() * fFactorX + 0.5 );
+/*N*/ aXAxesTitlePosition.Y() = static_cast<int>( aTitleXAxisPosition.Y() * fFactorY + 0.5 );
/*N*/ }
/*N*/ else
/*N*/ {
@@ -453,10 +462,8 @@ namespace binfilter {
/*N*/ {
/*N*/ // FG: Das ist eine Variable die in BuildChart gesetzt wird, kurz bevor
/*N*/ // das Objekt zerstoert wird.
-/*N*/ double fRelativeXPosition = ((double) aTitleYAxisPosition.X()) / aInitialSize.Width();
-/*N*/ double fRelativeYPosition = ((double) aTitleYAxisPosition.Y()) / aInitialSize.Height();
-/*N*/ aYAxesTitlePosition.X() = (int) (aPageSize.Width() * fRelativeXPosition + 0.5);
-/*N*/ aYAxesTitlePosition.Y() = (int) (aPageSize.Height() * fRelativeYPosition + 0.5);
+/*N*/ aYAxesTitlePosition.X() = static_cast<int>( aTitleYAxisPosition.X() * fFactorX + 0.5);
+/*N*/ aYAxesTitlePosition.Y() = static_cast<int>( aTitleYAxisPosition.Y() * fFactorY + 0.5);
/*N*/ }
/*N*/ else
/*N*/ {
@@ -543,19 +550,32 @@ namespace binfilter {
/*N*/ aBarY2.Create(aRect,nColCnt,nR2);
/*N*/ ChartBarDescriptor* pBar=&aBarY1;
/*N*/
-/*N*/ SdrObjList **pRowLists = new SdrObjList*[nRowCnt];
-/*N*/ SdrObjList **pStatLists = new SdrObjList*[nRowCnt];
+/*N*/ SdrObjList **pRowLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+/*N*/ SdrObjList **pStatLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+ if( !pRowLists || !pStatLists )
+ {
+ delete[] pRowLists;
+ delete[] pStatLists;
+ return pGroup;
+ }
/*N*/
/*N*/ ChartDataDescription aDescr(nColCnt,nRowCnt,pList,this,bShowDataDescr);
/*N*/
/*N*/ Point *pTracePoint=0;
/*N*/ if(m_nDefaultColorSet&CHSPECIAL_TRACELINES)
/*N*/ {
-/*?*/ pTracePoint = new Point[nRowCnt];//#50149#
+/*?*/ pTracePoint = ArrayHelper<Point>::create_long_size(nRowCnt);//#50149#
/*N*/ }
/*N*/
/*N*/
-/*N*/ XPolygon *pLine = new XPolygon[nLines]; //#50149#
+/*N*/ XPolygon *pLine = ArrayHelper<XPolygon>::create_long_size(nLines); //#50149#
+ if( !pLine )
+ {
+ delete[] pRowLists;
+ delete[] pStatLists;
+ delete[] pTracePoint;
+ return pGroup;
+ }
/*N*/ BOOL bStartPointIsValid; // Indicates wether the first point of a line
/*N*/ // segment is valid.
/*N*/
@@ -1247,8 +1267,14 @@ namespace binfilter {
/*N*/ long nPartWidth = aRect.GetWidth() / nBackColCnt;
/*N*/ double fPartWidth = ((double) aRect.GetWidth() / (double) nBackColCnt);
/*N*/
-/*N*/ SdrObjList** pRowLists = new SdrObjList*[nRowCnt];
-/*N*/ SdrObjList** pStatLists = new SdrObjList*[nRowCnt];
+/*N*/ SdrObjList** pRowLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+/*N*/ SdrObjList** pStatLists = ArrayHelper<SdrObjList*>::create_long_size(nRowCnt);
+ if( !pRowLists || !pStatLists )
+ {
+ delete[] pRowLists;
+ delete[] pStatLists;
+ return pGroup;
+ }
/*N*/
/*N*/ ChartDataDescription aDescr(nColCnt,nRowCnt,pList,this,bShowDataDescr);
/*N*/
@@ -1267,9 +1293,6 @@ namespace binfilter {
/*N*/
/*N*/ Polygon aPolygon( nColCnt + 16 ); // +4 -> +16: let some more points be possible. Is set to exact size later
/*N*/
-/*N*/ //Ab hier speziell fuer (Sp)Line-Charts:
-/*N*/ XPolygon *pSpline = new XPolygon(nColCnt * nGranularity);
-/*N*/
/*N*/ long nStartX=aRect.Left();
/*N*/ if(bPartDescr)
/*N*/ nStartX+=nPartWidth/2;
@@ -1399,32 +1422,6 @@ namespace binfilter {
/*?*/ {
/*?*/ if( nPoints > 1 )
/*?*/ {
-/*?*/ if( IsSplineChart() )
-/*?*/ {
-/*?*/ Polygon aNewPoly( nPoints );
-/*?*/ for( USHORT i = 0; i < nPoints; i++ )
-/*?*/ aNewPoly[ i ] = aPolygon[ i ];
-/*?*/
-/*?*/ XPolygon aXPoly( aNewPoly );
-/*?*/ if ((eChartStyle == CHSTYLE_2D_CUBIC_SPLINE) ||
-/*?*/ (eChartStyle == CHSTYLE_2D_CUBIC_SPLINE_SYMBOL))
-/*?*/ {
-/*?*/ CubicSpline( aXPoly, nPoints - 1, nGranularity, *pSpline );
-/*?*/ }
-/*?*/ else
-/*?*/ {
-/*?*/ approxMesh( nGranularity, *pSpline, aXPoly, nPoints - 1, nSplineDepth );
-/*?*/ }
-/*?*/
-/*?*/ XPolygon aSplinePoly( *pSpline );
-/*?*/ aSplinePoly.SetSize( (nPoints - 1) * nGranularity );
-/*?*/
-/*?*/ // #67488# crop polygon
-/*?*/ XPolyPolygon aResult;
-/*?*/ SchCalculationHelper::IntersectPolygonWithRectangle( aSplinePoly, aClipRect, aResult );
-/*?*/ pObj = new SdrPathObj( OBJ_PLIN, aResult );
-/*?*/ }
-/*?*/ else
/*?*/ {
/*?*/ Polygon aNewPoly( nPoints );
/*?*/ for( USHORT i = 0; i < nPoints; i++ )
@@ -1458,37 +1455,8 @@ namespace binfilter {
/*N*/ {
/*N*/ pObj = NULL;
/*N*/
-/*N*/ if( IsSplineChart() )
-/*N*/ {
-/*N*/ if( nPoints > 1 )
-/*N*/ {
-/*N*/ Polygon aNewPoly( nPoints );
-/*N*/ for( USHORT i = 0; i < nPoints; i++ )
-/*N*/ aNewPoly[ i ] = aPolygon[ i ];
-/*N*/
-/*N*/ XPolygon aXPoly( aNewPoly );
-/*N*/ if ((eChartStyle == CHSTYLE_2D_CUBIC_SPLINE) ||
-/*N*/ (eChartStyle == CHSTYLE_2D_CUBIC_SPLINE_SYMBOL))
-/*N*/ {
-/*N*/ CubicSpline( aXPoly, nPoints - 1,nGranularity, *pSpline );
-/*N*/ }
-/*N*/ else
-/*N*/ {
-/*N*/ approxMesh( nGranularity, *pSpline, aXPoly, nPoints - 1, nSplineDepth );
-/*N*/ }
-/*N*/
-/*N*/ XPolygon aSplinePoly( *pSpline );
-/*N*/ aSplinePoly.SetSize( (nPoints - 1) * nGranularity );
-/*N*/
-/*N*/ // #67488# crop polygon
-/*N*/ XPolyPolygon aResult;
-/*N*/ SchCalculationHelper::IntersectPolygonWithRectangle( aSplinePoly, aClipRect, aResult );
-/*N*/ pObj = new SdrPathObj( OBJ_PLIN, aResult );
-/*N*/ }
-/*N*/ }
-/*N*/ else
/*N*/ {
-/*N*/ if( bArea )
+/*N*/ if( bArea && !IsSplineChart() )
/*N*/ {
/*N*/ Polygon aNewPoly( nPoints + 3 );
/*N*/ for( USHORT i = 0; i < nPoints + 3; i++ )
@@ -1508,7 +1476,7 @@ namespace binfilter {
/*N*/ pObj->SetModel( this );
/*N*/ SetObjectAttr( pObj,CHOBJID_DIAGRAM_ROWS, TRUE, TRUE, (SfxItemSet *)&rDataRowAttr );
/*N*/ }
-/*N*/ else if( nPoints > 1 ) // line
+/*N*/ else if( nPoints > 1 ) // line (or stripped spline)
/*N*/ {
/*N*/ // #67488# crop polygon
/*N*/ Polygon aNewPoly( nPoints );
@@ -1540,8 +1508,6 @@ namespace binfilter {
/*N*/ } // if( nPoints )
/*N*/ } //for nRow
/*N*/
-/*N*/ delete pSpline;
-/*N*/
/*N*/ //Ab hier wieder wie in Create2DRow(Area)Chart:
/*N*/
/*N*/ aDescr.Build(TRUE);
@@ -1840,6 +1806,9 @@ namespace binfilter {
/*N*/ break;
/*N*/ }
/*N*/
+ if( nLastSeries<0 )
+ return;
+
/*N*/ // #101164# map fill-/line colors
/*N*/ if( nNumLinesInColChart > nOldNumLines )
/*N*/ {
@@ -1849,7 +1818,8 @@ namespace binfilter {
/*N*/ {
/*N*/ SfxItemSet * pSet = aDataRowAttrList.GetObject( nLastSeries - i );
/*N*/ OSL_ASSERT( pSet );
-/*N*/ pSet->Put( XLineColorItem(
+/*N*/ if( pSet )
+/*N*/ pSet->Put( XLineColorItem(
/*N*/ String(),
/*N*/ static_cast< const XFillColorItem & >(
/*N*/ pSet->Get( XATTR_FILLCOLOR )).GetValue() ));
@@ -1863,11 +1833,14 @@ namespace binfilter {
/*N*/ {
/*?*/ SfxItemSet * pSet = aDataRowAttrList.GetObject( nLastSeries - i );
/*?*/ OSL_ASSERT( pSet );
-/*?*/ pSet->Put( XFillColorItem(
+/*?*/ if( pSet )
+/*?*/ {
+/*?*/ pSet->Put( XFillColorItem(
/*?*/ String(),
/*?*/ static_cast< const XLineColorItem & >(
/*?*/ pSet->Get( XATTR_LINECOLOR )).GetValue() ));
-/*?*/ pSet->Put( XLineColorItem( String(), RGBColor( COL_BLACK ) ));
+/*?*/ pSet->Put( XLineColorItem( String(), RGBColor( COL_BLACK ) ));
+/*?*/ }
/*N*/ }
/*N*/ }
/*N*/ }
Modified: incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_globfunc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_globfunc.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_globfunc.cxx (original)
+++ incubator/ooo/branches/writer001/main/binfilter/bf_sch/source/core/sch_globfunc.cxx Mon Aug 20 11:46:19 2012
@@ -172,250 +172,6 @@ namespace binfilter {
/*N*/ return (SchObjGroup *) SetObjectAttr (new SchObjGroup, nID, bProtect, bResize, 0);
/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne kub. Spline
-|*
-\************************************************************************/
-
-/*N*/ void CubicSpline (XPolygon &pKnownPoints,
-/*N*/ int n,
-/*N*/ int splineSize,
-/*N*/ XPolygon &pSplines)
-/*N*/ {
-/*N*/ double *h = new double [n + 1];
-/*N*/ double *m = new double [n + 1];
-/*N*/ double *q = new double [n + 1];
-/*N*/ double *u = new double [n + 1];
-/*N*/
-/*N*/ for (int k = 1;
-/*N*/ k <= n;
-/*N*/ k ++)
-/*N*/ h [k] = pKnownPoints [k].X () - pKnownPoints [k - 1].X ();
-/*N*/
-/*N*/ double p;
-/*N*/ double lambda = 0.0;
-/*N*/ double d = 0.0;
-/*N*/ double mue;
-/*N*/
-/*N*/ q [0] = -lambda / 2.0;
-/*N*/ u [0] = d / 2.0;
-/*N*/
-/*N*/ int j;
-/*N*/ for (j = 1;
-/*N*/ j <= n;
-/*N*/ j ++)
-/*N*/ {
-/*N*/ mue = (j < n)
-/*N*/ ? h[j] / (h [j] + h [j + 1])
-/*N*/ : 0.0;
-/*N*/ p = mue * q [j - 1] + 2.0;
-/*N*/ lambda = 1.0 - mue;
-/*N*/ q [j] = -lambda / p;
-/*N*/ d = (j < n)
-/*N*/ ? 6.0 * ((pKnownPoints [j + 1].Y () - pKnownPoints [j].Y ()) / h [j + 1] -
-/*N*/ (pKnownPoints [j].Y () - pKnownPoints [j - 1].Y ()) / h [j]) / (h [j] + h [j + 1])
-/*N*/ : 0.0;
-/*N*/ u [j] = (d - mue * u [j - 1]) / p;
-/*N*/ }
-/*N*/
-/*N*/ m [n] = u [n];
-/*N*/
-/*N*/ for (j = n - 1;
-/*N*/ j >= 0;
-/*N*/ j --)
-/*N*/ m [j] = q [j] * m [j + 1] + u [j];
-/*N*/
-/*N*/ for (j = 0;
-/*N*/ j < n;
-/*N*/ j ++)
-/*N*/ {
-/*N*/ double xStep = (pKnownPoints [j + 1].X () - pKnownPoints [j].X ()) / splineSize;
-/*N*/ double x = pKnownPoints [j].X ();
-/*N*/
-/*N*/ double alpha = pKnownPoints [j].Y ();
-/*N*/ double gamma = m [j] / 2;
-/*N*/ double beta = (pKnownPoints [j + 1].Y () - pKnownPoints [j].Y ()) / h [j + 1] -
-/*N*/ ((2 * m [j] + m [j + 1]) * h [j + 1]) / 6;
-/*N*/ double delta = (m [j + 1] - m [j]) / (6 * h [j + 1]);
-/*N*/
-/*N*/ for (int i = 0;
-/*N*/ i < splineSize;
-/*N*/ i ++)
-/*N*/ {
-/*N*/ double xdiff = (x - pKnownPoints [j].X ());
-/*N*/ int index = j * splineSize + i;
-/*N*/
-/*N*/ pSplines [(short) index].Y () = long(alpha + xdiff * (beta + xdiff * (gamma + xdiff * delta)));
-/*N*/ pSplines [(short) index].X () = long(x);
-/*N*/ x += xStep;
-/*N*/ }
-/*N*/ }
-/*N*/
-/*N*/ pSplines [n * splineSize].Y () = pKnownPoints [n].Y ();
-/*N*/ pSplines [n * splineSize].X () = pKnownPoints [n].X ();
-/*N*/
-/*N*/ delete[] h;
-/*N*/ delete[] m;
-/*N*/ delete[] q;
-/*N*/ delete[] u;
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Bestimme Knotenvektor fuer B-Spline
-|*
-\************************************************************************/
-
-/*N*/ void TVector (int n,
-/*N*/ int k,
-/*N*/ double *t)
-/*N*/ {
-/*N*/ for (int i = 0;
-/*N*/ i <= n + k;
-/*N*/ i ++)
-/*N*/ {
-/*N*/ if (i < k) t [i] = 0;
-/*N*/ else if (i <= n) t [i] = i - k + 1;
-/*N*/ else t [i] = n - k + 2;
-/*N*/ }
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne linken Knotenvektor
-|*
-\************************************************************************/
-
-/*N*/ double TLeft (double x,
-/*N*/ int i,
-/*N*/ int k,
-/*N*/ double *t)
-/*N*/ {
-/*N*/ double deltaT = t [i + k - 1] - t [i];
-/*N*/
-/*N*/ return (deltaT == 0.0)
-/*N*/ ? 0.0
-/*N*/ : (x - t [i]) / deltaT;
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne rechten Knotenvektor
-|*
-\************************************************************************/
-
-/*N*/ double TRight (double x,
-/*N*/ int i,
-/*N*/ int k,
-/*N*/ double *t)
-/*N*/ {
-/*N*/ double deltaT = t [i + k] - t [i + 1];
-/*N*/
-/*N*/ return (deltaT == 0.0)
-/*N*/ ? 0.0
-/*N*/ : (t [i + k] - x) / deltaT;
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne Gewichtungsvektor
-|*
-\************************************************************************/
-
-/*N*/ void BVector (double x,
-/*N*/ int n,
-/*N*/ int k,
-/*N*/ double *b,
-/*N*/ double *t)
-/*N*/ {
-/*N*/ for (int i = 0;
-/*N*/ i <= n + k;
-/*N*/ i ++)
-/*N*/ b [i] = 0;
-/*N*/
-/*N*/ int i0 = (int) floor (x) + k - 1;
-/*N*/ b [i0] = 1;
-/*N*/
-/*N*/ for (int j = 2;
-/*N*/ j <= k;
-/*N*/ j ++)
-/*N*/ for (int i = 0;
-/*N*/ i <= i0;
-/*N*/ i ++)
-/*N*/ b [i] = TLeft (x, i, j, t) * b [i] + TRight (x, i, j, t) * b [i + 1];
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne einzelnen Punkt
-|*
-\************************************************************************/
-
-/*N*/ void BSPoint (int n,
-/*N*/ Point &p1,
-/*N*/ Point &p2,
-/*N*/ XPolygon &pKnownPoints,
-/*N*/ double *b)
-/*N*/ {
-/*N*/ for (int i = 0;
-/*N*/ i <= n;
-/*N*/ i ++)
-/*N*/ {
-/*N*/ p1.Y () = long(p1.Y () + b [i] * pKnownPoints [i].Y ());
-/*N*/ p2.Y () = long(p2.Y () + b [n - i] * pKnownPoints [i].Y ());
-/*N*/ }
-/*N*/ }
-
-/*************************************************************************
-|*
-|* Berechne B-Spline
-|*
-\************************************************************************/
-
-/*N*/ void approxMesh (int splineSize,
-/*N*/ XPolygon &pSplines,
-/*N*/ XPolygon &pKnownPoints,
-/*N*/ int n,
-/*N*/ int k)
-/*N*/ {
-/*N*/ int pCount = splineSize * n;
-/*N*/ double *b = new double [n + k + 1];
-/*N*/ double *t = new double [n + k + 2];
-/*N*/ double xStep = ((double) n - (double) k + 2.0) / (double) pCount;
-/*N*/ double dStep = ((double) pKnownPoints [n].X () - (double) pKnownPoints [0].X ()) / (double) pCount;
-/*N*/ double dXUp = pKnownPoints [0].X ();
-/*N*/ double dXDown = pKnownPoints [n].X ();
-/*N*/ double x = 0.0;
-/*N*/ int nEnd = pCount / 2 + 1;
-/*N*/
-/*N*/ TVector (n, k, t);
-/*N*/
-/*N*/ for (int j = 0;
-/*N*/ j <= nEnd;
-/*N*/ j ++)
-/*N*/ {
-/*N*/ Point aPoint1;
-/*N*/ Point aPoint2;
-/*N*/
-/*N*/ BVector (x, n, k, b, t);
-/*N*/ BSPoint (n, aPoint1, aPoint2, pKnownPoints, b);
-/*N*/
-/*N*/ pSplines [j].X () = (int)(floor(dXUp)+0.5);
-/*N*/ pSplines [j].Y () = aPoint1.Y ();
-/*N*/ pSplines [pCount - j].X () = (int)(floor(dXDown)+0.5);
-/*N*/ pSplines [pCount - j].Y () = aPoint2.Y ();
-/*N*/
-/*N*/ x += xStep;
-/*N*/ dXUp += dStep;
-/*N*/ dXDown -= dStep;
-/*N*/ }
-/*N*/
-/*N*/ delete[] t;
-/*N*/ delete[] b;
-/*N*/ }
-
/*************************************************************************
|*
|* Passe untere Grenze an den Wertebereich an