[Libreoffice-commits] .: 2 commits - sw/inc sw/source
sw/inc/doc.hxx |2 +- sw/inc/editsh.hxx |2 +- sw/source/core/doc/doc.cxx |6 +++--- sw/source/core/edit/editsh.cxx |2 +- sw/source/core/unocore/unocoll.cxx |4 ++-- sw/source/ui/fldui/flddinf.cxx |6 +++--- sw/source/ui/fldui/flddok.cxx | 18 +- sw/source/ui/fldui/fldfunc.cxx |8 sw/source/ui/fldui/fldmgr.cxx | 19 +-- sw/source/ui/fldui/fldref.cxx |6 +++--- sw/source/ui/fldui/fldvar.cxx | 24 sw/source/ui/inc/fldmgr.hxx|3 ++- sw/source/ui/utlui/content.cxx |7 +++ sw/source/ui/utlui/gloslst.cxx | 12 +--- 14 files changed, 58 insertions(+), 61 deletions(-) New commits: commit c1400c98ce137dddb252f9759ca9a89ab3452764 Author: August Sodora aug...@gmail.com Date: Thu Jan 12 23:15:09 2012 -0500 SvStringsDtor-std::vector diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 11f8cd8..e85ba27 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1704,7 +1704,7 @@ public: // Return names of all references that are set in document. // If array pointer is 0 return only whether a RefMark is set in document. -sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const; +sal_uInt16 GetRefMarks( std::vectorString* = 0 ) const; // Insert label. If a FlyFormat is created, return it. SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String rTxt, const String rSeparator, diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 70af368..11e3376 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -741,7 +741,7 @@ public: // Return names of all references set in document. // If ArrayPointer == 0 then return only whether a RefMark is set in document. -sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const; +sal_uInt16 GetRefMarks( std::vectorString* = 0 ) const; // Call AutoCorrect void AutoCorrect( SvxAutoCorrect rACorr, sal_Bool bInsertMode = sal_True, diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 8be6aa7..8c61466 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1822,7 +1822,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const // Return the names of all set references in the Doc //JP 24.06.96: If the array pointer is 0, then just return whether a RefMark is set in the Doc // OS 25.06.96: From now on we always return the reference count -sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const +sal_uInt16 SwDoc::GetRefMarks( std::vectorString* pNames ) const { const SfxPoolItem* pItem; const SwTxtRefMark* pTxtRef; @@ -1836,8 +1836,8 @@ sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const { if( pNames ) { -String* pTmp = new String( ((SwFmtRefMark*)pItem)-GetRefName() ); -pNames-Insert( pTmp, nCount ); +String pTmp(((SwFmtRefMark*)pItem)-GetRefName()); +pNames-insert(pNames-begin() + nCount, pTmp); } nCount ++; } diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index d984598..41d113a 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -519,7 +519,7 @@ const SwFmtRefMark* SwEditShell::GetRefMark( const String rName ) const } // returne die Namen aller im Doc gesetzten Referenzen -sal_uInt16 SwEditShell::GetRefMarks( SvStringsDtor* pStrings ) const +sal_uInt16 SwEditShell::GetRefMarks( std::vectorString* pStrings ) const { return GetDoc()-GetRefMarks( pStrings ); } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 36de7ef..4996bd3 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -1948,12 +1948,12 @@ uno::Sequence OUString SwXReferenceMarks::getElementNames(void) throw( uno::R uno::SequenceOUString aRet; if(IsValid()) { -SvStringsDtor aStrings; +std::vectorString aStrings; sal_uInt16 nCount = GetDoc()-GetRefMarks( aStrings ); aRet.realloc(nCount); OUString* pNames = aRet.getArray(); for(sal_uInt16 i = 0; i nCount; i++) -pNames[i] = *aStrings.GetObject(i); +pNames[i] = aStrings[i]; } else throw uno::RuntimeException(); diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx index f89b64b..7160fc2 100644 --- a/sw/source/ui/fldui/flddinf.cxx +++ b/sw/source/ui/fldui/flddinf.cxx @@ -139,9 +139,9 @@ void SwFldDokInfPage::Reset(const SfxItemSet ) nSelEntryData = static_cast sal_uInt16 (sVal.ToInt32()); } -SvStringsDtor aLst; +std::vectorString aLst; GetFldMgr().GetSubTypes(nTypeId, aLst); -for (sal_uInt16 i = 0; i aLst.Count(); ++i) +for(size_t i = 0; i aLst.size(); ++i) {
[Libreoffice-commits] .: 2 commits - sw/inc sw/source
sw/inc/crsrsh.hxx |1 sw/inc/viewsh.hxx | 21 +++- sw/source/core/crsr/crsrsh.cxx |8 - sw/source/core/inc/pagefrm.hxx |5 - sw/source/core/layout/pagechg.cxx | 22 - sw/source/core/layout/paintfrm.cxx | 47 ++ sw/source/core/view/viewsh.cxx | 21 +++- sw/source/core/view/vnew.cxx|9 +- sw/source/ui/docvw/FrameControlsManager.cxx |9 +- sw/source/ui/docvw/HeaderFooterWin.cxx | 19 +++- sw/source/ui/docvw/PageBreakWin.cxx | 19 +++- sw/source/ui/docvw/edtwin.cxx | 121 ++-- sw/source/ui/inc/FrameControl.hxx |4 sw/source/ui/inc/FrameControlsManager.hxx | 11 -- sw/source/ui/inc/HeaderFooterWin.hxx|3 sw/source/ui/inc/PageBreakWin.hxx |3 sw/source/ui/inc/edtwin.hxx | 14 +-- sw/source/ui/inc/wrtsh.hxx |2 sw/source/ui/wrtsh/wrtsh1.cxx |6 - 19 files changed, 211 insertions(+), 134 deletions(-) New commits: commit cce76e658af88813e17dea4f04388a29d7e582df Author: Jan Holesovsky ke...@suse.cz Date: Thu Dec 29 13:42:43 2011 +0100 Header/Footer: When editing, show only the appropriate conrol. Instead of showing both the header and footer controls, show only the footer-related if in footer, or header-related if in header. diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index fd4a3d6..85b17a4 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -92,6 +92,12 @@ namespace vcl class OldStylePrintAdaptor; } +enum FrameControlType +{ +PageBreak, +Header, +Footer +}; // Define for flags needed in ctor or layers below. // Currently the PreView flag is needed for DrawPage. @@ -156,9 +162,10 @@ class SW_DLLPUBLIC ViewShell : public Ring sal_Bool bEnableSmooth:1; // Disable SmoothScroll, e.g. for drag // of scrollbars. sal_Bool bEndActionByVirDev:1; // Paints from EndAction always via virtual device -bool bShowHeaderFooterSeparator:1; -bool bHeaderFooterEdit:1; // (e.g. when browsing). +bool bShowHeaderSeparator:1; // Flag to say that we are showing the header control +bool bShowFooterSeparator:1; // Flag to say that we are showing the footer control +bool bHeaderFooterEdit:1; // Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator above) // boolean, indicating that class in in constructor. bool mbInConstructor:1; @@ -565,10 +572,12 @@ public: const SwPostItMgr* GetPostItMgr() const { return (const_castViewShell*(this))-GetPostItMgr(); } SwPostItMgr* GetPostItMgr(); -void ToggleHeaderFooterEdit( ); +/// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags +void ToggleHeaderFooterEdit(); +/// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags bool IsHeaderFooterEdit() const { return bHeaderFooterEdit; } -bool IsShowHeaderFooterSeparator() { return bShowHeaderFooterSeparator; } -virtual void SetShowHeaderFooterSeparator( bool bShow ) { bShowHeaderFooterSeparator = bShow; } +bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? bShowHeaderSeparator: bShowFooterSeparator; } +virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) bShowHeaderSeparator = bShow; else bShowFooterSeparator = bShow; } }; // class CurrShell manages global ShellPointer --- diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index bb55f6b..0d1efa3 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1316,7 +1316,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) } if ( IsInHeaderFooter() != IsHeaderFooterEdit() ) -ToggleHeaderFooterEdit( ); +ToggleHeaderFooterEdit(); // #i27301# SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this ); diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 1e16a98..779c4cd 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -28,7 +28,7 @@ #ifndef _PAGEFRM_HXX #define _PAGEFRM_HXX - +#include viewsh.hxx #include svl/svarray.hxx #include ftnboss.hxx @@ -359,7 +359,8 @@ public: // in case this is am empty page, this function returns the 'reference' page const SwPageFrm GetFormatPage() const; -bool IsOverHeaderFooterArea( const Point rPt ) const; +/// If in header or footer area, it also indicates the exact area in rControl. +bool IsOverHeaderFooterArea( const Point rPt, FrameControlType
[Libreoffice-commits] .: 2 commits - sw/inc sw/source unusedcode.easy
sw/inc/swcrsr.hxx |4 ++-- sw/source/core/crsr/swcrsr.cxx|9 + sw/source/core/fields/cellfml.cxx |4 ++-- unusedcode.easy |7 --- 4 files changed, 13 insertions(+), 11 deletions(-) New commits: commit b2e84f9a40fda7821d4e658f9102bcbc783a1ba3 Author: Caolán McNamara caol...@redhat.com Date: Wed Nov 23 15:32:43 2011 + std::map::erase takes a nonconst iterator diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index f7bb248..9bb433a 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -283,8 +283,8 @@ public: virtual sal_Bool GotoTable( const String rName ); void InsertBox( const SwTableBox rTblBox ); -void DeleteBox( SwSelBoxes::const_iterator it ) { aSelBoxes.erase( it ); bChg = sal_True; } -void DeleteBox( SwSelBoxes::const_iterator itFirst, SwSelBoxes::const_iterator itLast ) { aSelBoxes.erase( itFirst, itLast ); bChg = sal_True; } +void DeleteBox( SwSelBoxes::iterator it ) { aSelBoxes.erase( it ); bChg = sal_True; } +void DeleteBox( SwSelBoxes::iterator itFirst, SwSelBoxes::iterator itLast ) { aSelBoxes.erase( itFirst, itLast ); bChg = sal_True; } void DeleteAllBoxes() { DeleteBox(aSelBoxes.begin(), aSelBoxes.end()); } sal_uInt16 GetBoxesCount() const { return aSelBoxes.size(); } const SwSelBoxes GetBoxes() const { return aSelBoxes; } diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 8b4fab8..650b01d 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -2165,8 +2165,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) else { -SwSelBoxes::const_iterator it = aTmp.find(pSttNd-GetIndex()); -if( it != aTmp.end() ) { +SwSelBoxes::iterator it = aTmp.find(pSttNd-GetIndex()); +if( it != aTmp.end() ) +{ SwNodeIndex aIdx( *pSttNd, 1 ); const SwNode* pNd = aIdx.GetNode(); if( !pNd-IsCntntNode() ) @@ -2272,7 +2273,7 @@ bool SwTableCursor::NewTableSelection() void SwTableCursor::ActualizeSelection( const SwSelBoxes rNew ) { -SwSelBoxes::const_iterator itOld = aSelBoxes.begin(); +SwSelBoxes::iterator itOld = aSelBoxes.begin(); SwSelBoxes::const_iterator itNew = rNew.begin(); while ( itOld != aSelBoxes.end() itNew != rNew.end() ) { @@ -2285,7 +2286,7 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes rNew ) } else if( pPOld-GetSttIdx() pPNew-GetSttIdx() ) { -SwSelBoxes::const_iterator it = itOld; +SwSelBoxes::iterator it = itOld; ++itOld; DeleteBox( it ); // this box has to go } diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 5e7c1e4..17d3db2 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -349,7 +349,7 @@ void SwTableFormula::_MakeFormel( const SwTable rTbl, String rNewStr, rNewStr += '('; bool bDelim = false; -for( SwSelBoxes::const_iterator it = aBoxes.begin(); +for( SwSelBoxes::iterator it = aBoxes.begin(); it != aBoxes.end() !pCalcPara-rCalc.IsCalcError(); ++it ) { @@ -960,7 +960,7 @@ void SwTableFormula::GetBoxes( const SwTableBox rSttBox, break; // dann mal die Tabellenkoepfe raus: -for( SwSelBoxes::const_iterator it = rBoxes.begin(); it != rBoxes.end(); ++it ) +for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); ++it ) { pLine = it-second-GetUpper(); while( pLine-GetUpper() ) commit 7434fa5bbd051dc4842bc76d33f27e07f10e0053 Author: Caolán McNamara caol...@redhat.com Date: Wed Nov 23 15:21:13 2011 + update list post SwSelBoxes conversion diff --git a/unusedcode.easy b/unusedcode.easy index 6bb28a2..77d915b 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -387,6 +387,7 @@ ScDPItemData::GetNumFormat() const ScDPSaveData::Refresh(com::sun::star::uno::Referencecom::sun::star::sheet::XDimensionsSupplier const) ScDdeLink::ResetValue() ScDocRowHeightUpdater::TabRanges::TabRanges() +ScDocument::SetAllTabRangeNames(std::__debug::mapshort, ScRangeName const*, std::lessshort, std::allocatorstd::pairshort const, ScRangeName const* const) ScDocument::ValidNewTabName(std::__debug::vectorrtl::OUString, std::allocatorrtl::OUString const) const ScFilterDetect::impl_createFactory(com::sun::star::uno::Referencecom::sun::star::lang::XMultiServiceFactory const) ScFormulaCell::IsRangeNameInUse(unsigned short) const @@ -408,7 +409,9 @@ ScMultiTextWnd::GetLineCount() ScMyCellInfo::ScMyCellInfo() ScMyStyleRanges::SetStylesToRanges(ScRangeList*, rtl::OUString const*, short, rtl::OUString const*, ScXMLImport)