[Libreoffice-commits] .: 16 commits - extensions/source framework/source sc/inc sc/source sd/inc sd/source sot/inc sot/source svtools/source svx/inc sw/source vcl/inc vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jun 5 02:16:02 PDT 2012
extensions/source/dbpilots/commonpagesdbp.cxx | 5
framework/source/uielement/menubarmanager.cxx | 2
framework/source/uielement/toolbarmanager.cxx | 6 -
sc/inc/colorscale.hxx | 3
sc/inc/conditio.hxx | 7 -
sc/inc/dbdata.hxx | 1
sc/inc/dociter.hxx | 1
sc/inc/document.hxx | 1
sc/inc/table.hxx | 1
sc/source/core/data/colorscale.cxx | 8 -
sc/source/core/data/conditio.cxx | 11 --
sc/source/core/data/dociter.cxx | 5
sc/source/core/data/documen4.cxx | 6 -
sc/source/core/data/table1.cxx | 5
sc/source/core/tool/dbdata.cxx | 19 ---
sc/source/filter/inc/sheetdatabuffer.hxx | 11 --
sc/source/filter/oox/sheetdatabuffer.cxx | 20 ---
sd/inc/sdattr.hxx | 4
sd/source/ui/app/menuids_tmpl.src | 1
sd/source/ui/app/strings.src | 30 +++++
sd/source/ui/inc/strings.hrc | 12 +-
sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 1
sd/source/ui/slidesorter/inc/view/SlsResource.hrc | 8 -
sd/source/ui/slidesorter/view/SlsButtonBar.cxx | 9 -
sd/source/ui/slidesorter/view/SlsResource.src | 31 -----
sd/source/ui/toolpanel/TestPanel.cxx | 21 +--
sot/inc/sot/storage.hxx | 4
sot/source/sdstor/storage.cxx | 17 ---
svtools/source/control/toolbarmenu.cxx | 16 +-
svx/inc/svx/svddrgv.hxx | 2
sw/source/ui/docvw/FrameControlsManager.cxx | 5
sw/source/ui/inc/FrameControlsManager.hxx | 1
sw/source/ui/lingu/olmenu.cxx | 68 ++++++++----
vcl/inc/vcl/menu.hxx | 12 --
vcl/source/window/menu.cxx | 104 +++++++------------
35 files changed, 161 insertions(+), 297 deletions(-)
New commits:
commit 1205e9e393ca12740cd6af1a51e05ea8d223c30f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 5 10:14:16 2012 +0100
drop some unused code
Change-Id: I952fa56cb8cef0321688ccd117659c8603f71e16
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 562f981..d8b294c 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -238,8 +238,7 @@ private:
typedef boost::ptr_vector<ScColorFormat> ColorFormatContainer;
ColorFormatContainer maColorScaleFormats;
public:
- ScColorFormatList() {};
- ScColorFormatList(ScDocument* pDoc, const ScColorFormatList& rList);
+ ScColorFormatList() {}
ScColorFormatList(const ScColorFormatList& rList);
typedef ColorFormatContainer::iterator iterator;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index f0acc90..6a62a2b 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -269,10 +269,9 @@ private:
boost::ptr_set<ScConditionalFormat> maConditionalFormats;
typedef boost::ptr_set<ScConditionalFormat> ConditionalFormatContainer;
public:
- ScConditionalFormatList() {}
- ScConditionalFormatList(const ScConditionalFormatList& rList);
- ScConditionalFormatList(ScDocument* pNewDoc, const ScConditionalFormatList& rList);
- ~ScConditionalFormatList() {}
+ ScConditionalFormatList() {}
+ ScConditionalFormatList(const ScConditionalFormatList& rList);
+ ~ScConditionalFormatList() {}
void InsertNew( ScConditionalFormat* pNew )
{ maConditionalFormats.insert(pNew); }
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 538ea9e..6534ac6 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -96,7 +96,6 @@ public:
bool operator== (const ScDBData& rData) const;
- SCTAB GetTable() const;
const ::rtl::OUString& GetName() const { return aName; }
const ::rtl::OUString& GetUpperName() const { return aUpper; }
void GetArea(SCTAB& rTab, SCCOL& rCol1, SCROW& rRow1, SCCOL& rCol2, SCROW& rRow2) const;
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 79495e1..fe7aa54 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -573,7 +573,6 @@ public:
SCTAB mnTab;
::boost::shared_ptr<ScFlatBoolRowSegments> mpRanges;
- TabRanges();
TabRanges(SCTAB nTab);
};
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 20b47ab..5508c32 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1207,7 +1207,6 @@ public:
SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uLong nIndex ) const;
SC_DLLPUBLIC ScConditionalFormatList* GetCondFormList( SCTAB nTab ) const;
- void SetCondFormList(ScConditionalFormatList* pNew, SCTAB nTab);
SC_DLLPUBLIC const ScColorFormatList* GetColorScaleList(SCTAB nTab) const;
SC_DLLPUBLIC ScColorFormatList* GetColorScaleList(SCTAB nTab);
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 397da57..c417562 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -801,7 +801,6 @@ public:
ScConditionalFormatList* GetCondFormList();
const ScConditionalFormatList* GetCondFormList() const;
- void SetCondFormList(ScConditionalFormatList* pNew);
sal_uLong AddCondFormat( const ScConditionalFormat& rNew );
sal_uLong AddColorFormat( ScColorFormat* pNew );
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 62b16e2..f28cca8 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -870,14 +870,6 @@ ScDataBarInfo* ScDataBarFormat::GetDataBarInfo(const ScAddress& rAddr) const
//-----------------------------------------------------------------
-ScColorFormatList::ScColorFormatList(ScDocument* pDoc, const ScColorFormatList& rList)
-{
- for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
- {
- maColorScaleFormats.push_back(itr->Clone(pDoc));
- }
-}
-
void ScColorFormatList::AddFormat( ScColorFormat* pFormat )
{
maColorScaleFormats.push_back( pFormat );
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index bbf3beb..fc9e13b 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1621,17 +1621,6 @@ ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList&
//! sortierte Eintraege aus rList schneller einfuegen ???
}
-ScConditionalFormatList::ScConditionalFormatList(ScDocument* pNewDoc,
- const ScConditionalFormatList& rList)
-{
- // fuer neues Dokument - echte Kopie mit neuen Tokens!
-
- for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
- InsertNew( itr->Clone(pNewDoc) );
-
- //! sortierte Eintraege aus rList schneller einfuegen ???
-}
-
bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
{
// fuer Ref-Undo - interne Variablen werden nicht verglichen
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 009f907..92c7cbd 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2205,11 +2205,6 @@ const ScPatternAttr* ScDocAttrIterator::GetNext( SCCOL& rCol, SCROW& rRow1, SCRO
// ============================================================================
-ScDocRowHeightUpdater::TabRanges::TabRanges() :
- mnTab(0), mpRanges(new ScFlatBoolRowSegments)
-{
-}
-
ScDocRowHeightUpdater::TabRanges::TabRanges(SCTAB nTab) :
mnTab(nTab), mpRanges(new ScFlatBoolRowSegments)
{
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index c18b993..fc74ff6 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -778,12 +778,6 @@ void ScDocument::ConditionalChanged( sal_uLong nKey, SCTAB nTab )
}
}
-void ScDocument::SetCondFormList(ScConditionalFormatList* pNew, SCTAB nTab)
-{
- if(VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
- maTabs[nTab]->SetCondFormList(pNew);
-}
-
//------------------------------------------------------------------------
bool ScDocument::HasDetectiveOperations() const
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 14eaa87..c349eb4 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2036,11 +2036,6 @@ const ScColorFormatList* ScTable::GetColorFormatList() const
return mpColorFormatList.get();
}
-void ScTable::SetCondFormList( ScConditionalFormatList* pNew )
-{
- mpCondFormatList.reset( pNew );
-}
-
ScConditionalFormatList* ScTable::GetCondFormList()
{
if(!mpCondFormatList)
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 32b15c7..bb5475c 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -168,11 +168,6 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
return *this;
}
-SCTAB ScDBData::GetTable() const
-{
- return nTable;
-}
-
bool ScDBData::operator== (const ScDBData& rData) const
{
// Daten, die nicht in den Params sind
@@ -668,20 +663,6 @@ public:
}
};
-class FindFilterDBByTable : public unary_function<ScDBData, bool>
-{
- SCTAB mnTab;
-public:
- FindFilterDBByTable(SCTAB nTab) : mnTab(nTab) {}
- bool operator() (const ScDBData& r) const
- {
- if (r.GetTable() != mnTab)
- return false;
-
- return (r.HasAutoFilter() || r.HasQueryParam());
- }
-};
-
}
ScDBCollection::NamedDBs::NamedDBs(ScDBCollection& rParent, ScDocument& rDoc) :
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx
index c8dc451..fdbfa12 100644
--- a/sc/source/filter/inc/sheetdatabuffer.hxx
+++ b/sc/source/filter/inc/sheetdatabuffer.hxx
@@ -96,17 +96,6 @@ class CellBlock : public WorksheetHelper
public:
explicit CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow );
- /** Returns true, if the own colspan contains the passed column. */
- bool contains( sal_Int32 nCol ) const;
-
- /** Returns the specified cell from the last row in the cell buffer array. */
- ::com::sun::star::uno::Any& getCellAny( sal_Int32 nCol );
- /** Inserts a rich-string into the cell block. */
- void insertRichString(
- const ::com::sun::star::table::CellAddress& rAddress,
- const RichStringRef& rxString,
- const Font* pFirstPortionFont );
-
/** Writes all buffered cells into the Calc sheet. */
void finalizeImport();
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 2a04f8a..3f0aea4 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -137,26 +137,6 @@ CellBlock::CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan
mpCurrCellRow = maCellArray[ 0 ].getArray();
}
-bool CellBlock::contains( sal_Int32 nCol ) const
-{
- return (maRange.StartColumn <= nCol) && (nCol <= maRange.EndColumn);
-}
-
-void CellBlock::insertRichString( const CellAddress& rAddress, const RichStringRef& rxString, const Font* pFirstPortionFont )
-{
- maRichStrings.push_back( RichStringCell( rAddress, rxString, pFirstPortionFont ) );
-}
-
-Any& CellBlock::getCellAny( sal_Int32 nCol )
-{
- OSL_ENSURE( contains( nCol ), "CellBlock::getCellAny - invalid column" );
- // fill cells before passed column with empty strings (the placeholder for empty cells)
- sal_Int32 nIndex = nCol - maRange.StartColumn;
- fillUnusedCells( nIndex );
- mnFirstFreeIndex = nIndex + 1;
- return mpCurrCellRow[ nIndex ];
-}
-
void CellBlock::finalizeImport()
{
// fill last cells in last row with empty strings (placeholder for empty cells)
diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx
index 58c77d7..8b91f73 100644
--- a/sw/source/ui/docvw/FrameControlsManager.cxx
+++ b/sw/source/ui/docvw/FrameControlsManager.cxx
@@ -72,11 +72,6 @@ SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, co
return SwFrameControlPtr();
}
-void SwFrameControlsManager::AddControl( FrameControlType eType, SwFrameControlPtr pControl )
-{
- m_aControls[eType].insert(make_pair(pControl->GetFrame(), pControl));
-}
-
void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm )
{
map< FrameControlType, SwFrameControlPtrMap >::iterator pIt = m_aControls.begin();
diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx
index b2fd54d..8e96cba 100644
--- a/sw/source/ui/inc/FrameControlsManager.hxx
+++ b/sw/source/ui/inc/FrameControlsManager.hxx
@@ -60,7 +60,6 @@ class SwFrameControlsManager
const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy );
SwFrameControlPtr GetControl( FrameControlType eType, const SwFrm* pFrm );
- void AddControl( FrameControlType eType, SwFrameControlPtr pControl );
void RemoveControls( const SwFrm* pFrm );
void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm );
void HideControls( FrameControlType eType );
commit fd0ede6f5d60e69a6002bcab05ef3edb227af96a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 23:58:03 2012 +0100
XubString->rtl::OUStringBuffer
Change-Id: I8304092154b74727a67e197a673949e18d6a1ab4
diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx
index 45932d6..3bbea1b 100644
--- a/sd/source/ui/toolpanel/TestPanel.cxx
+++ b/sd/source/ui/toolpanel/TestPanel.cxx
@@ -118,24 +118,22 @@ TestPanel::TestPanel (::Window& i_rParent)
ListBox* pBox = new ListBox (pScrollPanel->GetWindow());
for (sal_Int32 i=1; i<=20; i++)
{
- XubString aString (XubString::CreateFromAscii("Text "));
- aString.Append (XubString::CreateFromInt32(i));
- aString.Append (XubString::CreateFromAscii("/20"));
- pBox->InsertEntry (aString);
+ rtl::OUStringBuffer aString ("Text ");
+ aString.append(i).append("/20");
+ pBox->InsertEntry(aString.makeStringAndClear());
}
pScrollPanel->AddControl (
::std::auto_ptr<TreeNode>(new Wrapper (
pScrollPanel, Size (200,300), pBox, true)),
- String::CreateFromAscii ("First ListBox"),
+ rtl::OUString("First ListBox"),
"");
pBox = new ListBox (pScrollPanel->GetWindow());
for (sal_Int32 i=1; i<=20; i++)
{
- XubString aString (XubString::CreateFromAscii("More Text "));
- aString.Append (XubString::CreateFromInt32(i));
- aString.Append (XubString::CreateFromAscii("/20"));
- pBox->InsertEntry (aString);
+ rtl::OUStringBuffer aString("More Text ");
+ aString.append(i).append("/20");
+ pBox->InsertEntry(aString.makeStringAndClear());
}
pScrollPanel->AddControl (
::std::auto_ptr<TreeNode>(new Wrapper (
commit 0382959a1738d531a39978ea6702ea7015779c82
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 23:54:12 2012 +0100
ditch some XubStrings
Change-Id: I5f8b8b71b2ea1ce6041796efa70b338608aece17
diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index 3f9b927..f3f2a23 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -61,7 +61,7 @@ public:
class SdAttrLayerTitle : public SfxStringItem
{
public:
- SdAttrLayerTitle() : SfxStringItem( ATTR_LAYER_TITLE, XubString()) {}
+ SdAttrLayerTitle() : SfxStringItem( ATTR_LAYER_TITLE, rtl::OUString()) {}
SdAttrLayerTitle( const String& aStr ) : SfxStringItem( ATTR_LAYER_TITLE, aStr ) {}
};
@@ -70,7 +70,7 @@ public:
class SdAttrLayerDesc : public SfxStringItem
{
public:
- SdAttrLayerDesc() : SfxStringItem( ATTR_LAYER_DESC, XubString()) {}
+ SdAttrLayerDesc() : SfxStringItem( ATTR_LAYER_DESC, rtl::OUString()) {}
SdAttrLayerDesc( const String& aStr ) : SfxStringItem( ATTR_LAYER_DESC, aStr ) {}
};
commit c03d4016e916ccf309eaa8a9e3a0b503b5fc1232
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 23:53:58 2012 +0100
reduce scope of i
Change-Id: I41e1c0ae2aabbf760e5f8b3142190f82fd6698c2
diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx
index f2f8902..45932d6 100644
--- a/sd/source/ui/toolpanel/TestPanel.cxx
+++ b/sd/source/ui/toolpanel/TestPanel.cxx
@@ -116,8 +116,7 @@ TestPanel::TestPanel (::Window& i_rParent)
ScrollPanel* pScrollPanel = new ScrollPanel (this);
ListBox* pBox = new ListBox (pScrollPanel->GetWindow());
- int i;
- for (i=1; i<=20; i++)
+ for (sal_Int32 i=1; i<=20; i++)
{
XubString aString (XubString::CreateFromAscii("Text "));
aString.Append (XubString::CreateFromInt32(i));
@@ -131,7 +130,7 @@ TestPanel::TestPanel (::Window& i_rParent)
"");
pBox = new ListBox (pScrollPanel->GetWindow());
- for (i=1; i<=20; i++)
+ for (sal_Int32 i=1; i<=20; i++)
{
XubString aString (XubString::CreateFromAscii("More Text "));
aString.Append (XubString::CreateFromInt32(i));
commit a0d627639d24056337174dec65a5defba88a41f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 21:22:26 2012 +0100
fix use of local resource string ids in global context
possibly a regression since 227113bbf16f2feda4d3e41bb9aff7dc100ede17
Take the opportunity to give them more useful names while I'm at it
Change-Id: I175b656ac611b78ebaa21b53778085113632095e
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 1bc40bf..75b2339 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1269,3 +1269,33 @@ String STR_INSERT_MOVIE
{
Text [ en-US ] = "Insert Movie";
};
+
+String STRING_DRAG_AND_DROP_PAGES
+{
+ Text [ en-US ] = "Drag and Drop Pages" ;
+};
+
+String STRING_DRAG_AND_DROP_SLIDES
+{
+ Text [ en-US ] = "Drag and Drop Slides" ;
+};
+
+String STRING_START_SLIDESHOW
+{
+ Text [ en-US ] = "Start Slide Show" ;
+};
+
+String STRING_HIDE_SLIDE
+{
+ Text [ en-US ] = "Hide Slide" ;
+};
+
+String STRING_SHOW_SLIDE
+{
+ Text [ en-US ] = "Show Slide" ;
+};
+
+String STRING_DUPLICATE_SLIDE
+{
+ Text [ en-US ] = "Duplicate Slide" ;
+};
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index e199431..a3b36b9 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -500,9 +500,6 @@
#define STR_NAVIGATOR_SHOW_NAMED_SHAPES (RID_APP_START+718)
#define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719)
#define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720)
-//IAccessibility2 Implementation 2009-----
-#define STR_ACC_DIALOG_DESC (RID_APP_START + 730)
-//-----IAccessibility2 Implementation 2009
#define STR_RESET_LAYOUT (RID_APP_START+721)
#define STR_INSERT_TABLE (RID_APP_START+722)
@@ -510,6 +507,15 @@
#define STR_INSERT_PICTURE (RID_APP_START+724)
#define STR_INSERT_MOVIE (RID_APP_START+725)
+#define STRING_DRAG_AND_DROP_PAGES (RID_APP_START+726)
+#define STRING_DRAG_AND_DROP_SLIDES (RID_APP_START+727)
+#define STRING_START_SLIDESHOW (RID_APP_START+728)
+#define STRING_HIDE_SLIDE (RID_APP_START+729)
+#define STRING_SHOW_SLIDE (RID_APP_START+730)
+#define STRING_DUPLICATE_SLIDE (RID_APP_START+731)
+
+#define STR_ACC_DIALOG_DESC (RID_APP_START+732)
+
/******************************************************************************
* The ids in glob.hrc start at RID_APP_START+750!
******************************************************************************/
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 0ff1eb0..a41d5d0 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -35,7 +35,6 @@
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsResource.hrc"
#include "view/SlsTheme.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsInsertionIndicatorHandler.hxx"
diff --git a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
index 2b85a37..be4f732 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
+++ b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
@@ -100,12 +100,4 @@
#define IMAGE_HIDE_SLIDE_OVERLAY 92
#define IMAGE_FOCUS_BORDER 93
-#define STRING_DRAG_AND_DROP_PAGES 101
-#define STRING_DRAG_AND_DROP_SLIDES 102
-
-#define STRING_COMMAND1 110
-#define STRING_COMMAND2_A 111
-#define STRING_COMMAND2_B 112
-#define STRING_COMMAND3 113
-
#endif
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index 42150b5..3ed33d8 100644
--- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -43,6 +43,7 @@
#include "controller/SlsAnimator.hxx"
#include "controller/SlsAnimationFunction.hxx"
#include "app.hrc"
+#include "strings.hrc"
#include "drawdoc.hxx"
#include "sdmod.hxx"
#include "optsitem.hxx"
@@ -1064,7 +1065,7 @@ UnhideButton::UnhideButton (SlideSorter& rSlideSorter)
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMediumHover),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmall),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmallHover),
- String(SdResId(STRING_COMMAND2_B)))
+ String(SdResId(STRING_SHOW_SLIDE)))
{
}
@@ -1096,7 +1097,7 @@ StartShowButton::StartShowButton (SlideSorter& rSlideSorter)
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1MediumHover),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Small),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1SmallHover),
- String(SdResId(STRING_COMMAND1)))
+ String(SdResId(STRING_START_SLIDESHOW)))
{
}
@@ -1162,7 +1163,7 @@ HideButton::HideButton (SlideSorter& rSlideSorter)
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2MediumHover),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Small),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2SmallHover),
- String(SdResId(STRING_COMMAND2_A)))
+ String(SdResId(STRING_HIDE_SLIDE)))
{
}
@@ -1194,7 +1195,7 @@ DuplicateButton::DuplicateButton (SlideSorter& rSlideSorter)
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3MediumHover),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Small),
rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3SmallHover),
- String(SdResId(STRING_COMMAND3)))
+ String(SdResId(STRING_DUPLICATE_SLIDE)))
{
}
diff --git a/sd/source/ui/slidesorter/view/SlsResource.src b/sd/source/ui/slidesorter/view/SlsResource.src
index 13f6cd0..16cb3b9 100644
--- a/sd/source/ui/slidesorter/view/SlsResource.src
+++ b/sd/source/ui/slidesorter/view/SlsResource.src
@@ -280,35 +280,4 @@ Resource RID_SLIDESORTER_ICONS
{
ImageBitmap = Bitmap { File = "slide_sorter_focus_border.png" ; };
};
-
-
- String STRING_DRAG_AND_DROP_PAGES
- {
- Text [ en-US ] = "Drag and Drop Pages" ;
- };
-
- String STRING_DRAG_AND_DROP_SLIDES
- {
- Text [ en-US ] = "Drag and Drop Slides" ;
- };
-
- String STRING_COMMAND1
- {
- Text [ en-US ] = "Start Slide Show" ;
- };
-
- String STRING_COMMAND2_A
- {
- Text [ en-US ] = "Hide Slide" ;
- };
-
- String STRING_COMMAND2_B
- {
- Text [ en-US ] = "Show Slide" ;
- };
-
- String STRING_COMMAND3
- {
- Text [ en-US ] = "Duplicate Slide" ;
- };
};
commit 3271f2d87d8e3caca464964c03115cd3da37a138
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 20:57:23 2012 +0100
This SyncSvStream/SyncSysStream stuff isn't used
and doesn't seem to make a lot of sense
Change-Id: Ie59e39c88070b6620cb7683e69052314d732c54a
diff --git a/sot/inc/sot/storage.hxx b/sot/inc/sot/storage.hxx
index 925ae42..c6cd342 100644
--- a/sot/inc/sot/storage.hxx
+++ b/sot/inc/sot/storage.hxx
@@ -80,10 +80,6 @@ public:
SotStorageStream();
SO2_DECL_BASIC_CLASS_DLL(SotStorageStream,SOTDATA())
- using SvStream::SyncSvStream;
- virtual void SyncSvStream();
- void SyncSysStream() { SvStream::SyncSysStream(); }
-
virtual void ResetError();
virtual void SetSize( sal_uLong nNewSize );
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 5c7241a..ef223fc 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -146,23 +146,6 @@ SotStorageStream::~SotStorageStream()
}
/*************************************************************************
-|* SotStorageStream::SyncSvStream()
-|*
-|* Beschreibung: Der SvStream wird auf den Zustand des Standard-Streams
-|* gesetzt. Der Puffer des SvStreams wird weggeworfen.
-*************************************************************************/
-void SotStorageStream::SyncSvStream()
-{
- if( pOwnStm )
- {
- pOwnStm->Flush();
- sal_uLong nPos = pOwnStm->Tell();
- SetError( pOwnStm->GetError() );
- SvStream::SyncSvStream( nPos );
- }
-}
-
-/*************************************************************************
|* SotStorageStream::ResetError()
|*
|* Beschreibung
commit 5800884b89ace2745b66a6017d41ce5d75cb4ba0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 09:37:50 2012 +0100
Navigator menu entry is checkable
Change-Id: I5e1758e68bda856603132b78af69c7470712b507
diff --git a/sd/source/ui/app/menuids_tmpl.src b/sd/source/ui/app/menuids_tmpl.src
index e46209c..604e952 100644
--- a/sd/source/ui/app/menuids_tmpl.src
+++ b/sd/source/ui/app/menuids_tmpl.src
@@ -869,6 +869,7 @@
Command = ".uno:Navigator" ; \
HelpId = CMD_SID_NAVIGATOR ; \
Text [ en-US ] = "Na~vigator" ; \
+ Checkable = TRUE ; \
};
#define MN_GLUE_INSERT_POINT\
commit bb6d7a913659112e17fbf864d3e3e4895cafda5b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 4 08:51:03 2012 +0100
right click spelling menu not honouring UseImagesInMenus
Change-Id: Ic012ba427febb305269d9138dd918455aa49c712
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 171a797..5e27687 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -390,6 +390,7 @@ SwSpellPopup::SwSpellPopup(
OSL_ENSURE(xSpellAlt.is(), "no spelling alternatives available");
SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
+ bool bUseImagesInMenus = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
nCheckedLanguage = LANGUAGE_NONE;
if (xSpellAlt.is())
@@ -408,11 +409,15 @@ SwSpellPopup::SwSpellPopup(
{
Image aImage;
OUString aSuggestionImageUrl;
- uno::Reference< container::XNamed > xNamed( xSpellAlt, uno::UNO_QUERY );
- if (xNamed.is())
+
+ if (bUseImagesInMenus)
{
- aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName() );
- aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
+ uno::Reference< container::XNamed > xNamed( xSpellAlt, uno::UNO_QUERY );
+ if (xNamed.is())
+ {
+ aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName() );
+ aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
+ }
}
InsertSeparator(0);
@@ -496,15 +501,18 @@ SwSpellPopup::SwSpellPopup(
pMenu->InsertItem( nItemId, xDicTmp->getName() );
aDicNameSingle = xDicTmp->getName();
- uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
- if (xSvcInfo.is())
+ if (bUseImagesInMenus)
{
- OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
- xSvcInfo->getImplementationName() ) );
- if (!aDictionaryImageUrl.isEmpty())
+ uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
+ if (xSvcInfo.is())
{
- Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
- pMenu->SetItemImage( nItemId, aImage );
+ OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
+ xSvcInfo->getImplementationName() ) );
+ if (!aDictionaryImageUrl.isEmpty())
+ {
+ Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
+ pMenu->SetItemImage( nItemId, aImage );
+ }
}
}
@@ -550,10 +558,13 @@ SwSpellPopup::SwSpellPopup(
fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
- uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
- Image rImg = ::GetImage( xFrame,
- OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
- SetItemImage( MN_SPELLING_DLG, rImg );
+ if (bUseImagesInMenus)
+ {
+ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
+ Image rImg = ::GetImage( xFrame,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
+ SetItemImage( MN_SPELLING_DLG, rImg );
+ }
//////////////////////////////////////////////////////////////////////////////////
@@ -576,12 +587,14 @@ bGrammarResults( true ),
aInfo16( SW_RES(IMG_INFO_16) )
{
nCheckedLanguage = SvxLocaleToLanguage( rResult.aLocale );
+ bool bUseImagesInMenus = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus();
sal_uInt16 nPos = 0;
OUString aMessageText( rResult.aErrors[ nErrorInResult ].aShortComment );
InsertSeparator( nPos++ );
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
- SetItemImage( MN_SHORT_COMMENT, aInfo16 );
+ if (bUseImagesInMenus)
+ SetItemImage( MN_SHORT_COMMENT, aInfo16 );
// Add an item to show detailled infos if the FullCommentURL property is defined
beans::PropertyValues aProperties = rResult.aErrors[ nErrorInResult ].aProperties;
@@ -611,11 +624,15 @@ aInfo16( SW_RES(IMG_INFO_16) )
{
Image aImage;
OUString aSuggestionImageUrl;
- uno::Reference< lang::XServiceInfo > xInfo( rResult.xProofreader, uno::UNO_QUERY );
- if (xInfo.is())
+
+ if (bUseImagesInMenus)
{
- aSuggestionImageUrl = SvtLinguConfig().GetSpellAndGrammarContextSuggestionImage( xInfo->getImplementationName() );
- aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
+ uno::Reference< lang::XServiceInfo > xInfo( rResult.xProofreader, uno::UNO_QUERY );
+ if (xInfo.is())
+ {
+ aSuggestionImageUrl = SvtLinguConfig().GetSpellAndGrammarContextSuggestionImage( xInfo->getImplementationName() );
+ aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
+ }
}
sal_uInt16 nItemId = MN_SUGGESTION_START;
@@ -696,10 +713,13 @@ aInfo16( SW_RES(IMG_INFO_16) )
fillLangPopupMenu( pMenu, MN_SET_LANGUAGE_PARAGRAPH_START, aSeq, pWrtSh, aLangTable_Paragraph );
EnableItem( MN_SET_LANGUAGE_PARAGRAPH, true );
- uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
- Image rImg = ::GetImage( xFrame,
- OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
- SetItemImage( MN_SPELLING_DLG, rImg );
+ if (bUseImagesInMenus)
+ {
+ uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
+ Image rImg = ::GetImage( xFrame,
+ OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
+ SetItemImage( MN_SPELLING_DLG, rImg );
+ }
//////////////////////////////////////////////////////////////////////////////////
commit 76f02c23ffff5dd442c78994eda1e6853cfe7e55
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 3 23:32:48 2012 +0100
assume for all menus we reserve space for checkboxes
so menus have consistent whitespace at left regardless of containing
checkboxes/radiobutton entries. Its nasty to have menus "suddenly"
appear without whitespace as submenus of ones with whitespace.
This is a logical consequence of MENU_FLAG_SHOWCHECKIMAGES always
set (in the absence of SetMenuFlags where usage has generally
dropped MENU_FLAG_SHOWCHECKIMAGES accidentally)
Change-Id: I9501381b91415131eff5143a0c88142221530fb6
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index d24da8c..4c64446 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -831,7 +831,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
nFlag &= ~MENU_FLAG_HIDEDISABLEDENTRIES;
else
nFlag |= MENU_FLAG_HIDEDISABLEDENTRIES;
- pMenu->SetMenuFlags( nFlag | MENU_FLAG_SHOWCHECKIMAGES );
+ pMenu->SetMenuFlags( nFlag );
if ( m_bActive )
return 0;
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index f30f07e..63e24f7 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1780,9 +1780,6 @@ PopupMenu * ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar)
if( !(pToolBar->GetFloatStyle() & WB_CLOSEABLE) )
aPopupMenu.EnableItem(MENUITEM_TOOLBAR_CLOSE, sal_False);
- pItemMenu->SetMenuFlags (pItemMenu->GetMenuFlags () |
- MENU_FLAG_SHOWCHECKIMAGES);
-
for ( nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos )
{
if ( m_pToolBar->GetItemType(nPos) == TOOLBOXITEM_BUTTON )
@@ -1827,9 +1824,6 @@ PopupMenu * ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar)
// create an own submenu to avoid auto-delete when resource menu is deleted
PopupMenu *pItemMenu = new PopupMenu();
- pItemMenu->SetMenuFlags (pItemMenu->GetMenuFlags () |
- MENU_FLAG_SHOWCHECKIMAGES);
-
for( i=0; i< aPopupMenu.GetPopupMenu( 1 )->GetItemCount(); i++)
pItemMenu->CopyItem( *aPopupMenu.GetPopupMenu( 1 ), i, MENU_APPEND );
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 84b8af0..888b225 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1473,16 +1473,12 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
// Image:
if( pEntry->mbHasImage && bUseImages )
{
- // Don't render an image for a check thing
- /* if((nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) || !pEntry->HasCheck() )*/
- {
- if( pEntry->mbChecked )
- ImplPaintCheckBackground( this, aOuterCheckRect, pThisOnly && bHighlighted );
- aTmpPos = aOuterCheckRect.TopLeft();
- aTmpPos.X() += (aOuterCheckRect.GetWidth()-pEntry->maImage.GetSizePixel().Width())/2;
- aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pEntry->maImage.GetSizePixel().Height())/2;
- DrawImage( aTmpPos, pEntry->maImage, nImageStyle );
- }
+ if( pEntry->mbChecked )
+ ImplPaintCheckBackground( this, aOuterCheckRect, pThisOnly && bHighlighted );
+ aTmpPos = aOuterCheckRect.TopLeft();
+ aTmpPos.X() += (aOuterCheckRect.GetWidth()-pEntry->maImage.GetSizePixel().Width())/2;
+ aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pEntry->maImage.GetSizePixel().Height())/2;
+ DrawImage( aTmpPos, pEntry->maImage, nImageStyle );
}
// Text:
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 60bd029..c9388ee 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -101,9 +101,6 @@ typedef sal_uInt16 MenuItemBits;
// overrides default hiding of disabled entries in popup menus
#define MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES 0x0004
-// forces images & toggle visibility for toolbar config popup
-#define MENU_FLAG_SHOWCHECKIMAGES 0x0008
-
struct ImplMenuDelData
{
ImplMenuDelData* mpNext;
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 2779b37..7c1751c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -959,7 +959,7 @@ void Menu::ImplInit()
{
mnHighlightedItemPos = ITEMPOS_INVALID;
mpSalMenu = NULL;
- nMenuFlags = MENU_FLAG_SHOWCHECKIMAGES;
+ nMenuFlags = 0;
nDefaultItem = 0;
//bIsMenuBar = sal_False; // this is now set in the ctor, must not be changed here!!!
nSelectedId = 0;
@@ -2360,10 +2360,6 @@ Size Menu::ImplCalcSize( Window* pWin )
if( aMaxSize.Height() > nMinMenuItemHeight )
nMinMenuItemHeight = aMaxSize.Height();
- // When no native rendering of the checkbox & no image in the menu, we
- // have to add some extra space even in the MENU_FLAG_SHOWCHECKIMAGES case
- bool bSpaceForCheckbox = ( aMaxSize.Height() == 0 );
-
Size aMaxImgSz;
const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings();
@@ -2379,9 +2375,6 @@ Size Menu::ImplCalcSize( Window* pWin )
)
)
{
- // we have an icon, don't add the extra space
- bSpaceForCheckbox = false;
-
Size aImgSz = pData->aImage.GetSizePixel();
if ( aImgSz.Height() > aMaxImgSz.Height() )
aMaxImgSz.Height() = aImgSz.Height();
@@ -2432,12 +2425,9 @@ Size Menu::ImplCalcSize( Window* pWin )
if ( !bIsMenuBar && pData->HasCheck() )
{
nCheckWidth = aMaxSize.Width();
- if ( ( nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES ) || bSpaceForCheckbox )
- {
- // checks / images take the same place
- if( ! ( ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ) ) )
- nWidth += nCheckWidth + nExtra * 2;
- }
+ // checks / images take the same place
+ if( ! ( ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ) ) )
+ nWidth += nCheckWidth + nExtra * 2;
}
// Text:
@@ -2503,20 +2493,13 @@ Size Menu::ImplCalcSize( Window* pWin )
sal_uInt16 gfxExtra = (sal_uInt16) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
nImgOrChkPos = (sal_uInt16)nExtra;
- if ( ( nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES ) || bSpaceForCheckbox )
- {
- long nImgOrChkWidth = 0;
- if( aMaxSize.Height() > 0 ) // NWF case
- nImgOrChkWidth = aMaxSize.Height() + nExtra;
- else // non NWF case
- nImgOrChkWidth = nFontHeight/2 + gfxExtra;
- nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
- nTextPos = (sal_uInt16)(nImgOrChkPos + nImgOrChkWidth);
- }
- else
- {
- nTextPos = (sal_uInt16)(nImgOrChkPos + Max( aMaxImgSz.Width(), nCheckWidth ));
- }
+ long nImgOrChkWidth = 0;
+ if( aMaxSize.Height() > 0 ) // NWF case
+ nImgOrChkWidth = aMaxSize.Height() + nExtra;
+ else // non NWF case
+ nImgOrChkWidth = nFontHeight/2 + gfxExtra;
+ nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
+ nTextPos = (sal_uInt16)(nImgOrChkPos + nImgOrChkWidth);
nTextPos = nTextPos + gfxExtra;
aSz.Width() = nTextPos + nMaxWidth + nExtra;
@@ -2811,15 +2794,12 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
if ( !bLayout && !bIsMenuBar && ( ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ) ) )
{
// Don't render an image for a check thing
- if ((nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) || !pData->HasCheck() )
- {
- if( pData->bChecked )
- ImplPaintCheckBackground( pWin, aOuterCheckRect, pThisItemOnly && bHighlighted );
- aTmpPos = aOuterCheckRect.TopLeft();
- aTmpPos.X() += (aOuterCheckRect.GetWidth()-pData->aImage.GetSizePixel().Width())/2;
- aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pData->aImage.GetSizePixel().Height())/2;
- pWin->DrawImage( aTmpPos, pData->aImage, nImageStyle );
- }
+ if( pData->bChecked )
+ ImplPaintCheckBackground( pWin, aOuterCheckRect, pThisItemOnly && bHighlighted );
+ aTmpPos = aOuterCheckRect.TopLeft();
+ aTmpPos.X() += (aOuterCheckRect.GetWidth()-pData->aImage.GetSizePixel().Width())/2;
+ aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pData->aImage.GetSizePixel().Height())/2;
+ pWin->DrawImage( aTmpPos, pData->aImage, nImageStyle );
}
// Text:
commit e7e6d0f72b5388db3d0db17befb6fc0a00fa13c4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 3 23:15:08 2012 +0100
drop a XubString
Change-Id: Ibf53fc9f2ae47101c5631147f383f5452a7bfe62
diff --git a/svx/inc/svx/svddrgv.hxx b/svx/inc/svx/svddrgv.hxx
index 02d78f0..731161b 100644
--- a/svx/inc/svx/svddrgv.hxx
+++ b/svx/inc/svx/svddrgv.hxx
@@ -64,7 +64,7 @@ protected:
SdrDragMethod* mpCurrentSdrDragMethod;
SdrUndoGeoObj* pInsPointUndo;
Rectangle aDragLimit;
- XubString aInsPointUndoStr;
+ rtl::OUString aInsPointUndoStr;
SdrMarkList aFollowingEdges; // If nodes are dragged, all edges should follow as Xor
SdrHdlKind eDragHdl;
commit fb6ad98ef412571599280bd8df550c401cca1bc6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 3 23:09:15 2012 +0100
drop intermediate XubString
Change-Id: I91ae7e9df90bde89f0a3f4b931c1ab150d31a3dc
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index c5b0b2c..9efd6fd 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -143,15 +143,16 @@ namespace dbp
OSL_VERIFY( rContext.xForm->getPropertyValue( ::rtl::OUString("CommandType") ) >>= nCommandType );
// search the entry of the given type with the given name
- XubString sLookup( sCommand );
for ( sal_uInt16 nLookup = 0; nLookup < m_aTable.GetEntryCount(); ++nLookup )
{
- if ( m_aTable.GetEntry( nLookup ) == sLookup )
+ if (sCommand.equals(m_aTable.GetEntry(nLookup)))
+ {
if ( reinterpret_cast< sal_IntPtr >( m_aTable.GetEntryData( nLookup ) ) == nCommandType )
{
m_aTable.SelectEntryPos( nLookup );
break;
}
+ }
}
}
catch(const Exception&)
commit b640c63086495a6216ad2a63f2219380cbfb5dff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 3 21:02:37 2012 +0100
at one stage we had checkmarks *and* icons in menus side by side
later on we ended up with toggleable icons instead, change
comment to reflect the current situation
Change-Id: Ia39f6bffe8e5942442482b1f845d2964138ec032
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 2987267..2779b37 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2348,19 +2348,14 @@ void Menu::ImplRemoveDel( ImplMenuDelData& rDel )
Size Menu::ImplCalcSize( Window* pWin )
{
- // | Checked| Image| Text| Accel/Popup|
+ // | Check/Radio/Image| Text| Accel/Popup|
// for symbols: nFontHeight x nFontHeight
long nFontHeight = pWin->GetTextHeight();
long nExtra = nFontHeight/4;
-
- Size aSz;
- Size aMaxImgSz;
- long nMaxWidth = 0;
long nMinMenuItemHeight = nFontHeight;
long nCheckHeight = 0, nRadioHeight = 0;
- long nCheckWidth = 0;
Size aMaxSize = ImplGetNativeCheckAndRadioSize(pWin, nCheckHeight, nRadioHeight);
if( aMaxSize.Height() > nMinMenuItemHeight )
nMinMenuItemHeight = aMaxSize.Height();
@@ -2369,6 +2364,8 @@ Size Menu::ImplCalcSize( Window* pWin )
// have to add some extra space even in the MENU_FLAG_SHOWCHECKIMAGES case
bool bSpaceForCheckbox = ( aMaxSize.Height() == 0 );
+ Size aMaxImgSz;
+
const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
{
@@ -2395,6 +2392,10 @@ Size Menu::ImplCalcSize( Window* pWin )
}
}
+ Size aSz;
+ long nCheckWidth = 0;
+ long nMaxWidth = 0;
+
for ( size_t n = pItemList->size(); n; )
{
MenuItemData* pData = pItemList->GetDataFromPos( --n );
commit 84770240ee911393eb3e29f446e7c324843c5c6c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 3 20:59:02 2012 +0100
nCheckPos and nImagePos are always the same value, merge together
Change-Id: I41bf6eada1fbeaa9548f81b3bf4fd9d4f4f6871a
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 97dd29c..60bd029 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -158,8 +158,7 @@ private:
sal_uInt16 nSelectedId;
// Fuer Ausgabe:
- sal_uInt16 nCheckPos;
- sal_uInt16 nImagePos;
+ sal_uInt16 nImgOrChkPos;
sal_uInt16 nTextPos;
sal_Bool bIsMenuBar : 1, // Handelt es sich um den MenuBar
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index cb7781d..2987267 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2501,22 +2501,20 @@ Size Menu::ImplCalcSize( Window* pWin )
nMaxWidth = nScreenWidth/2;
sal_uInt16 gfxExtra = (sal_uInt16) Max( nExtra, 7L ); // #107710# increase space between checkmarks/images/text
- nCheckPos = (sal_uInt16)nExtra;
+ nImgOrChkPos = (sal_uInt16)nExtra;
if ( ( nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES ) || bSpaceForCheckbox )
{
long nImgOrChkWidth = 0;
- nImagePos = nCheckPos;
if( aMaxSize.Height() > 0 ) // NWF case
nImgOrChkWidth = aMaxSize.Height() + nExtra;
else // non NWF case
nImgOrChkWidth = nFontHeight/2 + gfxExtra;
nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
- nTextPos = (sal_uInt16)(nImagePos + nImgOrChkWidth);
+ nTextPos = (sal_uInt16)(nImgOrChkPos + nImgOrChkWidth);
}
else
{
- nImagePos = nCheckPos;
- nTextPos = (sal_uInt16)(nImagePos + Max( aMaxImgSz.Width(), nCheckWidth ));
+ nTextPos = (sal_uInt16)(nImgOrChkPos + Max( aMaxImgSz.Width(), nCheckWidth ));
}
nTextPos = nTextPos + gfxExtra;
@@ -2732,7 +2730,7 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
}
}
- Rectangle aOuterCheckRect( Point( aPos.X()+nCheckPos, aPos.Y() ), Size( pData->aSz.Height(), pData->aSz.Height() ) );
+ Rectangle aOuterCheckRect( Point( aPos.X()+nImgOrChkPos, aPos.Y() ), Size( pData->aSz.Height(), pData->aSz.Height() ) );
aOuterCheckRect.Left() += 1;
aOuterCheckRect.Right() -= 1;
aOuterCheckRect.Top() += 1;
commit 8b13d9a0cd76b04631db5b901ae433aecb955c30
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 2 17:07:56 2012 +0100
fix mangled indent
Change-Id: I57d0a16ed698b406cb7362a3382698fcd5bf21b2
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 4dfe615..cb7781d 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2943,11 +2943,11 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
{
// This restores the normal menu or menu bar text
// color for when it is no longer highlighted.
- if ( bIsMenuBar )
- pWin->SetTextColor( rSettings.GetMenuBarTextColor() );
- else
- pWin->SetTextColor( rSettings.GetMenuTextColor() );
- }
+ if ( bIsMenuBar )
+ pWin->SetTextColor( rSettings.GetMenuBarTextColor() );
+ else
+ pWin->SetTextColor( rSettings.GetMenuTextColor() );
+ }
}
if( bLayout )
{
commit 5366ca39cba57c2e994c8988c21ac05a905483f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 2 17:05:06 2012 +0100
make ImplGetNativeCheckAndRadioSize return max size
rather than just max height with max width smuggled out as a confusing extra
third argument
Change-Id: Id37ec4f679e5668715d5db0bc8875a27c8b2fb3c
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 87ae47b..97dd29c 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -195,9 +195,9 @@ protected:
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
SAL_DLLPRIVATE const XubString& ImplGetHelpText( sal_uInt16 nItemId ) const;
- // returns native check and option menu symbol height;
- // return value is Max( rCheckHeight, rRadioHeight )
- SAL_DLLPRIVATE long ImplGetNativeCheckAndRadioSize( Window*, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) const;
+ // returns native check and option menu symbol height in rCheckHeight and rRadioHeight
+ // return value is maximum width and height of checkboxes and radiobuttons
+ SAL_DLLPRIVATE Size ImplGetNativeCheckAndRadioSize( Window*, long& rCheckHeight, long& rRadioHeight ) const;
// returns native submenu arrow size and spacing from right border
// return value is whether it's supported natively
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 028a3ef..4dfe615 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2231,9 +2231,10 @@ void Menu::SetAccessible( const ::com::sun::star::uno::Reference< ::com::sun::st
mxAccessible = rxAccessible;
}
-long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, long& rRadioHeight, long &rMaxWidth ) const
+Size Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, long& rRadioHeight ) const
{
- rMaxWidth = rCheckHeight = rRadioHeight = 0;
+ long nCheckWidth = 0, nRadioWidth = 0;
+ rCheckHeight = rRadioHeight = 0;
if( ! bIsMenuBar )
{
@@ -2255,7 +2256,7 @@ long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
)
{
rCheckHeight = aNativeBounds.GetHeight();
- rMaxWidth = aNativeContent.GetWidth();
+ nCheckWidth = aNativeBounds.GetWidth();
}
}
if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM_RADIO_MARK ) )
@@ -2271,11 +2272,11 @@ long Menu::ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lon
)
{
rRadioHeight = aNativeBounds.GetHeight();
- rMaxWidth = Max (rMaxWidth, aNativeContent.GetWidth());
+ nRadioWidth = aNativeBounds.GetWidth();
}
}
}
- return (rCheckHeight > rRadioHeight) ? rCheckHeight : rRadioHeight;
+ return Size(Max(nCheckWidth, nRadioWidth), Max(rCheckHeight, rRadioHeight));
}
sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const
@@ -2359,14 +2360,14 @@ Size Menu::ImplCalcSize( Window* pWin )
long nMaxWidth = 0;
long nMinMenuItemHeight = nFontHeight;
long nCheckHeight = 0, nRadioHeight = 0;
- long nCheckWidth = 0, nMaxCheckWidth = 0;
- long nMaxHeight = ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth );
- if( nMaxHeight > nMinMenuItemHeight )
- nMinMenuItemHeight = nMaxHeight;
+ long nCheckWidth = 0;
+ Size aMaxSize = ImplGetNativeCheckAndRadioSize(pWin, nCheckHeight, nRadioHeight);
+ if( aMaxSize.Height() > nMinMenuItemHeight )
+ nMinMenuItemHeight = aMaxSize.Height();
// When no native rendering of the checkbox & no image in the menu, we
// have to add some extra space even in the MENU_FLAG_SHOWCHECKIMAGES case
- bool bSpaceForCheckbox = ( nMaxHeight == 0 );
+ bool bSpaceForCheckbox = ( aMaxSize.Height() == 0 );
const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
@@ -2429,7 +2430,7 @@ Size Menu::ImplCalcSize( Window* pWin )
// Check Buttons:
if ( !bIsMenuBar && pData->HasCheck() )
{
- nCheckWidth = nMaxCheckWidth;
+ nCheckWidth = aMaxSize.Width();
if ( ( nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES ) || bSpaceForCheckbox )
{
// checks / images take the same place
@@ -2505,8 +2506,8 @@ Size Menu::ImplCalcSize( Window* pWin )
{
long nImgOrChkWidth = 0;
nImagePos = nCheckPos;
- if( nMaxHeight > 0 ) // NWF case
- nImgOrChkWidth = nMaxHeight + nExtra;
+ if( aMaxSize.Height() > 0 ) // NWF case
+ nImgOrChkWidth = aMaxSize.Height() + nExtra;
else // non NWF case
nImgOrChkWidth = nFontHeight/2 + gfxExtra;
nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
@@ -2617,8 +2618,8 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
long nFontHeight = pWin->GetTextHeight();
long nExtra = nFontHeight/4;
- long nCheckHeight = 0, nRadioHeight = 0, nMaxCheckWidth = 0;
- ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth );
+ long nCheckHeight = 0, nRadioHeight = 0;
+ ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight );
DecorationView aDecoView( pWin );
const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings();
commit e586009e2c9356bacc4c9282e044f1c1b63e7601
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 2 16:47:14 2012 +0100
nMax here is a height value
Change-Id: Ia1c12f29840dcb2f3f5a5d654a368ddc11554ab2
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 78cc8ba..028a3ef 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2360,13 +2360,13 @@ Size Menu::ImplCalcSize( Window* pWin )
long nMinMenuItemHeight = nFontHeight;
long nCheckHeight = 0, nRadioHeight = 0;
long nCheckWidth = 0, nMaxCheckWidth = 0;
- long nMax = ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth );
- if( nMax > nMinMenuItemHeight )
- nMinMenuItemHeight = nMax;
+ long nMaxHeight = ImplGetNativeCheckAndRadioSize( pWin, nCheckHeight, nRadioHeight, nMaxCheckWidth );
+ if( nMaxHeight > nMinMenuItemHeight )
+ nMinMenuItemHeight = nMaxHeight;
// When no native rendering of the checkbox & no image in the menu, we
// have to add some extra space even in the MENU_FLAG_SHOWCHECKIMAGES case
- bool bSpaceForCheckbox = ( nMax == 0 );
+ bool bSpaceForCheckbox = ( nMaxHeight == 0 );
const StyleSettings& rSettings = pWin->GetSettings().GetStyleSettings();
if ( rSettings.GetUseImagesInMenus() )
@@ -2505,8 +2505,8 @@ Size Menu::ImplCalcSize( Window* pWin )
{
long nImgOrChkWidth = 0;
nImagePos = nCheckPos;
- if( nMax > 0 ) // NWF case
- nImgOrChkWidth = nMax + nExtra;
+ if( nMaxHeight > 0 ) // NWF case
+ nImgOrChkWidth = nMaxHeight + nExtra;
else // non NWF case
nImgOrChkWidth = nFontHeight/2 + gfxExtra;
nImgOrChkWidth = Max( nImgOrChkWidth, aMaxImgSz.Width() + gfxExtra );
More information about the Libreoffice-commits
mailing list