[Libreoffice-commits] .: 4 commits - basctl/source cui/source editeng/source sc/source sfx2/source svtools/source svx/source sw/source unusedcode.easy vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Dec 12 05:27:36 PST 2012
basctl/source/basicide/bastype2.cxx | 2
cui/source/customize/selector.cxx | 4
cui/source/dialogs/hyphen.cxx | 2
cui/source/dialogs/scriptdlg.cxx | 2
cui/source/dialogs/thesdlg.cxx | 4
editeng/source/misc/svxacorr.cxx | 5 -
sc/source/filter/inc/formulabase.hxx | 14 --
sc/source/filter/oox/formulabase.cxx | 15 ---
sfx2/source/bastyp/fltfnc.cxx | 25 ++---
svtools/source/contnr/treelistbox.cxx | 2
svtools/source/control/ctrlbox.cxx | 8 -
svx/source/dialog/charmap.cxx | 2
svx/source/dialog/fontlb.cxx | 2
svx/source/dialog/langbox.cxx | 2
sw/source/ui/cctrl/actctrl.cxx | 8 -
sw/source/ui/misc/numberingtypelistbox.cxx | 2
unusedcode.easy | 7 -
vcl/inc/vcl/graphictools.hxx | 2
vcl/inc/vcl/layout.hxx | 13 ++
vcl/inc/vcl/menubtn.hxx | 11 --
vcl/source/control/edit.cxx | 14 ++
vcl/source/control/menubtn.cxx | 67 --------------
vcl/source/gdi/graphictools.cxx | 138 -----------------------------
vcl/source/window/dialog.cxx | 10 ++
vcl/source/window/dlgctrl.cxx | 2
25 files changed, 76 insertions(+), 287 deletions(-)
New commits:
commit 166d8257979aac6775319a9e1f305bc94df97e29
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 12 12:49:58 2012 +0000
Resolves: fdo#57469 allow tab to traverse into custom widgets
The magic WB_TABSTOP bit is the one that allows a widget to be accepted as a
candidate for getting focus when pressing tab
Change-Id: I7d964bae6b84184ccbc4652d66cf3d2637566405
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 7ea6699..4d2e7e9 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -194,7 +194,7 @@ TreeListBox::TreeListBox (Window* pParent, ResId const& rRes)
}
TreeListBox::TreeListBox (Window* pParent)
- : SvTreeListBox(pParent)
+ : SvTreeListBox(pParent, WB_TABSTOP)
, m_aNotifier( *this )
{
Init();
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 8d4af3e..dfa8af7 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -72,7 +72,7 @@ using namespace ::com::sun::star::container;
* SvxConfigGroupListBox are copied from sfx2/source/dialog/cfg.cxx
*/
SvxConfigFunctionListBox::SvxConfigFunctionListBox(Window* pParent)
- : SvTreeListBox(pParent, WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT)
+ : SvTreeListBox(pParent, WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT | WB_TABSTOP)
, pCurEntry(0)
, m_pDraggingEntry(0)
{
@@ -187,7 +187,7 @@ SvxConfigFunctionListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
SvxConfigGroupListBox::SvxConfigGroupListBox(Window* pParent)
: SvTreeListBox(pParent,
- WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT)
+ WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT | WB_TABSTOP)
, m_bShowSlots(false)
, m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK))
, m_libImage(CUI_RES(RID_CUIIMG_LIB))
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index de16810..1579941 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -36,7 +36,7 @@
#define CUR_HYPH_POS_CHAR '-'
HyphenEdit::HyphenEdit(Window* pParent)
- : Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK)
+ : Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK|WB_TABSTOP)
{
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index f149a59..c3ee488 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -85,7 +85,7 @@ SFTreeListBox::SFTreeListBox(Window* pParent)
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL |
WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HIDESELECTION |
- WB_HASLINES | WB_HASLINESATROOT );
+ WB_HASLINES | WB_HASLINESATROOT | WB_TABSTOP );
SetNodeDefaultImages();
nMode = 0xFF; // everything
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 54a80f1..24f97b0 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -58,7 +58,7 @@ using ::rtl::OUString;
// class LookUpComboBox --------------------------------------------------
LookUpComboBox::LookUpComboBox(Window *pParent)
- : ComboBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK)
+ : ComboBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP)
{
EnableAutoSize(true);
@@ -97,7 +97,7 @@ IMPL_LINK( LookUpComboBox, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ )
// class ReplaceEdit --------------------------------------------------
ReplaceEdit::ReplaceEdit(Window *pParent)
- : Edit(pParent)
+ : Edit(pParent, WB_BORDER | WB_TABSTOP)
{
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f55ef95..b6c9613 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -454,7 +454,7 @@ SvTreeListBox::SvTreeListBox(Window* pParent, const ResId& rResId) :
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvTreeListBox(Window *pParent, VclBuilder::stringmap &)
{
- return new SvTreeListBox(pParent);
+ return new SvTreeListBox(pParent, WB_TABSTOP);
}
void SvTreeListBox::Clear()
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index dd739d4..85eb235 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -133,7 +133,7 @@ namespace
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeColorListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
bool bDropdown = extractDropdown(rMap);
- WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
ColorListBox *pListBox = new ColorListBox(pParent, nWinBits);
@@ -1042,7 +1042,7 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) :
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontNameBox(Window *pParent, VclBuilder::stringmap &rMap)
{
bool bDropdown = extractDropdown(rMap);
- WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
FontNameBox *pListBox = new FontNameBox(pParent, nWinBits);
@@ -1431,7 +1431,7 @@ FontStyleBox::FontStyleBox( Window* pParent, WinBits nBits ) :
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontStyleBox(Window *pParent, VclBuilder::stringmap &rMap)
{
bool bDropdown = extractDropdown(rMap);
- WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
FontStyleBox *pListBox = new FontStyleBox(pParent, nWinBits);
@@ -1651,7 +1651,7 @@ FontSizeBox::FontSizeBox( Window* pParent, const ResId& rResId ) :
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeFontSizeBox(Window *pParent, VclBuilder::stringmap &rMap)
{
bool bDropdown = extractDropdown(rMap);
- WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+ WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP;
if (bDropdown)
nWinBits |= WB_DROPDOWN;
FontSizeBox* pListBox = new FontSizeBox(pParent, nWinBits);
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 817f2dd..42b6417 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -66,7 +66,7 @@ SvxShowCharSet::SvxShowCharSet(Window* pParent, const ResId& rResId)
}
SvxShowCharSet::SvxShowCharSet(Window* pParent)
- : Control(pParent)
+ : Control(pParent, WB_TABSTOP)
, m_pAccessible(NULL)
, aVscrollSB( this, WB_VERT)
{
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index 1e6ceb8..131ca43 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -99,7 +99,7 @@ SvxFontListBox::SvxFontListBox(Window* pParent, WinBits nStyle)
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFontListBox(Window *pParent, VclBuilder::stringmap &)
{
- return new SvxFontListBox(pParent, 0);
+ return new SvxFontListBox(pParent, WB_TABSTOP);
}
void SvxFontListBox::InsertFontEntry( const String& rString, const Font& rFont, const Color* pColor )
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 495ebd0..c36517d 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -139,7 +139,7 @@ SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nBits, sal_Bool bCheck
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pParent, VclBuilder::stringmap &)
{
- SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
+ SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
pListBox->EnableAutoSize(true);
return pListBox;
}
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 010f1a9..d930a46 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -51,14 +51,14 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
}
NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId)
- : Edit(pParent, rResId),
- sForbiddenChars(rtl::OUString(" "))
+ : Edit(pParent, rResId)
+ , sForbiddenChars(rtl::OUString(" "))
{
}
NoSpaceEdit::NoSpaceEdit(Window* pParent)
- : Edit(pParent),
- sForbiddenChars(rtl::OUString(" "))
+ : Edit(pParent, WB_BORDER|WB_TABSTOP)
+ , sForbiddenChars(rtl::OUString(" "))
{
}
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 83660cc..1344552 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -70,7 +70,7 @@ bool SwNumberingTypeListBox::set_property(const rtl::OString &rKey, const rtl::O
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwNumberingTypeListBox(Window *pParent, VclBuilder::stringmap &)
{
- SwNumberingTypeListBox *pListBox = new SwNumberingTypeListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
+ SwNumberingTypeListBox *pListBox = new SwNumberingTypeListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
pListBox->EnableAutoSize(true);
return pListBox;
}
diff --git a/vcl/inc/vcl/layout.hxx b/vcl/inc/vcl/layout.hxx
index b09b112..d9c5e63 100644
--- a/vcl/inc/vcl/layout.hxx
+++ b/vcl/inc/vcl/layout.hxx
@@ -547,12 +547,25 @@ bool isVisibleInLayout(const Window *pWindow);
//return true if this window and its stack of containers are all enabled
bool isEnabledInLayout(const Window *pWindow);
+//Get first window of a pTopLevel window as
+//if any intermediate layout widgets didn't exist
+//i.e. acts like pChild = pChild->GetWindow(WINDOW_FIRSTCHILD);
+//in a flat hierarchy where dialogs only have one layer
+//of children
+Window* firstLogicalChildOfParent(Window *pTopLevel);
+
//Get next window after pChild of a pTopLevel window as
//if any intermediate layout widgets didn't exist
//i.e. acts like pChild = pChild->GetWindow(WINDOW_NEXT);
//in a flat hierarchy where dialogs only have one layer
//of children
Window* nextLogicalChildOfParent(Window *pTopLevel, Window *pChild);
+
+//Get previous window before pChild of a pTopLevel window as
+//if any intermediate layout widgets didn't exist
+//i.e. acts like pChild = pChild->GetWindow(WINDOW_PREV);
+//in a flat hierarchy where dialogs only have one layer
+//of children
Window* prevLogicalChildOfParent(Window *pTopLevel, Window *pChild);
inline bool isContainerWindow(const Window &rWindow)
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7d30f65..0ba5119 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -225,7 +225,19 @@ bool Edit::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
SetMaxTextLen(nTextLen == 0 ? EDIT_NOLIMIT : nTextLen);
}
else if (rKey == "editable")
- SetReadOnly(!toBool(rValue));
+ {
+ bool bReadOnly = !toBool(rValue);
+ SetReadOnly(bReadOnly);
+ //disable tab to traverse into readonly editables
+ WinBits nBits = GetStyle();
+ nBits &= ~(WB_TABSTOP|WB_NOTABSTOP);
+ if (!bReadOnly)
+ nBits |= WB_TABSTOP;
+ else
+ nBits |= WB_NOTABSTOP;
+ fprintf(stderr, "tabstop is %ld\n", nBits & WB_TABSTOP);
+ SetStyle(nBits);
+ }
else if (rKey == "visibility")
{
WinBits nBits = GetStyle();
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 24da8ef..bea6412 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -171,6 +171,16 @@ Window * prevLogicalChildOfParent(Window *pTopLevel, Window *pChild)
return pChild;
}
+//Get first window of a pTopLevel window as
+//if any intermediate layout widgets didn't exist
+Window * firstLogicalChildOfParent(Window *pTopLevel)
+{
+ Window *pChild = pTopLevel->GetWindow(WINDOW_FIRSTCHILD);
+ if (pChild && isContainerWindow(*pChild))
+ pChild = nextLogicalChildOfParent(pTopLevel, pChild);
+ return pChild;
+}
+
// -----------------------------------------------------------------------
void ImplWindowAutoMnemonic( Window* pWindow )
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 0ff589b..6c481da 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -78,7 +78,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16&
Window* pTabPage = NULL;
Window* pFoundWindow = NULL;
- Window* pWindow = pParent->GetWindow( WINDOW_FIRSTCHILD );
+ Window* pWindow = firstLogicalChildOfParent(pParent);
Window* pNextWindow = pWindow;
while ( pWindow )
{
commit 0c870ab35f0648ac5e87adc84ad4c711c4774330
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 12 09:50:08 2012 +0000
uncalled destructor
Change-Id: I76a06834dcaf751359d0e4241e8f886d20530f1e
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 60de316..3bd1f58 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -113,6 +113,7 @@ using namespace ::com::sun::star::beans;
namespace
{
class theSfxFilterListener : public rtl::Static<SfxFilterListener, theSfxFilterListener> {};
+ class theSfxFilterArray : public rtl::Static<SfxFilterList_Impl, theSfxFilterArray > {};
}
static SfxFilterList_Impl* pFilterArr = 0;
@@ -120,7 +121,7 @@ static sal_Bool bFirstRead = sal_True;
static void CreateFilterArr()
{
- pFilterArr = new SfxFilterList_Impl;
+ pFilterArr = &theSfxFilterArray::get();
theSfxFilterListener::get();
}
@@ -224,7 +225,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName
for ( size_t i = 0, n = pFilterArr->size(); i < n; ++i )
{
- const SfxFilter* pCheckFilter = pFilterArr->at( i );
+ const SfxFilter* pCheckFilter = (*pFilterArr)[i];
if ( pCheckFilter->GetServiceName().equalsIgnoreAsciiCase(sServiceName) )
{
pFilter = pCheckFilter;
@@ -325,7 +326,7 @@ void SfxFilterMatcher_Impl::Update()
pList->clear();
for ( size_t i = 0, n = pFilterArr->size(); i < n; ++i )
{
- SfxFilter* pFilter = pFilterArr->at( i );
+ SfxFilter* pFilter = (*pFilterArr)[i];
if ( pFilter->GetServiceName() == aName )
pList->push_back( pFilter );
}
@@ -359,7 +360,7 @@ const SfxFilter* SfxFilterMatcher::GetAnyFilter( SfxFilterFlags nMust, SfxFilter
m_rImpl.InitForIterating();
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = m_rImpl.pList->at( i );
+ const SfxFilter* pFilter = (*m_rImpl.pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) )
return pFilter;
@@ -655,7 +656,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const ::rtl::OUString& rMedia
{
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = m_rImpl.pList->at( i );
+ const SfxFilter* pFilter = (*m_rImpl.pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetMimeType() == rMediaType )
return pFilter;
@@ -677,7 +678,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4EA( const String& rType,SfxFilterFl
const SfxFilter* pFirst = 0;
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = m_rImpl.pList->at( i );
+ const SfxFilter* pFilter = (*m_rImpl.pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetTypeName() == rType )
{
@@ -705,7 +706,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const String& rExt, SfxF
{
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = m_rImpl.pList->at( i );
+ const SfxFilter* pFilter = (*m_rImpl.pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) )
{
@@ -758,7 +759,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const String& rName, SfxFil
const SfxFilter* pFirstFilter=0;
for ( size_t i = 0, n = m_rImpl.pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = m_rImpl.pList->at( i );
+ const SfxFilter* pFilter = (*m_rImpl.pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust &&
!(nFlags & nDont ) && pFilter->GetUIName() == rName )
@@ -801,7 +802,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
{
for ( size_t i = 0, n = pFilterArr->size(); i < n; ++i )
{
- const SfxFilter* pFilter = pFilterArr->at( i );
+ const SfxFilter* pFilter = (*pFilterArr)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetFilterName().CompareIgnoreCaseToAscii( aName ) == COMPARE_EQUAL )
return pFilter;
@@ -818,7 +819,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
for ( size_t i = 0, n = pList->size(); i < n; ++i )
{
- const SfxFilter* pFilter = pList->at( i );
+ const SfxFilter* pFilter = (*pList)[i];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) && pFilter->GetFilterName().CompareIgnoreCaseToAscii( aName ) == COMPARE_EQUAL )
return pFilter;
@@ -860,7 +861,7 @@ const SfxFilter* SfxFilterMatcherIter::Find_Impl()
const SfxFilter* pFilter = 0;
while( nCurrent < m_rMatch.pList->size() )
{
- pFilter = m_rMatch.pList->at( nCurrent++ );
+ pFilter = (*m_rMatch.pList)[nCurrent++];
SfxFilterFlags nFlags = pFilter->GetFilterFlags();
if( ((nFlags & nOrMask) == nOrMask ) && !(nFlags & nAndMask ) )
break;
@@ -919,7 +920,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
{
::rtl::OUString sFilterName( rName );
SfxFilterList_Impl& rList = *pFilterArr;
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > lFilterProperties ;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > lFilterProperties;
::com::sun::star::uno::Any aResult;
try
{
diff --git a/unusedcode.easy b/unusedcode.easy
index d65aecc..fd01545 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -59,7 +59,6 @@ sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
sd::ViewShellBase::CreateInstance(SfxViewFrame*, SfxViewShell*)
-std::__cxx1998::vector<SfxFilter*, std::allocator<SfxFilter*> >::~vector()
std::__cxx1998::vector<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~vector()
test::BootstrapFixtureBase::getPathFromWorkdir(char const*)
test::BootstrapFixtureBase::getURLFromWorkdir(char const*)
commit a705b8fe9d4f57fb51e2e4bf474dfde4bf58337e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 12 09:37:21 2012 +0000
callcatcher: update unused code list
Change-Id: Iff29c1f0a795d920a071eadc64e6639ff7506fff
diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx
index bd5c445..404554b 100644
--- a/sc/source/filter/inc/formulabase.hxx
+++ b/sc/source/filter/inc/formulabase.hxx
@@ -673,20 +673,6 @@ public:
const BinRange& rRange,
bool bAbsolute );
- /** Generates a cell range list string in A1:A1 notation from the passed
- cell range addresses. May enclose multiple ranges into parentheses.
-
- @param rRanges The list of cell range addresses.
- @param bAbsolute True = adds dollar signs before columns and rows.
- @param cSeparator Separator character between ranges.
- @param bEncloseMultiple True = enclose multiple ranges in parentheses.
- */
- static ::rtl::OUString generateRangeList2dString(
- const ApiCellRangeList& rRanges,
- bool bAbsolute,
- sal_Unicode cSeparator,
- bool bEncloseMultiple );
-
// ------------------------------------------------------------------------
/** Generates a string in Calc formula notation from the passed string.
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index 3a9b742..3aca87f 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1446,21 +1446,6 @@ OUString FormulaProcessorBase::generateRange2dString( const BinRange& rRange, bo
return aBuffer.makeStringAndClear();
}
-OUString FormulaProcessorBase::generateRangeList2dString( const ApiCellRangeList& rRanges,
- bool bAbsolute, sal_Unicode cSeparator, bool bEncloseMultiple )
-{
- OUStringBuffer aBuffer;
- for( ApiCellRangeList::const_iterator aIt = rRanges.begin(), aEnd = rRanges.end(); aIt != aEnd; ++aIt )
- {
- if( aBuffer.getLength() > 0 )
- aBuffer.append( cSeparator );
- aBuffer.append( generateRange2dString( *aIt, bAbsolute ) );
- }
- if( bEncloseMultiple && (rRanges.size() > 1) )
- aBuffer.insert( 0, sal_Unicode( '(' ) ).append( sal_Unicode( ')' ) );
- return aBuffer.makeStringAndClear();
-}
-
// ----------------------------------------------------------------------------
OUString FormulaProcessorBase::generateApiString( const OUString& rString )
diff --git a/unusedcode.easy b/unusedcode.easy
index 43b8a20..d65aecc 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1,5 +1,8 @@
+CompressGraphicsDialog::CompressGraphicsDialog(Window*, Graphic const&, Size&, Rectangle&, SfxBindings&)
+CompressGraphicsDialog::GetCompressedGraphic()
FontSelectPattern::FontSelectPattern(PhysicalFontFace const&, Size const&, float, int, bool)
Line::Intersection(Rectangle const&, Line&) const
+PoHeader::PoHeader()
SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char)
ScFiltersTest::testColorScaleODS()
ScFiltersTest::testColorScaleXLSX()
@@ -12,8 +15,8 @@ String::String(unsigned short)
SvListView::HasEntryFocus(SvTreeListEntry*) const
SvTreeList::GetChildIterators(SvTreeListEntry const*) const
SvViewDataEntry::SetCursored(bool)
-SvtGraphicStroke::toString() const
TextEngine::GetLeftMargin() const
+ThumbnailView::CalcWindowSizePixel(unsigned short, unsigned short, unsigned short, unsigned short, unsigned short)
ThumbnailViewItemAcc::FireAccessibleEvent(short, com::sun::star::uno::Any const&, com::sun::star::uno::Any const&)
TransitionScene::clear()
UnoControl::UnoControl()
@@ -51,7 +54,6 @@ framework::OReadMenuDocumentHandler::getServiceFactory()
jfw_plugin::VendorBase::createInstance()
oox::drawingml::TextListStyle::dump() const
oox::xls::BiffDrawingObjectBase::BiffDrawingObjectBase(oox::xls::WorksheetHelper const&)
-oox::xls::FormulaProcessorBase::generateRangeList2dString(oox::xls::ApiCellRangeList const&, bool, unsigned short, bool)
sc_apitest::main()
sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
diff --git a/vcl/inc/vcl/graphictools.hxx b/vcl/inc/vcl/graphictools.hxx
index 5199bb9..c8713fd 100644
--- a/vcl/inc/vcl/graphictools.hxx
+++ b/vcl/inc/vcl/graphictools.hxx
@@ -138,8 +138,6 @@ public:
double getMiterLimit () const;
/// Get an array of "on" and "off" lengths for stroke dashing
void getDashArray ( DashArray& ) const;
- /// Query a textual representation of the object's content
- ::rtl::OString toString () const;
// mutators
/// Set path to stroke
diff --git a/vcl/inc/vcl/menubtn.hxx b/vcl/inc/vcl/menubtn.hxx
index 4eae53f..46ead53 100644
--- a/vcl/inc/vcl/menubtn.hxx
+++ b/vcl/inc/vcl/menubtn.hxx
@@ -50,7 +50,6 @@ private:
PopupMenu* mpMenu;
sal_uInt16 mnCurItemId;
sal_uInt16 mnMenuMode;
- bool mbDisplaySelectedItem;
Link maActivateHdl;
Link maSelectHdl;
@@ -58,14 +57,10 @@ private:
SAL_DLLPRIVATE void ImplExecuteMenu();
DECL_DLLPRIVATE_LINK( ImplMenuTimeoutHdl, void* );
- SAL_DLLPRIVATE void updateText();
-
// Copy assignment is forbidden and not implemented.
SAL_DLLPRIVATE MenuButton( const MenuButton & );
SAL_DLLPRIVATE MenuButton& operator=( const MenuButton & );
- DECL_LINK(MenuEventListener, VclSimpleEvent*);
-
protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
@@ -83,7 +78,7 @@ public:
virtual void Select();
void SetMenuMode( sal_uInt16 nMode );
- sal_uInt16 GetMenuMode() const { return mnMenuMode; }
+ sal_uInt16 GetMenuMode() const { return mnMenuMode; }
void SetPopupMenu( PopupMenu* pNewMenu );
PopupMenu* GetPopupMenu() const { return mpMenu; }
@@ -95,10 +90,6 @@ public:
const Link& GetActivateHdl() const { return maActivateHdl; }
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
const Link& GetSelectHdl() const { return maSelectHdl; }
-
- void SetShowDisplaySelectedItem(bool bShow);
-
- virtual Size GetOptimalSize(WindowSizeType eType) const;
};
#endif // _SV_MENUBTN_HXX
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 12685b1..f8fb86f 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -77,7 +77,6 @@ void MenuButton::ImplExecuteMenu()
MenuButton::MenuButton( Window* pParent, WinBits nWinBits )
: PushButton( WINDOW_MENUBUTTON )
- , mbDisplaySelectedItem(false)
{
ImplInitMenuButtonData();
ImplInit( pParent, nWinBits );
@@ -87,7 +86,6 @@ MenuButton::MenuButton( Window* pParent, WinBits nWinBits )
MenuButton::MenuButton( Window* pParent, const ResId& rResId )
: PushButton( WINDOW_MENUBUTTON )
- , mbDisplaySelectedItem(false)
{
ImplInitMenuButtonData();
rResId.SetRT( RSC_MENUBUTTON );
@@ -120,8 +118,6 @@ void MenuButton::ImplLoadRes( const ResId& rResId )
MenuButton::~MenuButton()
{
delete mpMenuTimer;
- if (mbDisplaySelectedItem && mpMenu)
- mpMenu->RemoveEventListener(LINK(this, MenuButton, MenuEventListener));
delete mpOwnMenu;
}
@@ -203,33 +199,9 @@ void MenuButton::Activate()
void MenuButton::Select()
{
- updateText();
maSelectHdl.Call( this );
}
-void MenuButton::updateText()
-{
- if (mbDisplaySelectedItem)
- {
- if (mpMenu)
- SetText(mpMenu->GetItemText(mpMenu->GetCurItemId()));
- else
- SetText(OUString());
- }
-}
-
-Size MenuButton::GetOptimalSize(WindowSizeType eType) const
-{
- Size aRet = PushButton::GetOptimalSize(eType);
- if (mbDisplaySelectedItem && mpMenu)
- {
- Size aMenuSize(mpMenu->ImplCalcSize(const_cast<MenuButton*>(this)));
- if (aMenuSize.Width() > aRet.Width())
- aRet.Width() = aMenuSize.Width();
- }
- return aRet;
-}
-
// -----------------------------------------------------------------------
void MenuButton::SetMenuMode( sal_uInt16 nMode )
@@ -239,52 +211,13 @@ void MenuButton::SetMenuMode( sal_uInt16 nMode )
mnMenuMode = nMode;
}
-void MenuButton::SetShowDisplaySelectedItem(bool bShow)
-{
- if (mbDisplaySelectedItem == bShow)
- return;
- if (mbDisplaySelectedItem && mpMenu)
- mpMenu->RemoveEventListener(LINK(this, MenuButton, MenuEventListener));
- mbDisplaySelectedItem = bShow;
- if (mbDisplaySelectedItem && mpMenu)
- mpMenu->AddEventListener(LINK(this, MenuButton, MenuEventListener));
-}
-
void MenuButton::SetPopupMenu( PopupMenu* pNewMenu )
{
if (pNewMenu == mpMenu)
return;
- if (mbDisplaySelectedItem && mpMenu)
- mpMenu->RemoveEventListener(LINK(this, MenuButton, MenuEventListener));
// Fuer die 5.1-Auslieferung besser noch nicht inline, ansonsten kann
// diese Funktion zur 6.0 inline werden
mpMenu = pNewMenu;
- updateText();
- if (mbDisplaySelectedItem && mpMenu)
- mpMenu->AddEventListener(LINK(this, MenuButton, MenuEventListener));
-}
-
-IMPL_LINK(MenuButton, MenuEventListener, VclSimpleEvent*, pEvent)
-{
- if (pEvent && pEvent->ISA(VclMenuEvent))
- {
- VclMenuEvent* pMenuEvent = (VclMenuEvent*)pEvent;
- if (pMenuEvent->GetMenu() == mpMenu)
- {
- switch (pMenuEvent->GetId())
- {
- case VCLEVENT_MENU_INSERTITEM:
- case VCLEVENT_MENU_REMOVEITEM:
- case VCLEVENT_MENU_ITEMTEXTCHANGED:
- queue_resize();
- break;
- case VCLEVENT_MENU_SELECT:
- updateText();
- break;
- }
- }
- }
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 4e35c44..4961389 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -21,72 +21,6 @@
#include <vcl/graphictools.hxx>
-static ::rtl::OString polyToString( const Polygon& rPoly )
-{
- ::rtl::OString aStr;
- sal_uInt16 nVertex;
- for(nVertex=0; nVertex<rPoly.GetSize(); ++nVertex)
- {
- aStr += "(";
- switch( rPoly.GetFlags(nVertex) )
- {
- case POLY_NORMAL:
- case POLY_SMOOTH:
- case POLY_SYMMTR:
- aStr += "n: ";
- break;
-
- case POLY_CONTROL:
- aStr += "c: ";
- break;
-
- default:
- OSL_FAIL( "SvtGraphicStroke::polyToString invalid flag");
- break;
- }
- aStr += ::rtl::OString::valueOf( static_cast< double >( rPoly[nVertex].getX() ) );
- aStr += ",";
- aStr += ::rtl::OString::valueOf( static_cast< double >( rPoly[nVertex].getY() ) );
- aStr += ") ";
- }
-
- return aStr;
-}
-
-static ::rtl::OString polyPolyToString( const PolyPolygon& rPolyPoly )
-{
- ::rtl::OString aStr;
- sal_uInt16 nPoly;
- for(nPoly=0; nPoly<rPolyPoly.Count(); ++nPoly)
- {
- const Polygon& rPoly = rPolyPoly[nPoly];
-
- aStr += "{ ";
- aStr += polyToString( rPoly );
- aStr += "} ";
- }
-
- return aStr;
-}
-
-static ::rtl::OString dashToString( const SvtGraphicStroke::DashArray& rDashArray )
-{
- ::rtl::OString aStr;
-
- aStr += "dash: [ ";
-
- int i, nDashes( rDashArray.size() );
- for(i=0; i<nDashes; ++i)
- {
- aStr += ::rtl::OString::valueOf( rDashArray[i] );
- aStr += " ";
- }
-
- aStr += "] ";
-
- return aStr;
-}
-
////////////////////////////////////////////////////////////////////////////
SvtGraphicFill::Transform::Transform()
@@ -176,78 +110,6 @@ void SvtGraphicStroke::getDashArray( DashArray& rDashArray ) const
rDashArray = maDashArray;
}
-::rtl::OString SvtGraphicStroke::toString() const
-{
- ::rtl::OString aStr;
-
- aStr += polyToString( maPath );
- aStr += "trans: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
- aStr += " width: ";
- aStr += ::rtl::OString::valueOf( static_cast< double >(getStrokeWidth()) );
- aStr += " cap: ";
- switch( getCapType() )
- {
- case capButt:
- aStr += "butt";
- break;
-
- case capRound:
- aStr += "round";
- break;
-
- case capSquare:
- aStr += "square";
- break;
-
- default:
- OSL_FAIL( "SvtGraphicStroke::toString missing cap type");
- break;
- }
- aStr += " join: ";
- switch( getJoinType() )
- {
- case joinMiter:
- aStr += "miter";
- break;
-
- case joinRound:
- aStr += "round";
- break;
-
- case joinBevel:
- aStr += "bevel";
- break;
-
- case joinNone:
- aStr += "none";
- break;
-
- default:
- OSL_FAIL( "SvtGraphicStroke::toString missing join type");
- break;
- }
- aStr += " ";
-
- if( maStartArrow.Count() )
- {
- aStr += "start: ";
- aStr += polyPolyToString( maStartArrow );
- aStr += " ";
- }
-
- if( maEndArrow.Count() )
- {
- aStr += "end: ";
- aStr += polyPolyToString( maEndArrow );
- aStr += " ";
- }
-
- aStr += dashToString( maDashArray );
-
- return aStr;
-}
-
void SvtGraphicStroke::setPath( const Polygon& rPoly )
{
maPath = rPoly;
commit 6f6056b62e2107b325624832d851b09711a11dd8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 12 01:56:23 2012 +0000
Related: fdo#55570 presumably we can attempt the insert...
and rely that it won't replace the original on pre-existing key and use the
usual .second == true flag rather than lookup and then insert on
non-pre-existing key
Change-Id: Idba65bfb2efaa5812b965a8811ff425f0b0939d8
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 4bba278..0d8ff52 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2672,10 +2672,7 @@ bool SvxAutocorrWordList::Insert(SvxAutocorrWord *pWord)
if ( maSet.empty() ) // use the hash
{
rtl::OUString aShort( pWord->GetShort() );
- bool bThere = maHash.find( aShort ) != maHash.end();
- if (!bThere)
- maHash.insert( std::pair<rtl::OUString, SvxAutocorrWord *>( aShort, pWord ) );
- return !bThere;
+ return maHash.insert( std::pair<rtl::OUString, SvxAutocorrWord *>( aShort, pWord ) ).second;
}
else
return maSet.insert( pWord ).second;
More information about the Libreoffice-commits
mailing list