[Libreoffice-commits] core.git: xmloff/source
xmloff/source/style/impastpl.cxx |2 +- xmloff/source/style/impastpl.hxx |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) New commits: commit e781dfe877ac12c214e306a89f0702c117c89197 Author: Ryan McCoskrie Date: Mon Apr 18 12:38:47 2016 +1200 Remove needless typedef from xmloff/source/style/impastpl.hxx Change-Id: I573f7933c6353ae92774517a522fc63f871a09fb Reviewed-on: https://gerrit.libreoffice.org/24178 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 51a59e9..2d4959e 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -474,7 +474,7 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( XMLAutoStyleFamily &rFamily = *aJ; // iterate over names -for (XMLAutoStyleFamily::NameSetType::const_iterator aI = rFamily.maNameSet.begin(); aI != rFamily.maNameSet.end(); ++aI) +for (std::set::const_iterator aI = rFamily.maNameSet.begin(); aI != rFamily.maNameSet.end(); ++aI) { aFamilies.push_back( rFamily.mnFamily ); aNames.push_back( *aI ); diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index dc3b97d..5e65632 100644 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -104,14 +104,13 @@ struct XMLAutoStyleFamily { typedef std::set, comphelper::UniquePtrValueLess> ParentSetType; -typedef std::set NameSetType; sal_uInt32 mnFamily; OUString maStrFamilyName; rtl::Reference mxMapper; ParentSetType m_ParentSet; -NameSetType maNameSet; +std::set maNameSet; sal_uInt32 mnCount; sal_uInt32 mnName; OUString maStrPrefix; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basctl/source sw/source
basctl/source/basicide/baside2.hxx |3 +-- basctl/source/basicide/baside2b.cxx |2 +- sw/source/uibase/inc/srcedtw.hxx|4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) New commits: commit a6af1b545a6435ec3fdbc88e39bf765839f8614b Author: Ryan McCoskrie Date: Sun Apr 17 22:01:30 2016 +1200 Remove the hardly used SyntaxLineSet typedef Change-Id: Ib38bbbdcc65620329d1471d0d61ede65c4f834e6 Reviewed-on: https://gerrit.libreoffice.org/24176 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index a49df3c..b35af38 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -87,8 +87,7 @@ private: SyntaxHighlighter aHighlighter; IdleaSyntaxIdle; -typedef std::set SyntaxLineSet; -SyntaxLineSet aSyntaxLineTable; +std::set aSyntaxLineTable; DECL_LINK_TYPED(SyntaxTimerHdl, Idle *, void); // progress bar diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 68f2767..f612545 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1284,7 +1284,7 @@ IMPL_LINK_NOARG_TYPED(EditorWindow, SyntaxTimerHdl, Idle *, void) //pEditEngine->SetUpdateMode(false); bHighlightning = true; -for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin(); +for ( std::set::const_iterator it = aSyntaxLineTable.begin(); it != aSyntaxLineTable.end(); ++it ) { sal_uInt16 nLine = *it; diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index 09a4366..d7b57db 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -59,8 +59,6 @@ public: }; -typedef std::set SyntaxLineSet; - class SwSrcEditWindow : public vcl::Window, public SfxListener { private: @@ -88,7 +86,7 @@ private: boolbHighlighting; IdleaSyntaxIdle; -SyntaxLineSet aSyntaxLineTable; +std::set aSyntaxLineTable; voidImpDoHighlight( const OUString& rSource, sal_uInt16 nLineOff ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: basic/qa
basic/qa/cppunit/basic_coverage.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit 666dc67eaff92d019ea57a571f0156533f4507f8 Author: Ryan McCoskrie Date: Sun Apr 17 21:46:56 2016 +1200 Remove needless typedef from basic/qa/cppunit/basic_coverage.cxx Change-Id: Iba1c48d58daa618107ad84240d613f675d447aad Reviewed-on: https://gerrit.libreoffice.org/24175 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/basic/qa/cppunit/basic_coverage.cxx b/basic/qa/cppunit/basic_coverage.cxx index 585d54a..275fdb9 100644 --- a/basic/qa/cppunit/basic_coverage.cxx +++ b/basic/qa/cppunit/basic_coverage.cxx @@ -20,7 +20,6 @@ namespace class Coverage : public test::BootstrapFixture { private: -typedef std::vector< OUString > StringVec; int m_nb_tests_ok; int m_nb_tests_skipped; OUString m_sCurrentTest; @@ -28,7 +27,7 @@ private: void run_test(const OUString& sFileName); void test_failed(); void test_success(); -StringVec get_subdirnames( const OUString& sDirName ); +std::vector< OUString > get_subdirnames( const OUString& sDirName ); public: Coverage(); @@ -95,9 +94,9 @@ void Coverage::run_test(const OUString& sFileURL) } } -Coverage::StringVec Coverage::get_subdirnames( const OUString& sDirName ) +std::vector< OUString > Coverage::get_subdirnames( const OUString& sDirName ) { -Coverage::StringVec sSubDirNames; +std::vector< OUString > sSubDirNames; osl::Directory aDir(sDirName); osl::DirectoryItem aItem; osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL|osl_FileStatus_Mask_Type); @@ -142,9 +141,9 @@ void Coverage::Coverage_Iterator() CPPUNIT_ASSERT(!sDirName.isEmpty()); process_directory(sDirName); // any files in the root test dir are run in test harness default locale ( en-US ) -Coverage::StringVec sLangDirs = get_subdirnames( sDirName ); +std::vector< OUString > sLangDirs = get_subdirnames( sDirName ); -for ( Coverage::StringVec::iterator it = sLangDirs.begin(), it_end = sLangDirs.end(); it != it_end; ++it ) +for ( std::vector< OUString >::iterator it = sLangDirs.begin(), it_end = sLangDirs.end(); it != it_end; ++it ) { OUString sDir( *it ); sal_Int32 nSlash = (*it).lastIndexOf('/'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: canvas/source
canvas/source/cairo/cairo_textlayout.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit bb92c93a964f71ce574ddd940be6821da50b7235 Author: Ryan McCoskrie Date: Mon Apr 18 09:32:02 2016 +1200 - Removed the only-used-once FontLevelVector typedef Change-Id: I78bdd690cd80b7caee816b005790b0130dffefeb Reviewed-on: https://gerrit.libreoffice.org/24177 Tested-by: Jenkins Reviewed-by: jan iversen diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index 8bb4d46..4b4b260 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -349,8 +349,7 @@ namespace cairocanvas //Pull all the fonts we need to render the text typedef std::pair FontLevel; -typedef std::vector FontLevelVector; -FontLevelVector aFontData; +std::vector aFontData; SystemGlyphDataVector::const_iterator aGlyphIter=aSysLayoutData.rGlyphData.begin(); const SystemGlyphDataVector::const_iterator aGlyphEnd=aSysLayoutData.rGlyphData.end(); for( ; aGlyphIter != aGlyphEnd; ++aGlyphIter ) @@ -402,8 +401,8 @@ namespace cairocanvas **/ // Loop through the fonts used and render the matching glyphs for each -FontLevelVector::const_iterator aFontDataIter = aFontData.begin(); -const FontLevelVector::const_iterator aFontDataEnd = aFontData.end(); +std::vector::const_iterator aFontDataIter = aFontData.begin(); +const std::vector::const_iterator aFontDataEnd = aFontData.end(); for( ; aFontDataIter != aFontDataEnd; ++aFontDataIter ) { const SystemFontData &rSysFontData = aFontDataIter->first; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: canvas/source cui/source include/vcl sc/source vcl/headless vcl/inc vcl/osx vcl/source vcl/unx vcl/win vcl/workben
canvas/source/vcl/spritecanvashelper.cxx |2 +- cui/source/dialogs/cuigaldlg.cxx |6 ++ include/vcl/window.hxx |1 - sc/source/ui/miscdlgs/optsolver.cxx |2 +- vcl/headless/svpframe.cxx|4 vcl/inc/headless/svpframe.hxx|1 - vcl/inc/osx/salframe.h |1 - vcl/inc/salframe.hxx |2 -- vcl/inc/unx/gtk/gtkframe.hxx |1 - vcl/inc/unx/salframe.h |1 - vcl/inc/win/salframe.h |1 - vcl/osx/salframe.cxx | 12 vcl/source/gdi/impanmvw.cxx |2 +- vcl/source/window/window.cxx |6 -- vcl/unx/generic/window/salframe.cxx |5 - vcl/unx/gtk/window/gtkobject.cxx |2 +- vcl/unx/gtk/window/gtksalframe.cxx |5 - vcl/win/source/window/salframe.cxx |5 - vcl/workben/outdevgrind.cxx |2 +- 19 files changed, 7 insertions(+), 54 deletions(-) New commits: commit d77af785f962efa6f783a5106671d608c313f853 Author: Ryan McCoskrie Date: Thu Sep 10 10:17:35 2015 +1200 tdf#93684 - Remove SalFrame::Sync Change-Id: Icae9cf0a17f9cdf9a671c7e7278019d6980602b1 Reviewed-on: https://gerrit.libreoffice.org/18453 Tested-by: Jenkins Reviewed-by: jan iversen Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index 68a2c68..02c9fe4 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -305,7 +305,7 @@ namespace vclcanvas if( pTargetWindow ) { // commit to screen -pTargetWindow->Sync(); +pTargetWindow->Flush(); } return true; diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 000a962..a42c00e 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -123,7 +123,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, SolarMutexGuard aGuard; mpProgress->SetDirectory( rStartURL ); -mpProgress->Sync(); +mpProgress->Flush(); } try @@ -325,7 +325,7 @@ void TakeThread::execute() mpProgress->SetFile( aURL ); pStatusProgress->Update( i, nEntries - 1 ); -mpProgress->Sync(); +mpProgress->Flush(); pThm->InsertURL( aURL ); } } @@ -517,11 +517,9 @@ IMPL_LINK_TYPED( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, vo Application::Reschedule(); Flush(); -Sync(); m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) ); m_pFtActualizeFile->Flush(); -m_pFtActualizeFile->Sync(); } TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle) diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 7a7d0a2..fd62a8a 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1131,7 +1131,6 @@ public: boolHasPaintEvent() const; voidUpdate(); voidFlush(); -voidSync(); // toggles new docking support, enabled via toolkit voidEnableDocking( bool bEnable = true ); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 01a7d5e..cd18e0a 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -849,7 +849,7 @@ bool ScOptSolverDlg::CallSolver() // return true -> close dialog after cal aProgress->HideTimeLimit(); aProgress->Show(); aProgress->Update(); -aProgress->Sync(); +aProgress->Flush(); // try to make sure the progress dialog is painted before continuing Application::Reschedule(true); diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index eeed1fc..f3f2cce 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -413,10 +413,6 @@ void SvpSalFrame::Flush() { } -void SvpSalFrame::Sync() -{ -} - void SvpSalFrame::SetInputContext( SalInputContext* ) { } diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index f64d22f..dbe7d91 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -106,7 +106,6 @@ public: virtual voidSetPointerPos( long nX, long nY ) override; using SalFrame::Flush; virtual voidFlush() override; -virtual voidSync() override; virtual voidSetInputContext( SalInputContext* pContext ) override; virtual voidEndExtText
[Libreoffice-commits] core.git: sc/source
sc/source/ui/dbgui/sfiltdlg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 12b9341e45f3b476c5ea9ac83845e53121e15876 Author: Ryan McCoskrie Date: Sun Sep 13 17:28:58 2015 +1200 tdf#39468 - Translate German comments. Change-Id: Id1554b6ce3bee9596542863a77aadfe5fb7e3c94 Reviewed-on: https://gerrit.libreoffice.org/18526 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 53e6820..92753b0 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -401,7 +401,7 @@ IMPL_LINK_TYPED( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn, void ) IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void ) { -// alle 50ms nachschauen, ob RefInputMode noch stimmt +// every 50ms check whether RefInputMode is still true if( (_pIdle == pIdle) && IsActive() ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/kde4/KDESalFrame.cxx| 75 ++ vcl/unx/kde4/KDESalFrame.hxx|4 +- vcl/unx/kde4/KDESalGraphics.cxx | 77 vcl/unx/kde4/KDESalGraphics.hxx |7 +-- vcl/unx/kde4/KDEXLib.cxx|5 +- vcl/unx/kde4/KDEXLib.hxx|4 +- 6 files changed, 78 insertions(+), 94 deletions(-) New commits: commit ba8cdfca4d875af0c95622c7b87a8291e130865a Author: Ryan McCoskrie Date: Thu Aug 20 16:42:01 2015 +1200 tdf#92649: Converted pointers to unique_ptr's in vcl/unx/kde4 Change-Id: I1bab95a9a3db765d3b3bd34345dc006ccd33caf0 diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index 871ee73..125e049 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -288,48 +288,44 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) // Menu style.SetSkipDisabledInMenus( TRUE ); -KMenuBar* pMenuBar = new KMenuBar(); -if ( pMenuBar ) -{ -// Color -QPalette qMenuCG = pMenuBar->palette(); - -// Menu text and background color, theme specific -Color aMenuFore = toColor( qMenuCG.color( QPalette::WindowText ) ); -Color aMenuBack = toColor( qMenuCG.color( QPalette::Window ) ); - -style.SetMenuTextColor( aMenuFore ); -style.SetMenuBarTextColor( style.GetPersonaMenuBarTextColor().get_value_or( aMenuFore ) ); -style.SetMenuColor( aMenuBack ); -style.SetMenuBarColor( aMenuBack ); -style.SetMenuHighlightColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) ); -style.SetMenuHighlightTextColor( aMenuFore ); - -// set special menubar higlight text color -if ( QApplication::style()->inherits( "HighContrastStyle" ) ) -ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = toColor( qMenuCG.color( QPalette::HighlightedText ) ); -else -ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = aMenuFore; - -// set menubar rollover color -if ( pMenuBar->style()->styleHint( QStyle::SH_MenuBar_MouseTracking ) ) -{ -style.SetMenuBarRolloverColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) ); -style.SetMenuBarRolloverTextColor( ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor ); -} -else -{ -style.SetMenuBarRolloverColor( aMenuBack ); -style.SetMenuBarRolloverTextColor( aMenuFore ); -} -style.SetMenuBarHighlightTextColor(style.GetMenuHighlightTextColor()); +std::unique_ptr pMenuBar = std::unique_ptr( new KMenuBar() ); + +// Color +QPalette qMenuCG = pMenuBar->palette(); + +// Menu text and background color, theme specific +Color aMenuFore = toColor( qMenuCG.color( QPalette::WindowText ) ); +Color aMenuBack = toColor( qMenuCG.color( QPalette::Window ) ); + +style.SetMenuTextColor( aMenuFore ); +style.SetMenuBarTextColor( style.GetPersonaMenuBarTextColor().get_value_or( aMenuFore ) ); +style.SetMenuColor( aMenuBack ); +style.SetMenuBarColor( aMenuBack ); +style.SetMenuHighlightColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) ); +style.SetMenuHighlightTextColor( aMenuFore ); -// Font -aFont = toFont( pMenuBar->font(), rSettings.GetUILanguageTag().getLocale() ); -style.SetMenuFont( aFont ); +// set special menubar higlight text color +if ( QApplication::style()->inherits( "HighContrastStyle" ) ) +ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = toColor( qMenuCG.color( QPalette::HighlightedText ) ); +else +ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor = aMenuFore; + +// set menubar rollover color +if ( pMenuBar->style()->styleHint( QStyle::SH_MenuBar_MouseTracking ) ) +{ +style.SetMenuBarRolloverColor( toColor ( qMenuCG.color( QPalette::Highlight ) ) ); +style.SetMenuBarRolloverTextColor( ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor ); } +else +{ +style.SetMenuBarRolloverColor( aMenuBack ); +style.SetMenuBarRolloverTextColor( aMenuFore ); +} +style.SetMenuBarHighlightTextColor(style.GetMenuHighlightTextColor()); -delete pMenuBar; +// Font +aFont = toFont( pMenuBar->font(), rSettings.GetUILanguageTag().getLocale() ); +style.SetMenuFont( aFont ); // Scroll bar size style.SetScrollBarSize( QApplication::style()->pixelMetric( QStyle::PM_ScrollBarExtent ) ); @@ -366,7 +362,6 @@ KDESalFrame::~KDESalFrame() KDESalFrame::GraphicsHolder::~GraphicsHolder() { -delete pGraphics; } SalGraphics* KDESalFrame::AcquireGraphics() diff --git a/vcl/unx/kde4/KDESalFrame.hxx b/vcl/unx/kde4/KDESalFrame.hxx index ca45b346..1346237 100644 --- a/vcl/unx/kde4/KDESalFrame.hxx +++ b/vcl/unx/kde4/KDESa
Re: Patch: Fix bug 90222 - Replace ScaList with std container
On Wednesday, July 29, 2015 03:27:07 PM Eike Rathke wrote: > On Wednesday, 2015-07-29 22:45:18 +1200, Ryan McCoskrie wrote: > > (I'm having trouble with logerrit) > > That is why? We much prefer patches on gerrit, it eases review and > handling a lot. Using git review might also be an option for you. If for > some reason you *have* to use mail attachments, please use git > format-patch to generate the patch to be attached, which preserves > author and date and commit message, or even use the git send-email > command. > I use gerrit last year successfully but at the moment it's rejecting my public key. I'm working on that though. > [Various technical notes] Thanks for the feed back. Hopefully my next contribution won't be such a mess. > Last but not least: > > Apparently we don't have your license statement on file, could you > please send us a blanket statement that you contribute all your past and > future patches under the MPLv2 and LGPLv3+ licenses? Best on the dev > mailing list libreoffice@lists.freedesktop.org so we can link to it from > https://wiki.documentfoundation.org/Development/Developers > > Something like this does nicely: > > All of my past & future contributions to LibreOffice may be > licensed under the MPLv2/LGPLv3+ dual license. > > Best use Subject: license statement > I've already done that. http://lists.freedesktop.org/archives/libreoffice/2014-September/063297.html -- Ryan McCoskrie North Canterbury, New Zealand ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Patch: Fix bug 90222 - Replace ScaList with std container
(I'm having trouble with logerrit) This replaces the ScaList class used in scaddins with/source with std::vector. Odd issues: - I've written a wrap around to std::vector since the original ScaFuncDataList class would generate its contents in the constructor and supported looking contents up by name. - ScaList, ScaOUStringList and ScaFuncDataList were all defined twice. This patch has maintained doubling up the wrapper class for the moment. -- Ryan McCoskrie North Canterbury, New Zealanddiff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index 64679ff..3de398d 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -35,38 +35,6 @@ using namespace ::com::sun::star; #define STR_FROM_ANSI( s ) OUString( s, strlen( s ), RTL_TEXTENCODING_MS_1252 ) -const sal_uInt32 ScaList::nStartSize = 16; -const sal_uInt32 ScaList::nIncrSize = 16; - -ScaList::ScaList() : -pData( new void*[ nStartSize ] ), -nSize( nStartSize ), -nCount( 0 ), -nCurr( 0 ) -{ -} - -ScaList::~ScaList() -{ -delete[] pData; -} - -void ScaList::_Grow() -{ -nSize += nIncrSize; - -void** pNewData = new void*[ nSize ]; -memcpy( pNewData, pData, nCount * sizeof( void* ) ); - -delete[] pData; -pData = pNewData; -} - -ScaStringList::~ScaStringList() -{ -for( OUString* pStr = First(); pStr; pStr = Next() ) -delete pStr; -} ScaResId::ScaResId( sal_uInt16 nId, ResMgr& rResMgr ) : ResId( nId, rResMgr ) @@ -109,7 +77,7 @@ ScaFuncData::ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rResMgr ) : const ResStringArray& rArr = aArrLoader.GetStringArray(); for( sal_uInt32 nIndex = 0; nIndex < rArr.Count(); nIndex++ ) -aCompList.Append( rArr.GetString( nIndex ) ); +aCompList.push_back( rArr.GetString( nIndex ) ); } ScaFuncData::~ScaFuncData() @@ -125,31 +93,30 @@ sal_uInt16 ScaFuncData::GetStrIndex( sal_uInt16 nParam ) const ScaFuncDataList::ScaFuncDataList( ResMgr& rResMgr ) : -nLast( 0x ) +nLast( contents.begin() ) { for( sal_uInt16 nIndex = 0; nIndex < SAL_N_ELEMENTS(pFuncDataArr); nIndex++ ) -Append( new ScaFuncData( pFuncDataArr[ nIndex ], rResMgr ) ); +contents.push_back( new ScaFuncData( pFuncDataArr[ nIndex ], rResMgr ) ); } ScaFuncDataList::~ScaFuncDataList() { -for( ScaFuncData* pFData = First(); pFData; pFData = Next() ) -delete pFData; +for( std::vector::iterator it = contents.begin(); it != contents.end(); ++it ) +delete *nLast; } -const ScaFuncData* ScaFuncDataList::Get( const OUString& rProgrammaticName ) const +const ScaFuncData* ScaFuncDataList::Get( const OUString& rProgrammaticName ) { if( aLastName == rProgrammaticName ) -return Get( nLast ); +return *nLast; -for( sal_uInt32 nIndex = 0; nIndex < Count(); nIndex++ ) +for( std::vector::iterator it = contents.begin(); it != contents.end(); ++it ) { -const ScaFuncData* pCurr = Get( nIndex ); -if( pCurr->Is( rProgrammaticName ) ) +if( (*it)->Is( rProgrammaticName ) ) { -const_cast< ScaFuncDataList* >( this )->aLastName = rProgrammaticName; -const_cast< ScaFuncDataList* >( this )->nLast = nIndex; -return pCurr; +aLastName = rProgrammaticName; +nLast = it; +return *it; } } return NULL; @@ -446,13 +413,13 @@ uno::Sequence< sheet::LocalizedName > SAL_CALL ScaDateAddIn::getCompatibilityNam return uno::Sequence< sheet::LocalizedName >( 0 ); const ScaStringList& rStrList = pFData->GetCompNameList(); -sal_uInt32 nCount = rStrList.Count(); +sal_uInt32 nCount = rStrList.size(); uno::Sequence< sheet::LocalizedName > aRet( nCount ); sheet::LocalizedName* pArray = aRet.getArray(); for( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ ) -pArray[ nIndex ] = sheet::LocalizedName( GetLocale( nIndex ), *rStrList.Get( nIndex ) ); +pArray[ nIndex ] = sheet::LocalizedName( GetLocale( nIndex ), rStrList[nIndex] ); return aRet; } diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx index 9922bdf..e2271a0 100644 --- a/scaddins/source/datefunc/datefunc.hxx +++ b/scaddins/source/datefunc/datefunc.hxx @@ -35,86 +35,8 @@ #include #include -class ScaList -{ -private: -static const sal_uInt32 nStartSize; -static const sal_uInt32 nIncrSize; - -void** pData; // pointer array -sal_uInt32 nSize; // array size -sal_uInt32 nCount; // next index to be inserted at -sal_uInt32 nCurr; // current pos for iterations - -void_Grow(); -inli
[Libreoffice-commits] core.git: Changes to 'refs/changes/54/11554/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/40/11440/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/40/11440/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: wizards/com
wizards/com/sun/star/wizards/form/FormWizard.java | 26 -- 1 file changed, 5 insertions(+), 21 deletions(-) New commits: commit 86d05eea4578c58be8e4b7b8f3a365238bf22e02 Author: Ryan McCoskrie Date: Sun Sep 21 14:33:53 2014 +1200 Removed uneeded checks. Change-Id: I9fd008f0265f195a8069526cea22a288ff6238f7 Reviewed-on: https://gerrit.libreoffice.org/11562 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java b/wizards/com/sun/star/wizards/form/FormWizard.java index eda3821..c6cba67 100644 --- a/wizards/com/sun/star/wizards/form/FormWizard.java +++ b/wizards/com/sun/star/wizards/form/FormWizard.java @@ -78,10 +78,8 @@ public class FormWizard extends DatabaseObjectWizard 210, Boolean.TRUE, "DialogForm", 102, 41, 1, new Short((short) 0), m_oResource.getResText(UIConsts.RID_FORM), 310 }); drawNaviBar(); -if (getFormResources()) -{ -setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8); -} +getFormResources(); +setRightPaneHeaders(m_oResource, UIConsts.RID_FORM + 90, 8); } public static void main(String i_args[]) @@ -175,13 +173,7 @@ public class FormWizard extends DatabaseObjectWizard curFormDocument.oMainFormDBMetaData.initializeFieldColumns(true, sTableName, aFieldNames); final String[] aMainFieldNames = curFormDocument.oMainFormDBMetaData.getFieldNames(); -try -{ -curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aMainFieldNames, 1); -} -catch (java.lang.Exception e) -{ -} +curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aMainFieldNames, 1); } break; case SOSUBFORM_PAGE: @@ -193,13 +185,7 @@ public class FormWizard extends DatabaseObjectWizard curFormDocument.oSubFormDBMetaData.initializeFieldColumns(true, sTableName, aFieldNames); final String[] aSubFieldNames = curFormDocument.oSubFormDBMetaData.getFieldNames(); -try -{ -curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aSubFieldNames, 0); -} -catch (java.lang.Exception e) -{ -} +curFormDocument.LinkFieldNames = JavaTools.removeOutdatedFields(curFormDocument.LinkFieldNames, aSubFieldNames, 0); } break; case SOFIELDLINKER_PAGE: @@ -370,15 +356,13 @@ public class FormWizard extends DatabaseObjectWizard } } -private boolean getFormResources() +private void getFormResources() { sShowBinaryFields = m_oResource.getResText(UIConsts.RID_FORM + 2); slblTables = m_oResource.getResText(UIConsts.RID_FORM + 6); slblFields = m_oResource.getResText(UIConsts.RID_FORM + 12); slblSelFields = m_oResource.getResText(UIConsts.RID_FORM + 1); serrFormNameexists = m_oResource.getResText(UIConsts.RID_FORM + 98); - -return true; } public class FieldSelectionListener implements com.sun.star.wizards.ui.XFieldSelectionListener ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: wizards/com
wizards/com/sun/star/wizards/README |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 3327bf17571aed98abcdd565aac523141c009c5f Author: Ryan McCoskrie Date: Sun Sep 14 16:23:55 2014 +1200 Updated example paths in wizards/com/sun/star/wizards/README Change-Id: I5bd14f81c5eefc2227662605d6ccb107254c53df Reviewed-on: https://gerrit.libreoffice.org/11440 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/wizards/com/sun/star/wizards/README b/wizards/com/sun/star/wizards/README index 2d7bcbc..9ee2840 100644 --- a/wizards/com/sun/star/wizards/README +++ b/wizards/com/sun/star/wizards/README @@ -1,8 +1,8 @@ To call a wizard remotely you need to: -> For testing on core: -export URE_BOOTSTRAP="file:///home/'USER'/git/libo/install/program/fundamentalrc" -export PYTHONPATH=/home/'USER'/git/libo/install/program +export URE_BOOTSTRAP="file:///home/'USER'/libreoffice-core/instdir/program/fundamentalrc" +export PYTHONPATH=/home/'USER'/libreoffice-core/instdir/program #and run LibreOffice in listening mode: ./soffice --"accept=socket,host=localhost,port=2002;urp;" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits