[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy
svtools/inc/svtools/treelist.hxx|4 svtools/inc/svtools/viewdataentry.hxx |1 - svtools/source/contnr/treelist.cxx | 29 - svtools/source/contnr/viewdataentry.cxx |5 - unusedcode.easy |3 --- 5 files changed, 42 deletions(-) New commits: commit 00438a182db9d0edcc2339c8a35a79280c60d1a5 Author: Julien Nabet serval2...@yahoo.fr Date: Fri Dec 14 22:26:58 2012 +0100 Remove some newly tagged unused methods Change-Id: I95d2c24ffefe6835c9505d149dc94847f1140b9c diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index c931f0e..220b2f4 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -193,9 +193,6 @@ public: const SvTreeListEntries GetChildList( SvTreeListEntry* pParent ) const; SvTreeListEntries GetChildList( SvTreeListEntry* pParent ); -std::pairSvTreeListEntries::const_iterator, SvTreeListEntries::const_iterator -GetChildIterators(const SvTreeListEntry* pParent) const; - std::pairSvTreeListEntries::iterator, SvTreeListEntries::iterator GetChildIterators(SvTreeListEntry* pParent); @@ -341,7 +338,6 @@ public: sal_BoolIsExpanded( SvTreeListEntry* pEntry ) const; sal_BoolIsSelected( SvTreeListEntry* pEntry ) const; -sal_BoolHasEntryFocus( SvTreeListEntry* pEntry ) const; voidSetEntryFocus( SvTreeListEntry* pEntry, sal_Bool bFocus ); const SvViewDataEntry* GetViewData( const SvTreeListEntry* pEntry ) const; SvViewDataEntry* GetViewData( SvTreeListEntry* pEntry ); diff --git a/svtools/inc/svtools/viewdataentry.hxx b/svtools/inc/svtools/viewdataentry.hxx index 9fc0408..3800b29 100644 --- a/svtools/inc/svtools/viewdataentry.hxx +++ b/svtools/inc/svtools/viewdataentry.hxx @@ -65,7 +65,6 @@ public: bool IsCursored() const; bool IsSelectable() const; void SetFocus( bool bFocus ); -void SetCursored( bool bCursored ); void SetSelected( bool bSelected ); void SetHighlighted( bool bHighlighted ); void SetExpanded( bool bExpanded ); diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index d0125f4..90a03d2 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1118,27 +1118,6 @@ SvTreeListEntry* SvTreeList::GetRootLevelParent( SvTreeListEntry* pEntry ) const return pCurParent; } -std::pairSvTreeListEntries::const_iterator, SvTreeListEntries::const_iterator -SvTreeList::GetChildIterators(const SvTreeListEntry* pParent) const -{ -typedef std::pairSvTreeListEntries::const_iterator, SvTreeListEntries::const_iterator IteratorPair; - -static const SvTreeListEntries dummy; // prevent singular iterator asserts -IteratorPair aRet(dummy.begin(), dummy.end()); - -if (!pParent) -pParent = pRootItem; - -if (pParent-maChildren.empty()) -// This entry has no children. -return aRet; - -aRet.first = pParent-maChildren.begin(); -aRet.second = pParent-maChildren.end(); - -return aRet; -} - std::pairSvTreeListEntries::iterator, SvTreeListEntries::iterator SvTreeList::GetChildIterators(SvTreeListEntry* pParent) { @@ -1494,14 +1473,6 @@ sal_Bool SvListView::IsSelected( SvTreeListEntry* pEntry ) const return itr-second-IsSelected(); } -sal_Bool SvListView::HasEntryFocus( SvTreeListEntry* pEntry ) const -{ -DBG_ASSERT(pEntry,IsExpanded:No Entry); -SvDataTable::const_iterator itr = maDataTable.find(pEntry ); -DBG_ASSERT(itr != maDataTable.end(),Entry not in Table); -return itr-second-HasFocus(); -} - void SvListView::SetEntryFocus( SvTreeListEntry* pEntry, sal_Bool bFocus ) { DBG_ASSERT(pEntry,SetEntryFocus:No Entry); diff --git a/svtools/source/contnr/viewdataentry.cxx b/svtools/source/contnr/viewdataentry.cxx index c9c75f3..adf7b31 100644 --- a/svtools/source/contnr/viewdataentry.cxx +++ b/svtools/source/contnr/viewdataentry.cxx @@ -97,11 +97,6 @@ void SvViewDataEntry::SetFocus( bool bFocus ) mbFocused = bFocus; } -void SvViewDataEntry::SetCursored( bool bCursored ) -{ -mbCursored = bCursored; -} - void SvViewDataEntry::SetSelected( bool bSelected ) { mbSelected = bSelected; diff --git a/unusedcode.easy b/unusedcode.easy index 6b829c4..c6815be 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -11,9 +11,6 @@ ScMenuFloatingWindow::getDoc() ScVbaFormatooo::vba::excel::XStyle::getAddIndent() ScVbaFormatooo::vba::excel::XStyle::setAddIndent(com::sun::star::uno::Any const) SfxDocumentTemplateDlg::SfxDocumentTemplateDlg(Window*, SfxDocumentTemplates*) -SvListView::HasEntryFocus(SvTreeListEntry*) const -SvTreeList::GetChildIterators(SvTreeListEntry const*) const -SvViewDataEntry::SetCursored(bool) TextEngine::GetLeftMargin() const ThumbnailView::GetScrollWidth() const
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/treelist.hxx |5 - svtools/inc/svtools/treelistbox.hxx |3 ++- svtools/source/contnr/treelist.cxx| 14 +++--- svtools/source/contnr/treelistbox.cxx |5 + 4 files changed, 22 insertions(+), 5 deletions(-) New commits: commit 9210b95bcfd65ae558f445666d9b880e794d4c74 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Nov 15 16:31:49 2012 -0500 Make GetParent() const-correct. const method should return const pointer if it points to an object held internally prefer taking const pointer as a method argument if possible. Change-Id: I4dc8c31d55aa0054ea6db521be9ad45fefef8d07 diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index 467dda9..79fbc1b 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -256,7 +256,10 @@ public: SvTreeListEntry*GetEntry( SvTreeListEntry* pParent, sal_uLong nPos ) const; SvTreeListEntry*GetEntry( sal_uLong nRootPos ) const; SvTreeListEntry*GetEntryAtAbsPos( sal_uLong nAbsPos ) const; -SvTreeListEntry*GetParent( SvTreeListEntry* pEntry ) const; + +const SvTreeListEntry* GetParent( const SvTreeListEntry* pEntry ) const; +SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ); + SvTreeListEntry*GetRootLevelParent( SvTreeListEntry* pEntry ) const; const SvTreeListEntries GetChildList( SvTreeListEntry* pParent ) const; SvTreeListEntries GetChildList( SvTreeListEntry* pParent ); diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index 8ec235d..a7e05d3 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -399,7 +399,8 @@ public: voidFillEntryPath( SvTreeListEntry* pEntry, ::std::deque sal_Int32 _rPath ) const; using Window::GetParent; -SvTreeListEntry*GetParent( SvTreeListEntry* pEntry ) const; +const SvTreeListEntry* GetParent( const SvTreeListEntry* pEntry ) const; +SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ) const; SvTreeListEntry*GetRootLevelParent(SvTreeListEntry* pEntry ) const; using Window::GetChildCount; diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 675c019..ed278f1 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1855,11 +1855,19 @@ SvTreeListEntries SvTreeList::GetChildList( SvTreeListEntry* pParent ) return pParent-maChildren; } -SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) const +const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) const +{ +const SvTreeListEntry* pParent = pEntry-pParent; +if (pParent == pRootItem) +pParent = NULL; +return pParent; +} + +SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) { SvTreeListEntry* pParent = pEntry-pParent; -if ( pParent==pRootItem ) -pParent = 0; +if (pParent == pRootItem) +pParent = NULL; return pParent; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 5cdff0c..167035b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -938,6 +938,11 @@ void SvTreeListBox::FillEntryPath( SvTreeListEntry* pEntry, ::std::deque sal_In } } +const SvTreeListEntry* SvTreeListBox::GetParent( const SvTreeListEntry* pEntry ) const +{ +return pModel-GetParent(pEntry); +} + SvTreeListEntry* SvTreeListBox::GetParent( SvTreeListEntry* pEntry ) const { return pModel-GetParent(pEntry); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/treelist.hxx |2 -- svtools/source/contnr/treelist.cxx | 35 +-- 2 files changed, 1 insertion(+), 36 deletions(-) New commits: commit 036f86db553494c781f58cbb5cbb567774217ec4 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Oct 30 16:32:33 2012 -0400 Apparently CheckIntegrity() was only declared but never defined. Let's remove it. Change-Id: Idbc6c58fb6ce71c80534396111c4d5b17a9764c7 diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index b971a64..9b96506 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -297,8 +297,6 @@ public: voidSetCompareHdl( const Link rLink ) { aCompareLink = rLink; } const Link GetCompareHdl() const { return aCompareLink; } voidResort(); - -voidCheckIntegrity() const; }; class SVT_DLLPUBLIC SvListView diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index f3bf0bc..2ec20bd 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -322,10 +322,6 @@ sal_uLong SvTreeList::Move(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa if (!bSameParent) SetListPositions(rSrc); -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif - sal_uLong nRetVal = findEntryPosition(rDst, pSrcEntry); OSL_ENSURE(nRetVal == pSrcEntry-GetChildListPos(), ListPos not valid); Broadcast( LISTACTION_MOVED,pSrcEntry,pTargetParent,nRetVal); @@ -360,9 +356,6 @@ sal_uLong SvTreeList::Copy(SvTreeListEntry* pSrcEntry,SvTreeListEntry* pTargetPa SetListPositions(rDst); // correct list position in target list -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif Broadcast( LISTACTION_INSERTED_TREE, pClonedEntry ); sal_uLong nRetVal = findEntryPosition(rDst, pClonedEntry); return nRetVal; @@ -426,9 +419,6 @@ void SvTreeList::InsertTree(SvTreeListEntry* pSrcEntry, nEntryCount += GetChildCount( pSrcEntry ); nEntryCount++; // the parent is new, too -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif Broadcast(LISTACTION_INSERTED_TREE, pSrcEntry ); } @@ -1100,9 +1090,6 @@ sal_uLong SvTreeList::Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pParent,s else pEntry-nListPos = rList.size()-1; -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif Broadcast( LISTACTION_INSERTED, pEntry ); return nPos; // pEntry-nListPos; } @@ -1136,10 +1123,7 @@ void SvTreeList::SetAbsolutePositions() nPos++; pEntry = Next( pEntry ); } -bAbsPositionsValid = sal_True; -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif +bAbsPositionsValid = true; } @@ -1166,9 +1150,6 @@ void SvTreeList::Expand( SvListView* pView, SvTreeListEntry* pEntry ) pView-bVisPositionsValid = sal_False; pView-nVisibleCount = 0; } -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif } /* @@ -1194,9 +1175,6 @@ void SvTreeList::Collapse( SvListView* pView, SvTreeListEntry* pEntry ) pView-nVisibleCount = 0; pView-bVisPositionsValid = sal_False; } -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif } @@ -1230,9 +1208,6 @@ sal_Bool SvTreeList::Select( SvListView* pView, SvTreeListEntry* pEntry, sal_Boo pView-nSelectionCount--; } } -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif return sal_True; } @@ -1281,11 +1256,6 @@ bool SvTreeList::Remove( const SvTreeListEntry* pEntry ) SetListPositions(rList); nEntryCount -= nRemoved; - -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif - return true; } @@ -1313,9 +1283,6 @@ void SvTreeList::SelectAll( SvListView* pView, sal_Bool bSelect ) pView-nSelectionCount = nEntryCount; else pView-nSelectionCount = 0; -#ifdef CHECK_INTEGRITY -CheckIntegrity(); -#endif } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/treelistbox.hxx |2 -- svtools/source/contnr/svimpbox.cxx| 11 +-- svtools/source/contnr/treelistbox.cxx |7 --- 3 files changed, 5 insertions(+), 15 deletions(-) New commits: commit 6a076eca204eadc16e442b1cfdcaf7a5b38f197e Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Oct 19 16:05:10 2012 +0200 We don't need this method now. The two classes have been merged. Therefore this method makes no sense now. Change-Id: Idb77d8faf5314f776bebc3bc9abc0e7e88ab5d18 diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index 75c933b..06a4e54 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -101,7 +101,6 @@ enum SvButtonState { SV_BUTTON_UNCHECKED, SV_BUTTON_CHECKED, SV_BUTTON_TRISTATE #define SV_TAB_BORDER 8 -#define SV_LISTBOX_ID_TREEBOX 1 // fuer SvLBox::IsA() #define SV_ENTRYHEIGHTOFFS_PIXEL 2 #define TREEFLAG_CHKBTN 0x0001 @@ -378,7 +377,6 @@ public: using SvListView::SetModel; void SetModel(SvTreeList* pNewModel); -sal_uInt16 IsA(); sal_uLong GetEntryCount() const {return pModel-GetEntryCount();} SvTreeListEntry*First() const { return (SvTreeListEntry*)(pModel-First()); } SvTreeListEntry*Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth=0 ) const { return pModel-Next(pEntry,pDepth); } diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 83b344e..61e5471 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -790,12 +790,11 @@ sal_Bool SvImpLBox::EntryReallyHit(SvTreeListEntry* pEntry,const Point rPosPixe Rectangle aRect( pView-GetFocusRect( pEntry, nLine )); aRect.Right() = GetOutputSize().Width() - pView-GetMapMode().GetOrigin().X(); -if( pView-IsA() == SV_LISTBOX_ID_TREEBOX ) -{ -SvLBoxContextBmp* pBmp = (SvLBoxContextBmp*)(pEntry-GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); -aRect.Left() -= pBmp-GetSize(pView,pEntry).Width(); -aRect.Left() -= 4; // a little tolerance -} + +SvLBoxContextBmp* pBmp = (SvLBoxContextBmp*)(pEntry-GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP)); +aRect.Left() -= pBmp-GetSize(pView,pEntry).Width(); +aRect.Left() -= 4; // a little tolerance + Point aPos( rPosPixel ); aPos -= pView-GetMapMode().GetOrigin(); if( aRect.IsInside( aPos ) ) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 6442181..a24d6fb 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1554,13 +1554,6 @@ void SvTreeListBox::DisconnectFromModel() pImp-SetModel( GetModel() ); } - -sal_uInt16 SvTreeListBox::IsA() -{ -DBG_CHKTHIS(SvTreeListBox,0); -return SV_LISTBOX_ID_TREEBOX; -} - void SvTreeListBox::SetSublistOpenWithReturn( sal_Bool b ) { pImp-bSubLstOpRet = b; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy
svtools/inc/svtools/treelistbox.hxx |2 -- svtools/source/contnr/treelistbox.cxx | 17 - unusedcode.easy |1 - 3 files changed, 20 deletions(-) New commits: commit a51488cb2400163e20bc4fe5e3028587c29d08d9 Author: Caolán McNamara caol...@redhat.com Date: Sat Oct 13 20:12:56 2012 +0100 callcatcher: update unused code and drop freshly unused methods Change-Id: I8b1c0cc4a1af259e39578c36bace126c35337ecd diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index 6e2f278..a919cd5 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -639,8 +639,6 @@ protected: voidEditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem, const Selection ); voidEditedText( const XubString ); -voidEditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem, -const Point rMousePos ); // berechnet abhaengig von TreeList-Style Bitmap-Groessen // alle Tabulatoren neu; wird beim Einfuegen/Austauschen von diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 3c7da29..724f651 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -2950,23 +2950,6 @@ void SvTreeListBox::EditedText( const XubString rStr ) } } -void SvTreeListBox::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem, -const Point ) -{ -DBG_CHKTHIS(SvTreeListBox,0); -if( IsEditingActive() ) -EndEditing(); -if( pItem-IsA() == SV_ITEM_ID_LBOXSTRING ) -{ -Selection aSel( SELECTION_MIN, SELECTION_MAX ); -if( EditingEntry( pEntry, aSel ) ) -{ -SelectAll( sal_False ); -EditItemText( pEntry, (SvLBoxString*)pItem, aSel ); -} -} -} - SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point rPos ) { DBG_CHKTHIS(SvTreeListBox,0); diff --git a/unusedcode.easy b/unusedcode.easy index 3218143..c3ee05a 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -2,7 +2,6 @@ FontSelectPattern::FontSelectPattern(PhysicalFontFace const, Size const, float RelatedMultipart::getIds() SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char) ScCTB::ScCTB() -ScCondFormatHelper::GetExpression(ScCondFormatEntryType, int) ScCondFormatItem::ScCondFormatItem(unsigned int) ScConditionalFormat::dumpInfo(rtl::OUStringBuffer) const ScDataBarSettingsDlg::ScDataBarSettingsDlg(Window*, ScDocument*, ScAddress const) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/toolpanelopt.hxx |3 --- svtools/source/config/toolpanelopt.cxx | 10 -- 2 files changed, 13 deletions(-) New commits: commit 2a680739f8dfe123316a69a9c85030f784ca1f22 Author: Caolán McNamara caol...@redhat.com Date: Tue Oct 9 23:05:23 2012 +0100 AddListenerLink/RemoveListenerLink not implemented so the underlying stuff isn't used either, i.e. aList is always empty Change-Id: Ia273576956294f878a81c7fab17446b7f33c5fa2 diff --git a/svtools/inc/svtools/toolpanelopt.hxx b/svtools/inc/svtools/toolpanelopt.hxx index 4c70256..8b96e25 100644 --- a/svtools/inc/svtools/toolpanelopt.hxx +++ b/svtools/inc/svtools/toolpanelopt.hxx @@ -56,9 +56,6 @@ class SVT_DLLPUBLIC SvtToolPanelOptions: public utl::detail::Options SvtToolPanelOptions(); virtual ~SvtToolPanelOptions(); -void AddListenerLink( const Link rLink ); -void RemoveListenerLink( const Link rLink ); - bool GetVisibleImpressView() const; void SetVisibleImpressView( bool bVisible ); bool GetVisibleOutlineView() const; diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx index 94bebef..339e155 100644 --- a/svtools/source/config/toolpanelopt.cxx +++ b/svtools/source/config/toolpanelopt.cxx @@ -58,7 +58,6 @@ using namespace ::com::sun::star; class SvtToolPanelOptions_Impl : public ConfigItem { private: -::std::listLink aList; Sequence OUString m_seqPropertyNames; public: @@ -99,8 +98,6 @@ class SvtToolPanelOptions_Impl : public ConfigItem bool m_bVisibleHandoutView; bool m_bVisibleSlideSorterView; -void CallListeners(); - private: /** return list of key names of our configuration management which represent oue module tree @@ -249,16 +246,9 @@ void SvtToolPanelOptions_Impl::Load( const Sequence OUString rPropertyNames } } -void SvtToolPanelOptions_Impl::CallListeners() -{ -for ( ::std::listLink::const_iterator iter = aList.begin(); iter != aList.end(); ++iter ) -iter-Call( this ); -} - void SvtToolPanelOptions_Impl::Notify( const Sequence OUString rPropertyNames ) { Load( rPropertyNames ); -CallListeners(); } void SvtToolPanelOptions_Impl::Commit() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/svlbox.hxx | 20 ++-- svtools/inc/svtools/treelist.hxx | 37 -- svtools/source/contnr/svlbox.cxx | 65 +++ 3 files changed, 83 insertions(+), 39 deletions(-) New commits: commit 77a0acae58828d2186bce241b562c363da93343b Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Sep 27 15:37:27 2012 -0400 Remove DECLARE_SVTREELIST. There is only one place that uses it. Change-Id: Ie3a41b36a5273c9b658b6a2f0e5d029bcb148546 diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx index 6c7c0fb..b582806 100644 --- a/svtools/inc/svtools/svlbox.hxx +++ b/svtools/inc/svtools/svlbox.hxx @@ -215,6 +215,24 @@ public: voidSetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; } }; +class SVT_DLLPUBLIC SvLBoxTreeList : public SvTreeList +{ +public: +SvLBoxEntry* First() const; +SvLBoxEntry* Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const; +SvLBoxEntry* Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const; +SvLBoxEntry* Last() const; +SvLBoxEntry* Clone( SvListEntry* pEntry, sal_uLong nCloneCount ) const; +SvLBoxEntry* GetEntry( SvListEntry* pParent, sal_uLong nPos ) const; +SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const; +SvLBoxEntry* GetParent( SvListEntry* pEntry ) const; +SvLBoxEntry* FirstChild( SvLBoxEntry* pParent ) const; +SvLBoxEntry* NextSibling( SvLBoxEntry* pEntry ) const; +SvLBoxEntry* PrevSibling( SvLBoxEntry* pEntry ) const; +SvLBoxEntry* LastSibling( SvLBoxEntry* pEntry ) const; +SvLBoxEntry* GetEntryAtAbsPos( sal_uLong nAbsPos ) const; +}; + // * // ** SvLBox *** // * @@ -232,8 +250,6 @@ public: // Das Drop-Target ist in diesem Fall 0 #define SV_DRAGDROP_ENABLE_TOP (DragDropMode)0x0020 -DECLARE_SVTREELIST(SvLBoxTreeList, SvLBoxEntry*) - #define SVLISTBOX_ID_LBOX 0 // fuer SvLBox::IsA() #define SVLBOX_IN_EDT 0x0001 diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index d5ba003..bc0b683 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -603,43 +603,6 @@ inline SvListEntry* SvTreeList::GetParent( SvListEntry* pEntry ) const return pParent; } -#define DECLARE_SVTREELIST( ClassName, Type ) \ -class ClassName : public SvTreeList \ -{ \ -public: \ -TypeFirst() const \ -{ return (Type)SvTreeList::First(); } \ -TypeNext( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \ -{ return (Type)SvTreeList::Next(pEntry,pDepth); } \ -TypePrev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \ -{ return (Type)SvTreeList::Prev(pEntry,pDepth); } \ -TypeLast() const \ -{ return (Type)SvTreeList::Last(); } \ - \ -TypeClone( SvListEntry* pEntry, sal_uLong nCloneCount ) const \ -{ return (Type)SvTreeList::Clone(pEntry,nCloneCount); } \ -TypeGetEntry( SvListEntry* pParent, sal_uLong nPos ) const \ -{ return (Type)SvTreeList::GetEntry(pParent,nPos); } \ -TypeGetEntry( sal_uLong nRootPos ) const \ -{ return (Type)SvTreeList::GetEntry(nRootPos); } \ -TypeGetParent( SvListEntry* pEntry ) const \ -{ return (Type)SvTreeList::GetParent(pEntry); } \ -using SvTreeList::FirstChild; \ -TypeFirstChild( Type pParent ) const \ -{ return (Type)SvTreeList::FirstChild(pParent); } \ -using SvTreeList::NextSibling; \ -TypeNextSibling( Type pEntry ) const \ -{ return (Type)SvTreeList::NextSibling(pEntry); } \ -using SvTreeList::PrevSibling; \ -TypePrevSibling( Type pEntry ) const \ -{ return (Type)SvTreeList::PrevSibling(pEntry); }
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/table/gridtablerenderer.hxx |7 svtools/inc/svtools/table/tablerenderer.hxx | 21 + svtools/source/table/cellvalueconversion.cxx| 455 ++-- svtools/source/table/cellvalueconversion.hxx| 16 svtools/source/table/gridtablerenderer.cxx | 23 + svtools/source/table/tablecontrol_impl.cxx | 11 svtools/source/table/tabledatawindow.cxx|3 7 files changed, 503 insertions(+), 33 deletions(-) New commits: commit a7e949673cda3f0e2abfa49b2c22735f33205d01 Author: Norbert Thiebaud nthieb...@gmail.com Date: Mon Aug 20 20:42:37 2012 -0500 gridfixes: #i117265# use a NumberFormatter for converting cell values to text. This means using the Locale setup in the Options, and allows for more value types (like Date/Time) to be supported Change-Id: I78fb08f2da88405851664e3e1dd4505c3727e56b Reviewed-on: https://gerrit.libreoffice.org/534 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 21607a2..3982c6f 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -98,7 +98,12 @@ namespace svt { namespace table ColPos const i_colPos, RowPos const i_rowPos, bool const i_active, bool const i_selected, OutputDevice i_targetDevice, Rectangle const i_targetArea -); +) const; +virtual boolGetFormattedCellString( +::com::sun::star::uno::Any const i_cellValue, +ColPos const i_colPos, RowPos const i_rowPos, +::rtl::OUString o_cellString +) const; private: struct CellRenderContext; diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index a0fc93b..b56ed8a 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -260,7 +260,26 @@ namespace svt { namespace table ColPos const i_colPos, RowPos const i_rowPos, bool const i_active, bool const i_selected, OutputDevice i_targetDevice, Rectangle const i_targetArea -) = 0; +) const = 0; + +/** attempts to format the content of the given cell as string + +@param i_cellValue +the value for which an attempt for a string conversion should be made +@param i_colPos +the column position of the cell in question +@param i_rowPos +the row position of the cell in question +@param o_cellString +the cell content, formatted as string +@return +TRUE/ if and only if the content could be formatted as string +*/ +virtual boolGetFormattedCellString( +::com::sun::star::uno::Any const i_cellValue, +ColPos const i_colPos, RowPos const i_rowPos, +::rtl::OUString o_cellString +) const = 0; /// deletes the renderer instance virtual ~ITableRenderer() { } diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index afb27ae..27c9ed3 100644 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -27,6 +27,25 @@ #include cellvalueconversion.hxx +#include com/sun/star/util/XNumberFormatter.hpp +#include com/sun/star/util/XNumberFormatsSupplier.hpp +#include com/sun/star/beans/XPropertySet.hpp +#include com/sun/star/util/Date.hpp +#include com/sun/star/util/Time.hpp +#include com/sun/star/util/DateTime.hpp +#include com/sun/star/util/XNumberFormatTypes.hpp +#include com/sun/star/util/NumberFormat.hpp +#include comphelper/componentcontext.hxx +#include rtl/strbuf.hxx +#include rtl/math.hxx +#include tools/date.hxx +#include tools/time.hxx +#include tools/diagnose_ex.h +#include unotools/syslocale.hxx + +#include boost/shared_ptr.hpp +#include boost/unordered_map.hpp + //.. namespace svt { @@ -34,36 +53,432 @@ namespace svt /** === begin UNO using === **/ using ::com::sun::star::uno::Any; +using ::com::sun::star::util::XNumberFormatter; +using ::com::sun::star::uno::UNO_QUERY_THROW; +using ::com::sun::star::util::XNumberFormatsSupplier; +using ::com::sun::star::beans::XPropertySet; +using ::com::sun::star::uno::UNO_SET_THROW; +using
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/table/gridtablerenderer.hxx |6 - svtools/inc/svtools/table/tablerenderer.hxx | 24 ++-- svtools/source/table/gridtablerenderer.cxx | 19 +-- svtools/source/table/tablecontrol.cxx |4 svtools/source/table/tablecontrol_impl.cxx | 130 +++- svtools/source/table/tablecontrol_impl.hxx | 14 ++ 6 files changed, 95 insertions(+), 102 deletions(-) New commits: commit 87e333667bea20098124102e02aacb850c5c0109 Author: Norbert Thiebaud nthieb...@gmail.com Date: Mon Aug 20 21:21:22 2012 -0500 gridfixes: when the table controls doesn't have the focus use diff. color. use a different color to paint the selection, to be consistent with all our other controls Change-Id: Ia5160dfb769279e2a8a3458b16fe8f6cec08145e Reviewed-on: https://gerrit.libreoffice.org/537 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/svtools/inc/svtools/table/gridtablerenderer.hxx b/svtools/inc/svtools/table/gridtablerenderer.hxx index 3982c6f..1c5f36f 100644 --- a/svtools/inc/svtools/table/gridtablerenderer.hxx +++ b/svtools/inc/svtools/table/gridtablerenderer.hxx @@ -80,15 +80,15 @@ namespace svt { namespace table virtual voidPaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected, OutputDevice _rDevice, const Rectangle _rArea, const StyleSettings _rStyle ); -virtual voidPrepareRow( RowPos _nRow, bool _bActive, bool _bSelected, +virtual voidPrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, OutputDevice _rDevice, const Rectangle _rRowArea, const StyleSettings _rStyle ); virtual voidPaintRowHeader( -bool _bActive, bool _bSelected, +bool i_hasControlFocus, bool _bSelected, OutputDevice _rDevice, const Rectangle _rArea, const StyleSettings _rStyle ); virtual voidPaintCell( ColPos const i_col, -bool _bActive, bool _bSelected, +bool i_hasControlFocus, bool _bSelected, OutputDevice _rDevice, const Rectangle _rArea, const StyleSettings _rStyle ); virtual voidShowCellCursor( Window _rView, const Rectangle _rCursorRect); diff --git a/svtools/inc/svtools/table/tablerenderer.hxx b/svtools/inc/svtools/table/tablerenderer.hxx index b56ed8a..393a1c0 100644 --- a/svtools/inc/svtools/table/tablerenderer.hxx +++ b/svtools/inc/svtools/table/tablerenderer.hxx @@ -134,9 +134,8 @@ namespace svt { namespace table However, the renderer is also allowed to render any cell-independent content of this row. -@param _bActive -TRUE/ if and only if the row to be painted contains the -currently active cell. +@param i_hasControlFocus +TRUE/ if and only if the table control currently has the focus @param _bSelected TRUE/ if and only if the row to be prepared is selected currently. @@ -148,7 +147,7 @@ namespace svt { namespace table @param _rStyle the style to be used for drawing */ -virtual voidPrepareRow( RowPos _nRow, bool _bActive, bool _bSelected, +virtual voidPrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, OutputDevice _rDevice, const Rectangle _rRowArea, const StyleSettings _rStyle ) = 0; @@ -157,9 +156,8 @@ namespace svt { namespace table The row to be painted is denoted by the most recent call to -PrepareRow. -@param _bActive -TRUE/ if and only if the row to be painted contains the -currently active cell. +@param i_hasControlFocus +TRUE/ if and only if the table control currently has the focus br/ Note that this flag is equal to the respective flag in the previous -PrepareRow call, it's passed here for convinience @@ -178,9 +176,9 @@ namespace svt { namespace table @param _rStyle the style to be used for drawing */ -virtual voidPaintRowHeader( bool _bActive, bool _bSelected, -OutputDevice _rDevice, const Rectangle _rArea, -const StyleSettings _rStyle ) = 0; +virtual voidPaintRowHeader( bool i_hasControlFocus, bool _bSelected, +OutputDevice _rDevice, Rectangle const _rArea, +StyleSettings const _rStyle ) = 0; /** paints a certain cell @@
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/table/tablecontrol.hxx |3 --- svtools/source/table/tablecontrol.cxx | 18 ++ svtools/source/table/tabledatawindow.cxx |2 -- svtools/source/table/tabledatawindow.hxx |6 -- 4 files changed, 2 insertions(+), 27 deletions(-) New commits: commit a6754e5a09afd62ae431a279fa30be5e0506ad39 Author: Norbert Thiebaud nthieb...@gmail.com Date: Mon Sep 3 16:25:42 2012 -0500 gridfixes: re-enable the mouse listeners which got lost in a previous change. Do this by making the TableControl a CompoundControl, so VCL cares for everything which is needed. Consequently, get rid of the manual notification of the respective VCLEVENT_*'s, and everything related to it Change-Id: Id8872680b744e1171be916f6f66a4968e9d6567a Reviewed-on: https://gerrit.libreoffice.org/553 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx index c3078d8..8f297ed 100644 --- a/svtools/inc/svtools/table/tablecontrol.hxx +++ b/svtools/inc/svtools/table/tablecontrol.hxx @@ -173,9 +173,6 @@ namespace svt { namespace table // . private: -DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* ); -DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* ); - DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* ); private: diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 99053fe..1d1129f 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -59,14 +59,14 @@ namespace svt { namespace table ,m_pImpl( new TableControl_Impl( *this ) ) { TableDataWindow rDataWindow = m_pImpl-getDataWindow(); -rDataWindow.SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); -rDataWindow.SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) ); rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); SetBackground( Wallpaper( aWindowColor ) ); SetFillColor( aWindowColor ); + +SetCompoundControl( true ); } // - @@ -662,20 +662,6 @@ namespace svt { namespace table } //-- -IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData ) -{ -CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData ); -return 1; -} - - //-- -IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData ) -{ - CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData ); -return 1; -} - - //-- void TableControl::Select() { ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_pImpl-getSelectHandler(), this ); diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 4f69758..09ca76f 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -205,7 +205,6 @@ namespace svt { namespace table { m_aSelectHdl.Call( NULL ); } -m_aMouseButtonDownHdl.Call((MouseEvent*) rMEvt); } //-- @@ -214,7 +213,6 @@ namespace svt { namespace table if ( !m_rTableControl.getInputHandler()-MouseButtonUp( m_rTableControl, rMEvt ) ) Window::MouseButtonUp( rMEvt ); -m_aMouseButtonUpHdl.Call((MouseEvent*) rMEvt); m_rTableControl.getAntiImpl().GrabFocus(); } diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 96f178a..c3a126a 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -51,8 +51,6 @@ namespace svt { namespace table friend class TableFunctionSet; private: TableControl_Impl m_rTableControl; -Linkm_aMouseButtonDownHdl; - Link m_aMouseButtonUpHdl; Linkm_aSelectHdl; sal_uLong
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/slidesorterbaropt.hxx | 90 ++-- svtools/source/config/slidesorterbaropt.cxx | 210 +++- 2 files changed, 138 insertions(+), 162 deletions(-) New commits: commit b843d9056898f916b8c1bf86b36190c3c796a60f Author: Rob Snelders programm...@ertai.nl Date: Sat Aug 4 20:43:13 2012 +0200 code cleanup Change-Id: Ib154cd53253e4d802d13a024a20f6c34d499e672 diff --git a/svtools/inc/svtools/slidesorterbaropt.hxx b/svtools/inc/svtools/slidesorterbaropt.hxx index c2ef705..c00952a 100644 --- a/svtools/inc/svtools/slidesorterbaropt.hxx +++ b/svtools/inc/svtools/slidesorterbaropt.hxx @@ -27,68 +27,76 @@ #include rtl/ustring.hxx #include unotools/options.hxx - /*@short forward declaration to our private date container implementation -@descr We use these class as internal member to support small memory requirements. -You can create the container if it is neccessary. The class which use these mechanism -is faster and smaller then a complete implementation!*/ +/** forward declaration to our private date container implementation + +We use these class as internal member to support small memory requirements. +You can create the container if it is neccessary. The class which use these mechanism +is faster and smaller then a complete implementation! +*/ class SvtSlideSorterBarOptions_Impl; class Link; - /*@short collect informations about sidebar group -@ATTENTION This class is partially threadsafe. -@devstatus ready to use*/ +/** collect informations about sidebar group + +\attention This class is partially threadsafe. +*/ class SVT_DLLPUBLIC SvtSlideSorterBarOptions: public utl::detail::Options { public: - /*@short standard constructor and destructor -@descr This will initialize an instance with default values. -We implement these class with a refcount mechanism! Every instance of this class increase it -at create and decrease it at delete time - but all instances use the same data container! -He is implemented as a static member ... -@seealsomember m_nRefCount -@seealsomember m_pDataContainer*/ - SvtSlideSorterBarOptions(); +/** standard constructor and destructor + +This will initialize an instance with default values. +We implement these class with a refcount mechanism! Every instance of this class increase it +at create and decrease it at delete time - but all instances use the same data container! +He is implemented as a static member ... + +\samember m_nRefCount +\samember m_pDataContainer +*/ +SvtSlideSorterBarOptions(); virtual ~SvtSlideSorterBarOptions(); void AddListenerLink( const Link rLink ); void RemoveListenerLink( const Link rLink ); -sal_BoolGetVisibleImpressView() const; -voidSetVisibleImpressView( sal_Bool bVisible ); -sal_BoolGetVisibleOutlineView() const; -voidSetVisibleOutlineView( sal_Bool bVisible ); -sal_BoolGetVisibleNotesView() const; -voidSetVisibleNotesView( sal_Bool bVisible ); -sal_BoolGetVisibleHandoutView() const; -voidSetVisibleHandoutView( sal_Bool bVisible ); -sal_BoolGetVisibleSlideSorterView() const; -voidSetVisibleSlideSorterView( sal_Bool bVisible ); -sal_BoolGetVisibleDrawView() const; -voidSetVisibleDrawView( sal_Bool bVisible ); +bool GetVisibleImpressView() const; +void SetVisibleImpressView( bool bVisible ); +bool GetVisibleOutlineView() const; +void SetVisibleOutlineView( bool bVisible ); +bool GetVisibleNotesView() const; +void SetVisibleNotesView( bool bVisible ); +bool GetVisibleHandoutView() const; +void SetVisibleHandoutView( bool bVisible ); +bool GetVisibleSlideSorterView() const; +void SetVisibleSlideSorterView( bool bVisible ); +bool GetVisibleDrawView() const; +void SetVisibleDrawView( bool bVisible ); private: - /*@short return a reference to a static mutex -@descr These class is partially threadsafe (for de-/initialization only). -All access methods are'nt safe! -We create a static mutex only for one ime and use at different times. -@return A reference to a static mutex member.*/ +/** return a reference to a static mutex + +These class is partially threadsafe (for de-/initialization only). +All access methods are'nt safe! +We create a static mutex only for one ime and use at different times.
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy xmlsecurity/source
svtools/inc/svtools/framestatuslistener.hxx |1 svtools/source/uno/framestatuslistener.cxx| 28 -- unusedcode.easy |2 xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx |8 -- xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.hxx |3 - 5 files changed, 1 insertion(+), 41 deletions(-) New commits: commit f33ed937b675540a0fec71822c3e55568065a433 Author: José Santiago Jiménez Sarmiento jimenezsarmie...@gmail.com Date: Wed Apr 25 17:12:01 2012 +0200 Remove unused methods diff --git a/svtools/inc/svtools/framestatuslistener.hxx b/svtools/inc/svtools/framestatuslistener.hxx index 3e5b871..8c3fbd1 100644 --- a/svtools/inc/svtools/framestatuslistener.hxx +++ b/svtools/inc/svtools/framestatuslistener.hxx @@ -58,7 +58,6 @@ class SVT_DLLPUBLIC FrameStatusListener : public ::com::sun::star::frame::XStatu // methods to support status forwarder, known by the old sfx2 toolbox controller implementation void addStatusListener( const rtl::OUString aCommandURL ); -void removeStatusListener( const rtl::OUString aCommandURL ); void bindListener(); void unbindListener(); sal_Bool isBound() const; diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index 502211d..6579c26 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -233,34 +233,6 @@ void FrameStatusListener::addStatusListener( const rtl::OUString aCommandURL ) } } -void FrameStatusListener::removeStatusListener( const rtl::OUString aCommandURL ) -{ -SolarMutexGuard aSolarMutexGuard; - -URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); -if ( pIter != m_aListenerMap.end() ) -{ -Reference XDispatch xDispatch( pIter-second ); -Reference XStatusListener xStatusListener( static_cast OWeakObject* ( this ), UNO_QUERY ); -m_aListenerMap.erase( pIter ); - -try -{ -Reference XURLTransformer xURLTransformer( m_xServiceManager-createInstance( -rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.util.URLTransformer ))), -UNO_QUERY ); -com::sun::star::util::URL aTargetURL; -aTargetURL.Complete = aCommandURL; -xURLTransformer-parseStrict( aTargetURL ); - -if ( xDispatch.is() xStatusListener.is() ) -xDispatch-removeStatusListener( xStatusListener, aTargetURL ); -} -catch (const Exception) -{ -} -} -} void FrameStatusListener::bindListener() { diff --git a/unusedcode.easy b/unusedcode.easy index fb71361..5e0fc8c 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,4 +1,3 @@ -CertificateExtension_XmlSecImpl::setCertExtn(com::sun::star::uno::Sequencesigned char, com::sun::star::uno::Sequencesigned char, unsigned char) EditEngine::GetNextVisPortion(ParaPortion const*) const FmFieldWinMgr::GetChildWindowId() FmPropBrwMgr::GetChildWindowId() @@ -719,7 +718,6 @@ std::__cxx1998::multimap_xmlNode*, com::sun::star::uno::Referencecom::sun::sta std::__cxx1998::vectorOrderedEntry*, std::allocatorOrderedEntry* ::~vector() std::__cxx1998::vectorServiceInfo*, std::allocatorServiceInfo* ::~vector() std::__cxx1998::vectorSfxFilter*, std::allocatorSfxFilter* ::~vector() -svt::FrameStatusListener::removeStatusListener(rtl::OUString const) svxform::DataNavigatorManager::GetChildWindowId() svxform::FmFilterNavigatorWinMgr::GetChildWindowId() svxform::NavigatorFrameManager::GetChildWindowId() diff --git a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx index 63589b3..fd43387 100644 --- a/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx +++ b/xmlsecurity/source/xmlsec/certificateextension_xmlsecimpl.cxx @@ -62,13 +62,6 @@ sal_Bool SAL_CALL CertificateExtension_XmlSecImpl :: isCritical() throw( ::com:: return m_xExtnValue ; } -//Helper method -void CertificateExtension_XmlSecImpl :: setCertExtn( ::com::sun::star::uno::Sequence sal_Int8 extnId, ::com::sun::star::uno::Sequence sal_Int8 extnValue, sal_Bool critical ) { -m_critical = critical ; -m_xExtnId = extnId ; -m_xExtnValue = extnValue ; -} - void CertificateExtension_XmlSecImpl :: setCertExtn( unsigned char* value, unsigned int vlen, unsigned char* id, unsigned int idlen, sal_Bool critical ) { unsigned int i ; if( value != NULL vlen != 0 ) { @@ -94,4 +87,5 @@ void CertificateExtension_XmlSecImpl :: setCertExtn( unsigned char* value, unsig m_critical = critical ; } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy
svtools/inc/svtools/svmedit.hxx |3 --- svtools/source/edit/svmedit.cxx | 19 --- unusedcode.easy |3 --- 3 files changed, 25 deletions(-) New commits: commit 0e31821b12f36bd753f35a73fcaba8ede8eb1359 Author: Szabolcs Dezsi dezsisz...@hotmail.com Date: Thu Feb 16 11:38:04 2012 + Removed unused functions from MultiLineEdit in svtools module diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx index eb855da..bfce316 100644 --- a/svtools/inc/svtools/svmedit.hxx +++ b/svtools/inc/svtools/svmedit.hxx @@ -65,7 +65,6 @@ protected: ExtTextEngine* GetTextEngine() const; ExtTextView*GetTextView() const; -ScrollBar* GetHScrollBar() const; ScrollBar* GetVScrollBar() const; public: @@ -110,7 +109,6 @@ public: { SetText( rStr ); SetSelection( rNewSelection ); } String GetText() const; String GetText( LineEnd aSeparator ) const; -String GetTextLines() const; String GetTextLines( LineEnd aSeparator ) const; voidSetRightToLeft( sal_Bool bRightToLeft ); @@ -137,7 +135,6 @@ public: voidDraw( OutputDevice* pDev, const Point rPos, const Size rSize, sal_uLong nFlags ); void SetLeftMargin( sal_uInt16 n ); -sal_uInt16 GetLeftMargin() const; virtual ::com::sun::star::uno::Reference ::com::sun::star::awt::XWindowPeer diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index 640f05a..bb5f4b3 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -1215,11 +1215,6 @@ String MultiLineEdit::GetText( LineEnd aSeparator ) const return pImpSvMEdit-GetText( aSeparator ); } -String MultiLineEdit::GetTextLines() const -{ -return pImpSvMEdit-GetTextLines(); -} - String MultiLineEdit::GetTextLines( LineEnd aSeparator ) const { return pImpSvMEdit-GetTextLines( aSeparator ); @@ -1559,12 +1554,6 @@ ExtTextView* MultiLineEdit::GetTextView() const return pImpSvMEdit-GetTextWindow()-GetTextView(); } -ScrollBar* MultiLineEdit::GetHScrollBar() const -{ -return pImpSvMEdit-GetHScrollBar(); -} - - ScrollBar* MultiLineEdit::GetVScrollBar() const { return pImpSvMEdit-GetVScrollBar(); @@ -1581,14 +1570,6 @@ void MultiLineEdit::SetLeftMargin( sal_uInt16 n ) GetTextEngine()-SetLeftMargin( n ); } -sal_uInt16 MultiLineEdit::GetLeftMargin() const -{ -if ( GetTextEngine() ) -return GetTextEngine()-GetLeftMargin(); -else -return 0; -} - void MultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft ) { if ( GetTextEngine() ) diff --git a/unusedcode.easy b/unusedcode.easy index 3dd0f66..647b4f3 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -42,9 +42,6 @@ Matrix3d::Inverse() const Matrix3d::Matrix3d() MenuBar::MenuBar(ResId const) MergeData::Dump() -MultiLineEdit::GetHScrollBar() const -MultiLineEdit::GetLeftMargin() const -MultiLineEdit::GetTextLines() const NfCurrencyEntry::NfCurrencyEntry() NumberFormatCodeWrapper::getDefault(short, short) const NumericBox::GetValue(unsigned short) const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy vcl/inc vcl/source
svtools/inc/svtools/imap.hxx|3 --- svtools/source/edit/svmedit.cxx |6 -- svtools/source/misc/imap.cxx| 18 -- unusedcode.easy |6 -- vcl/inc/ilstbox.hxx |1 - vcl/inc/image.h |1 - vcl/inc/vcl/button.hxx |3 --- vcl/inc/vcl/settings.hxx|6 -- vcl/source/app/settings.cxx | 12 vcl/source/control/button.cxx |8 vcl/source/control/ilstbox.cxx |7 --- vcl/source/gdi/impimage.cxx |5 - 12 files changed, 76 deletions(-) New commits: commit 3626c2cef7c39bda96e2d3bc0d5a53ba1044aadc Author: Alexander Bergmann myadd...@gmx.de Date: Wed Feb 15 13:15:50 2012 + unusedcode.easy: Removed unused code diff --git a/svtools/inc/svtools/imap.hxx b/svtools/inc/svtools/imap.hxx index 9418d98..8d81c00 100644 --- a/svtools/inc/svtools/imap.hxx +++ b/svtools/inc/svtools/imap.hxx @@ -132,9 +132,6 @@ public: const String GetName() const { return aName; } voidSetName( const String rName ) { aName = rName; } -// gibt das BoundRect aller IMap-Objekte in 1/100mm zurueck -Rectangle GetBoundRect() const; - // skaliert alle Objekte der ImageMap entpr. dem uebergebenen Faktor voidScale( const Fraction rFractX, const Fraction rFracY ); diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index 44ad0d1..267a203 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -139,7 +139,6 @@ public: voidSetMaxTextLen( xub_StrLen nLen ); xub_StrLen GetMaxTextLen() const; -voidSetInsertMode( sal_Bool bInsert ); sal_BoolIsInsertMode() const; voidInsertText( const String rStr ); @@ -396,11 +395,6 @@ sal_Bool ImpSvMEdit::IsModified() const return mpTextWindow-GetTextEngine()-IsModified(); } -void ImpSvMEdit::SetInsertMode( sal_Bool bInsert ) -{ -mpTextWindow-GetTextView()-SetInsertMode( bInsert ); -} - void ImpSvMEdit::SetReadOnly( sal_Bool bRdOnly ) { mpTextWindow-GetTextView()-SetReadOnly( bRdOnly ); diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index d4199e2..dd15a4b 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -989,24 +989,6 @@ IMapObject* ImageMap::GetHitIMapObject( const Size rTotalSize, |* \**/ -Rectangle ImageMap::GetBoundRect() const -{ -Rectangle aBoundRect; -size_t nCount = maList.size(); - -for ( size_t i = 0; i nCount; i++ ) -aBoundRect.Union( maList[ i ]-GetBoundRect() ); - -return aBoundRect; -} - - -/** -|* -|* -|* -\**/ - void ImageMap::Scale( const Fraction rFracX, const Fraction rFracY ) { size_t nCount = maList.size(); diff --git a/unusedcode.easy b/unusedcode.easy index af2cff9..b65437f 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -28,19 +28,13 @@ HTMLControls::Insert(HTMLControl const**, unsigned short) HTMLControls::Insert(HTMLControls const*, unsigned short, unsigned short) HTMLControls::Remove(HTMLControl const*, unsigned short) HTMLControls::Remove(unsigned short, unsigned short) -ImageButton::ImageButton(unsigned short) -ImageMap::GetBoundRect() const -ImpSvMEdit::SetInsertMode(unsigned char) ImpSvtData::~ImpSvtData() ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale) const -ImplEntryList::IsEntrySelected(String const) const -ImplImageList::GetImageCount() const InsCapOptArr::Insert(InsCapOptArr const*, unsigned short, unsigned short) InsCapOptArr::Insert(InsCaptionOpt* const, unsigned short) InsCapOptArr::Insert(InsCaptionOpt* const*, unsigned short) InsCapOptArr::Remove(InsCaptionOpt* const, unsigned short) InsCapOptArr::Remove(unsigned short, unsigned short) -KeyboardSettings::CopyData() MSDffImportRecords::Insert(MSDffImportRecords const*, unsigned short, unsigned short) MSDffImportRecords::Insert(SvxMSDffImportRec* const, unsigned short) MSDffImportRecords::Insert(SvxMSDffImportRec* const*, unsigned short) diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index c1355f0..cecf3b8 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -168,7 +168,6 @@ public: sal_uInt16 GetSelectEntryCount() const; XubString GetSelectEntry( sal_uInt16 nIndex ) const; sal_uInt16 GetSelectEntryPos( sal_uInt16 nIndex ) const; -sal_BoolIsEntrySelected( const XubString rStr ) const; sal_BoolIsEntryPosSelected( sal_uInt16 nIndex ) const; voidSetLastSelected( sal_uInt16 nPos ) { mnLastSelected = nPos; } diff --git a/vcl/inc/image.h b/vcl/inc/image.h index 1497750..f8abc4e
[Libreoffice-commits] .: svtools/inc svtools/source unusedcode.easy
svtools/inc/svtools/ctrlbox.hxx| 33 - svtools/source/control/ctrlbox.cxx | 24 unusedcode.easy|3 --- 3 files changed, 60 deletions(-) New commits: commit 458c80234b701fb1cb9a71239cec532c54b2e9f0 Author: Mariusz Dykierek mariuszdykie...@gmail.com Date: Mon Jan 23 13:53:54 2012 +0530 Removed Get*EntryLine? and Get*EntryDistance methods. diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index 5815719..a4d9eff 100644 --- a/svtools/inc/svtools/ctrlbox.hxx +++ b/svtools/inc/svtools/ctrlbox.hxx @@ -352,16 +352,10 @@ public: using ListBox::GetEntryPos; virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const; -longGetEntryLine1( sal_uInt16 nPos ) const; -longGetEntryLine2( sal_uInt16 nPos ) const; -longGetEntryDistance( sal_uInt16 nPos ) const; sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const; voidSelectEntry( const XubString rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); } voidSelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True ); -longGetSelectEntryLine1( sal_uInt16 nSelIndex = 0 ) const; -longGetSelectEntryLine2( sal_uInt16 nSelIndex = 0 ) const; -longGetSelectEntryDistance( sal_uInt16 nSelIndex = 0 ) const; sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const; inline sal_Bool IsEntrySelected( const XubString rStr ) const { return ListBox::IsEntrySelected( rStr ); } sal_BoolIsEntrySelected( sal_uInt16 nStyle1 = STYLE_SOLID ) const; @@ -389,33 +383,6 @@ private: void* GetEntryData( sal_uInt16 nPos ) const; }; -inline long LineListBox::GetSelectEntryLine1( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryLine1( nPos ); -else -return 0; -} - -inline long LineListBox::GetSelectEntryLine2( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryLine2( nPos ); -else -return 0; -} - -inline long LineListBox::GetSelectEntryDistance( sal_uInt16 nSelIndex ) const -{ -sal_uInt16 nPos = GetSelectEntryPos( nSelIndex ); -if ( nPos != LISTBOX_ENTRY_NOTFOUND ) -return GetEntryDistance( nPos ); -else -return 0; -} - inline sal_Bool LineListBox::IsEntrySelected( sal_uInt16 nStyle ) const { sal_uInt16 nPos = GetEntryPos( nStyle ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d4959ec..ce72cdc 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -851,30 +851,6 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const // --- -long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetLine1ForWidth( m_nWidth ) : 0; -} - -// --- - -long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetLine2ForWidth( m_nWidth ) : 0; -} - -// --- - -long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const -{ -ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; -return ( pData ) ? pData-GetDistForWidth( m_nWidth ) : 0; -} - -// --- - sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const { ImpLineListData* pData = (nPos pLineList-size()) ? (*pLineList)[ nPos ] : NULL; diff --git a/unusedcode.easy b/unusedcode.easy index 9d44e00..caa31b1 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -112,9 +112,6 @@ InsCapOptArr::Remove(InsCaptionOpt* const, unsigned short) InsCapOptArr::Remove(unsigned short, unsigned short) ItemList::FindAttrib(unsigned short) KeyboardSettings::CopyData() -LineListBox::GetEntryDistance(unsigned short) const -LineListBox::GetEntryLine1(unsigned short) const -LineListBox::GetEntryLine2(unsigned short) const LinkStructArr::DeleteAndDestroy(unsigned short, unsigned short) LngSvcMgr::RemoveLngSvcEvtBroadcaster(com::sun::star::uno::Referencecom::sun::star::linguistic2::XLinguServiceEventBroadcaster const) LocaleDataWrapper::getCollatorImplementations() const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/filedlg.hxx | 30 - svtools/source/dialogs/filedlg.cxx | 21 - svtools/source/dialogs/filedlg2.cxx | 594 svtools/source/dialogs/filedlg2.hxx | 71 4 files changed, 11 insertions(+), 705 deletions(-) New commits: commit 7482e974117df2bdc737785efdf9eb410787c7b4 Author: Michael Stahl mst...@redhat.com Date: Thu Jan 5 18:37:42 2012 +0100 svtools: remove unused FileDialog svtools/filedlg.hxx(88) : warning C4610: class ´FileDialog´ can never be instantiated diff --git a/svtools/inc/svtools/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx index d25219a..b771631 100644 --- a/svtools/inc/svtools/filedlg.hxx +++ b/svtools/inc/svtools/filedlg.hxx @@ -26,8 +26,8 @@ * / -#ifndef _SVT_FILEDLG_HXX -#define _SVT_FILEDLG_HXX +#ifndef SVT_FILEDLG_HXX +#define SVT_FILEDLG_HXX #include svtools/svtdllapi.h @@ -43,10 +43,8 @@ class ImpSvFileDlg; class SVT_DLLPUBLIC PathDialog : public ModalDialog { private: -friend class FileDialog;// Imp... - ImpSvFileDlg* pImpFileDlg;// Implementation -LinkaOKHdlLink; // Link zum OK-Handler +LinkaOKHdlLink; // Link to OK-Handler protected: UniString aDfltExt; // Default - Extension @@ -67,26 +65,6 @@ public: virtual short Execute(); }; -// -- -// - SvFileDialog - -// -- - -class SVT_DLLPUBLIC FileDialog : public PathDialog -{ -private: -LinkaFileHdlLink; // Link zum FileSelect-Handler -LinkaFilterHdlLink; // Link zum FilterSelect-Handler - -public: -~FileDialog(); - -virtual voidFileSelect(); -virtual voidFilterSelect(); - -const UniStringGetDefaultExt() const { return aDfltExt; } -UniString GetFilterType( sal_uInt16 nPos ) const; -}; - -#endif // _FILEDLG_HXX +#endif // FILEDLG_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx index 77a071c..c2224ae 100644 --- a/svtools/source/dialogs/filedlg.cxx +++ b/svtools/source/dialogs/filedlg.cxx @@ -34,7 +34,7 @@ PathDialog::PathDialog( Window* _pParent, WinBits nStyle, sal_Bool bCreateDir ) ModalDialog( _pParent, WB_STDMODAL | nStyle ) { pImpFileDlg = new ImpSvFileDlg; -pImpFileDlg-CreateDialog( this, nStyle, WINDOW_PATHDIALOG, bCreateDir ); +pImpFileDlg-CreatePathDialog(this, bCreateDir); } PathDialog::~PathDialog() @@ -72,23 +72,4 @@ long PathDialog::OK() return sal_True; } -FileDialog::~FileDialog() -{ -} - -void FileDialog::FileSelect() -{ -aFileHdlLink.Call( this ); -} - -void FileDialog::FilterSelect() -{ -aFilterHdlLink.Call( this ); -} - -UniString FileDialog::GetFilterType( sal_uInt16 nPos ) const -{ - return ((ImpFileDialog*)pImpFileDlg-GetDialog())-GetFilterType( nPos ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index 319848f..32f6ef6 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -692,600 +692,10 @@ UniString ImpPathDialog::GetPath() const return aFile.GetFull(); } - -ImpFileDialog::ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType ) : - ImpPathDialog( pDlg, nType, sal_False ) -{ -bOpen = (nWinBits WB_SAVEAS) == 0; - -SvtResId aSvtResId = bOpen ? STR_FILEDLG_OPEN : STR_FILEDLG_SAVE; - -// Titel setzen -GetFileDialog()-SetText( UniString( aSvtResId ) ); -nDirCount = 0; - -// initialize Controls if not used as a base class -if ( nType == WINDOW_FILEDIALOG ) -InitControls(); - -pDlg-SetHelpId( HID_FILEDLG_OPENDLG ); - -} - -ImpFileDialog::~ImpFileDialog() -{ -for ( size_t i = 0, n = aFilterList.size(); i n; ++i ) { -delete aFilterList[ i ]; -} -aFilterList.clear(); - -delete pFileTitel; -if (pFileList ( pFileList != pDirList ) ) -delete pFileList; - -delete pTypeTitel; -delete pTypeList; -} - -void ImpFileDialog::InitControls() -{ -UniString aEmptyStr; - -const int nW = 160; -const int nH = 48; // Um den Dialog in eine akzeptable Form zu bringen - -INITCONTROL( pFileTitel, FixedText, 0, -Point(10, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_FILE ) ), HID_FILEDLG_FILE ); -INITCONTROL( pEdit, Edit, WB_BORDER, -Point(10, 31), Size(nW, 20), aEmptyStr, HID_FILEDLG_EDIT ); // aMask() -INITCONTROL( pFileList, ListBox, WB_SORT | WB_AUTOHSCROLL | WB_BORDER, -Point(10, 58), Size(nW, 180-nH), aEmptyStr, HID_FILEDLG_FILES ); - -INITCONTROL( pDirTitel, FixedText, 0, -Point(nW+20, 12), Size(nW, 18), UniString( SvtResId( STR_FILEDLG_DIR ) ),
[Libreoffice-commits] .: svtools/inc svtools/source
svtools/inc/svtools/sampletext.hxx |2 svtools/source/misc/sampletext.cxx | 137 - 2 files changed, 137 insertions(+), 2 deletions(-) New commits: commit ada314807900a6b9205bacc1b149ab58720ffa7b Author: Caolán McNamara caol...@redhat.com Date: Thu Oct 20 12:53:31 2011 +0100 add makeRepresentativeTextForLanguage to generate sample text add initial code to generate language specific sample preview text samples for use for font previewing in format-character diff --git a/svtools/inc/svtools/sampletext.hxx b/svtools/inc/svtools/sampletext.hxx index 1100c8a..09ba499 100644 --- a/svtools/inc/svtools/sampletext.hxx +++ b/svtools/inc/svtools/sampletext.hxx @@ -31,6 +31,7 @@ #include svtools/svtdllapi.h #include rtl/ustring.hxx #include unicode/uscript.h +#include i18npool/lang.h #include vcl/fontcapabilities.hxx class OutputDevice; @@ -44,6 +45,7 @@ SVT_DLLPUBLIC bool canRenderNameOfSelectedFont(OutputDevice rDevice); SVT_DLLPUBLIC rtl::OUString makeRepresentativeSymbolTextForSelectedFont(OutputDevice rDevice); SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForSelectedFont(OutputDevice rDevice); +SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForLanguage(LanguageType eLang); SVT_DLLPUBLIC rtl::OUString makeRepresentativeTextForScript(UScriptCode eScript); SVT_DLLPUBLIC rtl::OUString makeMinimalTextForScript(UScriptCode eScript); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 6cf1604..45a6ba9 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -117,6 +117,16 @@ rtl::OUString makeRepresentativeSymbolTextForSelectedFont(OutputDevice rDevice) return bHasSampleTextGlyphs ? sSampleText : rtl::OUString(); } +//These ones are typically for use in the font dropdown box beside the +//fontname, so say things roughly like Script/Alphabet/Name-Of-Major-Language +// +//Here we don't always know the language of course, only the script that can be +//written with the font. Often that's one single language written in that +//script, or a handful of related languages where the name of the script is the +//same between languages, or the name in the major language is known by most +//readers of the minor languages, e.g. Yiddish is written with the HEBREW +//script as well, the vast majority of Yiddish readers will be able to read +//Hebrew as well. rtl::OUString makeRepresentativeTextForScript(UScriptCode eScript) { rtl::OUString sSampleText; @@ -427,8 +437,131 @@ rtl::OUString makeMinimalTextForScript(UScriptCode eScript) return sSampleText; } -#define TRADITIONAL_CHINESE 0x0100 -#define SIMPLIFIED_CHINESE 0x0200 +//These ones are typically for use in the font preview window in format +//character +// +//There we generally know the language. Though its possible for the language to +//be none. +// +//Currently we fall back to makeRepresentativeTextForScript as I don't have +//suitable strings +rtl::OUString makeRepresentativeTextForLanguage(LanguageType eLang) +{ +switch( eLang ) +{ +case LANGUAGE_CHINESE: +return makeRepresentativeTextForScript(USCRIPT_HAN); + +case LANGUAGE_CHINESE_TRADITIONAL: +case LANGUAGE_CHINESE_HONGKONG: +case LANGUAGE_CHINESE_MACAU: +return makeRepresentativeTextForScript(USCRIPT_TRADITIONAL_HAN); + +case LANGUAGE_CHINESE_SIMPLIFIED: +case LANGUAGE_CHINESE_SINGAPORE: +return makeRepresentativeTextForScript(USCRIPT_SIMPLIFIED_HAN); +} + +rtl::OUString sRet; +switch( eLang LANGUAGE_MASK_PRIMARY ) +{ +case LANGUAGE_GREEK LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_GREEK); +break; +case LANGUAGE_HEBREW LANGUAGE_MASK_PRIMARY: +case LANGUAGE_YIDDISH LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_HEBREW); +break; +case LANGUAGE_ARABIC_SAUDI_ARABIA LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_ARABIC); +break; +case LANGUAGE_HINDI LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_DEVANAGARI); +break; +case LANGUAGE_ASSAMESE LANGUAGE_MASK_PRIMARY: +{ +const sal_Unicode aAs[] = { +0x0985, 0x09B8, 0x09AE, 0x09C0, 0x09AF, 0x09BC, 0x09BE, +0x0020, 0x0986, 0x0996, 0x09F0 +}; +sRet = rtl::OUString(aAs, SAL_N_ELEMENTS(aAs)); +break; +} +case LANGUAGE_BENGALI LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_BENGALI); +break; +case LANGUAGE_PUNJABI LANGUAGE_MASK_PRIMARY: +sRet = makeRepresentativeTextForScript(USCRIPT_GURMUKHI); +break; +case LANGUAGE_GUJARATI
Re: [Libreoffice] [Libreoffice-commits] .: svtools/inc svtools/source
On Tuesday 08 of February 2011, Joseph Powers wrote: New commits: commit 27f2608c5d1deb6cfc8c7e56239563815588e015 Author: Joseph Powers jpower...@cox.net Date: Tue Feb 8 06:55:57 2011 -0800 Remove DECLARE_LIST( ValueItemList, ValueSetItem* ) diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx index 98072c2..be8adf4 100644 --- a/svtools/inc/svtools/valueset.hxx +++ b/svtools/inc/svtools/valueset.hxx @@ -234,8 +237,8 @@ gewuenschten WinBits (vor Show) mit SetStyle() gesetzt werden. // - ValueSet - // -#define VALUESET_APPEND ((USHORT)0x) -#define VALUESET_ITEM_NOTFOUND ((USHORT)0x) +#define VALUESET_APPEND ((size_t)-1) +#define VALUESET_ITEM_NOTFOUND ((size_t)-1) I have reverted this part, it breaks build with: clone/components/cui/source/tabpages/borderconn.cxx:215:1: error: narrowing conversion of '-1u' from 'size_t' to 'short unsigned int' inside { } -- Lubos Lunak l.lu...@suse.cz ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice