[Libreoffice-commits] core.git: Branch 'feature/slidehack' - 2 commits - sd/source vcl/inc vcl/source
Thorsten Behrens
tbehrens at suse.com
Fri Apr 12 05:39:46 PDT 2013
sd/source/ui/dlg/GroupSlidesDialog.cxx | 10 +++---
sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 10 ++----
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 16 +++++------
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 16 +++++------
vcl/inc/graphite_layout.hxx | 1
vcl/source/glyphs/graphite_layout.cxx | 23 +---------------
6 files changed, 27 insertions(+), 49 deletions(-)
New commits:
commit ddfae02796f98ff1889f77a232cf459aaa9e2ea4
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Fri Apr 12 14:38:51 2013 +0200
Change fprintf -> SAL_DEBUG
Let's not forget to remove that before merge.
diff --git a/sd/source/ui/dlg/GroupSlidesDialog.cxx b/sd/source/ui/dlg/GroupSlidesDialog.cxx
index 0771d5a..a396913 100644
--- a/sd/source/ui/dlg/GroupSlidesDialog.cxx
+++ b/sd/source/ui/dlg/GroupSlidesDialog.cxx
@@ -79,7 +79,7 @@ SdGroupSlidesDialog::~SdGroupSlidesDialog()
IMPL_LINK_NOARG(SdGroupSlidesDialog, AddHdl)
{
- fprintf(stderr, "Add to group\n");
+ SAL_DEBUG("Add to group");
EndDialog(0);
return 0;
}
@@ -89,14 +89,14 @@ int SdGroupSlidesDialog::endDialog( bool bSuccessSoSave )
if ( bSuccessSoSave )
{
sal_uInt16 nSelected = mpGroupCombo->GetSelectEntryPos();
- fprintf( stderr, "complete: %d\n", (int) nSelected );
+ SAL_DEBUG("complete: " << (int) nSelected );
if ( nSelected < maGroups.size() )
{
- fprintf( stderr, "one selected\n" );
+ SAL_DEBUG("one selected");
}
else
{
- fprintf( stderr, "new group\n" );
+ SAL_DEBUG("new group");
}
}
@@ -120,7 +120,7 @@ IMPL_LINK_NOARG( SdGroupSlidesDialog, GroupSelectHdl )
{
sal_uInt16 nSelected = mpGroupCombo->GetSelectEntryPos();
OSL_ASSERT( nSelected < maGroups.size() );
- fprintf( stderr, "select hdl %d\n", (int) nSelected );
+ SAL_DEBUG("select hdl " << (int) nSelected );
populateEdits( maGroups[ nSelected ] );
return 0;
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index a500dee..4d177c6 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -84,6 +84,7 @@
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
#include <boost/bind.hpp>
@@ -657,7 +658,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
if (rSet.GetItemState(SID_GROUP_SLIDES) == SFX_ITEM_AVAILABLE
|| rSet.GetItemState(SID_UNGROUP_SLIDES) == SFX_ITEM_AVAILABLE)
{
- fprintf(stderr, "Determine if we can show group vs. un-group\n");
+ SAL_DEBUG("Determine if we can show group vs. un-group");
}
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
@@ -1272,10 +1273,7 @@ SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet)
void SlotManager::GroupSlides()
{
- PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
- View* pDrView = &mrSlideSorter.GetView();
-
- fprintf (stderr, "Execute -group\n");
+ SAL_DEBUG("Execute -group");
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
@@ -1303,7 +1301,7 @@ void SlotManager::GroupSlides()
void SlotManager::UnGroupSlides()
{
- fprintf (stderr, "Execute un-group\n");
+ SAL_DEBUG("Execute un-group");
}
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 4444e59..66f75d9 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -701,7 +701,7 @@ SlideJockeyViewShell::~SlideJockeyViewShell()
{
// FIXME: need to delete this early - it holds references on random widgets.
mpSlideSorter.reset();
- fprintf(stderr, "Delete slide jockey %p\n", this);
+ SAL_DEBUG("Delete slide jockey " << this);
}
::boost::shared_ptr<SlideJockeyViewShell> SlideJockeyViewShell::Create (
@@ -744,9 +744,9 @@ public:
}
virtual void setAllocation(const Size& rAllocation)
{
- fprintf(stderr, "setAllocation %d,%d %dx%d\n",
- (int)GetPosPixel().X(), (int)GetPosPixel().Y(),
- (int)rAllocation.Width(), (int)rAllocation.Height());
+ SAL_DEBUG("setAllocation " << (int)GetPosPixel().X() << "," <<
+ (int)GetPosPixel().Y() << " " << (int)rAllocation.Width()
+ << "x" << (int)rAllocation.Height());
mpSlideSorter->ArrangeGUIElements(GetPosPixel(), rAllocation);
@@ -764,7 +764,7 @@ public:
virtual void Paint( const Rectangle& rRect )
{ // for reasons unknown the background is not painted at all here [!]
// who should do that ?
- fprintf(stderr,"SlideSortercontainer::Paint ...\n");
+ SAL_DEBUG("SlideSortercontainer::Paint ...");
Erase();
VclBin::Paint( rRect );
}
@@ -776,7 +776,7 @@ public:
void SlideJockeyViewShell::Initialize (void)
{
- fprintf( stderr, "Create custom slide jockey layout\n" );
+ SAL_DEBUG("Create custom slide jockey layout");
// FIXME: I need to write a layout enabled GtkPaned replacement
// using a splitter manually is just -too- bad ...
@@ -829,8 +829,8 @@ void SlideJockeyViewShell::ArrangeGUIElements (void)
{
if (IsActive())
{
- fprintf(stderr, "Arrange elements size %d %d\n",
- (int) maViewSize.Width(), (int)maViewSize.Height() );
+ SAL_DEBUG("Arrange elements size " << (int) maViewSize.Width()
+ << " " << (int)maViewSize.Height());
OSL_ASSERT(mpSlideSorter.get()!=NULL);
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index fecd7d7..1bbe97b 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -523,9 +523,9 @@ void SlideSorterView::DeterminePageObjectVisibilities (void)
mbPageObjectVisibilitiesValid = true;
Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel())));
- fprintf(stderr ,"SlideSorterView::DeterminePageObjectvisi %ld,%ld %ldx%ld\n",
- aViewArea.getX(), aViewArea.getY(),
- aViewArea.getWidth(), aViewArea.getHeight());
+ SAL_DEBUG("SlideSorterView::DeterminePageObjectvisi " <<
+ aViewArea.getX() << "," << aViewArea.getY() << " " <<
+ aViewArea.getWidth() << "," << aViewArea.getHeight());
const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea));
const Range aUnion(
::std::min(maVisiblePageRange.Min(), aRange.Min()),
@@ -760,14 +760,14 @@ void SlideSorterView::Paint (
OutputDevice& rDevice,
const Rectangle& rRepaintArea)
{
- fprintf(stderr ,"SlideSorterView::Paint %ld,%ld %ldx%ld\n",
- rRepaintArea.getX(), rRepaintArea.getY(),
- rRepaintArea.getWidth(), rRepaintArea.getHeight());
+ SAL_DEBUG("SlideSorterView::Paint " <<
+ rRepaintArea.getX() << "," << rRepaintArea.getY() << " "
+ << rRepaintArea.getWidth() << "," << rRepaintArea.getHeight());
if ( ! mpPageObjectPainter)
if ( ! GetPageObjectPainter())
{
- fprintf(stderr, "bail early !\n");
+ SAL_DEBUG("bail early !");
return;
}
@@ -784,7 +784,7 @@ void SlideSorterView::Paint (
// Paint all page objects that are fully or partially inside the
// repaint region.
const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(rRepaintArea));
- fprintf(stderr, "Visible slides are: %d -> %d\n", (int) aRange.Min(), (int)aRange.Max());
+ SAL_DEBUG("Visible slides are: " << (int) aRange.Min() << " -> " << (int)aRange.Max());
for (sal_Int32 nIndex=aRange.Min(); nIndex<=aRange.Max(); ++nIndex)
{
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
commit 46e91abb95a7eeb4136912419d42a69e5acdf0dd
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Mon Apr 8 16:59:48 2013 +0200
Revert "fix fdo#60534 : use DefaultCharMapper::mapChar() to map RTL string unicodes."
This reverts commit 83d9c5562c27b5f766157eba70bebd320463a0af.
diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx
index fa6d25c..bbf6f15 100644
--- a/vcl/inc/graphite_layout.hxx
+++ b/vcl/inc/graphite_layout.hxx
@@ -97,7 +97,6 @@ public:
private:
const gr_face * mpFace; // not owned by layout
gr_font * mpFont; // not owned by layout
- sal_Unicode * mpStr;
int mnSegCharOffset; // relative to ImplLayoutArgs::mpStr
long mnWidth;
std::vector<int> mvChar2BaseGlyph;
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 3e3c329..8b19c31 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -48,7 +48,6 @@
#include <unicode/ubidi.h>
#include <unicode/uscript.h>
-#include <layout/DefaultCharMapper.h>
// Graphite Libraries (must be after vcl headers on windows)
#include <graphite2/Segment.h>
@@ -491,7 +490,6 @@ GraphiteLayout::GraphiteLayout(const gr_face * face, gr_font * font,
const grutils::GrFeatureParser * pFeatures) throw()
: mpFace(face),
mpFont(font),
- mpStr(NULL),
mnWidth(0),
mfScaling(1.0),
mpFeatures(pFeatures)
@@ -503,7 +501,6 @@ GraphiteLayout::~GraphiteLayout() throw()
{
clear();
// the features and font are owned by the platform layers
- delete[] mpStr;
mpFeatures = NULL;
mpFont = NULL;
}
@@ -594,28 +591,12 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
}
size_t numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset,
rArgs.mpStr + (rArgs.mnLength > limit + 64 ? limit + 64 : rArgs.mnLength), NULL);
-
- mpStr = new sal_Unicode[rArgs.mnLength+1];
- if(mpStr)
- memcpy(mpStr, rArgs.mpStr, (rArgs.mnLength+1)*2);
-
- if (bRtl && mpStr)
- {
- DefaultCharMapper cmap(true, bRtl);
- int i=0;
- while(rArgs.mpStr[i])
- {
- mpStr[i]=(sal_Unicode) cmap.mapChar((sal_uInt32)rArgs.mpStr[i]);
- i++;
- }
- }
-
if (mpFeatures)
pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16,
- mpStr + mnSegCharOffset, numchars, bRtl);
+ rArgs.mpStr + mnSegCharOffset, numchars, bRtl);
else
pSegment = gr_make_seg(mpFont, mpFace, 0, NULL, gr_utf16,
- mpStr + mnSegCharOffset, numchars, bRtl);
+ rArgs.mpStr + mnSegCharOffset, numchars, bRtl);
//pSegment = new gr::RangeSegment((gr::Font *)&mrFont, mpTextSrc, &maLayout, mnMinCharPos, limit);
if (pSegment != NULL)
More information about the Libreoffice-commits
mailing list