Kaydet (Commit) 4c67df15 authored tarafından Noel Grandin's avatar Noel Grandin

out of line some heavily repeated functions

Change-Id: Icd9f7ebab89d6c2b166b6f42fd7682e89127fd51
Reviewed-on: https://gerrit.libreoffice.org/68903
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst bd4d7020
#!/usr/bin/python
#
# Find the top 100 functions that are repeated in multiple .o files, so we can out-of-line those
#
#
import subprocess
from collections import defaultdict
# the odd bash construction here is because some of the .o files returned by find are not object files
# and I don't want xargs to stop when it hits an error
a = subprocess.Popen("find instdir/program/ -name *.so | xargs echo nm --radix=d --size-sort --demangle | bash", stdout=subprocess.PIPE, shell=True)
#xargs sh -c "somecommand || true"
nameDict = defaultdict(int)
with a.stdout as txt:
for line in txt:
line = line.strip()
idx1 = line.find(" ")
idx2 = line.find(" ", idx1 + 1)
name = line[idx2:]
nameDict[name] += 1
sizeDict = defaultdict(set)
for k, v in nameDict.iteritems():
sizeDict[v].add(k)
cnt = 0
for k in sorted(list(sizeDict), reverse=True):
print k
for v in sizeDict[k]:
print v
cnt += 1
if cnt > 100 : break
#first = sorted(list(sizeDict))[-1]
#print first
#include/vcl/ITiledRenderable.hxx
# why is gaLOKPointerMap declared inside this header?
......@@ -561,6 +561,8 @@ LanguageTag::LanguageTag( const rtl_Locale & rLocale )
convertFromRtlLocale();
}
LanguageTag::~LanguageTag() {}
LanguageTag::ImplPtr LanguageTagImpl::registerOnTheFly( LanguageType nRegisterID )
{
LanguageTag::ImplPtr pImpl;
......
......@@ -107,6 +107,8 @@ public:
*/
explicit LanguageTag( const rtl_Locale & rLocale );
~LanguageTag();
/** Obtain BCP 47 language tag.
@param bResolveSystem
......
......@@ -31,56 +31,7 @@ namespace vcl
* by css, it might turn out to be worth mapping some of these missing cursors
* to available cursors?
*/
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning( disable : 4592)
#endif
static const std::map <PointerStyle, OString> gaLOKPointerMap {
{ PointerStyle::Arrow, "default" },
// PointerStyle::Null ?
{ PointerStyle::Wait, "wait" },
{ PointerStyle::Text, "text" },
{ PointerStyle::Help, "help" },
{ PointerStyle::Cross, "crosshair" },
{ PointerStyle::Fill, "fill" },
{ PointerStyle::Move, "move" },
{ PointerStyle::NSize, "n-resize" },
{ PointerStyle::SSize, "s-resize" },
{ PointerStyle::WSize, "w-resize" },
{ PointerStyle::ESize, "e-resize" },
{ PointerStyle::NWSize, "ne-resize" },
{ PointerStyle::NESize, "ne-resize" },
{ PointerStyle::SWSize, "sw-resize" },
{ PointerStyle::SESize, "se-resize" },
// WindowNSize through WindowSESize
{ PointerStyle::HSplit, "col-resize" },
{ PointerStyle::VSplit, "row-resize" },
{ PointerStyle::HSizeBar, "col-resize" },
{ PointerStyle::VSizeBar, "row-resize" },
{ PointerStyle::Hand, "grab" },
{ PointerStyle::RefHand, "pointer" },
// Pen, Magnify, Fill, Rotate
// HShear, VShear
// Mirror, Crook, Crop, MovePoint, MoveBezierWeight
// MoveData
{ PointerStyle::CopyData, "copy" },
{ PointerStyle::LinkData, "alias" },
// MoveDataLink, CopyDataLink
//MoveFile, CopyFile, LinkFile
// MoveFileLink, CopyFileLink, MoveFiless, CopyFiles
{ PointerStyle::NotAllowed, "not-allowed" },
// DrawLine through DrawCaption
// Chart, Detective, PivotCol, PivotRow, PivotField, Chain, ChainNotAllowed
// TimeEventMove, TimeEventSize
// AutoScrollN through AutoScrollNSWE
// Airbrush
{ PointerStyle::TextVertical, "vertical-text" }
// Pivot Delete, TabSelectS through TabSelectSW
// PaintBrush, HideWhiteSpace, ShowWhiteSpace
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
extern const std::map <PointerStyle, OString> gaLOKPointerMap;
class VCL_DLLPUBLIC ITiledRenderable
......
......@@ -13,6 +13,66 @@
namespace vcl
{
/*
* Map directly to css cursor styles to avoid further mapping in the client.
* Gtk (via gdk_cursor_new_from_name) also supports the same css cursor styles.
*
* This was created partially with help of the mappings in gtkdata.cxx.
* The list is incomplete as some cursor style simply aren't supported
* by css, it might turn out to be worth mapping some of these missing cursors
* to available cursors?
*/
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning( disable : 4592)
#endif
const std::map <PointerStyle, OString> gaLOKPointerMap {
{ PointerStyle::Arrow, "default" },
// PointerStyle::Null ?
{ PointerStyle::Wait, "wait" },
{ PointerStyle::Text, "text" },
{ PointerStyle::Help, "help" },
{ PointerStyle::Cross, "crosshair" },
{ PointerStyle::Fill, "fill" },
{ PointerStyle::Move, "move" },
{ PointerStyle::NSize, "n-resize" },
{ PointerStyle::SSize, "s-resize" },
{ PointerStyle::WSize, "w-resize" },
{ PointerStyle::ESize, "e-resize" },
{ PointerStyle::NWSize, "ne-resize" },
{ PointerStyle::NESize, "ne-resize" },
{ PointerStyle::SWSize, "sw-resize" },
{ PointerStyle::SESize, "se-resize" },
// WindowNSize through WindowSESize
{ PointerStyle::HSplit, "col-resize" },
{ PointerStyle::VSplit, "row-resize" },
{ PointerStyle::HSizeBar, "col-resize" },
{ PointerStyle::VSizeBar, "row-resize" },
{ PointerStyle::Hand, "grab" },
{ PointerStyle::RefHand, "pointer" },
// Pen, Magnify, Fill, Rotate
// HShear, VShear
// Mirror, Crook, Crop, MovePoint, MoveBezierWeight
// MoveData
{ PointerStyle::CopyData, "copy" },
{ PointerStyle::LinkData, "alias" },
// MoveDataLink, CopyDataLink
//MoveFile, CopyFile, LinkFile
// MoveFileLink, CopyFileLink, MoveFiless, CopyFiles
{ PointerStyle::NotAllowed, "not-allowed" },
// DrawLine through DrawCaption
// Chart, Detective, PivotCol, PivotRow, PivotField, Chain, ChainNotAllowed
// TimeEventMove, TimeEventSize
// AutoScrollN through AutoScrollNSWE
// Airbrush
{ PointerStyle::TextVertical, "vertical-text" }
// Pivot Delete, TabSelectS through TabSelectSW
// PaintBrush, HideWhiteSpace, ShowWhiteSpace
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
ITiledRenderable::~ITiledRenderable()
{
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment