[Libreoffice-commits] .: filter/source svx/inc
filter/source/msfilter/msdffimp.cxx |6 +++--- svx/inc/svx/msdffdef.hxx|3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit 28a6558f9d3ca2dda3191f8b5b3f2378ee2533da Author: Caolán McNamara caol...@redhat.com Date: Sat Feb 4 01:17:03 2012 +0100 extract max legal dff length to header diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 8f25ac8..5871da9 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -3422,6 +3422,8 @@ bool SvxMSDffManager::SeekToRec( SvStream rSt, sal_uInt16 nRecId, sal_uLong nMa rSt aHd; if (!rSt.good()) break; +if (aHd.nRecLen nMaxLegalDffRecordLength) +break; if ( aHd.nRecType == nRecId ) { if ( nSkipCount ) @@ -6818,8 +6820,6 @@ bool SvxMSDffManager::ReadCommonRecordHeader(DffRecordHeader rRec, rRec.nRecInstance, rRec.nRecType, rRec.nRecLen); } -sal_uInt32 nMaxLegalRecordLength = SAL_MAX_UINT32 - DFF_COMMON_RECORD_HEADER_SIZE; - /* also static */ bool SvxMSDffManager::ReadCommonRecordHeader(SvStream rSt, sal_uInt8 rVer, sal_uInt16 rInst, sal_uInt16 rFbt, sal_uInt32 rLength) @@ -6830,7 +6830,7 @@ bool SvxMSDffManager::ReadCommonRecordHeader(SvStream rSt, rInst = nTmp 4; if (!rSt.good()) return false; -if (rLength nMaxLegalRecordLength) +if (rLength nMaxLegalDffRecordLength) return false; return true; } diff --git a/svx/inc/svx/msdffdef.hxx b/svx/inc/svx/msdffdef.hxx index 42acdbb..016197f 100644 --- a/svx/inc/svx/msdffdef.hxx +++ b/svx/inc/svx/msdffdef.hxx @@ -37,6 +37,9 @@ #define DFF_COMMON_RECORD_HEADER_SIZE 8 +const sal_uInt32 nMaxLegalDffRecordLength = \ +SAL_MAX_UINT32 - DFF_COMMON_RECORD_HEADER_SIZE; + #define DFF_PSFLAG_CONTAINER 0x0F // If the version field of a record // header takes on this value, the // record header marks the start of ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/inc vcl/source
vcl/inc/vcl/combobox.hxx|1 + vcl/source/control/combobox.cxx | 27 +-- 2 files changed, 26 insertions(+), 2 deletions(-) New commits: commit ab0efc3eb1c0b351bcaccd847cd66f986f95781e Author: Caolán McNamara caol...@redhat.com Date: Sat Feb 4 12:57:37 2012 +0100 Better optimal combobox width if dropdown button is wider than scrollbar than use that as the extra width over the edit widget diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx index d44a595..85d4e20 100644 --- a/vcl/inc/vcl/combobox.hxx +++ b/vcl/inc/vcl/combobox.hxx @@ -78,6 +78,7 @@ protected: SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId rResId ); SAL_DLLPRIVATE void ImplCalcEditHeight(); +SAL_DLLPRIVATE long getMaxWidthScrollBarAndDownButton() const; protected: ComboBox( WindowType nType ); diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 97abfc1..a93dc67 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1078,6 +1078,29 @@ Size ComboBox::GetOptimalSize(WindowSizeType eType) const // --- +long ComboBox::getMaxWidthScrollBarAndDownButton() const +{ +long nButtonDownWidth = 0; + +Window *pBorder = GetWindow( WINDOW_BORDER ); +ImplControlValue aControlValue; +Point aPoint; +Rectangle aContent, aBound; + +// use the full extent of the control +Rectangle aArea( aPoint, pBorder-GetOutputSizePixel() ); + +if ( GetNativeControlRegion(CTRL_COMBOBOX, PART_BUTTON_DOWN, +aArea, 0, aControlValue, rtl::OUString(), aBound, aContent) ) +{ +nButtonDownWidth = aContent.getWidth(); +} + +long nScrollBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); + +return std::max(nScrollBarWidth, nButtonDownWidth); +} + Size ComboBox::CalcMinimumSize() const { Size aSz; @@ -1090,7 +1113,7 @@ Size ComboBox::CalcMinimumSize() const { aSz.Height() = mpImplLB-CalcSize( 1 ).Height(); aSz.Width() = mpImplLB-GetMaxEntryWidth(); -aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); +aSz.Width() += getMaxWidthScrollBarAndDownButton(); } aSz = CalcWindowSize( aSz ); @@ -1150,7 +1173,7 @@ Size ComboBox::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const aSz.Width() = aMinSz.Width(); if ( IsDropDownBox() ) -aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); +aSz.Width() += getMaxWidthScrollBarAndDownButton(); if ( !IsDropDownBox() ) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: animations/README rhino/README sc/README sd/README sfx2/README slideshow/README starmath/README sw/README
animations/README |1 + rhino/README |2 +- sc/README |1 + sd/README |3 +++ sfx2/README |3 ++- slideshow/README |1 + starmath/README |1 + sw/README |1 + 8 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 904d59fab93eb2fe855f0a46d9d6d64e62df0228 Author: Josh Heidenreich josh.sickm...@gmail.com Date: Sat Feb 4 09:25:42 2012 -0600 add missing README to animation, sc, sd, slideshow, starmath, sw diff --git a/animations/README b/animations/README new file mode 100644 index 000..0076995 --- /dev/null +++ b/animations/README @@ -0,0 +1 @@ +Contains containers for the css::animation UNO API, used in [[slideshow]] and [[sd]]. diff --git a/rhino/README b/rhino/README index f8f47a1..ae212c9 100644 --- a/rhino/README +++ b/rhino/README @@ -1,5 +1,5 @@ The Scripting Framework makes use of the Rhino (http://www.mozilla.org/rhino/) -JavaScript interpreter, available under the Mozilla Public License +JavaScript interpreter, available under the Mozilla Public License (http://www.mozilla.org/MPL/MPL-1.1.html). In addition, to support the debugging of scripts contained in OpenOffice.org diff --git a/sc/README b/sc/README new file mode 100644 index 000..fb918b9 --- /dev/null +++ b/sc/README @@ -0,0 +1 @@ +Spreadsheet application code. diff --git a/sd/README b/sd/README new file mode 100644 index 000..963e7bd --- /dev/null +++ b/sd/README @@ -0,0 +1,3 @@ +The core directory for the impress/draw applications. + +Think of impress as a hack on top of draw. diff --git a/sfx2/README b/sfx2/README index 3b160a2..1182cc2 100755 --- a/sfx2/README +++ b/sfx2/README @@ -1,3 +1,4 @@ This is the gui code, much of which is now deprecated. List of documents open would be traceked, -raw C__ code; gutsy core of document management and loading. +raw C__ code; gutsy core of document management and loading. + diff --git a/slideshow/README b/slideshow/README new file mode 100644 index 000..54a1994 --- /dev/null +++ b/slideshow/README @@ -0,0 +1 @@ +Contains the new impress slideshow engine introduced in OO.o 2.0 diff --git a/starmath/README b/starmath/README new file mode 100644 index 000..a5a0a4e --- /dev/null +++ b/starmath/README @@ -0,0 +1 @@ +Formula editor code for writer ([[sw]]). diff --git a/sw/README b/sw/README new file mode 100644 index 000..dc844a6 --- /dev/null +++ b/sw/README @@ -0,0 +1 @@ +Writer application code. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sc/source
sc/source/ui/app/scmod.cxx|2 +- sc/source/ui/view/cellsh1.cxx |2 +- sc/source/ui/view/editsh.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit bf2300fb0704f92f312b96b2e624a1730df5dd45 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Feb 4 21:50:55 2012 +0100 Fix 3 Possible inefficient checking diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 47ef6b9..a9da20e 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2162,7 +2162,7 @@ sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) rlRefWindow.erase( i ); -if( !rlRefWindow.size() ) +if( rlRefWindow.empty() ) m_mapRefWindow.erase( nSlotId ); return sal_True; diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index e9a574f..603d7b8 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1836,7 +1836,7 @@ void ScCellShell::ExecuteEdit( SfxRequest rReq ) pScMod-InputKeyEvent( KeyEvent('=',KeyCode()) ); std::vectorrtl::OUString aNames = pDlg-GetSelectedNames(); -if (aNames.size()) +if (!aNames.empty()) { rtl::OUStringBuffer aBuffer; for (std::vectorrtl::OUString::const_iterator itr = aNames.begin(); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index c843e96..e339b2c 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -438,7 +438,7 @@ void ScEditShell::Execute( SfxRequest rReq ) if ( nRet == BTN_PASTE_NAME ) { std::vectorrtl::OUString aNames = pDlg-GetSelectedNames(); -if (aNames.size()) +if (!aNames.empty()) { rtl::OUStringBuffer aBuffer; for (std::vectorrtl::OUString::const_iterator itr = aNames.begin(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits