From 870203a92a83da9e2e1b8a56e4eab43aa561a564 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 21 Jun 2010 17:41:23 +0200 Subject: sb126: #i111970# accept and ignore EnableAsync (transplanted from 0c119e327cea31601db9932cf3f85bbab9ee06f5) --- configmgr/source/configurationprovider.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx index a89540a88158..78d71e73e7d5 100644 --- a/configmgr/source/configurationprovider.cxx +++ b/configmgr/source/configurationprovider.cxx @@ -241,7 +241,7 @@ Service::createInstanceWithArguments( if (nodepath.getLength() == 0) { badNodePath(); } - // For backwards compatibility, allow a notepath that misses the leading + // For backwards compatibility, allow a nodepath that misses the leading // slash: if (nodepath[0] != '/') { nodepath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + nodepath; @@ -456,7 +456,8 @@ Factory::createInstanceWithArgumentsAndContext( " arguments")), 0); } - // For backwards compatibility, allow "Locale" in any case: + // For backwards compatibility, allow "Locale" and (ignored) + // "EnableAsync" in any case: if (name.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("locale"))) { @@ -471,8 +472,9 @@ Factory::createInstanceWithArgumentsAndContext( " one, non-empty, string Locale argument")), 0); } - } else { - //TODO + } else if (!name.equalsIgnoreAsciiCaseAsciiL( + RTL_CONSTASCII_STRINGPARAM("enableasync"))) + { throw css::uno::Exception( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( -- cgit v1.2.3 From 66222c7cbe23fbb4ae0ebf00d543cc2699f56b6c Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 8 Sep 2010 17:52:18 +0200 Subject: #b6983101#: applied patch and did some additional robustness checks --- sw/source/core/doc/number.cxx | 9 ++++++++- sw/source/filter/rtf/rtfnum.cxx | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 7af292626f06..847c6b229fd1 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -101,8 +101,15 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const { + const SwNumFmt * pResult = NULL; + ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL); - return aFmts[ i ]; + if ( i < MAXLEVEL && eRuleType < RULE_END) + { + pResult = aFmts[ i ]; + } + + return pResult; } // --> OD 2008-07-08 #i91400# diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 84719b2f1255..507f35375ed6 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -806,8 +806,8 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) // suche die Rule - steht unter Nummer 3 nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue - 1 ); + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 + : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 )); } else { @@ -815,9 +815,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) { case RTF_PNLVL: nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue-1 ); + : (!nTokenValue ? 0 : BYTE( nTokenValue-1 )); break; case RTF_PNLVLBODY: -- cgit v1.2.3 From f68c781b9427c6970e45e8976d54313603ddd8df Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 9 Sep 2010 10:48:03 +0200 Subject: hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one --- solenv/bin/checkdll.sh | 4 ++-- solenv/bin/gsicheck | 4 ++-- solenv/bin/localize | 4 ++-- solenv/bin/localize_sl | 4 ++-- solenv/bin/rpm-wrapper | 6 +++--- solenv/bin/soirpm.sh | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) mode change 100755 => 100644 solenv/bin/soirpm.sh diff --git a/solenv/bin/checkdll.sh b/solenv/bin/checkdll.sh index e8faa516a852..a9a502c7f6af 100755 --- a/solenv/bin/checkdll.sh +++ b/solenv/bin/checkdll.sh @@ -51,12 +51,12 @@ if [ -x $checkdll ]; then shift # remove the trailing --- case `uname -s` in - Darwin) case "${DYLD_LIBRARY_PATH+X}" in + Darwin) case "${DYLD_LIBRARY_PATH:+X}" in X) DYLD_LIBRARY_PATH=$libpath:$DYLD_LIBRARY_PATH;; *) DYLD_LIBRARY_PATH=$libpath;; esac export DYLD_LIBRARY_PATH;; - *) case "${LD_LIBRARY_PATH+X}" in + *) case "${LD_LIBRARY_PATH:+X}" in X) LD_LIBRARY_PATH=$libpath:$LD_LIBRARY_PATH;; *) LD_LIBRARY_PATH=$libpath;; esac diff --git a/solenv/bin/gsicheck b/solenv/bin/gsicheck index 9b898c9d5950..fb2f65cbe01d 100755 --- a/solenv/bin/gsicheck +++ b/solenv/bin/gsicheck @@ -5,9 +5,9 @@ exit 1 fi if [ "${OS?}" = MACOSX ]; then - export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} else - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} fi if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then diff --git a/solenv/bin/localize b/solenv/bin/localize index e14b149226b5..ef5550e72e67 100755 --- a/solenv/bin/localize +++ b/solenv/bin/localize @@ -7,9 +7,9 @@ fi # localize.pl calls localize_sl in solver bin directory which depends on dynamic # libraries in solver lib directory but has no correct RPATH (or equivalent): if [ "${OS?}" = MACOSX ]; then - export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} else - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} fi if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then diff --git a/solenv/bin/localize_sl b/solenv/bin/localize_sl index df8205cf6d22..af7f8351406c 100755 --- a/solenv/bin/localize_sl +++ b/solenv/bin/localize_sl @@ -5,9 +5,9 @@ exit 1 fi if [ "${OS?}" = MACOSX ]; then - export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} else - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT} fi if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then diff --git a/solenv/bin/rpm-wrapper b/solenv/bin/rpm-wrapper index 1a285ddaa3e6..f4234a9c5d89 100755 --- a/solenv/bin/rpm-wrapper +++ b/solenv/bin/rpm-wrapper @@ -35,15 +35,15 @@ set -e if [ "$OUTPATH" = "unxlngi6" ] then -LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ +LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ ${BUILD_TOOLS?}/rpmbuild "$@" else if [ "$OUTPATH" = "unxlngx6" ] then -LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ +LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBRARY_PATH?} \ ${BUILD_TOOLS?}/rpmbuild "$@" else -LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \ +LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \ ${BUILD_TOOLS?}/rpm "$@" fi fi diff --git a/solenv/bin/soirpm.sh b/solenv/bin/soirpm.sh old mode 100755 new mode 100644 index 1aa34f2a4a45..86f8a3e269fd --- a/solenv/bin/soirpm.sh +++ b/solenv/bin/soirpm.sh @@ -28,5 +28,5 @@ LIBRPMBUILD=$(find ${COMPATH} -name 'librpmbuild-4.1*' -print) # echo $(dirname $LIBRPMBUILD) LD_LIBRARY_PATH=$(dirname ${LIBRPMBUILD}) ${BUILD_TOOLS?}/rpm "$@" -# LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \ +# LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${COMPATH?}/lib \ # ${BUILD_TOOLS?}/rpm "$@" -- cgit v1.2.3 From 33192399848807a2029ecf398f843c2810e4f894 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 9 Sep 2010 10:48:03 +0200 Subject: hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one --- pyuno/zipcore/python.sh | 2 +- ure/source/startup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyuno/zipcore/python.sh b/pyuno/zipcore/python.sh index 680c6a241572..b57bc6c3e3b6 100644 --- a/pyuno/zipcore/python.sh +++ b/pyuno/zipcore/python.sh @@ -44,7 +44,7 @@ PATH=$sd_prog${PATH+:$PATH} export PATH # Set LD_LIBRARY_PATH so that "import pyuno" finds libpyuno.so: -LD_LIBRARY_PATH=$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} +LD_LIBRARY_PATH=$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH # Set UNO_PATH so that "officehelper.bootstrap()" can find soffice executable: diff --git a/ure/source/startup.sh b/ure/source/startup.sh index 6d79b8d72060..7130d172809b 100644 --- a/ure/source/startup.sh +++ b/ure/source/startup.sh @@ -39,7 +39,7 @@ epath=`dirname "$0"` if [ -x "${epath}/javaldx" ] ; then jpath=`"${epath}/javaldx" $my_envargs` if [ -n "${jpath}" ]; then - LD_LIBRARY_PATH=${jpath}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} + LD_LIBRARY_PATH=${jpath}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export LD_LIBRARY_PATH fi fi -- cgit v1.2.3 From 240bb1f07083839b69767fa68603999d5c5aaba7 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 9 Sep 2010 10:48:03 +0200 Subject: hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one --- padmin/source/spadmin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/padmin/source/spadmin.sh b/padmin/source/spadmin.sh index 31ab4382fe52..c831ab7f0919 100644 --- a/padmin/source/spadmin.sh +++ b/padmin/source/spadmin.sh @@ -57,7 +57,7 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` if [ -n "$my_path" ] ; then - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH fi fi -- cgit v1.2.3 From 90a93cdf131381df4fe985d6535be76a52310a1c Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 9 Sep 2010 10:48:03 +0200 Subject: hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one --- desktop/scripts/soffice.sh | 2 +- desktop/scripts/unopkg.sh | 2 +- svx/source/gengal/gengal.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index 0215f88d1ff0..cd191e43ef2b 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -96,7 +96,7 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` if [ -n "$my_path" ] ; then - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH fi fi diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh index 0fe319735c06..1f09b87eb1ef 100644 --- a/desktop/scripts/unopkg.sh +++ b/desktop/scripts/unopkg.sh @@ -57,7 +57,7 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` if [ -n "$my_path" ] ; then - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH fi fi diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh index 98e2cc1c845a..a760b8e085d0 100644 --- a/svx/source/gengal/gengal.sh +++ b/svx/source/gengal/gengal.sh @@ -67,17 +67,17 @@ case $sd_platform in ;; Darwin) - DYLD_LIBRARY_PATH=${sd_prog}${DYLD_LIBRARY_PATH+:${DYLD_LIBRARY_PATH}} + DYLD_LIBRARY_PATH=${sd_prog}${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} export DYLD_LIBRARY_PATH ;; HP-UX) - SHLIB_PATH=${sd_prog}:/usr/openwin/lib${SHLIB_PATH+:${SHLIB_PATH}} + SHLIB_PATH=${sd_prog}:/usr/openwin/lib${SHLIB_PATH:+:${SHLIB_PATH}} export SHLIB_PATH ;; *) - LD_LIBRARY_PATH=${sd_prog}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} + LD_LIBRARY_PATH=${sd_prog}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} export LD_LIBRARY_PATH ;; esac -- cgit v1.2.3 From 25b25d0edf477735c145e514269c76bf1766328b Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 10 Sep 2010 11:45:14 +0200 Subject: #b6983098# applied patch --- sw/source/filter/ww8/ww8scan.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index d318522100cf..d64e207313d8 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -7179,8 +7179,16 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData) for (i=0; i < nMaxLeading; ++i) rgxchLPunct[i] = Get_Short(pData); - rgxchFPunct[cchFollowingPunct]=0; - rgxchLPunct[cchLeadingPunct]=0; + if (cchFollowingPunct >= 0 && cchFollowingPunct < nMaxFollowing) + rgxchFPunct[cchFollowingPunct]=0; + else + rgxchFPunct[nMaxFollowing - 1]=0; + + if (cchLeadingPunct >= 0 && cchLeadingPunct < nMaxLeading) + rgxchLPunct[cchLeadingPunct]=0; + else + rgxchLPunct[nMaxLeading - 1]=0; + } void WW8DopTypography::WriteToMem(BYTE *&pData) const -- cgit v1.2.3 From e8206d063b6eac570e38834b58923420e55dda99 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Fri, 10 Sep 2010 17:37:04 +0200 Subject: #b6983105# applied patch and verified --- sw/source/filter/ww8/ww8par3.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 75454dddbc58..a9a60a01147a 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1400,7 +1400,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) pLFOInfo->pNumRule->Set(aLFOLVL.nLevel, aNumFmt); } bLVLOk = true; - pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; + + if (nMaxLevel > aLFOLVL.nLevel) + pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; } if( !bLVLOk ) break; -- cgit v1.2.3 From 5b674bd583868abde278ebdf73bb2197849a49ae Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 14 Sep 2010 09:09:34 +0200 Subject: dba33j: #i111125# Resize: do not leave the method prematurely, the more not depending on a condition whose state is about to be changed a few lines below --- svtools/source/brwbox/brwbox2.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 68cf316e813b..53c2a5ac86f6 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -613,13 +613,6 @@ void BrowseBox::Resize() if (IsZoom()) nSBSize = (ULONG)(nSBSize * (double)GetZoom()); - long nSize = pDataWin->GetPosPixel().Y(); - if( !getDataWindow()->bNoHScroll ) - nSize += aHScroll.GetSizePixel().Height(); - - if ( GetOutputSizePixel().Height() < nSize ) - return; - DoHideCursor( "Resize" ); USHORT nOldVisibleRows = (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1); -- cgit v1.2.3 -- cgit v1.2.3 From 7d9d5117b8a0a2d7032f10a198738784504a5175 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Thu, 16 Sep 2010 15:24:15 +0200 Subject: dba33j: #i114522# method on moving anchor handle: Use adjusted position for hit test on handle, because hit test based on primitives now has problem with floating point operations (0 becomes -1,77e-15) --- sw/source/ui/docvw/edtwin.cxx | 47 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 7b5741316cbb..5049220b1b5a 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -193,15 +193,51 @@ class SwAnchorMarker SdrHdl* pHdl; Point aHdlPos; Point aLastPos; + // --> OD 2010-09-16 #i114522# + bool bTopRightHandle; + // <-- public: - SwAnchorMarker( SdrHdl* pH ) : - pHdl( pH ), aHdlPos( pH->GetPos() ), aLastPos( pH->GetPos() ) {} + SwAnchorMarker( SdrHdl* pH ) + : pHdl( pH ) + , aHdlPos( pH->GetPos() ) + , aLastPos( pH->GetPos() ) + // --> OD 2010-09-16 #i114522# + , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) + // <-- + {} const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } - void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; } + void ChgHdl( SdrHdl* pNew ) + { + pHdl = pNew; + // --> OD 2010-09-16 #i114522# + if ( pHdl ) + { + bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR); + } + // <-- + } + // --> OD 2010-09-16 #i114522# + const Point GetPosForHitTest( const OutputDevice& rOut ) + { + Point aHitTestPos( GetPos() ); + aHitTestPos = rOut.LogicToPixel( aHitTestPos ); + if ( bTopRightHandle ) + { + aHitTestPos += Point( -1, 1 ); + } + else + { + aHitTestPos += Point( 1, 1 ); + } + aHitTestPos = rOut.PixelToLogic( aHitTestPos ); + + return aHitTestPos; + } + // <-- }; struct QuickHelpData @@ -3609,7 +3645,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // So the pAnchorMarker has to find the right SdrHdl, if it's // the old one, it will find it with position aOld, if this one // is destroyed, it will find a new one at position GetHdlPos(). - Point aOld = pAnchorMarker->GetPos(); + // --> OD 2010-09-16 #i114522# +// const Point aOld = pAnchorMarker->GetPos(); + const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) ); + // <-- Point aNew = rSh.FindAnchorPos( aDocPt ); SdrHdl* pHdl; if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )|| -- cgit v1.2.3 From d70aabb7bda9dc0a4bc14e00e6080a12ef8f238c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Sep 2010 12:46:27 +0200 Subject: dba33j: #i114273# --- wizards/com/sun/star/wizards/db/DBMetaData.java | 32 +-- .../com/sun/star/wizards/query/QueryWizard.java | 256 +++++++++++++-------- .../com/sun/star/wizards/ui/FilterComponent.java | 171 ++------------ 3 files changed, 175 insertions(+), 284 deletions(-) diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index f46c3fd657d4..323ded34385a 100644 --- a/wizards/com/sun/star/wizards/db/DBMetaData.java +++ b/wizards/com/sun/star/wizards/db/DBMetaData.java @@ -38,12 +38,10 @@ import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.UnknownPropertyException; import com.sun.star.beans.XPropertySet; -import com.sun.star.container.XChild; import com.sun.star.container.XHierarchicalNameAccess; import com.sun.star.container.XHierarchicalNameContainer; import com.sun.star.container.XNameAccess; import com.sun.star.container.XNameContainer; -import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XModel; import com.sun.star.frame.XStorable; import com.sun.star.lang.XComponent; @@ -91,7 +89,6 @@ import java.util.logging.Logger; public class DBMetaData { - private XNameAccess xQueryNames; public XDatabaseMetaData xDBMetaData; private XDataSource m_dataSource; @@ -109,12 +106,8 @@ public class DBMetaData public com.sun.star.lang.XMultiServiceFactory xMSF; public XComponent xConnectionComponent; - private XNameAccess m_xTableNames; - private XInteractionHandler oInteractionHandler; private XNameAccess xNameAccess; private XInterface xDatabaseContext; - private XCompletedConnection xCompleted; - // private int[] nDataTypes = null; private XWindowPeer xWindowPeer; private String[] TableNames = new String[] {}; private String[] QueryNames = new String[] {}; @@ -212,15 +205,13 @@ public class DBMetaData return lDateCorrection; } - void getInterfaces(XMultiServiceFactory xMSF) + private void getInterfaces(XMultiServiceFactory xMSF) { try { this.xMSF = xMSF; xDatabaseContext = (XInterface) xMSF.createInstance("com.sun.star.sdb.DatabaseContext"); xNameAccess = UnoRuntime.queryInterface( XNameAccess.class, xDatabaseContext ); - XInterface xInteractionHandler = (XInterface) xMSF.createInstance("com.sun.star.task.InteractionHandler"); - oInteractionHandler = UnoRuntime.queryInterface( XInteractionHandler.class, xInteractionHandler ); DataSourceNames = xNameAccess.getElementNames(); } catch (Exception exception) @@ -257,7 +248,6 @@ public class DBMetaData public boolean hasTableByName(String _stablename) { - // getTableNames(); return getTableNamesAsNameAccess().hasByName(_stablename); } @@ -371,11 +361,6 @@ public class DBMetaData return bHasEscapeProcessing; } - // public void initCommandNames() - // { - // getTableNames(); - // } - public XNameAccess getQueryNamesAsNameAccess() { XQueriesSupplier xDBQueries = UnoRuntime.queryInterface( XQueriesSupplier.class, DBConnection ); @@ -416,7 +401,7 @@ public class DBMetaData return TableNames; } - void InitializeWidthList() + private void InitializeWidthList() { WidthList = new int[17][2]; WidthList[0][0] = DataType.BIT; // == -7; @@ -581,7 +566,7 @@ public class DBMetaData return m_dataSource; } - private void setDataSourceByName(String _DataSourceName, boolean bgetInterfaces) + private void setDataSourceByName(String _DataSourceName) { try { @@ -601,7 +586,6 @@ public class DBMetaData public void getDataSourceInterfaces() throws Exception { - xCompleted = UnoRuntime.queryInterface( XCompletedConnection.class, getDataSource() ); xDataSourcePropertySet = UnoRuntime.queryInterface( XPropertySet.class, getDataSource() ); bPasswordIsRequired = ((Boolean) xDataSourcePropertySet.getPropertyValue("IsPasswordRequired")).booleanValue(); } @@ -684,8 +668,8 @@ public class DBMetaData private boolean getConnection(String _DataSourceName) { - setDataSourceByName(_DataSourceName, true); - return getConnection( getDataSource() ); + setDataSourceByName(_DataSourceName); + return getConnection( getDataSource() ); } private boolean getConnection(com.sun.star.sdbc.XConnection _DBConnection) @@ -955,7 +939,7 @@ public class DBMetaData NamedValueCollection creationArgs = new NamedValueCollection(); creationArgs.put( "Name", basename ); creationArgs.put( "URL", documentURL ); - creationArgs.put( "AsTemplate", new Boolean( i_createTemplate ) ); + creationArgs.put( "AsTemplate", i_createTemplate ); XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface( XMultiServiceFactory.class, _xDocNameAccess ); Object oDBDocument = xDocMSF.createInstanceWithArguments( "com.sun.star.sdb.DocumentDefinition", creationArgs.getPropertyValues() ); XHierarchicalNameContainer xHier = UnoRuntime.queryInterface( XHierarchicalNameContainer.class, _xDocNameAccess ); @@ -967,7 +951,7 @@ public class DBMetaData } catch (Exception e) { - e.printStackTrace(System.out); + e.printStackTrace(); } } @@ -1103,13 +1087,11 @@ public class DBMetaData public void finish() { xQueryNames = null; - oInteractionHandler = null; xNameAccess = null; xDatabaseContext = null; xDBMetaData = null; m_dataSource = null; xModel = null; - xCompleted = null; xDataSourcePropertySet = null; xWindowPeer = null; DBConnection = null; diff --git a/wizards/com/sun/star/wizards/query/QueryWizard.java b/wizards/com/sun/star/wizards/query/QueryWizard.java index 53fc67f01192..a0970534d657 100644 --- a/wizards/com/sun/star/wizards/query/QueryWizard.java +++ b/wizards/com/sun/star/wizards/query/QueryWizard.java @@ -36,8 +36,10 @@ import com.sun.star.sdbc.SQLException; import com.sun.star.uno.AnyConverter; import com.sun.star.wizards.ui.UIConsts; import com.sun.star.uno.UnoRuntime; +import com.sun.star.wizards.common.Desktop; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; +import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.common.Resource; import com.sun.star.wizards.db.DatabaseObjectWizard; import com.sun.star.wizards.db.QueryMetaData; @@ -59,15 +61,15 @@ public class QueryWizard extends DatabaseObjectWizard private static final int SOGROUPFILTER_PAGE = 6; private static final int SOTITLES_PAGE = 7; protected static final int SOSUMMARY_PAGE = 8; - private CommandFieldSelection CurDBCommandFieldSelection; - private SortingComponent CurSortingComponent; - private FieldSelection CurGroupFieldSelection; - private TitlesComponent CurTitlesComponent; - private FilterComponent CurFilterComponent; - private FilterComponent CurGroupFilterComponent; - private AggregateComponent CurAggregateComponent; - private Finalizer CurFinalizer; - private QuerySummary CurDBMetaData; + private CommandFieldSelection m_DBCommandFieldSelectio; + private SortingComponent m_sortingComponent; + private FieldSelection m_groupFieldSelection; + private TitlesComponent m_titlesComponent; + private FilterComponent m_filterComponent; + private FilterComponent m_groupFilterComponent; + private AggregateComponent m_aggregateComponent; + private Finalizer m_finalizer; + private QuerySummary m_DBMetaData; private String reslblFieldHeader; private String reslblAliasHeader; private String reslblFields; @@ -82,30 +84,85 @@ public class QueryWizard extends DatabaseObjectWizard { super( xMSF, 40970, i_wizardContext ); addResourceHandler("QueryWizard", "dbw"); - CurDBMetaData = new QuerySummary(xMSF, m_oResource); + m_DBMetaData = new QuerySummary(xMSF, m_oResource); } -/* public static void main(String args[]) + public static void main(String i_args[]) { - String ConnectStr = "uno:pipe,name=foo;urp;StarOffice.ServiceManager"; + final String settings[] = new String[] { null, null, null }; + final int IDX_PIPE_NAME = 0; + final int IDX_LOCATION = 1; + final int IDX_DSN = 2; + + // some simple parsing + boolean failure = false; + int settingsIndex = -1; + for ( int i=0; i= 0 ) + { + settings[ settingsIndex ] = i_args[i]; + settingsIndex = -1; + continue; + } + + if ( i_args[i].equals( "--pipe-name" ) ) + { + settingsIndex = IDX_PIPE_NAME; + continue; + } + + if ( i_args[i].equals( "--database-location" ) ) + { + settingsIndex = IDX_LOCATION; + continue; + } + + if ( i_args[i].equals( "--data-source-name" ) ) + { + settingsIndex = IDX_DSN; + continue; + } + + failure = true; + } + + if ( settings[ IDX_PIPE_NAME ] == null ) + failure = true; + + if ( ( settings[ IDX_DSN ] == null ) && ( settings[ IDX_LOCATION ] == null ) ) + failure = true; + + if ( failure ) + { + System.err.println( "supported arguments: " ); + System.err.println( " --pipe-name : specifies the name of the pipe to connect to the running OOo instance" ); + System.err.println( " --database-location : specifies the URL of the database document to work with" ); + System.err.println( " --data-source-name : specifies the name of the data source to work with" ); + return; + } + + final String ConnectStr = "uno:pipe,name=" + settings[IDX_PIPE_NAME] + ";urp;StarOffice.ServiceManager"; try { - XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr); - if (xLocMSF != null) + final XMultiServiceFactory serviceFactory = Desktop.connect(ConnectStr); + if (serviceFactory != null) { PropertyValue[] curproperties = new PropertyValue[1]; - curproperties[0] = Properties.createProperty("DatabaseLocation", "file:///G:/temp/abc.odb"); -// curproperties[0] = Properties.createProperty("DataSourceName", "TESTDB"); + if ( settings[ IDX_LOCATION ] != null ) + curproperties[0] = Properties.createProperty( "DatabaseLocation", settings[ IDX_LOCATION ] ); + else + curproperties[0] = Properties.createProperty( "DataSourceName", settings[ IDX_DSN ] ); - QueryWizard CurQueryWizard = new QueryWizard(xLocMSF); - CurQueryWizard.startQueryWizard(xLocMSF, curproperties); + QueryWizard CurQueryWizard = new QueryWizard( serviceFactory, curproperties ); + CurQueryWizard.startQueryWizard(); } } catch (java.lang.Exception jexception) { jexception.printStackTrace(System.out); } - }*/ + } public final XFrame getFrame() { @@ -116,7 +173,7 @@ public class QueryWizard extends DatabaseObjectWizard { try { - if ( CurDBMetaData.getConnection( m_wizardContext ) ) + if ( m_DBMetaData.getConnection( m_wizardContext ) ) { reslblFields = m_oResource.getResText(UIConsts.RID_QUERY + 4); reslblFieldHeader = m_oResource.getResText(UIConsts.RID_QUERY + 19); //Fielnames in AliasComponent @@ -138,11 +195,11 @@ public class QueryWizard extends DatabaseObjectWizard setRightPaneHeaders(m_oResource, UIConsts.RID_QUERY + 70, 8); this.setMaxStep(8); buildSteps(); - this.CurDBCommandFieldSelection.preselectCommand( m_wizardContext, false ); + this.m_DBCommandFieldSelectio.preselectCommand( m_wizardContext, false ); XWindowPeer windowPeer = UnoRuntime.queryInterface( XWindowPeer.class, m_frame.getContainerWindow() ); createWindowPeer(windowPeer); - CurDBMetaData.setWindowPeer(this.xControl.getPeer()); + m_DBMetaData.setWindowPeer(this.xControl.getPeer()); insertQueryRelatedSteps(); executeDialog( m_frame.getContainerWindow().getPosSize() ); } @@ -151,14 +208,14 @@ public class QueryWizard extends DatabaseObjectWizard { jexception.printStackTrace(System.out); } - CurGroupFilterComponent = null; - CurTitlesComponent = null; - CurAggregateComponent = null; - CurDBCommandFieldSelection = null; + m_groupFilterComponent = null; + m_titlesComponent = null; + m_aggregateComponent = null; + m_DBCommandFieldSelectio = null; xWindowPeer = null; - CurFinalizer = null; - CurDBMetaData.finish(); - CurDBMetaData = null; + m_finalizer = null; + m_DBMetaData.finish(); + m_DBMetaData = null; System.gc(); return m_createdQuery; @@ -181,17 +238,17 @@ public class QueryWizard extends DatabaseObjectWizard case SOAGGREGATE_PAGE: if (_bEnabled == true) { - bEnabled = ((CurDBMetaData.hasNumericalFields()) && (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar())); + bEnabled = ((m_DBMetaData.hasNumericalFields()) && (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar())); } break; case SOGROUPSELECTION_PAGE: - bEnabled = CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY; + bEnabled = m_DBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY; break; case SOGROUPFILTER_PAGE: bEnabled = false; if (_bEnabled == true) { - bEnabled = (CurDBMetaData.GroupByFilterConditions.length > 0); + bEnabled = (m_DBMetaData.GroupByFilterConditions.length > 0); } break; @@ -225,11 +282,11 @@ public class QueryWizard extends DatabaseObjectWizard i = insertRoadmapItem(0, true, SOFIELDSELECTION_PAGE - 1, SOFIELDSELECTION_PAGE); i = insertRoadmapItem(i, false, SOSORTING_PAGE - 1, SOSORTING_PAGE); // Orderby is always supported i = insertRoadmapItem(i, false, SOFILTER_PAGE - 1, SOFILTER_PAGE); - if (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar()) + if (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()) { - i = insertRoadmapItem(i, CurDBMetaData.hasNumericalFields(), SOAGGREGATE_PAGE - 1, SOAGGREGATE_PAGE); + i = insertRoadmapItem(i, m_DBMetaData.hasNumericalFields(), SOAGGREGATE_PAGE - 1, SOAGGREGATE_PAGE); } - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { i = insertRoadmapItem(i, false, SOGROUPSELECTION_PAGE - 1, SOGROUPSELECTION_PAGE); i = insertRoadmapItem(i, false, SOGROUPFILTER_PAGE - 1, SOGROUPFILTER_PAGE); @@ -251,28 +308,25 @@ public class QueryWizard extends DatabaseObjectWizard { try { -// curDBCommandFieldSelection = new CommandFieldSelection(this, curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, true, 34411); -// curDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - - CurDBCommandFieldSelection = new CommandFieldSelection(this, CurDBMetaData, 120, reslblFields, reslblSelFields, reslblTables, true, 40850); - CurDBCommandFieldSelection.setAppendMode(true); - CurDBCommandFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - CurSortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); - CurFilterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 209, 3, CurDBMetaData, 40878); - CurFilterComponent.addNumberFormats(); + m_DBCommandFieldSelectio = new CommandFieldSelection(this, m_DBMetaData, 120, reslblFields, reslblSelFields, reslblTables, true, 40850); + m_DBCommandFieldSelectio.setAppendMode(true); + m_DBCommandFieldSelectio.addFieldSelectionListener(new FieldSelectionListener()); + m_sortingComponent = new SortingComponent(this, SOSORTING_PAGE, 95, 27, 210, 40865); + m_filterComponent = new FilterComponent(this, xMSF, SOFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40878); + m_filterComponent.addNumberFormats(); - if (CurDBMetaData.xDBMetaData.supportsCoreSQLGrammar()) + if (m_DBMetaData.xDBMetaData.supportsCoreSQLGrammar()) { - CurAggregateComponent = new AggregateComponent(this, CurDBMetaData, SOAGGREGATE_PAGE, 97, 69, 209, 5, 40895); + m_aggregateComponent = new AggregateComponent(this, m_DBMetaData, SOAGGREGATE_PAGE, 97, 69, 209, 5, 40895); } - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurGroupFieldSelection = new FieldSelection(this, SOGROUPSELECTION_PAGE, 95, 27, 210, 150, reslblFields, this.reslblGroupBy, 40915, false); - CurGroupFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); - CurGroupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 209, 3, CurDBMetaData, 40923); + m_groupFieldSelection = new FieldSelection(this, SOGROUPSELECTION_PAGE, 95, 27, 210, 150, reslblFields, this.reslblGroupBy, 40915, false); + m_groupFieldSelection.addFieldSelectionListener(new FieldSelectionListener()); + m_groupFilterComponent = new FilterComponent(this, xMSF, SOGROUPFILTER_PAGE, 97, 27, 209, 3, m_DBMetaData, 40923); } - CurTitlesComponent = new TitlesComponent(this, SOTITLES_PAGE, 97, 37, 207, 7, reslblFieldHeader, reslblAliasHeader, 40940); - CurFinalizer = new Finalizer(this, CurDBMetaData); + m_titlesComponent = new TitlesComponent(this, SOTITLES_PAGE, 97, 37, 207, 7, reslblFieldHeader, reslblAliasHeader, 40940); + m_finalizer = new Finalizer(this, m_DBMetaData); enableNavigationButtons(false, false, false); } catch (com.sun.star.uno.Exception exception) @@ -288,10 +342,10 @@ public class QueryWizard extends DatabaseObjectWizard || ( switchToStep( ncurStep, SOSUMMARY_PAGE ) ) ) { - m_createdQuery = CurFinalizer.finish(); + m_createdQuery = m_finalizer.finish(); if ( m_createdQuery.length() > 0 ) { - loadSubComponent( CommandType.QUERY, m_createdQuery, CurFinalizer.displayQueryDesign() ); + loadSubComponent( CommandType.QUERY, m_createdQuery, m_finalizer.displayQueryDesign() ); xDialog.endExecute(); return true; } @@ -305,11 +359,11 @@ public class QueryWizard extends DatabaseObjectWizard { if (nOldStep <= SOGROUPSELECTION_PAGE && nNewStep > SOGROUPSELECTION_PAGE) { - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurDBMetaData.setGroupFieldNames(CurGroupFieldSelection.getSelectedFieldNames()); - CurDBMetaData.GroupFieldNames = JavaTools.removeOutdatedFields(CurDBMetaData.GroupFieldNames, CurDBMetaData.NonAggregateFieldNames); - CurDBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(CurDBMetaData.GroupByFilterConditions, CurDBMetaData.GroupFieldNames); + m_DBMetaData.setGroupFieldNames(m_groupFieldSelection.getSelectedFieldNames()); + m_DBMetaData.GroupFieldNames = JavaTools.removeOutdatedFields(m_DBMetaData.GroupFieldNames, m_DBMetaData.NonAggregateFieldNames); + m_DBMetaData.GroupByFilterConditions = JavaTools.removeOutdatedFields(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.GroupFieldNames); } } switch (nNewStep) @@ -317,24 +371,24 @@ public class QueryWizard extends DatabaseObjectWizard case SOFIELDSELECTION_PAGE: break; case SOSORTING_PAGE: - CurSortingComponent.initialize(CurDBMetaData.getDisplayFieldNames(), CurDBMetaData.getSortFieldNames()); + m_sortingComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.getSortFieldNames()); break; case SOFILTER_PAGE: - CurFilterComponent.initialize(CurDBMetaData.getFilterConditions(), CurDBMetaData.getDisplayFieldNames()); + m_filterComponent.initialize(m_DBMetaData.getFilterConditions(), m_DBMetaData.getDisplayFieldNames()); break; case SOAGGREGATE_PAGE: - CurAggregateComponent.initialize(); + m_aggregateComponent.initialize(); break; case SOGROUPSELECTION_PAGE: break; case SOGROUPFILTER_PAGE: - CurGroupFilterComponent.initialize(CurDBMetaData.GroupByFilterConditions, CurDBMetaData.getGroupFieldNames()); + m_groupFilterComponent.initialize(m_DBMetaData.GroupByFilterConditions, m_DBMetaData.getGroupFieldNames()); break; case SOTITLES_PAGE: - CurTitlesComponent.initialize(CurDBMetaData.getDisplayFieldNames(), CurDBMetaData.FieldTitleSet); + m_titlesComponent.initialize(m_DBMetaData.getDisplayFieldNames(), m_DBMetaData.FieldTitleSet); break; case SOSUMMARY_PAGE: - CurFinalizer.initialize(); + m_finalizer.initialize(); break; default: break; @@ -351,27 +405,27 @@ public class QueryWizard extends DatabaseObjectWizard switch (nOldStep) { case SOFIELDSELECTION_PAGE: - CurDBMetaData.reorderFieldColumns(CurDBCommandFieldSelection.getSelectedFieldNames()); - CurDBMetaData.initializeFieldTitleSet(true); - CurDBMetaData.setNumericFields(); + m_DBMetaData.reorderFieldColumns(m_DBCommandFieldSelectio.getSelectedFieldNames()); + m_DBMetaData.initializeFieldTitleSet(true); + m_DBMetaData.setNumericFields(); searchForOutdatedFields(); break; case SOSORTING_PAGE: - CurDBMetaData.setSortFieldNames(CurSortingComponent.getSortFieldNames()); + m_DBMetaData.setSortFieldNames(m_sortingComponent.getSortFieldNames()); break; case SOFILTER_PAGE: - CurDBMetaData.setFilterConditions(CurFilterComponent.getFilterConditions()); + m_DBMetaData.setFilterConditions(m_filterComponent.getFilterConditions()); break; case SOAGGREGATE_PAGE: - CurDBMetaData.AggregateFieldNames = CurAggregateComponent.getAggregateFieldNames(); + m_DBMetaData.AggregateFieldNames = m_aggregateComponent.getAggregateFieldNames(); break; case SOGROUPSELECTION_PAGE: break; case SOGROUPFILTER_PAGE: - CurDBMetaData.setGroupByFilterConditions(this.CurGroupFilterComponent.getFilterConditions()); + m_DBMetaData.setGroupByFilterConditions(this.m_groupFilterComponent.getFilterConditions()); break; case SOTITLES_PAGE: - CurDBMetaData.setFieldTitles(CurTitlesComponent.getFieldTitles()); + m_DBMetaData.setFieldTitles(m_titlesComponent.getFieldTitles()); break; case SOSUMMARY_PAGE: break; @@ -382,15 +436,15 @@ public class QueryWizard extends DatabaseObjectWizard { try { - if (CurDBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY) + if (m_DBMetaData.Type == QueryMetaData.QueryType.SOSUMMARYQUERY) { - if (CurDBMetaData.xDBMetaData.supportsGroupBy()) + if (m_DBMetaData.xDBMetaData.supportsGroupBy()) { - CurDBMetaData.setNonAggregateFieldNames(); - CurGroupFieldSelection.initialize(CurDBMetaData.getUniqueAggregateFieldNames(), false, CurDBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); - CurGroupFieldSelection.intializeSelectedFields(CurDBMetaData.NonAggregateFieldNames); - CurGroupFieldSelection.setMultipleMode(false); - setStepEnabled(SOGROUPFILTER_PAGE, CurAggregateComponent.isGroupingpossible() && CurDBMetaData.NonAggregateFieldNames.length > 0); + m_DBMetaData.setNonAggregateFieldNames(); + m_groupFieldSelection.initialize(m_DBMetaData.getUniqueAggregateFieldNames(), false, m_DBMetaData.xDBMetaData.getMaxColumnsInGroupBy()); + m_groupFieldSelection.intializeSelectedFields(m_DBMetaData.NonAggregateFieldNames); + m_groupFieldSelection.setMultipleMode(false); + setStepEnabled(SOGROUPFILTER_PAGE, m_aggregateComponent.isGroupingpossible() && m_DBMetaData.NonAggregateFieldNames.length > 0); } } } @@ -403,18 +457,18 @@ public class QueryWizard extends DatabaseObjectWizard private void searchForOutdatedFields() { - String[] sFieldNames = CurDBMetaData.getFieldNames(); - String[][] sRemovedFields = JavaTools.removeOutdatedFields(CurDBMetaData.getSortFieldNames(), sFieldNames); - CurDBMetaData.setSortFieldNames(sRemovedFields); - CurDBMetaData.setFilterConditions(JavaTools.removeOutdatedFields(CurDBMetaData.getFilterConditions(), sFieldNames)); - CurDBMetaData.AggregateFieldNames = JavaTools.removeOutdatedFields(CurDBMetaData.AggregateFieldNames, sFieldNames); + String[] sFieldNames = m_DBMetaData.getFieldNames(); + String[][] sRemovedFields = JavaTools.removeOutdatedFields(m_DBMetaData.getSortFieldNames(), sFieldNames); + m_DBMetaData.setSortFieldNames(sRemovedFields); + m_DBMetaData.setFilterConditions(JavaTools.removeOutdatedFields(m_DBMetaData.getFilterConditions(), sFieldNames)); + m_DBMetaData.AggregateFieldNames = JavaTools.removeOutdatedFields(m_DBMetaData.AggregateFieldNames, sFieldNames); } private void enableWizardSteps(String[] NewItems) { boolean bEnabled = NewItems.length > 0; - setControlProperty("btnWizardNext", "Enabled", new Boolean(bEnabled)); - setControlProperty("btnWizardFinish", "Enabled", new Boolean(bEnabled)); + setControlProperty("btnWizardNext", "Enabled", bEnabled); + setControlProperty("btnWizardFinish", "Enabled", bEnabled); enableRoadmapItems(NewItems, bEnabled); // Note: Performancewise this could be improved } @@ -446,15 +500,15 @@ public class QueryWizard extends DatabaseObjectWizard { if (ID == 1) { - CurDBMetaData.addSeveralFieldColumns(SelItems, CurDBCommandFieldSelection.getSelectedCommandName()); + m_DBMetaData.addSeveralFieldColumns(SelItems, m_DBCommandFieldSelectio.getSelectedCommandName()); enableWizardSteps(NewItems); - CurDBCommandFieldSelection.changeSelectedFieldNames(CurDBMetaData.getDisplayFieldNames()); - CurDBCommandFieldSelection.toggleCommandListBox(NewItems); + m_DBCommandFieldSelectio.changeSelectedFieldNames(m_DBMetaData.getDisplayFieldNames()); + m_DBCommandFieldSelectio.toggleCommandListBox(NewItems); } else { - boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", new Boolean(bEnabled)); + boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); } } @@ -464,30 +518,30 @@ public class QueryWizard extends DatabaseObjectWizard if (ID == 1) { enableWizardSteps(NewItems); - String[] sSelfieldNames = CurDBMetaData.getFieldNames(SelItems, CurDBCommandFieldSelection.getSelectedCommandName()); - CurDBCommandFieldSelection.addItemsToFieldsListbox(sSelfieldNames); - CurDBMetaData.removeSeveralFieldColumnsByDisplayFieldName(SelItems); - CurDBCommandFieldSelection.toggleCommandListBox(NewItems); + String[] sSelfieldNames = m_DBMetaData.getFieldNames(SelItems, m_DBCommandFieldSelectio.getSelectedCommandName()); + m_DBCommandFieldSelectio.addItemsToFieldsListbox(sSelfieldNames); + m_DBMetaData.removeSeveralFieldColumnsByDisplayFieldName(SelItems); + m_DBCommandFieldSelectio.toggleCommandListBox(NewItems); } else { - boolean bEnabled = (CurGroupFieldSelection.getSelectedFieldNames().length > 0); + boolean bEnabled = (m_groupFieldSelection.getSelectedFieldNames().length > 0); String CurDisplayFieldName = SelItems[0]; - if (JavaTools.FieldInList(CurDBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) + if (JavaTools.FieldInList(m_DBMetaData.NonAggregateFieldNames, CurDisplayFieldName) > -1) { showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, resmsgNonNumericAsGroupBy); - CurGroupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, CurGroupFieldSelection.xSelectedFieldsListBox.getItemCount()); - String FieldList[] = CurGroupFieldSelection.xFieldsListBox.getItems(); + m_groupFieldSelection.xSelectedFieldsListBox.addItems(SelItems, m_groupFieldSelection.xSelectedFieldsListBox.getItemCount()); + String FieldList[] = m_groupFieldSelection.xFieldsListBox.getItems(); int index = JavaTools.FieldInList(FieldList, CurDisplayFieldName); if (index > -1) { - CurGroupFieldSelection.xFieldsListBox.removeItems((short) index, (short) 1); + m_groupFieldSelection.xFieldsListBox.removeItems((short) index, (short) 1); } } else { - Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", new Boolean(bEnabled)); + Helper.setUnoPropertyValue(getRoadmapItemByID(SOGROUPFILTER_PAGE), "Enabled", bEnabled); } } } diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index 85b797d3b640..4720b40ca55f 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -40,18 +40,17 @@ import com.sun.star.beans.XPropertySet; import com.sun.star.lang.EventObject; import com.sun.star.lang.IllegalArgumentException; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.lib.uno.helper.PropertySet; import com.sun.star.sdbc.DataType; import com.sun.star.uno.Any; import com.sun.star.uno.AnyConverter; import com.sun.star.uno.Exception; import com.sun.star.uno.Type; +import com.sun.star.uno.TypeClass; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.wizards.common.NumberFormatter; import com.sun.star.wizards.common.Helper; import com.sun.star.wizards.common.JavaTools; -import com.sun.star.wizards.common.Properties; import com.sun.star.wizards.db.FieldColumn; import com.sun.star.wizards.db.QueryMetaData; import java.util.logging.Level; @@ -61,19 +60,9 @@ public class FilterComponent { private Integer IStep; - // private int iStartPosX; - // private int iStartPosY; - // int Count; private int RowCount; - // private int FilterCount; private static String[] sLogicOperators; - private static String[] sBooleanValues; - // private /* public */ String[] FieldNames; - private XRadioButton optMatchAll; private XRadioButton optMatchAny; - // private String soptMatchAll; - // private String soptMatchAny; - // private String[] sHeadLines; private String slblFieldNames; private String slblOperators; private String slblValue; @@ -81,7 +70,6 @@ public class FilterComponent private int BaseID = 2300; private String sIncSuffix; private ControlRow[] oControlRows; - // private Vector FilterNames; private String sDuplicateCondition; final int SOOPTORMODE = 100; final int SOOPTANDMODE = 101; @@ -127,7 +115,6 @@ public class FilterComponent final int SO_OPTQUERYMODE = 5; int SOI_MATCHALL = 0; int SOI_MATCHANY = 1; - // int ifilterstate = SOI_MATCHALL; int curHelpID; class ItemListenerImpl implements com.sun.star.awt.XItemListener @@ -139,8 +126,6 @@ public class FilterComponent String sControlName = ""; switch (iKey) { - // case SOOPTQUERYMODE: - // getfilterstate(); case SO_FIRSTFIELDNAME: case SO_SECONDFIELDNAME: case SO_THIRDFIELDNAME: @@ -152,24 +137,11 @@ public class FilterComponent FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName); String sControlNameTextValue = "txtValue" + sControlNameSuffix; -// String sControlNameBooleanList = "lstBoolean" + sControlNameSuffix; -// if (aFieldColumn.FieldType == DataType.BOOLEAN) -// { -// // scheint aufgrund eines Fehlers in Toolkit nicht zu funktionieren -// CurUnoDialog.setControlVisible(sControlNameTextValue, false); -// CurUnoDialog.setControlVisible(sControlNameBooleanList, true); -// } -// else -// { -// CurUnoDialog.setControlVisible(sControlNameTextValue, true); -// CurUnoDialog.setControlVisible(sControlNameBooleanList, false); - XControl xValueControl = CurUnoDialog.xDlgContainer.getControl(sControlNameTextValue); XInterface xValueModel = (XInterface) UnoDialog.getModel(xValueControl); Helper.setUnoPropertyValue(xValueModel, "TreatAsNumber", Boolean.valueOf(CurFieldColumn.isNumberFormat())); final NumberFormatter aNumberFormatter = oQueryMetaData.getNumberFormatter(); aNumberFormatter.setNumberFormat(xValueModel, CurFieldColumn.getDBFormatKey(), aNumberFormatter); -// } break; case SO_FIRSTCONDITION: @@ -180,7 +152,6 @@ public class FilterComponent break; case SOOPTORMODE: case SOOPTANDMODE: - // getfilterstate(); return; case SO_FIRSTBOOLFIELDNAME: @@ -210,24 +181,6 @@ public class FilterComponent togglefollowingControlRow(sName); } - public void disposing(EventObject EventObject) - { - } - } - - public void fieldconditionchanged(ItemEvent EventObject) - { - String sName = getControlName(EventObject.Source); - togglefollowingControlRow(sName); - } - - public void disposing(com.sun.star.lang.EventObject eventObject) - { - } - - class ActionListenerImpl implements com.sun.star.awt.XActionListener - { - public void disposing(EventObject eventObject) { } @@ -291,18 +244,19 @@ public class FilterComponent column.addProperty("Type", PropertyAttribute.BOUND, DataType.VARCHAR); column.addProperty("Name", PropertyAttribute.BOUND, ""); + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), null ); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); if ( oQueryMetaData.getSQLQueryComposer().getQuery().length() == 0) { final String fromClause = oQueryMetaData.getSQLQueryComposer().getFromClause(); - StringBuffer sql = new StringBuffer(); + StringBuilder sql = new StringBuilder(); sql.append(oQueryMetaData.getSQLQueryComposer().getSelectClause(true)); sql.append(' '); sql.append(fromClause); oQueryMetaData.getSQLQueryComposer().getQueryComposer().setElementaryQuery(sql.toString()); } - int a = 0; + oQueryMetaData.getSQLQueryComposer().getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); for (int i = 0; i < RowCount; i++) { ControlRow CurControlRow = oControlRows[i]; @@ -323,12 +277,14 @@ public class FilterComponent value = ((Double)value) - oQueryMetaData.getNullDateCorrection(); break; } - column.addProperty("Value", PropertyAttribute.MAYBEVOID, value); + column.removeProperty( "Value" ); + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); columnSet.setPropertyValue("Value", value); oQueryMetaData.getSQLQueryComposer().getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); } } } + final String test = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getQuery(); filterconditions = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getStructuredFilter(); int[] iduplicate = JavaTools.getDuplicateFieldIndex(filterconditions); if (iduplicate[0] != -1) @@ -337,9 +293,7 @@ public class FilterComponent String smsgDuplicateCondition = getDisplayCondition(sDuplicateCondition, aduplicatecondition, null); CurUnoDialog.showMessageBox("WarningBox", VclWindowPeerAttribute.OK, smsgDuplicateCondition); CurUnoDialog.vetoableChange(new java.beans.PropertyChangeEvent(CurUnoDialog, "Steps", Integer.valueOf(1), Integer.valueOf(2))); - return new PropertyValue[][] - { - }; + return new PropertyValue[][]{}; } } catch (Exception ex) @@ -402,22 +356,6 @@ public class FilterComponent return ifilterstate; } - private void addfiltercondition(int _index, String _curFieldName, Object _curValue, int _curOperator) - { - String ValString = String.valueOf(_curValue); - PropertyValue oPropertyValue = Properties.createProperty(_curFieldName, ValString, _curOperator); - getfilterstate(); - if (getfilterstate() == this.SOI_MATCHALL) - { - if (_index == 0) - { - filterconditions[0] = new PropertyValue[getFilterCount()]; - } - filterconditions[0][_index] = new PropertyValue(); - filterconditions[0][_index] = oPropertyValue; - } - } - private int getFilterCount() { int a = 0; @@ -429,8 +367,6 @@ public class FilterComponent } } return a; - // FilterCount = a; - // return FilterCount; } /** Creates a new instance of FilterComponent @@ -456,8 +392,6 @@ public class FilterComponent this.oQueryMetaData = _oQueryMetaData; boolean bEnabled; sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "optMatchAll"); - // iStartPosX = iPosX; - // iStartPosY = iPosY; String soptMatchAll = CurUnoDialog.m_oResource.getResText(BaseID + 9); String soptMatchAny = CurUnoDialog.m_oResource.getResText(BaseID + 10); @@ -465,14 +399,13 @@ public class FilterComponent slblOperators = CurUnoDialog.m_oResource.getResText(BaseID + 24); slblValue = CurUnoDialog.m_oResource.getResText(BaseID + 25); sLogicOperators = CurUnoDialog.m_oResource.getResArray(BaseID + 26, 10 /* 7 */); // =, <>, <, >, <=, >=, like, !like, is null, !is null - sBooleanValues = CurUnoDialog.m_oResource.getResArray(BaseID + 36, 2); // true, false sDuplicateCondition = CurUnoDialog.m_oResource.getResText(BaseID + 89); // create Radiobuttons // * match all // * match one - optMatchAll = CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), + CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), new String[] { "Height", @@ -533,13 +466,6 @@ public class FilterComponent public void initialize(PropertyValue[][] _filterconditions, String[] _fieldnames) { - // String aFieldNamesWithAdditionalEmpty[] = new String[_fieldnames.length + 1]; - // for (int i = 0; i < _fieldnames.length; i++) - // { - // aFieldNamesWithAdditionalEmpty[i] = _fieldnames[i]; - // } - // aFieldNamesWithAdditionalEmpty[_fieldnames.length] = ""; - int i; for (i = 0; i < RowCount; i++) { @@ -592,7 +518,7 @@ public class FilterComponent // // // ------------------------------------------------------------------------- - class ControlRow + final class ControlRow { private final static int SOLSTFIELDNAME = 3; @@ -775,30 +701,6 @@ public class FilterComponent Short.valueOf(curtabindex++), Integer.valueOf(nValueWidth) }); - -// ControlElements[6] = CurUnoDialog.insertListBox((new StringBuilder()).append("lstBoolean").append(sCompSuffix).toString(), SO_BOOLEANLIST[Index], null, new ItemListenerImpl(), new String[] { -// "Enabled", -// "Dropdown", -// "Height", -// "HelpURL", -// "LineCount", -// "PositionX", "PositionY", -// "Step", -// "StringItemList", -// "TabIndex", -// "Width" -// }, new Object[] { -// new Boolean(bEnabled), -// Boolean.TRUE, -// new Integer(13), -// "HID:" + _firstRowHelpID++, -// new Short((short) 2), -// new Integer(nPosX3 + 44), new Integer(iCompPosY + 23), -// IStep, -// FilterComponent.sBooleanValues, -// new Short(curtabindex++), -// new Integer(nValueWidth) -// }); } catch (Exception exception) { @@ -843,13 +745,6 @@ public class FilterComponent String sValue = (String.valueOf(oValue)); return (!sValue.equals("")); } -// String sBoolValue=""; -// short aSelectedBoolValue[] = (short[])Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[6]), "SelectedItems"); -// if (aSelectedBoolValue.length > 0) -// { -// sBoolValue = String.valueOf(aSelectedBoolValue[0] == 1); -// return !sBoolValue.equals(""); -// } } } return false; @@ -861,16 +756,10 @@ public class FilterComponent } } - private void fieldnamechanged(ItemEvent EventObject) - { - int i = 0; - } - protected void setCondition(PropertyValue _filtercondition) { try { - int ikey; XListBox xFieldsListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTFIELDNAME]); xFieldsListBox.selectItem(_filtercondition.Name, true); XListBox xOperatorListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, ControlElements[SOLSTOPERATOR]); @@ -940,8 +829,8 @@ public class FilterComponent private void settovoid() { - CurUnoDialog.deselectListBox(ControlElements[SOLSTFIELDNAME]); - CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); + WizardDialog.deselectListBox(ControlElements[SOLSTFIELDNAME]); + WizardDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue", com.sun.star.uno.Any.VOID); } @@ -976,7 +865,7 @@ public class FilterComponent } else if (!isConditionComplete()) { - CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); + WizardDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); } } @@ -1053,37 +942,3 @@ public class FilterComponent } } } -// com.sun.star.sdb.SQLFilterOperator.EQUAL -// com.sun.star.sdb.SQLFilterOperator.NOT_EQUAL -// com.sun.star.sdb.SQLFilterOperator.LESS -// com.sun.star.sdb.SQLFilterOperator.GREATER -// com.sun.star.sdb.SQLFilterOperator.LESS_EQUAL -// com.sun.star.sdb.SQLFilterOperator.GREATER_EQUAL -// com.sun.star.sdb.SQLFilterOperator.LIKE -// com.sun.star.sdb.SQLFilterOperator.NOT_LIKE -// com.sun.star.sdb.SQLFilterOperator.SQLNULL -// com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL - -/* constants SQLFilterOperator -{ -/// equal to -const long EQUAL = 1; -/// not equal to -const long NOT_EQUAL = 2; -/// less than -const long LESS = 3; -/// greater than -const long GREATER = 4; -/// less or eqal than -const long LESS_EQUAL = 5; -/// greater or eqal than -const long GREATER_EQUAL = 6; -/// like -const long LIKE = 7; -/// not like -const long NOT_LIKE = 8; -/// is null -const long SQLNULL = 9; -/// is not null -const long NOT_SQLNULL = 10; -}; */ -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From b952a10ddcc3f832c5e129ed4e604eec6ae78939 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 14:22:44 +0200 Subject: dba33j: #i114566# +getNormalizedStructuredFilter --- .../sun/star/wizards/db/DatabaseObjectWizard.java | 3 +- .../com/sun/star/wizards/db/SQLQueryComposer.java | 82 ++++++++++++++++++---- .../com/sun/star/wizards/ui/FilterComponent.java | 51 ++++++++------ 3 files changed, 101 insertions(+), 35 deletions(-) diff --git a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java index 5c65d73794f0..e03323c6ebbc 100644 --- a/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java +++ b/wizards/com/sun/star/wizards/db/DatabaseObjectWizard.java @@ -57,7 +57,8 @@ public abstract class DatabaseObjectWizard extends WizardDialog { try { - m_docUI.loadComponent( i_type, i_name, i_forEditing ); + if ( m_docUI != null ) + m_docUI.loadComponent( i_type, i_name, i_forEditing ); } catch ( IllegalArgumentException ex ) { diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 0a52f6a3a7a9..235da2d7c04a 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -47,6 +47,7 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.sdbc.SQLException; import com.sun.star.lang.XInitialization; import com.sun.star.awt.XWindow; +import com.sun.star.sdb.SQLFilterOperator; import com.sun.star.wizards.common.*; @@ -60,7 +61,7 @@ public class SQLQueryComposer // String m_sFromClause; public XSingleSelectQueryAnalyzer m_xQueryAnalyzer; Vector composedCommandNames = new Vector(1); - private XSingleSelectQueryComposer m_xQueryComposer; + private XSingleSelectQueryComposer m_queryComposer; XMultiServiceFactory xMSF; boolean bincludeGrouping = true; @@ -72,7 +73,7 @@ public class SQLQueryComposer xMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, CurDBMetaData.DBConnection); final Object oQueryComposer = xMSF.createInstance("com.sun.star.sdb.SingleSelectQueryComposer"); m_xQueryAnalyzer = (XSingleSelectQueryAnalyzer) UnoRuntime.queryInterface(XSingleSelectQueryAnalyzer.class, oQueryComposer); - m_xQueryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); + m_queryComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, m_xQueryAnalyzer); XSQLQueryComposerFactory xSQLComposerFactory; xSQLComposerFactory = (XSQLQueryComposerFactory) UnoRuntime.queryInterface(XSQLQueryComposerFactory.class, CurDBMetaData.DBConnection); // /* XSQLQueryComposer */ xSQLQueryComposer = xSQLComposerFactory.createQueryComposer(); @@ -160,7 +161,7 @@ public class SQLQueryComposer { for (int i = 0; i < CurDBMetaData.getFilterConditions().length; i++) { - m_xQueryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); + m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); } } catch (Exception exception) @@ -172,7 +173,7 @@ public class SQLQueryComposer public void prependSortingCriteria() throws SQLException { XIndexAccess xColumnIndexAccess = m_xQueryAnalyzer.getOrderColumns(); - m_xQueryComposer.setOrder(""); + m_queryComposer.setOrder(""); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { appendSortingCriterion(i, false); @@ -186,7 +187,7 @@ public class SQLQueryComposer if (JavaTools.FieldInTable(CurDBMetaData.getSortFieldNames(), sName) == -1) { boolean bascend = AnyConverter.toBoolean(xColumnPropertySet.getPropertyValue("IsAscending")); - m_xQueryComposer.appendOrderByColumn(xColumnPropertySet, bascend); + m_queryComposer.appendOrderByColumn(xColumnPropertySet, bascend); } } catch (Exception e) @@ -203,13 +204,13 @@ public class SQLQueryComposer String sSort = CurDBMetaData.getSortFieldNames()[_SortIndex][1]; boolean bascend = (sSort.equals("ASC")); - m_xQueryComposer.appendOrderByColumn(xColumn, bascend); + m_queryComposer.appendOrderByColumn(xColumn, bascend); } public void appendSortingcriteria(boolean _baddAliasFieldNames) throws SQLException { String sOrder = ""; - m_xQueryComposer.setOrder(""); + m_queryComposer.setOrder(""); for (int i = 0; i < CurDBMetaData.getSortFieldNames().length; i++) { String sSortValue = CurDBMetaData.getSortFieldNames()[i][0]; @@ -223,7 +224,7 @@ public class SQLQueryComposer } sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + CurDBMetaData.AggregateFieldNames[iAggregate][0] + ")"; sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1]; - m_xQueryComposer.setOrder(sOrder); + m_queryComposer.setOrder(sOrder); } else { @@ -232,7 +233,7 @@ public class SQLQueryComposer sOrder = m_xQueryAnalyzer.getOrder(); } // just for debug! - sOrder = m_xQueryComposer.getOrder(); + sOrder = m_queryComposer.getOrder(); int dummy = 0; } @@ -241,7 +242,7 @@ public class SQLQueryComposer for (int i = 0; i < CurDBMetaData.GroupFieldNames.length; i++) { XPropertySet xColumn = CurDBMetaData.getColumnObjectByFieldName(CurDBMetaData.GroupFieldNames[i], _baddAliasFieldNames); - m_xQueryComposer.appendGroupByColumn(xColumn); + m_queryComposer.appendGroupByColumn(xColumn); } String s = m_xQueryAnalyzer.getQuery(); } @@ -309,7 +310,7 @@ public class SQLQueryComposer if (CurDBMetaData.getFilterConditions().length > 0) { CurDBMetaData.setFilterConditions(replaceConditionsByAlias(CurDBMetaData.getFilterConditions())); - m_xQueryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); + m_queryComposer.setStructuredFilter(CurDBMetaData.getFilterConditions()); } } } @@ -319,7 +320,7 @@ public class SQLQueryComposer appendGroupByColumns(_baddAliasFieldNames); if (CurDBMetaData.GroupByFilterConditions.length > 0) { - m_xQueryComposer.setStructuredHavingClause(CurDBMetaData.GroupByFilterConditions); + m_queryComposer.setStructuredHavingClause(CurDBMetaData.GroupByFilterConditions); } } appendSortingcriteria(_baddAliasFieldNames); @@ -426,8 +427,63 @@ public class SQLQueryComposer typeexception.printStackTrace(System.out); } } + + /** + * retrieves a normalized structured filter + * + *

XSingleSelectQueryComposer.getStructuredFilter has a strange habit of returning the predicate (equal, not equal, etc) + * effectively twice: Once as SQLFilterOperator, and once in the value. That is, if you have a term "column <> 3", then + * you'll get an SQLFilterOperator.NOT_EQUAL (which is fine), and the textual value of the condition + * will read "<> 3". The latter is strange enough, but even more strange is that this behavior is not even consistent: + * for SQLFilterOperator.EQUAL, the "=" sign is not include in the textual value.

+ * + *

To abstract from this weirdness, use this function here, which strips the unwanted tokens from the textual value + * representation.

+ */ + public PropertyValue[][] getNormalizedStructuredFilter() + { + final PropertyValue[][] structuredFilter = m_queryComposer.getStructuredFilter(); + for ( int i=0; i 0) { + final SQLQueryComposer composer = oQueryMetaData.getSQLQueryComposer(); try { final String serviceName = "com.sun.star.beans.PropertyBag"; @@ -247,29 +248,29 @@ public class FilterComponent column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), null ); final XPropertySet columnSet = UnoRuntime.queryInterface(XPropertySet.class, column); - if ( oQueryMetaData.getSQLQueryComposer().getQuery().length() == 0) + if ( composer.getQuery().length() == 0) { - final String fromClause = oQueryMetaData.getSQLQueryComposer().getFromClause(); + final String fromClause = composer.getFromClause(); StringBuilder sql = new StringBuilder(); - sql.append(oQueryMetaData.getSQLQueryComposer().getSelectClause(true)); + sql.append(composer.getSelectClause(true)); sql.append(' '); sql.append(fromClause); - oQueryMetaData.getSQLQueryComposer().getQueryComposer().setElementaryQuery(sql.toString()); + composer.getQueryComposer().setElementaryQuery(sql.toString()); } - oQueryMetaData.getSQLQueryComposer().getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); + composer.getQueryComposer().setStructuredFilter( new PropertyValue[][] {} ); for (int i = 0; i < RowCount; i++) { - ControlRow CurControlRow = oControlRows[i]; - if (CurControlRow.isEnabled()) + ControlRow currentControlRow = oControlRows[i]; + if (currentControlRow.isEnabled()) { - if (CurControlRow.isConditionComplete()) + if (currentControlRow.isConditionComplete()) { - String sFieldName = CurControlRow.getSelectedFieldName(); - int nOperator = (int) CurControlRow.getSelectedOperator(); + String sFieldName = currentControlRow.getSelectedFieldName(); + int nOperator = (int) currentControlRow.getSelectedOperator(); FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName); columnSet.setPropertyValue("Name", aFieldColumn.getFieldName()); columnSet.setPropertyValue("Type", aFieldColumn.getXColumnPropertySet().getPropertyValue("Type")); - Object value = CurControlRow.getValue(); + Object value = currentControlRow.getValue(); switch(aFieldColumn.getFieldType()) { case DataType.TIMESTAMP: @@ -278,14 +279,23 @@ public class FilterComponent break; } column.removeProperty( "Value" ); - column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); + final short operator = currentControlRow.getSelectedOperator(); + if ( ( operator == SQLFilterOperator.SQLNULL ) + || ( operator == SQLFilterOperator.NOT_SQLNULL ) + || AnyConverter.isVoid( value ) + ) + { + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), new String() ); + value = new Any( new Type( TypeClass.VOID ), null ); + } + else + column.addProperty("Value", (short)( PropertyAttribute.MAYBEVOID | PropertyAttribute.REMOVABLE ), value ); columnSet.setPropertyValue("Value", value); - oQueryMetaData.getSQLQueryComposer().getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); + composer.getQueryComposer().appendFilterByColumn(columnSet, getfilterstate() == this.SOI_MATCHALL,nOperator); } } } - final String test = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getQuery(); - filterconditions = oQueryMetaData.getSQLQueryComposer().getQueryComposer().getStructuredFilter(); + filterconditions = composer.getNormalizedStructuredFilter(); int[] iduplicate = JavaTools.getDuplicateFieldIndex(filterconditions); if (iduplicate[0] != -1) { @@ -520,7 +530,6 @@ public class FilterComponent // ------------------------------------------------------------------------- final class ControlRow { - private final static int SOLSTFIELDNAME = 3; private final static int SOLSTOPERATOR = 4; private final static int SOTXTVALUE = 5; @@ -936,9 +945,9 @@ public class FilterComponent protected String getDateTimeString(boolean bgetDate) { - double dblValue = ((Double) getValue()).doubleValue(); - NumberFormatter oNumberFormatter = oQueryMetaData.getNumberFormatter(); - return oNumberFormatter.convertNumberToString(iDateTimeFormat, dblValue); + double dblValue = ((Double) getValue()).doubleValue(); + NumberFormatter oNumberFormatter = oQueryMetaData.getNumberFormatter(); + return oNumberFormatter.convertNumberToString(iDateTimeFormat, dblValue); } } } -- cgit v1.2.3 From 4fd0835170a4175aec8b1345580921d6161a3761 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Mon, 20 Sep 2010 16:52:57 +0200 Subject: #b6986082# InsBoxen: Do not insert a new cell beyond the end --- sw/source/core/docnode/ndtbl.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index b213eb1d075d..f0683ae700a5 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -334,7 +334,13 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd, new SwEndNode( aEndIdx, *pSttNd ); pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine ); - pLine->GetTabBoxes().C40_INSERT( SwTableBox, pPrvBox, nInsPos + n ); + + SwTableBoxes & rTabBoxes = pLine->GetTabBoxes(); + USHORT nRealInsPos = nInsPos + n; + if (nRealInsPos > rTabBoxes.Count()) + nRealInsPos = rTabBoxes.Count(); + + rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); //if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei -- cgit v1.2.3 -- cgit v1.2.3 From 39f7e8187da53962b481629dd4065709aa4c5991 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 23:42:56 +0200 Subject: dba33j: #i114627# do not let the SubComponentManager manage reports executed for data display --- dbaccess/source/ui/app/AppController.cxx | 19 ++++++++++++++----- dbaccess/source/ui/app/AppControllerGen.cxx | 3 ++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 9d659c26e707..595d9b412851 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1789,7 +1789,7 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree ) } catch(const Exception&) { - OSL_ENSURE(0,"Could not open element!"); + DBG_UNHANDLED_EXCEPTION(); } } return false; // not handled @@ -1842,12 +1842,20 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const getContainer()->showPreview(NULL); } + bool isStandaloneDocument = false; switch ( _eType ) { case E_REPORT: + if ( _eOpenMode != E_OPEN_DESIGN ) + { + // reports which are opened in a mode other than design are no sub components of our application + // component, but standalone documents. + isStandaloneDocument = true; + } + // NO break! case E_FORM: { - if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) + if ( isStandaloneDocument || !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) ) { ::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType ); if ( !aHelper->isConnected() ) @@ -1856,7 +1864,8 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const Reference< XComponent > xDefinition; xRet = aHelper->open( _sName, xDefinition, _eOpenMode, _rAdditionalArguments ); - onDocumentOpened( _sName, _eType, _eOpenMode, xRet, xDefinition ); + if ( !isStandaloneDocument ) + onDocumentOpened( _sName, _eType, _eOpenMode, xRet, xDefinition ); } } break; @@ -2781,9 +2790,9 @@ void OApplicationController::containerFound( const Reference< XContainer >& _xCo _xContainer->addContainerListener(this); } } - catch(Exception) + catch(const Exception&) { - OSL_ENSURE(0,"Could not listener on the container!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 435c6ff25fef..9965f00dbd21 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -676,7 +676,8 @@ void OApplicationController::onDocumentOpened( const ::rtl::OUString& _rName, co try { - m_pSubComponentManager->onSubComponentOpened( _rName, _nType, _eMode, _rxDefinition.is() ? _rxDefinition : _xDocument ); + OSL_ENSURE( _xDocument.is(), "OApplicationController::onDocumentOpened: is there any *valid* scenario where this fails?" ); + m_pSubComponentManager->onSubComponentOpened( _rName, _nType, _eMode, _xDocument.is() ? _xDocument : _rxDefinition ); if ( _rxDefinition.is() ) { -- cgit v1.2.3 From c212d898215c5d5b935dd76cd6f37b5896c04ce6 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 22 Sep 2010 11:08:30 +0200 Subject: dba33j: i114026: findTableColumnsMatching_throw: take the update-table's name as parameter, to catch the cases where the name is an alias --- dbaccess/source/core/api/KeySet.cxx | 70 ++++++++++++-------- dbaccess/source/core/api/KeySet.hxx | 7 +- dbaccess/source/core/api/OptimisticSet.cxx | 2 +- dbaccess/source/core/api/RowSetCache.cxx | 103 +++++++++-------------------- 4 files changed, 79 insertions(+), 103 deletions(-) diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 6ee7a2b8ea4c..5de2c497c031 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -197,9 +197,10 @@ void OKeySet::initColumns() m_pParameterNames.reset( new SelectColumnsMetaData(bCase) ); m_pForeignColumnNames.reset( new SelectColumnsMetaData(bCase) ); } -void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable - ,const Reference& i_xMeta - ,const Reference& i_xQueryColumns) +void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable, + const ::rtl::OUString& i_rUpdateTableName, + const Reference& i_xMeta, + const Reference& i_xQueryColumns) { // first ask the database itself for the best columns which can be used Sequence< ::rtl::OUString> aBestColumnNames; @@ -220,37 +221,48 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable xPara->getPropertyValue(PROPERTY_REALNAME) >>= aParameterColumns[i]; } - if ( m_sUpdateTableName.getLength() ) + ::rtl::OUString sUpdateTableName( i_rUpdateTableName ); + if ( sUpdateTableName.getLength() == 0 ) { - ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames),true); - ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames),true); - ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,m_sUpdateTableName,(*m_pParameterNames),true); + OSL_ENSURE( false, "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't work when the table has an alias name." ); + // If i_aTable originates from a query composer, and is a table which appears with an alias in the SELECT statement, + // then the below code will not produce correct results. + // For instance, imagine a "SELECT alias.col FROM table AS alias". Now i_aTable would be the table named + // "table", so our sUpdateTableName would be "table" as well - not the information about the "alias" is + // already lost here. + // now getColumnPositions would travers the columns, and check which of them belong to the table denoted + // by sUpdateTableName. Since the latter is "table", but the columns only know that they belong to a table + // named "alias", there will be no matching - so getColumnPositions wouldn't find anything. + + ::rtl::OUString sCatalog, sSchema, sTable; + Reference xTableProp( i_aTable, UNO_QUERY_THROW ); + xTableProp->getPropertyValue( PROPERTY_CATALOGNAME )>>= sCatalog; + xTableProp->getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema; + xTableProp->getPropertyValue( PROPERTY_NAME ) >>= sTable; + sUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); } - else + + ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sUpdateTableName,(*m_pKeyColumnNames),true); + ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sUpdateTableName,(*m_pColumnNames),true); + ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sUpdateTableName,(*m_pParameterNames),true); + + if ( m_pKeyColumnNames->empty() ) { - ::rtl::OUString sCatalog,sSchema,sTable; - Reference xTableProp(i_aTable,UNO_QUERY); - Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME); - aCatalog >>= sCatalog; - xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; - xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable; - const ::rtl::OUString sComposedUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); - ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sComposedUpdateTableName,(*m_pKeyColumnNames),true); - ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sComposedUpdateTableName,(*m_pColumnNames),true); - ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sComposedUpdateTableName,(*m_pParameterNames),true); + ::dbtools::throwGenericSQLException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not find any key column." ) ), *this ); } - SelectColumnsMetaData::const_iterator aPosIter = m_pKeyColumnNames->begin(); - SelectColumnsMetaData::const_iterator aPosEnd = m_pKeyColumnNames->end(); - for(;aPosIter != aPosEnd;++aPosIter) + for ( SelectColumnsMetaData::const_iterator keyColumn = m_pKeyColumnNames->begin(); + keyColumn != m_pKeyColumnNames->end(); + ++keyColumn + ) { - if ( xTblColumns->hasByName(aPosIter->second.sRealName) ) - { - Reference xProp(xTblColumns->getByName(aPosIter->second.sRealName),UNO_QUERY); - sal_Bool bAuto = sal_False; - if( (xProp->getPropertyValue(PROPERTY_ISAUTOINCREMENT) >>= bAuto) && bAuto) - m_aAutoColumns.push_back(aPosIter->first); - } + if ( !xTblColumns->hasByName( keyColumn->second.sRealName ) ) + continue; + + Reference xProp( xTblColumns->getByName( keyColumn->second.sRealName ), UNO_QUERY ); + sal_Bool bAuto = sal_False; + if ( ( xProp->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= bAuto ) && bAuto ) + m_aAutoColumns.push_back( keyColumn->first ); } } ::rtl::OUStringBuffer OKeySet::createKeyFilter() @@ -286,7 +298,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O Reference xMeta = m_xConnection->getMetaData(); Reference xQueryColSup(m_xComposer,UNO_QUERY); const Reference xQueryColumns = xQueryColSup->getColumns(); - findTableColumnsMatching_throw(makeAny(m_xTable),xMeta,xQueryColumns); + findTableColumnsMatching_throw(makeAny(m_xTable),m_sUpdateTableName,xMeta,xQueryColumns); // the first row is empty because it's now easier for us to distinguish when we are beforefirst or first // without extra varaible to be set diff --git a/dbaccess/source/core/api/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx index 212ec237699e..1266c271040a 100644 --- a/dbaccess/source/core/api/KeySet.hxx +++ b/dbaccess/source/core/api/KeySet.hxx @@ -142,9 +142,10 @@ namespace dbaccess void impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData); void initColumns(); - void findTableColumnsMatching_throw( const ::com::sun::star::uno::Any& i_aTable - ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& i_xMeta - ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns); + void findTableColumnsMatching_throw( const ::com::sun::star::uno::Any& i_aTable, + const ::rtl::OUString& i_rUpdateTableName, + const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& i_xMeta, + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& i_xQueryColumns); ::rtl::OUStringBuffer createKeyFilter(); void tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch); void executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector& _aIndexColumnPositions = ::std::vector()); diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index 2a9ac96ce82b..99bbc17f1f0f 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -133,7 +133,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const :: const ::rtl::OUString* pTableNameEnd = pTableNameIter + aTableNames.getLength(); for( ; pTableNameIter != pTableNameEnd ; ++pTableNameIter) { - findTableColumnsMatching_throw(xTables->getByName(*pTableNameIter),xMeta,xQueryColumns); + findTableColumnsMatching_throw(xTables->getByName(*pTableNameIter),*pTableNameIter,xMeta,xQueryColumns); } // the first row is empty because it's now easier for us to distinguish when we are beforefirst or first diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 92e29ac784ba..be9984938e01 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -28,84 +28,44 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbaccess.hxx" -#ifndef _COMPHELPER_SEQSTREAM_HXX -#include -#endif -#ifndef _COMPHELPER_UNO3_HXX_ -#include -#endif -#ifndef _COMPHELPER_EXTRACT_HXX_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_XKEYSSUPPLIER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_KEYTYPE_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBC_RESULTSETCONCURRENCY_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBC_COLUMNVALUE_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_XCOLUMNSSUPPLIER_HPP_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_PRIVILEGE_HPP_ -#include -#endif -#ifndef _DBACORE_DATACOLUMN_HXX_ -#include "CRowSetDataColumn.hxx" -#endif -#ifndef DBACCESS_CORE_API_CROWSETCOLUMN_HXX + +#include "BookmarkSet.hxx" #include "CRowSetColumn.hxx" -#endif -#ifndef DBACCESS_CORE_API_ROWSETBASE_HXX +#include "CRowSetDataColumn.hxx" +#include "KeySet.hxx" +#include "OptimisticSet.hxx" #include "RowSetBase.hxx" -#endif +#include "RowSetCache.hxx" +#include "StaticSet.hxx" +#include "WrappedResultSet.hxx" +#include "core_resource.hrc" +#include "core_resource.hxx" +#include "dbastrings.hrc" + +/** === begin UNO includes === **/ +#include +#include +#include +#include +#include +#include +#include +#include +/** === end UNO includes === **/ + +#include +#include +#include +#include #include -#include -#include #include #include -#ifndef _COMPHELPER_PROPERTY_HXX_ -#include -#endif -#ifndef _COM_SUN_STAR_SDBCX_COMPAREBOOKMARK_HPP_ -#include -#endif -#ifndef _TOOLS_DEBUG_HXX +#include +#include #include -#endif +#include #include -#ifndef DBACCESS_CORE_API_ROWSETCACHE_HXX -#include "RowSetCache.hxx" -#endif -#ifndef _DBA_CORE_RESOURCE_HXX_ -#include "core_resource.hxx" -#endif -#ifndef _DBA_CORE_RESOURCE_HRC_ -#include "core_resource.hrc" -#endif -#ifndef DBACCESS_CORE_API_BOOKMARKSET_HXX -#include "BookmarkSet.hxx" -#endif -#ifndef DBACCESS_CORE_API_STATICSET_HXX -#include "StaticSet.hxx" -#endif -#ifndef DBACCESS_CORE_API_KEYSET_HXX -#include "KeySet.hxx" -#endif -#ifndef DBACCESS_SHARED_DBASTRINGS_HRC -#include "dbastrings.hrc" -#endif -#include "WrappedResultSet.hxx" -#include "OptimisticSet.hxx" using namespace dbaccess; using namespace dbtools; @@ -228,7 +188,10 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, } catch(const Exception&) { + DBG_UNHANDLED_EXCEPTION(); } + m_pCacheSet = NULL; + m_xCacheSet.clear(); } else { -- cgit v1.2.3 From 467abe4b7b87482e0ebd2fd9dc9f34080f25c7ea Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 20 Sep 2010 22:53:54 +0200 Subject: dba33j: #i114438# --- dbaccess/source/core/inc/DatabaseDataProvider.hxx | 2 +- dbaccess/source/core/misc/DatabaseDataProvider.cxx | 295 +++++++++++++-------- reportdesign/source/core/sdr/RptObject.cxx | 20 +- .../source/filter/xml/xmlExportDocumentHandler.cxx | 4 +- .../source/filter/xml/xmlImportDocumentHandler.cxx | 38 ++- .../source/filter/xml/xmlImportDocumentHandler.hxx | 1 + .../source/ui/inspection/DataProviderHandler.cxx | 21 +- 7 files changed, 219 insertions(+), 162 deletions(-) diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx index e75c980e2a93..5d7a4a4e368e 100644 --- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx +++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx @@ -223,7 +223,7 @@ private: void impl_fillRowSet_throw(); void impl_executeRowSet_throw(::osl::ResettableMutexGuard& _rClearForNotifies); bool impl_fillParameters_nothrow( ::osl::ResettableMutexGuard& _rClearForNotifies); - void impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >& i_aColumnNames); + void impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const ::com::sun::star::uno::Sequence< ::rtl::OUString >& i_aColumnNames); void impl_invalidateParameter_nothrow(); ::com::sun::star::uno::Any impl_getNumberFormatKey_nothrow(const ::rtl::OUString & _sRangeRepresentation) const; diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 802e052297f9..bb41b5062ff8 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -31,10 +31,12 @@ #include "dbastrings.hrc" #include "cppuhelper/implbase1.hxx" #include +#include #include #include #include #include +#include #include #include @@ -205,22 +207,24 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat osl::ResettableMutexGuard aClearForNotifies(m_aMutex); if ( createDataSourcePossible(_aArguments) ) { - sal_Bool bHasCategories = sal_True; - uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames; - const beans::PropertyValue* pArgIter = _aArguments.getConstArray(); - const beans::PropertyValue* pArgEnd = pArgIter + _aArguments.getLength(); - for(;pArgIter != pArgEnd;++pArgIter) + try { - if ( pArgIter->Name.equalsAscii("HasCategories") ) - { - pArgIter->Value >>= bHasCategories; - - } - else if ( pArgIter->Name.equalsAscii("ComplexColumnDescriptions") ) - { - pArgIter->Value >>= aColumnNames; - } + uno::Reference< chart::XChartDataArray> xChartData( m_xInternal, uno::UNO_QUERY_THROW ); + xChartData->setData( uno::Sequence< uno::Sequence< double > >() ); + xChartData->setColumnDescriptions( uno::Sequence< ::rtl::OUString >() ); + if ( m_xInternal->hasDataByRangeRepresentation( ::rtl::OUString::valueOf( sal_Int32(0) ) ) ) + m_xInternal->deleteSequence(0); + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); } + + ::comphelper::NamedValueCollection aArgs( _aArguments ); + const sal_Bool bHasCategories = aArgs.getOrDefault( "HasCategories", sal_True ); + uno::Sequence< ::rtl::OUString > aColumnNames = + aArgs.getOrDefault( "ColumnDescriptions", uno::Sequence< ::rtl::OUString >() ); + bool bRet = false; if ( m_Command.getLength() != 0 && m_xActiveConnection.is() ) { @@ -254,41 +258,36 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArguments(const uno::Reference< chart2::data::XDataSource > & _xDataSource) throw (uno::RuntimeException) { - uno::Sequence< beans::PropertyValue > aArguments( 4 ); - aArguments[0] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1, uno::Any(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), - beans::PropertyState_DIRECT_VALUE ); - aArguments[1] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1, uno::makeAny( chart::ChartDataRowSource_COLUMNS ), - beans::PropertyState_DIRECT_VALUE ); + ::comphelper::NamedValueCollection aArguments; + aArguments.put( "CellRangeRepresentation", uno::Any( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "all" ) ) ) ); + aArguments.put( "DataRowSource", uno::makeAny( chart::ChartDataRowSource_COLUMNS ) ); // internal data always contains labels and categories - aArguments[2] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1, uno::makeAny( true ), beans::PropertyState_DIRECT_VALUE ); + aArguments.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); + sal_Bool bHasCategories = sal_False; if( _xDataSource.is()) { - uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences(_xDataSource->getDataSequences()); - const sal_Int32 nCount( aSequences.getLength()); - for( sal_Int32 nIdx=0; nIdx xSeqProp( aSequences[nIdx]->getValues(), uno::UNO_QUERY ); - ::rtl::OUString aRole; - if( xSeqProp.is() && - (xSeqProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Role"))) >>= aRole) && - aRole.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("categories")) ) - { - bHasCategories = sal_True; - break; - } - } - } + uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aSequences(_xDataSource->getDataSequences()); + const sal_Int32 nCount( aSequences.getLength()); + for( sal_Int32 nIdx=0; nIdx xSeqProp( aSequences[nIdx]->getValues(), uno::UNO_QUERY ); + ::rtl::OUString aRole; + if ( xSeqProp.is() + && ( xSeqProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Role" ) ) ) >>= aRole ) + && aRole.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "categories" ) ) + ) + { + bHasCategories = sal_True; + break; + } + } + } } - - aArguments[3] = beans::PropertyValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1, uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); - return aArguments; + aArguments.put( "HasCategories", uno::makeAny( bHasCategories ) ); + return aArguments.getPropertyValues(); } // ----------------------------------------------------------------------------- @@ -649,66 +648,136 @@ void DatabaseDataProvider::impl_executeRowSet_throw(::osl::ResettableMutexGuard& if ( impl_fillParameters_nothrow(_rClearForNotifies) ) m_xRowSet->execute(); } + // ----------------------------------------------------------------------------- -void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const uno::Sequence< uno::Sequence< ::rtl::OUString > >& i_aColumnNames) +namespace { - // clear the data before fill the new one - uno::Reference< chart::XChartDataArray> xChartData(m_xInternal,uno::UNO_QUERY); - if ( xChartData.is() ) + struct ColumnDescription { - xChartData->setData(uno::Sequence< uno::Sequence >()); - xChartData->setColumnDescriptions(uno::Sequence< ::rtl::OUString >()); - if ( m_xInternal->hasDataByRangeRepresentation(::rtl::OUString::valueOf(sal_Int32(0))) ) - m_xInternal->deleteSequence(0); - } + ::rtl::OUString sName; + sal_Int32 nResultSetPosition; + sal_Int32 nDataType; + + ColumnDescription() + :sName() + ,nResultSetPosition( 0 ) + ,nDataType( sdbc::DataType::VARCHAR ) + { + } + explicit ColumnDescription( const ::rtl::OUString& i_rName ) + :sName( i_rName ) + ,nResultSetPosition( 0 ) + ,nDataType( sdbc::DataType::VARCHAR ) + { + } + }; - uno::Reference< sdbcx::XColumnsSupplier> xColSup(m_xRowSet,uno::UNO_QUERY_THROW); - uno::Reference< container::XNameAccess > xColumns = xColSup->getColumns(); - uno::Sequence< ::rtl::OUString > aColumns; + struct CreateColumnDescription : public ::std::unary_function< ::rtl::OUString, ColumnDescription > + { + ColumnDescription operator()( const ::rtl::OUString& i_rName ) + { + return ColumnDescription( i_rName ); + } + }; + + struct SelectColumnName : public ::std::unary_function< ColumnDescription, ::rtl::OUString > + { + const ::rtl::OUString& operator()( const ColumnDescription& i_rColumn ) + { + return i_rColumn.sName; + } + }; +} + +// ----------------------------------------------------------------------------- +void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCategories,const uno::Sequence< ::rtl::OUString >& i_aColumnNames) +{ + // clear the data before fill the new one + uno::Reference< sdbcx::XColumnsSupplier > xColSup(m_xRowSet,uno::UNO_QUERY_THROW); + uno::Reference< container::XNameAccess > xColumns( xColSup->getColumns(), uno::UNO_SET_THROW ); + const uno::Sequence< ::rtl::OUString > aRowSetColumnNames( xColumns->getElementNames() ); + + typedef ::std::vector< ColumnDescription > ColumnDescriptions; + ColumnDescriptions aColumns; + bool bFirstColumnIsCategory = _bHasCategories; if ( i_aColumnNames.getLength() ) { - aColumns.realloc(1); - aColumns[0] = xColumns->getElementNames()[0]; - for(sal_Int32 i = 0 ; i < i_aColumnNames.getLength();++i) + // some normalizations ... + uno::Sequence< ::rtl::OUString > aImposedColumnNames( i_aColumnNames ); + + // strangely, there exist documents where the ColumnDescriptions end with a number of empty strings. /me + // thinks they're generated when you have a chart based on a result set with n columns, but remove some + // of those columns from the chart - it looks like a bug in the report XML export to me. + // So, get rid of the "trailing" empty columns + sal_Int32 nLastNonEmptyColName = aImposedColumnNames.getLength() - 1; + for ( ; nLastNonEmptyColName >= 0; --nLastNonEmptyColName ) { - if ( i_aColumnNames[i].getLength() ) + if ( aImposedColumnNames[ nLastNonEmptyColName ].getLength() != 0 ) + break; + } + aImposedColumnNames.realloc( nLastNonEmptyColName + 1 ); + + // second, for X-Y-charts the ColumnDescriptions exported by chart miss the name of the first (non-category) + // column. This, this results in a ColumnDescriptions array like <"", "col2", "col3">, where you'd expect + // <"col1", "col2", "col3">. + // Fix this with some heuristics: + if ( ( aImposedColumnNames.getLength() > 0 ) && ( aImposedColumnNames[0].getLength() == 0 ) ) + { + const sal_Int32 nAssumedRowSetColumnIndex = _bHasCategories ? 1 : 0; + if ( nAssumedRowSetColumnIndex < aRowSetColumnNames.getLength() ) + aImposedColumnNames[0] = aRowSetColumnNames[ nAssumedRowSetColumnIndex ]; + } + + const sal_Int32 nCount = aImposedColumnNames.getLength(); + for ( sal_Int32 i = 0 ; i < nCount; ++i ) + { + const ::rtl::OUString sColumnName( aImposedColumnNames[i] ); + if ( !xColumns->hasByName( sColumnName ) ) + continue; + + if ( _bHasCategories && aColumns.empty() ) { - sal_Int32 nCount = aColumns.getLength(); - aColumns.realloc(nCount+1); - aColumns[nCount] = i_aColumnNames[i][0]; + if ( aRowSetColumnNames.getLength() ) + aColumns.push_back( ColumnDescription( aRowSetColumnNames[0] ) ); + else + aColumns.push_back( ColumnDescription( sColumnName ) ); + bFirstColumnIsCategory = true; } + aColumns.push_back( ColumnDescription( sColumnName ) ); } } - else + if ( aColumns.empty() ) { - aColumns = xColumns->getElementNames(); + aColumns.resize( aRowSetColumnNames.getLength() ); + ::std::transform( + aRowSetColumnNames.getConstArray(), + aRowSetColumnNames.getConstArray() + aRowSetColumnNames.getLength(), + aColumns.begin(), + CreateColumnDescription() + ); } + // fill the data - uno::Reference< sdbc::XResultSet> xRes(m_xRowSet,uno::UNO_QUERY_THROW); - uno::Reference< sdbc::XRow> xRow(m_xRowSet,uno::UNO_QUERY_THROW); - uno::Reference< sdbc::XResultSetMetaData> xResultSetMetaData = uno::Reference< sdbc::XResultSetMetaDataSupplier>(m_xRowSet,uno::UNO_QUERY)->getMetaData(); - uno::Reference< sdbc::XColumnLocate> xColumnLocate(m_xRowSet,uno::UNO_QUERY_THROW); - - ::std::vector aColumnTypes; - uno::Sequence< uno::Any > aLabelArgs(1); - const sal_Int32 nCount = aColumns.getLength(); - if ( nCount ) - aColumnTypes.push_back(xResultSetMetaData->getColumnType(1)); - - ::std::vector< sal_Int32 > aColumnPositions; - const ::rtl::OUString* pIter = aColumns.getConstArray(); - const ::rtl::OUString* pEnd = pIter + aColumns.getLength(); - for(sal_Int32 k = 0;pIter != pEnd;++pIter,++k) + uno::Reference< sdbc::XResultSet> xRes( m_xRowSet, uno::UNO_QUERY_THROW ); + uno::Reference< sdbc::XRow> xRow( m_xRowSet,uno::UNO_QUERY_THROW ); + uno::Reference< sdbc::XResultSetMetaDataSupplier > xSuppMeta( m_xRowSet,uno::UNO_QUERY_THROW ); + uno::Reference< sdbc::XResultSetMetaData > xResultSetMetaData( xSuppMeta->getMetaData(), uno::UNO_SET_THROW ); + uno::Reference< sdbc::XColumnLocate > xColumnLocate( m_xRowSet, uno::UNO_QUERY_THROW ); + + for ( ColumnDescriptions::iterator col = aColumns.begin(); + col != aColumns.end(); + ++col + ) { - aColumnPositions.push_back(xColumnLocate->findColumn(*pIter)); - uno::Reference< beans::XPropertySet> xColumn(xColumns->getByName(*pIter),uno::UNO_QUERY); - sal_Int32 nType = sdbc::DataType::VARCHAR; - if ( xColumn.is() ) - { - m_aNumberFormats.insert( ::std::map< ::rtl::OUString,uno::Any>::value_type(::rtl::OUString::valueOf(k),xColumn->getPropertyValue(PROPERTY_NUMBERFORMAT))); - xColumn->getPropertyValue(PROPERTY_TYPE) >>= nType; - } - aColumnTypes.push_back(nType); + col->nResultSetPosition = xColumnLocate->findColumn( col->sName ); + + const uno::Reference< beans::XPropertySet > xColumn( xColumns->getByName( col->sName ), uno::UNO_QUERY_THROW ); + const uno::Any aNumberFormat( xColumn->getPropertyValue( PROPERTY_NUMBERFORMAT ) ); + OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_TYPE ) >>= col->nDataType ); + + const sal_Int32 columnIndex = col - aColumns.begin(); + const ::rtl::OUString sRangeName = ::rtl::OUString::valueOf( columnIndex ); + m_aNumberFormats.insert( ::std::map< ::rtl::OUString, uno::Any >::value_type( sRangeName, aNumberFormat ) ); } ::std::vector< ::rtl::OUString > aRowLabels; @@ -719,31 +788,31 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat { ++nRowCount; - aValue.fill(1,aColumnTypes[0],xRow); - aRowLabels.push_back(aValue.getString()); + aValue.fill( aColumns[0].nResultSetPosition, aColumns[0].nDataType, xRow ); + aRowLabels.push_back( aValue.getString() ); + ::std::vector< double > aRow; - ::std::vector< sal_Int32 >::iterator aColumnPosIter = aColumnPositions.begin(); - ::std::vector< sal_Int32 >::iterator aColumnPosEnd = aColumnPositions.end(); - sal_Int32 i = 0; - if ( _bHasCategories ) + for ( ColumnDescriptions::const_iterator col = aColumns.begin(); + col != aColumns.end(); + ++col + ) { - ++aColumnPosIter; - ++i; - } - for (; aColumnPosIter != aColumnPosEnd; ++aColumnPosIter,++i) - { - aValue.fill(*aColumnPosIter,aColumnTypes[i],xRow); + if ( bFirstColumnIsCategory && ( col == aColumns.begin() ) ) + continue; + + aValue.fill( col->nResultSetPosition, col->nDataType, xRow ); if ( aValue.isNull() ) { double nValue; ::rtl::math::setNan( &nValue ); - aRow.push_back(nValue); + aRow.push_back( nValue ); } else - aRow.push_back(aValue.getDouble()); + aRow.push_back( aValue.getDouble() ); } - aDataValues.push_back(aRow); - } // while( xRes->next() && (!m_RowLimit || nRowCount < m_RowLimit) ) + + aDataValues.push_back( aRow ); + } // insert default data when no rows exist if ( !nRowCount ) @@ -759,19 +828,29 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(sal_Bool _bHasCat aRowLabels.push_back(::rtl::OUString::valueOf(h+1)); ::std::vector< double > aRow; const sal_Int32 nSize = sizeof(fDefaultData)/sizeof(fDefaultData[0]); - for (sal_Int32 j = 0; j < (nCount-1); ++j,++k) + for (size_t j = 0; j < (aColumns.size()-1); ++j,++k) { if ( k >= nSize ) k = 0; aRow.push_back(fDefaultData[k]); - } // for (sal_Int32 j = 0,k = 0; j < (nCount-1); ++j,++k) + } // for (sal_Int32 j = 0,k = 0; j < (aColumns.size()-1); ++j,++k) aDataValues.push_back(aRow); } } // if ( !nRowCount ) uno::Reference< chart::XChartDataArray> xData(m_xInternal,uno::UNO_QUERY); xData->setRowDescriptions(uno::Sequence< ::rtl::OUString >(&(*aRowLabels.begin()),aRowLabels.size())); - xData->setColumnDescriptions(uno::Sequence< ::rtl::OUString >(aColumns.getArray()+ (_bHasCategories ? 1 : 0),aColumns.getLength() - (_bHasCategories ? 1 : 0) )); + + const size_t nOffset = bFirstColumnIsCategory ? 1 : 0; + uno::Sequence< ::rtl::OUString > aColumnDescriptions( aColumns.size() - nOffset ); + ::std::transform( + aColumns.begin() + nOffset, + aColumns.end(), + aColumnDescriptions.getArray(), + SelectColumnName() + ); + xData->setColumnDescriptions( aColumnDescriptions ); + uno::Sequence< uno::Sequence< double > > aData(aDataValues.size()); uno::Sequence< double >* pDataIter = aData.getArray(); uno::Sequence< double >* pDataEnd = pDataIter + aData.getLength(); diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index 2299fff10f98..7d1cdbc6db30 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -1221,20 +1221,12 @@ void OOle2Obj::initializeChart( const uno::Reference< frame::XModel>& _xModel) OReportModel* pRptModel = static_cast(GetModel()); pRptModel->GetUndoEnv().AddElement(lcl_getDataProvider(xObj)); - uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1, - uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), beans::PropertyState_DIRECT_VALUE ); - aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[3] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), -1, - uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ); - xReceiver->setArguments( aArgs ); + ::comphelper::NamedValueCollection aArgs; + aArgs.put( "CellRangeRepresentation", uno::makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "all" ) ) ) ); + aArgs.put( "HasCategories", uno::makeAny( sal_True ) ); + aArgs.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); + aArgs.put( "DataRowSource", uno::makeAny( chart::ChartDataRowSource_COLUMNS ) ); + xReceiver->setArguments( aArgs.getPropertyValues() ); if( xChartModel.is() ) xChartModel->unlockControllers(); diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index d3a557c3ff6b..be664b5694e1 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -349,14 +349,14 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any > if ( xDataProvider.is() ) { m_aColumns.realloc(1); - uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames = xDataProvider->getComplexColumnDescriptions(); + uno::Sequence< ::rtl::OUString > aColumnNames = xDataProvider->getColumnDescriptions(); for(sal_Int32 i = 0 ; i < aColumnNames.getLength();++i) { if ( aColumnNames[i].getLength() ) { sal_Int32 nCount = m_aColumns.getLength(); m_aColumns.realloc(nCount+1); - m_aColumns[nCount] = aColumnNames[i][0]; + m_aColumns[nCount] = aColumnNames[i]; } } } diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index c92eecc1084d..c0ae9152e146 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -56,8 +57,9 @@ using namespace ::xmloff::token; ::rtl::OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,const xmloff::token::XMLTokenEnum& _eAttribute); -ImportDocumentHandler::ImportDocumentHandler(uno::Reference< uno::XComponentContext > const & context) : - m_xContext(context) +ImportDocumentHandler::ImportDocumentHandler(uno::Reference< uno::XComponentContext > const & context) + :m_xContext(context) + ,m_bImportedChart( false ) { } // ----------------------------------------------------------------------------- @@ -121,35 +123,24 @@ void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException, { m_xDelegatee->endDocument(); uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW); - if ( xReceiver.is() ) + if ( xReceiver.is() && m_bImportedChart ) { // this fills the chart again - uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1, - uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), beans::PropertyState_DIRECT_VALUE ); - aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[3] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), -1, - uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ); + ::comphelper::NamedValueCollection aArgs; + aArgs.put( "CellRangeRepresentation", ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ); + aArgs.put( "HasCategories", uno::makeAny( sal_True ) ); + aArgs.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); + aArgs.put( "DataRowSource", uno::makeAny( chart::ChartDataRowSource_COLUMNS ) ); uno::Reference< chart::XComplexDescriptionAccess > xDataProvider(m_xModel->getDataProvider(),uno::UNO_QUERY); if ( xDataProvider.is() ) { - aArgs.realloc(5); - uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames = xDataProvider->getComplexColumnDescriptions(); - aArgs[4] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("ComplexColumnDescriptions"), -1, - uno::makeAny( aColumnNames ), beans::PropertyState_DIRECT_VALUE ); + const uno::Sequence< ::rtl::OUString > aColumnNames = xDataProvider->getColumnDescriptions(); + aArgs.put( "ColumnDescriptions", uno::makeAny( aColumnNames ) ); } - xReceiver->attachDataProvider(m_xDatabaseDataProvider.get()); - xReceiver->setArguments( aArgs ); + xReceiver->attachDataProvider( m_xDatabaseDataProvider.get() ); + xReceiver->setArguments( aArgs.getPropertyValues() ); } } @@ -204,6 +195,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName } m_xDelegatee->startElement(lcl_createAttribute(XML_NP_OFFICE,XML_CHART),NULL); bExport = false; + m_bImportedChart = true; } else if ( _sName.equalsAscii("rpt:master-detail-field") ) { diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx index 3f0fdebfc111..579a1b79b231 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.hxx @@ -85,6 +85,7 @@ private: virtual ~ImportDocumentHandler(); ::osl::Mutex m_aMutex; + bool m_bImportedChart; ::std::vector< ::rtl::OUString> m_aMasterFields; ::std::vector< ::rtl::OUString> m_aDetailFields; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aArguments; diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index 57e293994741..d62a9443d490 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -27,6 +27,7 @@ #include "precompiled_reportdesign.hxx" #include "DataProviderHandler.hxx" #include +#include #include #include #include @@ -469,21 +470,13 @@ void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const ::rtl::OUStrin sal_Bool bModified = xReport->isModified(); // this fills the chart again - uno::Sequence< beans::PropertyValue > aArgs( 4 ); - aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1, - uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), beans::PropertyState_DIRECT_VALUE ); - aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1, - uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE ); - aArgs[3] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), -1, - uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ); + ::comphelper::NamedValueCollection aArgs; + aArgs.put( "CellRangeRepresentation", uno::makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "all" ) ) ) ); + aArgs.put( "HasCategories", uno::makeAny( sal_True ) ); + aArgs.put( "FirstCellAsLabel", uno::makeAny( sal_True ) ); + aArgs.put( "DataRowSource", uno::makeAny( chart::ChartDataRowSource_COLUMNS ) ); uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xChartModel,uno::UNO_QUERY_THROW); - xReceiver->setArguments( aArgs ); + xReceiver->setArguments( aArgs.getPropertyValues() ); if ( !bModified ) xReport->setModified(sal_False); } // if ( NewValue != OldValue ) -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From 3dc0a69ae5a399c0b82827ff863530fd7b8e13a2 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 21 Sep 2010 11:36:27 +0200 Subject: dba33j: #i111302# fixed truncated strings --- cui/source/options/optimprove.src | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 003390d4600a..232595b534e4 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -84,29 +84,29 @@ TabPage RID_SVXPAGE_IMPROVEMENT FixedText FT_NR_REPORTS { Pos = MAP_APPFONT ( 12 , 132 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of reports sent:" ; }; FixedText FT_NR_REPORTS_VALUE { - Pos = MAP_APPFONT ( 95 , 132 ) ; + Pos = MAP_APPFONT ( 111 , 132 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; }; FixedText FT_NR_ACTIONS { Pos = MAP_APPFONT ( 12 , 145 ) ; - Size = MAP_APPFONT ( 80 , 8 ) ; + Size = MAP_APPFONT ( 96 , 8 ) ; Text [ en-US ] = "Number of tracked actions:" ; }; FixedText FT_NR_ACTIONS_VALUE { Pos = MAP_APPFONT ( 95 , 145 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; + Size = MAP_APPFONT ( 111 , 10 ) ; }; PushButton PB_SHOWDATA { Pos = MAP_APPFONT ( 12 , 161 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Show Data" ; }; String STR_INFO -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From b86ec6f20a6ee63fa56cb8b2a26fe8ad04a79be3 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 22 Sep 2010 14:42:41 +0200 Subject: fwk159: #i114231# use login token if there is any --- swext/mediawiki/build.xml | 4 +-- swext/mediawiki/makefile.mk | 8 ++++- .../src/com/sun/star/wiki/EditPageParser.java | 5 ++++ swext/mediawiki/src/com/sun/star/wiki/Helper.java | 34 +++++++++++++++++++++- .../src/com/sun/star/wiki/WikiArticle.java | 2 ++ 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/swext/mediawiki/build.xml b/swext/mediawiki/build.xml index 8dea0dce0bd2..79cd9cb9eb1c 100644 --- a/swext/mediawiki/build.xml +++ b/swext/mediawiki/build.xml @@ -53,7 +53,7 @@ - + @@ -75,7 +75,7 @@ - diff --git a/swext/mediawiki/makefile.mk b/swext/mediawiki/makefile.mk index 9d051397a319..52d9900ab1e6 100644 --- a/swext/mediawiki/makefile.mk +++ b/swext/mediawiki/makefile.mk @@ -41,7 +41,13 @@ COMMONS_LOGGING_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-logging-1 COMP=fix_system_commons .ENDIF -ANT_FLAGS+=-Dcommons-codec-jar=$(COMMONS_CODEC_JAR) -Dcommons-lang-jar=$(COMMONS_LANG_JAR) -Dcommons-httpclient-jar=$(COMMONS_HTTPCLIENT_JAR) -Dcommons-logging-jar=$(COMMONS_LOGGING_JAR) +.IF defined(debug) || defined(DEBUG) +ANTDEBUG=true +.ELSE +ANTDEBUG=off +.ENDIF + +ANT_FLAGS+=-Dcommons-codec-jar=$(COMMONS_CODEC_JAR) -Dcommons-lang-jar=$(COMMONS_LANG_JAR) -Dcommons-httpclient-jar=$(COMMONS_HTTPCLIENT_JAR) -Dcommons-logging-jar=$(COMMONS_LOGGING_JAR) -Dantdebug=$(ANTDEBUG) # creates two files wiki-publisher.oxt and mediawiki_develop.zip, the second one might be used in further build process ALLTAR: $(COMP) ANTBUILD diff --git a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java index a0ed06ab4399..f91819c6bc2a 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java +++ b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java @@ -35,6 +35,7 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback protected String m_sEditTime = ""; protected String m_sEditToken = ""; + protected String m_sLoginToken = ""; protected String m_sMainURL = ""; private int m_nWikiArticleHash = 0; @@ -100,6 +101,10 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback { this.m_sEditToken = ( String ) a.getAttribute( HTML.Attribute.VALUE ); } + else if ( sName.equalsIgnoreCase( "wpLoginToken" ) ) + { + this.m_sLoginToken = ( String ) a.getAttribute( HTML.Attribute.VALUE ); + } } } diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java index 7862cdd42912..7ecd9ecb0e7c 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java +++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java @@ -784,6 +784,29 @@ public class Helper return bResult; } + static protected String GetLoginToken( String sLoginPage ) + { + String sResult = ""; + if ( sLoginPage != null && sLoginPage.length() > 0 ) + { + try + { + StringReader aReader = new StringReader( sLoginPage ); + HTMLEditorKit.Parser aParser = Helper.GetHTMLParser(); + EditPageParser aCallbacks = new EditPageParser(); + + aParser.parse( aReader, aCallbacks, true ); + sResult = aCallbacks.m_sLoginToken; + } + catch( Exception e ) + { + e.printStackTrace(); + } + } + + return sResult; + } + static protected HostConfiguration Login( URI aMainURL, String sWikiUser, String sWikiPass, XComponentContext xContext ) throws com.sun.star.uno.Exception, java.io.IOException, WikiCancelException { @@ -799,10 +822,16 @@ public class Helper ExecuteMethod( aGetCookie, aNewHostConfig, aURI, xContext, true ); int nResultCode = aGetCookie.getStatusCode(); + String sLoginPage = null; + if ( nResultCode == 200 ) + sLoginPage = aGetCookie.getResponseBodyAsString(); + aGetCookie.releaseConnection(); - if ( nResultCode == 200 ) + if ( sLoginPage != null ) { + String sLoginToken = GetLoginToken( sLoginPage ); + PostMethod aPost = new PostMethod(); URI aPostURI = new URI( aMainURL.getPath() + "index.php?title=Special:Userlogin&action=submitlogin" ); aPost.setPath( aPostURI.getEscapedPathQuery() ); @@ -810,6 +839,9 @@ public class Helper aPost.addParameter( "wpName", sWikiUser ); aPost.addParameter( "wpRemember", "1" ); aPost.addParameter( "wpPassword", sWikiPass ); + if ( sLoginToken.length() > 0 ) + aPost.addParameter( "wpLoginToken", sLoginToken ); + String[][] pArgs = GetSpecialArgs( xContext, aMainURL.getHost() ); if ( pArgs != null ) for ( int nArgInd = 0; nArgInd < pArgs.length; nArgInd++ ) diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java index 13bb55abcedf..89025ed84513 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java +++ b/swext/mediawiki/src/com/sun/star/wiki/WikiArticle.java @@ -145,6 +145,8 @@ public class WikiArticle if ( nResultCode == 200 ) sWebPage = aRequest.getResponseBodyAsString(); + aRequest.releaseConnection(); + if ( sWebPage != null ) { StringReader r = new StringReader(sWebPage); -- cgit v1.2.3 From 5e8e3f41a72bf7be444b501a97481443fce5a23c Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 22 Sep 2010 16:19:51 +0200 Subject: dba33j: GCC WaE --- dbaccess/source/core/misc/DatabaseDataProvider.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index bb41b5062ff8..ab0ccc737a11 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -244,10 +244,10 @@ uno::Reference< chart2::data::XDataSource > SAL_CALL DatabaseDataProvider::creat uno::Reference< lang::XInitialization> xIni(m_xInternal,uno::UNO_QUERY); if ( xIni.is() ) { - uno::Sequence< uno::Any > aArgs(1); + uno::Sequence< uno::Any > aInitArgs(1); beans::NamedValue aParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateDefaultData")),uno::makeAny(sal_True)); - aArgs[0] <<= aParam; - xIni->initialize(aArgs); + aInitArgs[0] <<= aParam; + xIni->initialize(aInitArgs); } } -- cgit v1.2.3 From e5ab3e1c6d76f36d9d1fe44f5c48981fc9e73942 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 22 Sep 2010 17:26:17 +0200 Subject: dba33j: unxmacxi.pro: WaE --- reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index c0ae9152e146..92ee79509dea 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -58,8 +58,8 @@ using namespace ::xmloff::token; ::rtl::OUString lcl_createAttribute(const xmloff::token::XMLTokenEnum& _eNamespace,const xmloff::token::XMLTokenEnum& _eAttribute); ImportDocumentHandler::ImportDocumentHandler(uno::Reference< uno::XComponentContext > const & context) - :m_xContext(context) - ,m_bImportedChart( false ) + :m_bImportedChart( false ) + ,m_xContext(context) { } // ----------------------------------------------------------------------------- -- cgit v1.2.3 From 0336bdb79be24d95dac3ab814c52a8738aeb5253 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 23 Sep 2010 11:21:26 +0200 Subject: dba33j: #i111302# fixed truncated strings --- cui/source/options/optimprove.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cui/source/options/optimprove.src b/cui/source/options/optimprove.src index 232595b534e4..c389b38cddfa 100644 --- a/cui/source/options/optimprove.src +++ b/cui/source/options/optimprove.src @@ -100,8 +100,8 @@ TabPage RID_SVXPAGE_IMPROVEMENT }; FixedText FT_NR_ACTIONS_VALUE { - Pos = MAP_APPFONT ( 95 , 145 ) ; - Size = MAP_APPFONT ( 111 , 10 ) ; + Pos = MAP_APPFONT ( 111 , 145 ) ; + Size = MAP_APPFONT ( 100 , 10 ) ; }; PushButton PB_SHOWDATA { -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From 011ac751da6ad88af5ff9e6547f568549e6675c3 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 24 Sep 2010 14:08:30 +0200 Subject: #i114703# better selection of localized fontnames (thanks cmc) --- vcl/unx/source/fontmanager/fontconfig.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx index 03816857f27c..5b18ec002aa9 100644 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ b/vcl/unx/source/fontmanager/fontconfig.cxx @@ -509,22 +509,29 @@ namespace std::vector::const_iterator aEnd = families.end(); bool alreadyclosematch = false; - for (std::vector::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter) + for( std::vector::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter ) { const char *pLang = (const char*)aIter->first; - //perfect - if( rtl_str_compare(pLang,sFullMatch.getStr() ) == 0) + if( rtl_str_compare( pLang, sFullMatch.getStr() ) == 0) { + // both language and country match candidate = aIter->second; break; } - else if( (rtl_str_compare(pLang,sLangMatch.getStr()) == 0) && (!alreadyclosematch)) + else if( alreadyclosematch ) + continue; + else if( rtl_str_compare( pLang, sLangMatch.getStr()) == 0) { + // just the language matches candidate = aIter->second; alreadyclosematch = true; } + else if( rtl_str_compare( pLang, "en") == 0) + { + // fallback to the english family name + candidate = aIter->second; + } } - return candidate; } } -- cgit v1.2.3 From f711eee6345574feb835cc19b783a3b8b6303b18 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 28 Sep 2010 11:04:18 +0200 Subject: sw33bf10: redland/prj/d.lst: missing mkdir inc/external --- redland/prj/d.lst | 1 + 1 file changed, 1 insertion(+) diff --git a/redland/prj/d.lst b/redland/prj/d.lst index 6363f9bbe330..f96f3a516fff 100644 --- a/redland/prj/d.lst +++ b/redland/prj/d.lst @@ -1,3 +1,4 @@ +mkdir: %_DEST%\inc%_EXT%\external ..\%__SRC%\inc\*.h %_DEST%\inc%_EXT%\external\*.h ..\%__SRC%\lib\libraptor.so.1 %_DEST%\lib%_EXT%\libraptor.so.1 symlink: %_DEST%\lib%_EXT%\libraptor.so.1 %_DEST%\lib%_EXT%\libraptor.so -- cgit v1.2.3 From 7f245231f6129c8b9c2122771906312ae76a4de9 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 29 Sep 2010 10:23:10 +0200 Subject: cws dict33a: #i114774 thesaurus patch applied --- lingucomponent/source/spellcheck/spell/sspellimp.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 0cb6ad8ec3da..5fc0c517e141 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -375,6 +375,9 @@ sal_Bool SAL_CALL return TRUE; #endif + // return FALSE to process SPELLML requests (they are longer than the header) + if (rWord.match(A2OU(SPELLML_HEADER), 0) && (rWord.getLength() > 10)) return FALSE; + // Get property values to be used. // These are be the default values set in the SN_LINGU_PROPERTIES // PropertySet which are overridden by the supplied ones from the -- cgit v1.2.3 -- cgit v1.2.3 From e31fe5beb2debc2132cb31b9f15e2104f3b4a3ea Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 29 Sep 2010 12:24:07 +0200 Subject: sw33bf10: #i114793# missing rename crash_report.bin -> crashrep --- svx/source/dialog/sendreportunx.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/dialog/sendreportunx.cxx b/svx/source/dialog/sendreportunx.cxx index 47a75f668b2f..d59bc9bb1cba 100644 --- a/svx/source/dialog/sendreportunx.cxx +++ b/svx/source/dialog/sendreportunx.cxx @@ -243,7 +243,7 @@ namespace svx{ int ret = -1; rtl::OUString path1( RTL_CONSTASCII_USTRINGPARAM( - "$BRAND_BASE_DIR/program/crash_report.bin")); + "$BRAND_BASE_DIR/program/crashrep")); rtl::Bootstrap::expandMacros(path1); rtl::OString path2; if ((osl::FileBase::getSystemPathFromFileURL(path1, path1) == -- cgit v1.2.3 From d2c13df2ea23ed334ce37c4fc9687252ff100d51 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Wed, 29 Sep 2010 13:31:35 +0200 Subject: sw33bf10: #i105461# write missing parts of OBJLBSDATA sub record --- sc/source/filter/excel/xeescher.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 0509f2afa5fa..b2801df7f54a 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -841,7 +841,7 @@ void XclExpTbxControlObj::WriteSubRecs( XclExpStream& rStrm ) } else if( mnObjType == EXC_OBJTYPE_DROPDOWN ) { - rStrm << sal_uInt16( 0 ) << mnLineCount; + rStrm << sal_uInt16( 0 ) << mnLineCount << sal_uInt16( 0 ) << sal_uInt16( 0 ); } rStrm.EndRecord(); -- cgit v1.2.3 From 568b1c96b9564e90ef007689b940523890017fd7 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 1 Oct 2010 15:13:01 +0200 Subject: sw33bf11: #i114875# - method - consider brochure print correctly in fix for issue i114210 --- sw/source/ui/uno/unotxdoc.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index e78fc11c1203..38a9f1fc5337 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2858,7 +2858,11 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( { // --> TL, OD 2010-09-07 #i114210# // determine the correct page number from the renderer index - const USHORT nPage = m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // --> OD 2010-10-01 #i114875 + // consider brochure print + const USHORT nPage = bPrintProspect + ? nRenderer + 1 + : m_pRenderData->GetPagesToPrint()[ nRenderer ]; // <-- // get paper tray to use ... -- cgit v1.2.3 From 3598a25179735eecbeed9c65e296c9353af9b727 Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Mon, 4 Oct 2010 08:01:27 +0200 Subject: sdk331: 114884: remove unofficial api's --- odk/pack/copying/makefile.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk index 52efe87ff797..02471bd53638 100644 --- a/odk/pack/copying/makefile.mk +++ b/odk/pack/copying/makefile.mk @@ -34,7 +34,7 @@ TARGET=copying .INCLUDE: $(PRJ)/util/makefile.pmk #---------------------------------------------------------------- -IDLLIST:={$(subst,/,/ $(shell @$(FIND) $(IDLOUT) -type f | sed -e '/star.portal/d' -e'/star.webservices/d'))} +IDLLIST:={$(subst,/,/ $(shell @$(FIND) $(IDLOUT)/com -type f))} DESTIDLLIST={$(subst,$(IDLOUT),$(DESTDIRIDL) $(IDLLIST))} DESTINCLUDELIST={$(subst,$(SOLARINCDIR),$(DESTDIRINC) $(INCLUDELIST))} -- cgit v1.2.3 From 01f1baa440b4366c694e160a213ba5d371a82b95 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Mon, 4 Oct 2010 14:19:19 +0200 Subject: cws tl86: update to OpenSymbol font v. 2.4.3 --- extras/source/truetype/symbol/opens___.ttf | Bin 198668 -> 206612 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/extras/source/truetype/symbol/opens___.ttf b/extras/source/truetype/symbol/opens___.ttf index 3123f3f33f85..96707f2638a8 100644 Binary files a/extras/source/truetype/symbol/opens___.ttf and b/extras/source/truetype/symbol/opens___.ttf differ -- cgit v1.2.3 From b0e6ce3381f8e991a8185a733ce5a6648b9528b7 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 5 Oct 2010 13:05:24 -0700 Subject: #i102807# adjust magnify event sensitivity to app expectations --- vcl/aqua/inc/salframeview.h | 4 +++ vcl/aqua/source/window/salframeview.mm | 65 +++++++++++++++++++++------------- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h index 0174c1a68832..d812523c472d 100755 --- a/vcl/aqua/inc/salframeview.h +++ b/vcl/aqua/inc/salframeview.h @@ -77,6 +77,10 @@ id mpMouseEventListener; id mDraggingDestinationHandler; NSEvent* mpLastSuperEvent; + + // #i102807# used by magnify event handler + NSTimeInterval mfLastMagnifyTime; + float mfMagnifyDeltaSum; } +(void)unsetMouseFrame: (AquaSalFrame*)pFrame; -(id)initWithSalFrame: (AquaSalFrame*)pFrame; diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 25dadf0e592b..2f9959ab43f4 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -378,6 +378,7 @@ static AquaSalFrame* getMouseContainerFrame() mpLastSuperEvent = nil; } + mfLastMagnifyTime = 0.0; return self; } @@ -637,21 +638,40 @@ private: // TODO: ?? -(float)magnification; if( AquaSalFrame::isAlive( mpFrame ) ) - { - mpFrame->mnLastEventTime = static_cast( [pEvent timestamp] * 1000.0 ); + { + const NSTimeInterval fMagnifyTime = [pEvent timestamp]; + mpFrame->mnLastEventTime = static_cast( fMagnifyTime * 1000.0 ); mpFrame->mnLastModifierFlags = [pEvent modifierFlags]; - - float dZ = 0.0; - for(;;) + + // check if this is a new series of magnify events + static const NSTimeInterval fMaxDiffTime = 0.3; + const bool bNewSeries = (fMagnifyTime - mfLastMagnifyTime > fMaxDiffTime); + + if( bNewSeries ) + mfMagnifyDeltaSum = 0.0; + mfMagnifyDeltaSum += [pEvent deltaZ]; + + mfLastMagnifyTime = [pEvent timestamp]; + // TODO: change to 0.1 when COMMAND_WHEEL_ZOOM handlers allow finer zooming control + static const float fMagnifyFactor = 0.25; + static const float fMinMagnifyStep = 15.0 / fMagnifyFactor; + if( fabs(mfMagnifyDeltaSum) <= fMinMagnifyStep ) + return; + + // adapt NSEvent-sensitivity to application expectations + // TODO: rather make COMMAND_WHEEL_ZOOM handlers smarter + const float fDeltaZ = mfMagnifyDeltaSum * fMagnifyFactor; + int nDeltaZ = FRound( fDeltaZ ); + if( !nDeltaZ ) { - dZ += [pEvent deltaZ]; - NSEvent* pNextEvent = [NSApp nextEventMatchingMask: NSScrollWheelMask - untilDate: nil inMode: NSDefaultRunLoopMode dequeue: YES ]; - if( !pNextEvent ) - break; - pEvent = pNextEvent; + // handle new series immediately + if( !bNewSeries ) + return; + nDeltaZ = (fDeltaZ >= 0.0) ? +1 : -1; } - + // eventually give credit for delta sum + mfMagnifyDeltaSum -= nDeltaZ / fMagnifyFactor; + NSPoint aPt = [NSEvent mouseLocation]; mpFrame->CocoaToVCL( aPt ); @@ -667,18 +687,15 @@ private: if( Application::GetSettings().GetLayoutRTL() ) aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX; - if( dZ != 0.0 ) - { - aEvent.mnDelta = static_cast(floor(dZ)); - aEvent.mnNotchDelta = dZ < 0 ? -1 : 1; - if( aEvent.mnDelta == 0 ) - aEvent.mnDelta = aEvent.mnNotchDelta; - aEvent.mbHorz = FALSE; - aEvent.mnScrollLines = dZ > 0 ? dZ/WHEEL_EVENT_FACTOR : -dZ/WHEEL_EVENT_FACTOR; - if( aEvent.mnScrollLines == 0 ) - aEvent.mnScrollLines = 1; - mpFrame->CallCallback( SALEVENT_WHEELMOUSE, &aEvent ); - } + aEvent.mnDelta = nDeltaZ; + aEvent.mnNotchDelta = (nDeltaZ >= 0) ? +1 : -1; + if( aEvent.mnDelta == 0 ) + aEvent.mnDelta = aEvent.mnNotchDelta; + aEvent.mbHorz = FALSE; + aEvent.mnScrollLines = nDeltaZ; + if( aEvent.mnScrollLines == 0 ) + aEvent.mnScrollLines = 1; + mpFrame->CallCallback( SALEVENT_WHEELMOUSE, &aEvent ); } } -- cgit v1.2.3 From c4dc91f5f2a7e04926070bbaabcd58ce85bb516d Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 5 Oct 2010 15:16:38 +0200 Subject: ooo33gsl10: #i112076# fix MetaFloatTransparentAction --- vcl/source/gdi/metaact.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 94f07b8f17d1..8c1545758c3b 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -3793,7 +3793,6 @@ MetaAction* MetaFloatTransparentAction::Clone() void MetaFloatTransparentAction::Move( long nHorzMove, long nVertMove ) { maPoint.Move( nHorzMove, nVertMove ); - maMtf.Move(nHorzMove, nVertMove); } // ------------------------------------------------------------------------ @@ -3804,7 +3803,6 @@ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) ImplScaleRect( aRectangle, fScaleX, fScaleY ); maPoint = aRectangle.TopLeft(); maSize = aRectangle.GetSize(); - maMtf.Scale(fScaleX, fScaleY); } // ------------------------------------------------------------------------ -- cgit v1.2.3 From 519a2b9f2b61c6ccc09b3455cd2869340559f079 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Oct 2010 19:01:32 +0200 Subject: ooo330l10n4: utf8 encoding issue --- l10ntools/scripts/tool/l10ntool.py | 3 +-- l10ntools/scripts/tool/xhtex.py | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py index 70d88674f07b..f1630027ccdc 100644 --- a/l10ntools/scripts/tool/l10ntool.py +++ b/l10ntools/scripts/tool/l10ntool.py @@ -66,11 +66,10 @@ class AbstractL10nTool: pass ################################################################################################ - + def format_outputfile(self, filename, language): extension = filename[filename.rfind('.')+1:] file = filename[:filename.rfind('.')] - # Python 2.3.x friendly return self.get_outputfile_format_str().replace('[', '%(').replace(']',')s') % \ { 'filename': filename, 'fileNoExt': file, 'language': language, 'extension': extension, 'path_prefix': self._options.path_prefix, diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py index ae973aacc555..d916fc675944 100644 --- a/l10ntools/scripts/tool/xhtex.py +++ b/l10ntools/scripts/tool/xhtex.py @@ -56,13 +56,14 @@ class Xhtex(AbstractL10nTool): if elem.childNodes[0].nodeType == elem.TEXT_NODE and elem.getAttribute("id").strip(): obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip()) if sdfdata[obj.get_id()]: - elem.childNodes[0].data = str(sdfdata[obj.get_id()].text) + elem.childNodes[0].data = unicode(str(sdfdata[obj.get_id()].text),"utf8") + def merge_title(self, list, sdfdata, lang, inputfilename): for elem in list: obj = self.prepare_sdf_line(inputfile=inputfilename, lang=lang, id=elem.getAttribute("id").strip()) if elem.getAttribute("id").strip() and sdfdata[obj.get_id()]: - elem.setAttribute("title", str(sdfdata[obj.get_id()].text)) + elem.setAttribute("title", unicode(str(sdfdata[obj.get_id()].text),"utf8")) # L10N tool def __init__(self): @@ -97,7 +98,7 @@ class Xhtex(AbstractL10nTool): try: f = open(outputfilename, "w+") str = dom.toxml() - f.write(str) + f.write(str.encode("utf-8")) except IOError: print "ERROR: Can not write file " + outputfilename sys.exit(-1) -- cgit v1.2.3 From 2cf1d791136363951a537b2ef832dd00b37c5b5c Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Oct 2010 19:04:25 +0200 Subject: ooo330l10n4: changed SRC_ROOT -> SOURCE_ROOT_DIR, misc cleanup --- l10ntools/scripts/localize.pl | 124 ++++-------------------------------------- 1 file changed, 12 insertions(+), 112 deletions(-) diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl index 7a9d8beb6f15..230b6d46f395 100644 --- a/l10ntools/scripts/localize.pl +++ b/l10ntools/scripts/localize.pl @@ -87,7 +87,6 @@ my @sdfparticles; #### main #### parse_options(); -check_modules_scm(); my $binpath = ''; if( defined $ENV{UPDMINOREXT} ) @@ -159,7 +158,7 @@ sub splitfile{ next if( $prj eq "binfilter" ); # Don't merge strings into binfilter module chomp( $line ); - if( is_openoffice_module( $prj ) ) + if( $force_ooo_module ) { $string_hash_ooo { $lang }{ "$prj\t$file\t$type\t$gid\t$lid\t$helpid\t$plattform\t$lang" } = $line; } @@ -171,97 +170,25 @@ sub splitfile{ } close( MYFILE ); - if( !defined $ENV{SRC_ROOT} ){ - print "Error, no SRC_ROOT in env found.\n"; + if( !defined $ENV{SOURCE_ROOT_DIR} ){ + print "Error, no SOURCE_ROOT_DIR in env found.\n"; exit( -1 ); } - my $src_root = $ENV{SRC_ROOT}; - my $so_l10n_path = $src_root."/l10n_so/source"; - my $ooo_l10n_path = $src_root."/l10n/source"; + my $src_root = $ENV{SOURCE_ROOT_DIR}; + my $so_l10n_path = $src_root."/sun/l10n_so/source"; + my $ooo_l10n_path = $src_root."/ooo/l10n/source"; #print "$so_l10n_path\n"; #print "$ooo_l10n_path\n"; - write_sdf( \%string_hash_so , $so_l10n_path ); - write_sdf( \%string_hash_ooo , $ooo_l10n_path ); - -} -sub check_modules_scm -{ - #my @ooo_modules; - #my @so_modules; - my $src_path = $ENV{ SRC_ROOT } ; - my $last_dir = getcwd(); - chdir $src_path ; - my @modules = <*/.svn/entries>; - - foreach my $module ( @modules ) + if( $force_ooo_module ) { - #print "$module \n"; - if( open ( FILE , "<$module" ) ) - { - while( ) - { - - my @path = split ( "/" , $module ) ; - - if( /svn.services.openoffice.org/ ) - { - my $mod = $path[ 0 ]; - #push @ooo_modules , $mod; - $is_ooo_module{ $mod } = "true"; - # print "$module -> ooo "; - } - elsif ( /jumbo2.germany.sun.com/ ) - { - my $mod = $path[ 0 ]; - #push @so_modules , $mod; - # print "$module -> so "; - #$so_lookup_hash{ $mod } = "true"; - } - #else - #{ - # print "ERROR: Is $module a SO or OOo module? Can not parese the $module/.svn/entries file ... please check mwsfinnish/merge/splitsdf.pl line 280\n"; - # exit -1; - #} - } - } + write_sdf( \%string_hash_ooo , $ooo_l10n_path ); + } + else + { + write_sdf( \%string_hash_so , $so_l10n_path ); } - chdir $last_dir ; - #print "OOO\n"; - #print @ooo_modules; - #print "\nSO\n"; - #print @so_modules; -} - - -#sub parse -#{ -# my $command = "$CVS_BINARY -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs co -c"; -# my $output = `$command`; -# my $rc = $? << 8; -# if ( $output eq "" || $rc < 0 ){ -# print STDERR "ERROR: Can not fetch cvs alias list, please login to the cvs server and press at the password prompt just return\ncvs -d:pserver:anoncvs\@anoncvs.services.openoffice.org:/cvs login\n"; -# exit ( -1 ); -# } -# my @list = split /\n/ , $output ; -# foreach my $string( @list ) -# { -# -# # print "Found '$1'\n" , if( $string =~ /^(\w*)/ && $1 ne "" ); -# -# $is_ooo_module{ $1 } = "TRUE", if( $string =~ /^(\w*)/ && $1 ne "" ); -# } -# # foreach my $key( keys( %is_ooo_module ) ) -# #{ -# # print "$key\n"; -# #} -#} -sub is_openoffice_module -{ - my $module = shift; - return "TRUE", if ( $force_ooo_module || defined $is_ooo_module{ $module } ); - return ""; } sub write_sdf @@ -458,16 +385,9 @@ sub collectfiles{ # $| = 1; STDOUT->autoflush( 1 ); - ### Search sdf particles - #print STDOUT "### Searching sdf particles\n"; my $working_path = getcwd(); chdir $ENV{SOURCE_ROOT_DIR}, if defined $ENV{SOURCE_ROOT_DIR}; - #chdir $srcpath; - #find ( { wanted => \&wanted , follow => 1 }, getcwd() ); - #chdir $working_path; add_paths( $langhash_ref ); - #my $nFound = $#sdfparticles +1; - #print "\n $nFound files found !\n"; my ( $LOCALIZEPARTICLE , $localizeSDF ) = File::Temp::tempfile(); close( $LOCALIZEPARTICLE ); @@ -591,7 +511,6 @@ sub collectfiles{ } } close ALLPARTICLES_MERGED; -#*************** # Hash of array my %output; @@ -1156,22 +1075,3 @@ sub usage{ print STDERR "\nlocalize -m -l cs -f my.sdf\n( Merge cs translation into the sourcecode ) \n"; } -# my $line = defined $_ ? $_ : ''; -# my $leftpart = defined $2 ? $2 : ''; -# my $prj = defined $3 ? $3 : ''; -# my $file = defined $4 ? $4 : ''; -# my $dummy = defined $5 ? $5 : ''; -# my $type = defined $6 ? $6 : ''; -# my $gid = defined $7 ? $7 : ''; -# my $lid = defined $8 ? $8 : ''; -# my $helpid = defined $9 ? $9 : ''; -# my $plattform = defined $10 ? $10 : ''; -# my $width = defined $11 ? $11 : ''; -# my $lang = defined $12 ? $12 : ''; -# my $rightpart = defined $13 ? $13 : ''; -# my $text = defined $14 ? $14 : ''; -# my $helptext = defined $15 ? $15 : ''; -# my $quickhelptext = defined $16 ? $16 : ''; -# my $title = defined $17 ? $17 : ''; -# my $timestamp = defined $18 ? $18 : ''; - -- cgit v1.2.3 From 60d81d7214173faec846f89f41db88ee073e4e81 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Oct 2010 19:05:30 +0200 Subject: ooo330l10n4: deliver *.py --- l10ntools/prj/d.lst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst index 9d493e1e9673..c268f36574f8 100644 --- a/l10ntools/prj/d.lst +++ b/l10ntools/prj/d.lst @@ -49,16 +49,16 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help ..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex -..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py -..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py -..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py -..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py -..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc -..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc -..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc -..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc -..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py -..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py +..\scripts\tool\*.py %_DEST%\bin%_EXT%\ +#..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py +#..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py +#..\script\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py +#..\script\tool\const.pyc %_DEST%\bin%_EXT%\const.pyc +#..\script\tool\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc +#..\script\tool\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc +#..\script\tool\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc +#..\script\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py +#..\script\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py ..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx -- cgit v1.2.3 From fb98253ab312683294fd36b37644d0b0de6e04df Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Oct 2010 19:11:17 +0200 Subject: ooo330l10n4: fixed encoding, windows path issue --- l10ntools/java/jpropex/java/JPropEx.java | 11 +++++++---- l10ntools/java/jpropex/java/SdfData.java | 2 +- l10ntools/java/jpropex/java/SdfEntity.java | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java index f068f93ad18b..9ff8bf96fe44 100644 --- a/l10ntools/java/jpropex/java/JPropEx.java +++ b/l10ntools/java/jpropex/java/JPropEx.java @@ -141,9 +141,12 @@ public class JPropEx private SdfEntity prepareSdfObj( String filename ) { - String path = makeAbs( filename ); - //String path = makeAbs( inputFileArg ); - path = path.replace( rootArg + "/" , "" ); + String path = makeAbs( filename ).trim(); + String myRootArg = makeAbs( rootArg ).trim(); + myRootArg = myRootArg.replace( "\\","/"); + myRootArg += "/"; + path = path.replace("\\","/"); + path = path.replace( myRootArg, "" ); path = path.replace("/","\\"); // TODO: Make this static java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -176,7 +179,7 @@ public class JPropEx { BufferedReader in = new BufferedReader( new FileReader( filename.substring( 1 ) ) ); while( in.ready() ) - lines.add( in.readLine() ); + lines.add( in.readLine().trim() ); } catch( IOException e ) { diff --git a/l10ntools/java/jpropex/java/SdfData.java b/l10ntools/java/jpropex/java/SdfData.java index 6f79909df1b2..98eddbeca20f 100644 --- a/l10ntools/java/jpropex/java/SdfData.java +++ b/l10ntools/java/jpropex/java/SdfData.java @@ -68,7 +68,7 @@ public class SdfData BufferedReader in; try { - in = new BufferedReader( new FileReader( filename ) ); + in = new BufferedReader( new InputStreamReader( new FileInputStream( filename ), "UTF-8" ) ); SdfEntity entity; while( in.ready() ) { diff --git a/l10ntools/java/jpropex/java/SdfEntity.java b/l10ntools/java/jpropex/java/SdfEntity.java index c2f6a5d788b1..7723238815e7 100644 --- a/l10ntools/java/jpropex/java/SdfEntity.java +++ b/l10ntools/java/jpropex/java/SdfEntity.java @@ -97,7 +97,6 @@ public class SdfEntity implements Cloneable{ } public void setProperties( String line ){ - if( line != null ) { String[] splitted = line.split("\t",15); -- cgit v1.2.3 From 1a97f19af14e3419dd7462254ffe53f5efcf7680 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 5 Oct 2010 19:12:27 +0200 Subject: ooo330l10n4: added sq ta --- solenv/inc/postset.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solenv/inc/postset.mk b/solenv/inc/postset.mk index 77413849c5f9..f16ccb554fc5 100644 --- a/solenv/inc/postset.mk +++ b/solenv/inc/postset.mk @@ -25,7 +25,6 @@ # #************************************************************************* - # Default ISO code used when no languages specified # This language will be always included! defaultlangiso=en-US @@ -118,6 +117,7 @@ sa-IN \ si \ sc \ sd \ +sq \ sk \ sl \ sh \ @@ -129,6 +129,7 @@ sw \ sw-TZ \ te-IN \ ti-ER \ +ta \ ta-IN \ th \ tn \ -- cgit v1.2.3 From 967df99b1d91bbc884dfada36df16eead61f2d95 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 6 Oct 2010 11:30:10 +0200 Subject: ooo33gsl10: #i97556# fix ImplDrawAlpha in RTL case --- vcl/source/gdi/outdev2.cxx | 11 +++++++++-- vcl/source/window/window.cxx | 0 2 files changed, 9 insertions(+), 2 deletions(-) mode change 100644 => 100755 vcl/source/gdi/outdev2.cxx mode change 100644 => 100755 vcl/source/window/window.cxx diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx old mode 100644 new mode 100755 index bea307a4c38d..06dcd73cc3d4 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1988,7 +1988,15 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, const long nSrcWidth = aBmpRect.GetWidth(), nSrcHeight = aBmpRect.GetHeight(); const long nDstWidth = aDstRect.GetWidth(), nDstHeight = aDstRect.GetHeight(); const long nOutWidth = aOutSz.Width(), nOutHeight = aOutSz.Height(); - const long nOffX = aDstRect.Left() - aOutPt.X(), nOffY = aDstRect.Top() - aOutPt.Y(); + // calculate offset in original bitmap + // in RTL case this is a little more complicated since the contents of the + // bitmap is not mirrored (it never is), however the paint region and bmp region + // are in mirrored coordinates, so the intersection of (aOutPt,aOutSz) with these + // is content wise somewhere else and needs to take mirroring into account + const long nOffX = IsRTLEnabled() + ? aOutSz.Width() - aDstRect.GetWidth() - (aDstRect.Left() - aOutPt.X()) + : aDstRect.Left() - aOutPt.X(), + nOffY = aDstRect.Top() - aOutPt.Y(); long nX, nOutX, nY, nOutY; long nMirrOffX = 0; long nMirrOffY = 0; @@ -2002,7 +2010,6 @@ void OutputDevice::ImplDrawAlpha( const Bitmap& rBmp, const AlphaMask& rAlpha, for( nX = 0L, nOutX = nOffX; nX < nDstWidth; nX++, nOutX++ ) { pMapX[ nX ] = aBmpRect.Left() + nOutX * nSrcWidth / nOutWidth; - if( bHMirr ) pMapX[ nX ] = nMirrOffX - pMapX[ nX ]; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx old mode 100644 new mode 100755 -- cgit v1.2.3 From 6d9b321745e617daed8a407b97ee4c1c4a24eaa6 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 6 Oct 2010 17:08:15 +0200 Subject: ooo33gsl10: #i114944# handle AutoFilter button position on RTL sheets --- sc/source/ui/cctrl/dpcontrol.cxx | 22 +++++++++++++++++++--- sc/source/ui/inc/dpcontrol.hxx | 4 +++- sc/source/ui/view/gridwin2.cxx | 17 ++++++++++++++--- sc/source/ui/view/gridwin4.cxx | 13 +++++-------- sc/source/ui/view/output2.cxx | 22 +++++++--------------- 5 files changed, 48 insertions(+), 30 deletions(-) diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index 82c276d98f2c..b90a51ed6bee 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -66,7 +66,8 @@ ScDPFieldButton::ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pSt mbBaseButton(true), mbPopupButton(false), mbHasHiddenMember(false), - mbPopupPressed(false) + mbPopupPressed(false), + mbPopupLeft(false) { if (pZoomX) maZoomX = *pZoomX; @@ -88,10 +89,15 @@ void ScDPFieldButton::setText(const OUString& rText) maText = rText; } -void ScDPFieldButton::setBoundingBox(const Point& rPos, const Size& rSize) +void ScDPFieldButton::setBoundingBox(const Point& rPos, const Size& rSize, bool bLayoutRTL) { maPos = rPos; maSize = rSize; + if (bLayoutRTL) + { + // rPos is the logical-left position, adjust maPos to visual-left (inside the cell border) + maPos.X() -= maSize.Width() - 1; + } } void ScDPFieldButton::setDrawBaseButton(bool b) @@ -114,6 +120,11 @@ void ScDPFieldButton::setPopupPressed(bool b) mbPopupPressed = b; } +void ScDPFieldButton::setPopupLeft(bool b) +{ + mbPopupLeft = b; +} + void ScDPFieldButton::draw() { const long nMargin = 2; @@ -179,7 +190,12 @@ void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const if (nH > 18) nH = 18; - rPos.setX(maPos.getX() + maSize.getWidth() - nW); + // #i114944# AutoFilter button is left-aligned in RTL. + // DataPilot button is always right-aligned for now, so text output isn't affected. + if (mbPopupLeft) + rPos.setX(maPos.getX()); + else + rPos.setX(maPos.getX() + maSize.getWidth() - nW); rPos.setY(maPos.getY() + maSize.getHeight() - nH); rSize.setWidth(nW); rSize.setHeight(nH); diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx index 45badf0c88fd..25cb3e05acac 100644 --- a/sc/source/ui/inc/dpcontrol.hxx +++ b/sc/source/ui/inc/dpcontrol.hxx @@ -69,11 +69,12 @@ public: ~ScDPFieldButton(); void setText(const ::rtl::OUString& rText); - void setBoundingBox(const Point& rPos, const Size& rSize); + void setBoundingBox(const Point& rPos, const Size& rSize, bool bLayoutRTL); void setDrawBaseButton(bool b); void setDrawPopupButton(bool b); void setHasHiddenMember(bool b); void setPopupPressed(bool b); + void setPopupLeft(bool b); void draw(); void getPopupBoundingBox(Point& rPos, Size& rSize) const; @@ -94,6 +95,7 @@ private: bool mbPopupButton; bool mbHasHiddenMember; bool mbPopupPressed; + bool mbPopupLeft; }; // ============================================================================ diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index ec584213898c..669f1fda010d 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -145,7 +145,8 @@ bool ScGridWindow::DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& // Check if the mouse cursor is clicking on the popup arrow box. mpFilterButton.reset(new ScDPFieldButton(this, &GetSettings().GetStyleSettings(), &pViewData->GetZoomX(), &pViewData->GetZoomY(), pDoc)); - mpFilterButton->setBoundingBox(aScrPos, aScrSize); + mpFilterButton->setBoundingBox(aScrPos, aScrSize, bLayoutRTL); + mpFilterButton->setPopupLeft(bLayoutRTL); // #i114944# AutoFilter button is left-aligned in RTL Point aPopupPos; Size aPopupSize; mpFilterButton->getPopupBoundingBox(aPopupPos, aPopupSize); @@ -371,6 +372,8 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove ) bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj) { + BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + // Get the geometry of the cell. Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich); long nSizeX, nSizeY; @@ -379,7 +382,8 @@ bool ScGridWindow::DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddres // Check if the mouse cursor is clicking on the popup arrow box. ScDPFieldButton aBtn(this, &GetSettings().GetStyleSettings()); - aBtn.setBoundingBox(aScrPos, aScrSize); + aBtn.setBoundingBox(aScrPos, aScrSize, bLayoutRTL); + aBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now Point aPopupPos; Size aPopupSize; aBtn.getPopupBoundingBox(aPopupPos, aPopupSize); @@ -520,9 +524,16 @@ void ScGridWindow::DPLaunchFieldPopupMenu( } } + BOOL bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() ); + Rectangle aCellRect(rScrPos, rScrSize); const Size& rPopupSize = mpDPFieldPopup->getWindowSize(); - if (rScrSize.getWidth() > rPopupSize.getWidth()) + if (bLayoutRTL) + { + // RTL: rScrPos is logical-left (visual right) position, always right-align with that + aCellRect.SetPos(Point(rScrPos.X() - rPopupSize.Width() + 1, rScrPos.Y())); + } + else if (rScrSize.getWidth() > rPopupSize.getWidth()) { // If the cell width is larger than the popup window width, launch it // right-aligned with the cell. diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index ba73fbf00269..372dcc582a45 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1291,7 +1291,8 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); Point aScrPos = pViewData->GetScrPos( nCol, nRow, eWhich ); - aCellBtn.setBoundingBox(aScrPos, Size(nSizeX-1, nSizeY-1)); + aCellBtn.setBoundingBox(aScrPos, Size(nSizeX-1, nSizeY-1), bLayoutRTL); + aCellBtn.setPopupLeft(bLayoutRTL); // #i114944# AutoFilter button is left-aligned in RTL aCellBtn.setDrawBaseButton(false); aCellBtn.setDrawPopupButton(true); aCellBtn.setHasHiddenMember(bArrowState); @@ -1315,17 +1316,13 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); long nPosX = aScrPos.X(); long nPosY = aScrPos.Y(); - if ( bLayoutRTL ) - { - // overwrite the right, not left (visually) grid as long as the - // left/right colors of the button borders aren't mirrored. - nPosX -= nSizeX - 2; - } + // bLayoutRTL is handled in setBoundingBox String aStr; pDoc->GetString(nCol, nRow, nTab, aStr); aCellBtn.setText(aStr); - aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1)); + aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1), bLayoutRTL); + aCellBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now aCellBtn.setDrawBaseButton(true); aCellBtn.setDrawPopupButton(pInfo->bPopupButton); aCellBtn.setHasHiddenMember(pInfo->bFilterActive); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 6d40d304fb13..61289cc7f931 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -80,7 +80,7 @@ #include //! Autofilter-Breite mit column.cxx zusammenfassen -#define DROPDOWN_BITMAP_SIZE 17 +#define DROPDOWN_BITMAP_SIZE 18 #define DRAWTEXT_MAX 32767 @@ -1274,7 +1274,8 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY ( static_cast(rPattern.GetItem(ATTR_MERGE_FLAG)).GetValue() & SC_MF_AUTO ) && ( !bBreak || pRefDevice == pFmtDevice ) ) { - long nFilter = Min( nMergeSizeY, (long) DROPDOWN_BITMAP_SIZE ); + // filter drop-down width is now independent from row height + const long nFilter = DROPDOWN_BITMAP_SIZE; BOOL bFit = ( nNeeded + nFilter <= nMergeSizeX ); if ( bFit || bCellIsValue ) { @@ -3516,20 +3517,11 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) eOrient!=SVX_ORIENTATION_STACKED && pInfo && pInfo->bAutoFilter) { - if (pRowInfo[nArrY].nHeight < DROPDOWN_BITMAP_SIZE) - { - if (bPixelToLogic) - nAvailWidth -= pRefDevice->PixelToLogic(Size(0,pRowInfo[nArrY].nHeight)).Height(); - else - nAvailWidth -= pRowInfo[nArrY].nHeight; - } + // filter drop-down width is now independent from row height + if (bPixelToLogic) + nAvailWidth -= pRefDevice->PixelToLogic(Size(0,DROPDOWN_BITMAP_SIZE)).Height(); else - { - if (bPixelToLogic) - nAvailWidth -= pRefDevice->PixelToLogic(Size(0,DROPDOWN_BITMAP_SIZE)).Height(); - else - nAvailWidth -= DROPDOWN_BITMAP_SIZE; - } + nAvailWidth -= DROPDOWN_BITMAP_SIZE; long nComp = nEngineWidth; if (nAvailWidth Date: Wed, 6 Oct 2010 17:59:24 +0200 Subject: ooo330l10n4: revert last change + added 2 missing pyc --- l10ntools/prj/d.lst | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst index c268f36574f8..c7ae5c323d19 100644 --- a/l10ntools/prj/d.lst +++ b/l10ntools/prj/d.lst @@ -50,16 +50,18 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex ..\scripts\tool\*.py %_DEST%\bin%_EXT%\ -#..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py -#..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py -#..\script\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py -#..\script\tool\const.pyc %_DEST%\bin%_EXT%\const.pyc -#..\script\tool\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc -#..\script\tool\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc -#..\script\tool\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc -#..\script\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py -#..\script\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py - +..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py +..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py +..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py +..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py +..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc +..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc +..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc +..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc +..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py +..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py +..\%__SRC%\bin\xhtex.pyc %_DEST%\bin%_EXT%\xhtex.pyc +..\%__SRC%\bin\xtxex.pyc %_DEST%\bin%_EXT%\xtxex.pyc ..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx ..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx ..\inc\l10ntools\file.hxx %_DEST%\inc%_EXT%\l10ntools\file.hxx -- cgit v1.2.3 From 3d320ea62d071b75e4a6b1e4c81259627c0edf45 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Wed, 6 Oct 2010 18:02:51 +0200 Subject: ooo330l10n4: removed *.py from source tree --- l10ntools/prj/d.lst | 1 - 1 file changed, 1 deletion(-) diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst index c7ae5c323d19..29dd21cee543 100644 --- a/l10ntools/prj/d.lst +++ b/l10ntools/prj/d.lst @@ -49,7 +49,6 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help ..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl ..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex ..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex -..\scripts\tool\*.py %_DEST%\bin%_EXT%\ ..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py ..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py ..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py -- cgit v1.2.3 From 035d9de9918d1c5425735b3727e974b392f9a5c8 Mon Sep 17 00:00:00 2001 From: Release Engineering Date: Fri, 8 Oct 2010 10:09:56 +0200 Subject: OOO330 --- solenv/inc/minor.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index 61724393d095..23f622f607a0 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=330 -RSCREVISION=330m9(Build:9529) -BUILD=9529 -LAST_MINOR=m9 +RSCREVISION=330m10(Build:9533) +BUILD=9533 +LAST_MINOR=m10 SOURCEVERSION=OOO330 -- cgit v1.2.3